This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
configure.ac.in
164 lines (141 loc) · 4.52 KB
/
configure.ac.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
AC_PREREQ(2.57)
AC_REVISION($Revision: 4719 $)
AC_COPYRIGHT(Copyright 2002 - 2016 The pgAdmin Development Team)
AC_INIT(pgadmin3, PGADMIN_LONG_VERSION, pgadmin-support@postgresql.org)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR([pgadmin/pgAdmin3.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([tar-ustar])
AC_PREFIX_DEFAULT([/usr/local/pgadmin3])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_RANLIB
CHECK_CPP_COMPILER
CHECK_SUN_COMPILER
AM_CONDITIONAL([SUN_CC], [test x$SUN_CC_COMPILER = xyes])
AM_CONDITIONAL([SUN_CXX], [test x$SUN_CXX_COMPILER = xyes])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h])
AC_CHECK_HEADERS([errno.h fcntl.h stdio.h unistd.h sys/uio.h])
AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/ioctl.h sys/time.h])
AC_CHECK_HEADERS([sys/un.h], [have_sys_un_h=yes], [have_sys_un_h=no])
AM_CONDITIONAL([HAVE_SYS_UN_H], test "x$have_sys_un_h" = xyes)
AC_CONFIG_HEADERS([pgadmin/include/libssh2/libssh2_config.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_STRTOD
AC_CHECK_FUNCS([gethostbyname inet_ntoa memmove memset strchr])
# Custom checks
ENABLE_DEBUG
ENABLE_STATIC
ENABLE_APPBUNDLE
ENABLE_DATABASEDESIGNER
AM_CONDITIONAL([APPBUNDLE], [test x$BUILD_APPBUNDLE = xyes])
AM_CONDITIONAL([BUILD_DEBUG], [test x$BUILD_DEBUG = xyes])
AM_CONDITIONAL([INSTALL_DOCS], [test x$INSTALL_DOCS = xyes])
LOCATE_POSTGRESQL
SETUP_POSTGRESQL
CHECK_EDB_LIBPQ
AM_CONDITIONAL([EDB_LIBPQ], [test x$EDB_LIBPQ = xyes])
SETUP_ARCH_I386
SETUP_ARCH_X86_64
SETUP_ARCH_PPC
SETUP_ARCH_PPC64
SET_WX_VERSION
LOCATE_WXWIDGETS
CHECK_WXWIDGETS
SETUP_WXWIDGETS
LOCATE_LIBXML2
SETUP_LIBXML2
CHECK_LIBXML2
LOCATE_LIBXSLT
SETUP_LIBXSLT
# Configure parameters
AC_ARG_WITH(libgcrypt,
AC_HELP_STRING([--with-libgcrypt],[Use Libgcrypt for crypto]),
use_libgcrypt=$withval,use_libgcrypt=auto)
AC_ARG_WITH(openssl,
AC_HELP_STRING([--with-openssl],[Use OpenSSL for crypto]),
use_openssl=$withval,use_openssl=auto)
AC_ARG_WITH(libz,
AC_HELP_STRING([--with-libz],[Use Libz for compression]),
use_libz=$withval,use_libz=auto)
# Look for OpenSSL (default)
if test "$use_openssl" != "no" && test "$use_libgcrypt" != "yes"; then
AC_CHECK_HEADER(openssl/ssl.h, , [AC_MSG_ERROR([Couldn't find openssl/ssl.h...install the OpenSSL devel package] )])
AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [#include <openssl/ssl.h>])
LIBSREQUIRED=libssl,libcrypto
fi
# Look for libgcrypt
if test "$ac_cv_libssl" != "yes" && test "$use_libgcrypt" != "no"; then
AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [#include <gcrypt.h>])
LIBSREQUIRED=libgcrypt
fi
AC_SUBST(LIBSREQUIRED)
if test "$ac_cv_libssl" != "yes" && test "$ac_cv_libgcrypt" != "yes"; then
AC_MSG_NOTICE([cannot find OpenSSL or Libgcrypt, try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH])
BUILD_SSH_TUNNEL="no"
else
BUILD_SSH_TUNNEL="yes"
fi
AM_CONDITIONAL([BUILD_SSH_TUNNEL], [test x$BUILD_SSH_TUNNEL = xyes])
if test "$ac_cv_libssl" = "yes"; then
AC_DEFINE(LIBSSH2_OPENSSL, 1, [Compile libssh2 with OpenSSL support])
AC_DEFINE(HAVE_OPENSSL_CRYPTO, 1, [Compile libssh2 with OpenSSL support])
CPPFLAGS="$CPPFLAGS -DHAVE_OPENSSL_CRYPTO -DLIBSSH2_OPENSSL"
LIBS="$LIBS $LIBSSL"
fi
if test "$ac_cv_libgcrypt" = "yes"; then
CPPFLAGS="$CPPFLAGS -DHAVE_GCRYPT"
LIBS="$LIBS $LIBGCRYPT"
AC_DEFINE(LIBSSH2_LIBGCRYPT, 1, [Use libgcrypt])
fi
AM_CONDITIONAL(LIBGCRYPT, test "$ac_cv_libgcrypt" = "yes")
# Not all OpenSSL have AES-CTR functions.
if test "$ac_cv_libssl" = "yes"; then
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $LIBSSL"
AC_CHECK_FUNCS(EVP_aes_128_ctr)
LDFLAGS="$save_LDFLAGS"
fi
# Look for Libz
if test "$use_libz" != "no"; then
AC_LIB_HAVE_LINKFLAGS([z], [], [#include <zlib.h>])
if test "$ac_cv_libz" != yes; then
AC_MSG_NOTICE([Cannot find libz, disabling compression])
AC_MSG_NOTICE([Try --with-libz-prefix=PATH if you know you have it])
else
LIBS="$LIBS $LIBZ"
AC_DEFINE(LIBSSH2_HAVE_ZLIB, 1, [Compile in zlib support])
fi
fi
CURL_CHECK_NONBLOCKING_SOCKET
LOCATE_SPHINX
AM_CONDITIONAL([SPHINX_BUILD], [test x$SPHINX_BUILD != x])
AC_CONFIG_FILES([Makefile
branding/Makefile
i18n/Makefile
plugins.d/Makefile
pgadmin/Makefile
pkg/Makefile
pkg/debian/Makefile
pkg/mac/Makefile
pkg/mandrake/Makefile
pkg/redhat/Makefile
pkg/slackware/Makefile
pkg/src/Makefile
pkg/suse/Makefile
pkg/win32/Makefile
xtra/Makefile
xtra/png2c/Makefile
xtra/wx-build/Makefile])
AC_OUTPUT
SUMMARY