Skip to content

Commit 6768012

Browse files
committed
Use external libssh2 instead of the bundled one
1 parent 4de3e4b commit 6768012

10 files changed

+41
-1470
lines changed

INSTALL

+11-5
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ You will need:
1919
- wxGTK 2.8.x from http://www.wxwidgets.org/
2020
- libxml2 2.6.18 or above from http://www.xmlsoft.org/
2121
- libxslt 1.1.x or above from http://www.xmlsoft.org/
22+
- libssh2 1.10.0 or above from http://www.libssh2.org/
2223
- PostgreSQL 8.4 or above from http://www.postgresql.org/
2324
- Sphinx 1.0 or above from http://sphinx.pocoo.org/
2425

2526
Building:
2627

27-
1) Install libxml2 and libxslt if they are not already present on your system,
28+
1) Install libssh2, libxml2 and libxslt if they are not already present on your system,
2829
per the instructions included with them.
2930

3031
2) Install PostgreSQL per the instructions included. It is recommended that you
@@ -75,12 +76,13 @@ You will need:
7576
- wxMac 2.8.x from http://www.wxwidgets.org/
7677
- libxml2 2.6.18 or above from http://www.xmlsoft.org/
7778
- libxslt 1.1.x or above from http://www.xmlsoft.org/
79+
- libssh2 1.10.0 or above from http://www.libssh2.org/
7880
- PostgreSQL 8.4 or above from http://www.postgresql.org/
7981
- Sphinx 1.0 or above from http://sphinx.pocoo.org/
8082

8183
Building:
8284

83-
1) Install libxml2 and libxslt per the instructions included with them into a
85+
1) Install libssh2, libxml2 and libxslt per the instructions included with them into a
8486
non-system location. The default versions included with OS X Panther and
8587
Tiger are too old and will not work correctly with pgAdmin.
8688

@@ -148,6 +150,7 @@ You will need:
148150
- Release DLLs
149151
If you want to build the documentation and/or the installer you additionally
150152
need the package "Source Code".
153+
- libssh2 1.10.0 or above from https://www.libssh2.org/
151154
- PostgreSQL 9.2.24 (binary distribution) from http://www.postgresql.org/
152155
- PostgreSQL 10.19 or later (binary distribution) from http://www.postgresql.org/
153156
- Sphinx 1.0 or above from http://sphinx.pocoo.org/
@@ -170,12 +173,15 @@ Building:
170173
3) Install PostgreSQL 9.2.24 to a convenient location pointed to by the %PGDIR%
171174
environment variable.
172175

173-
4) Unpack the pgAdmin source code to a convenient location.
176+
4) Unpack, compile and install libssh2 to a convenient location pointed to by the
177+
%LIBSSH2DIR% environment variable.
174178

175-
5) Start Visual C++ and load the pgAdmin solution file. Build the required
179+
5) Unpack the pgAdmin source code to a convenient location.
180+
181+
6) Start Visual C++ and load the pgAdmin solution file. Build the required
176182
targets.
177183

178-
6) To run the resulting executable, you'll need to copy all of the
184+
7) To run the resulting executable, you'll need to copy all of the
179185
prerequisite DLLs from the wxWidgets and PostgreSQL installations into the
180186
directory where the EXE file is located, or have those directories in your
181187
path.

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888
# * -z2 - Unix style line endings
8989
# Also add the -n to make it not save .orig files (we have git for that)
9090
style:
91-
astyle -n -p --style=allman -S -t4 -k3 -z2 `find . -name "*.cpp" -o -name "*.h" | egrep -v "(wx-build|xrcDialogs|pgadmin/libssh2|pgadmin/include/libssh2)"`
91+
astyle -n -p --style=allman -S -t4 -k3 -z2 `find . -name "*.cpp" -o -name "*.h" | egrep -v "(wx-build|xrcDialogs)"`
9292

9393
# Create HTML docs
9494
doc:

configure.ac.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ AC_CHECK_HEADERS([errno.h fcntl.h stdio.h unistd.h sys/uio.h])
2626
AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/ioctl.h sys/time.h])
2727
AC_CHECK_HEADERS([sys/un.h], [have_sys_un_h=yes], [have_sys_un_h=no])
2828
AM_CONDITIONAL([HAVE_SYS_UN_H], test "x$have_sys_un_h" = xyes)
29-
AC_CONFIG_HEADERS([pgadmin/include/libssh2/libssh2_config.h])
3029

3130
# Checks for typedefs, structures, and compiler characteristics.
3231
AC_HEADER_STDBOOL
@@ -69,6 +68,8 @@ CHECK_LIBXML2
6968
LOCATE_LIBXSLT
7069
SETUP_LIBXSLT
7170

71+
AC_CHECK_LIB([ssh2], [libssh2_session_init_ex], , [AC_MSG_ERROR([Couldn't find libssh2!])])
72+
7273
# Configure parameters
7374
AC_ARG_WITH(libgcrypt,
7475
AC_HELP_STRING([--with-libgcrypt],[Use Libgcrypt for crypto]),

pgadmin/Makefile.am

-9
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ include gqb/module.mk
4949
include hotdraw/module.mk
5050
include ui/module.mk
5151
include utils/module.mk
52-
include libssh2/module.mk
5352

5453
if SUN_CC
5554
__CFLAGS=""
@@ -80,11 +79,7 @@ nobase_dist_pkgdata_DATA += \
8079
$(TMP_ui)
8180
endif
8281

83-
if BUILD_SSH_TUNNEL
84-
AM_CPPFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -I$(top_srcdir)/pgadmin/include -I$(top_srcdir)/pgadmin/include/libssh2 $(__CPPFLAGS) $(__EDB_LIBPQ)
85-
else
8682
AM_CPPFLAGS = -DDATA_DIR=\"$(pkgdatadir)/\" -I$(top_srcdir)/pgadmin/include $(__CPPFLAGS) $(__EDB_LIBPQ)
87-
endif
8883

8984
# Automake trys to execute install-exec-hook if it appears anywhere in the file, so we need a dummy
9085
# for non-APPBUNDLE cases.
@@ -100,11 +95,7 @@ nobase_dist_data_DATA += \
10095
$(TMP_ui)
10196
endif
10297

103-
if BUILD_SSH_TUNNEL
104-
AM_CPPFLAGS = -I$(top_srcdir)/pgadmin/include -I$(top_srcdir)/pgadmin/include/libssh2 $(__CPPFLAGS) $(__EDB_LIBPQ)
105-
else
10698
AM_CPPFLAGS = -I$(top_srcdir)/pgadmin/include $(__CPPFLAGS) $(__EDB_LIBPQ)
107-
endif
10899

109100
install-exec-hook:
110101
cd $(bindir) ;\

pgadmin/include/module.mk

-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ include include/gqb/module.mk
3636
include include/hotdraw/module.mk
3737
include include/utils/module.mk
3838
include include/ogl/module.mk
39-
include include/libssh2/module.mk
4039

0 commit comments

Comments
 (0)