17
17
dnl You should have received a copy of the GNU General Public License
18
18
dnl along with this program; if not, write to the Free Software
19
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
dnl MA 02110-1301, USA
21
22
dnl (Process this file with autoconf to produce a configure script.)
22
dnlAC_REVISION($Revision: 1.135 $)dnl
25
25
min_automake_version="1.9.3"
27
27
# Remember to change the version number immediately *after* a release
28
28
# and remove the "-cvs" or "rc" suffix immediately *before* a release.
29
AC_INIT(gnupg, 1.4.1, bug-gnupg@gnu.org)
29
AC_INIT(gnupg, 1.4.2, bug-gnupg@gnu.org)
30
30
# Set development_version to yes if the minor number is odd or you
31
31
# feel that the default check for a development version is not
122
122
AC_MSG_RESULT($selinux_support)
125
AC_MSG_CHECKING([whether OpenPGP card support is requested])
126
AC_ARG_ENABLE(card-support,
127
AC_HELP_STRING([--disable-card-support],
128
[disable OpenPGP card support]),
129
card_support=$enableval, card_support=yes)
130
AC_MSG_RESULT($card_support)
132
125
AC_MSG_CHECKING([whether the new iconv based code is requested])
133
126
AC_ARG_ENABLE(gnupg-iconv,
134
127
AC_HELP_STRING([--disable-gnupg-iconv],
174
AC_MSG_CHECKING([whether OpenPGP card support is requested])
175
AC_ARG_ENABLE(card-support,
176
AC_HELP_STRING([--disable-card-support],
177
[disable OpenPGP card support]),
178
card_support=$enableval)
179
AC_MSG_RESULT($card_support)
182
# Note that we may later disable the agent support based on the platform.
183
AC_MSG_CHECKING([whether gpg-agent support is requested])
184
AC_ARG_ENABLE(agent-support,
185
AC_HELP_STRING([--disable-agent-support],
186
[disable gpg-agent support]),
187
agent_support=$enableval)
188
AC_MSG_RESULT($agent_support)
175
191
AC_MSG_CHECKING([whether to enable the RSA public key algorithm])
176
192
AC_ARG_ENABLE(rsa,
356
372
AC_HELP_STRING([--disable-keyserver-path],
357
373
[disable the exec-path option for keyserver helpers]),
358
374
[if test "$enableval" = no ; then
359
AC_DEFINE(DISABLE_KEYSERVER_PATH,1,[define to disable exec-path for keyserver helpers])
375
disable_keyserver_path=yes
360
376
fi],enableval=yes)
361
377
AC_MSG_RESULT($enableval)
470
484
we use a simplified version of gettext])
471
485
AC_DEFINE(HAVE_W32_SYSTEM,1,
472
486
[Defined if we run on a W32 API based system])
487
disable_keyserver_path=yes
473
488
have_dosish_system=yes
477
493
i?86-emx-os2 | i?86-*-os2*emx )
478
494
# OS/2 with the EMX environment
532
550
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
552
if test "$disable_keyserver_path" = yes; then
553
AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
554
[define to disable exec-path for keyserver helpers])
534
557
AC_SUBST(MPI_OPT_FLAGS)
535
558
GNUPG_SYS_SYMBOL_UNDERSCORE
595
618
AC_SUBST(SRVLIBS)
597
# Try and link a LDAP test program to weed out unusable LDAP
598
# libraries. -lldap [-llber [-lresolv]] is for older OpenLDAPs.
599
# OpenLDAP, circa 1999, was terrible with creating weird dependencies.
600
# This seems to have all been resolved, so I'm simplifying this code
601
# significantly. If all else fails, the user can play
602
# guess-the-dependency by using something like ./configure
603
# LDAPLIBS="-Lfoo -lbar"
605
622
if test "$try_ldap" = yes ; then
608
AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
610
if test -d "$withval" ; then
611
CPPFLAGS="${CPPFLAGS} -I$withval/include"
612
LDFLAGS="${LDFLAGS} -L$withval/lib"
616
for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lldap" "-lldap -llber" "-lldap -llber -lresolv" "-lwldap32"; do
617
_ldap_save_libs=$LIBS
618
LIBS="$MY_LDAPLIBS $NETLIBS $LIBS"
620
AC_MSG_CHECKING([whether LDAP via \"$MY_LDAPLIBS\" is present and sane])
623
#include <winsock2.h>
628
],[ldap_open("foobar",1234);],
629
[gnupg_cv_func_ldap_init=yes],[gnupg_cv_func_ldap_init=no])
630
AC_MSG_RESULT([$gnupg_cv_func_ldap_init])
632
if test "$gnupg_cv_func_ldap_init" = yes ; then
633
LDAPLIBS=$MY_LDAPLIBS
634
GPGKEYS_LDAP="gpgkeys_ldap$EXEEXT"
636
AC_CHECK_FUNCS(ldap_get_option ldap_set_option ldap_start_tls_s)
638
if test "$ac_cv_func_ldap_get_option" != yes ; then
639
AC_MSG_CHECKING([whether LDAP supports ld_errno])
640
AC_TRY_LINK([#include <ldap.h>],[LDAP *ldap; ldap->ld_errno;],
641
[gnupg_cv_func_ldap_ld_errno=yes],
642
[gnupg_cv_func_ldap_ld_errno=no])
643
AC_MSG_RESULT([$gnupg_cv_func_ldap_ld_errno])
645
if test "$gnupg_cv_func_ldap_ld_errno" = yes ; then
646
AC_DEFINE(HAVE_LDAP_LD_ERRNO,1,[Define if the LDAP library supports ld_errno])
651
LIBS=$_ldap_save_libs
653
if test "$GPGKEYS_LDAP" != "" ; then break; fi
623
GNUPG_CHECK_LDAP($NETLIBS)
657
AC_SUBST(GPGKEYS_LDAP)
659
AM_CONDITIONAL(GPGKEYS_LDAP, test "$GPGKEYS_LDAP" != "")
626
# Special hack to test curl
661
628
AC_ARG_ENABLE(fake-curl,
662
629
AC_HELP_STRING([--enable-fake-curl],[enable EXPERIMENTAL no-curl HTTP code]),fake_curl=$enableval,fake_curl=no)
664
631
AM_CONDITIONAL(FAKE_CURL,test x"$fake_curl" = xyes)
666
633
if test x"$fake_curl" = xyes ; then
634
AC_DEFINE(FAKE_CURL,1,[define to fake the libcurl API internally])
667
635
libcurl_protocol_HTTP=yes
669
637
# If we have neither FTP or HTTP defined, then don't bother to check
671
if test x"$try_ftp" = xyes || test x"$try_http" = xyes ; then
672
LIBCURL_CHECK_CONFIG([no])
639
if test x"$try_hkp" = xyes || test x"$try_ftp" = xyes || test x"$try_http" = xyes ; then
640
LIBCURL_CHECK_CONFIG([no],,[with_curl=yes])
644
AM_CONDITIONAL(WITH_CURL,test x"$with_curl" = xyes || test x"$fake_curl" = xyes)
676
646
# Are we doing HTTP?
678
648
if test x"$try_http" = xyes ; then
812
782
AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
785
if test "$agent_support" = yes ; then
786
AC_DEFINE(ENABLE_AGENT_SUPPORT,1,[Define to include gpg-agent support])
815
789
if test "$try_extensions" = yes ; then
816
790
AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
898
873
AC_CHECK_FUNCS(memmove gettimeofday getrusage setrlimit clock_gettime)
899
874
AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale)
900
875
AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo)
901
AC_REPLACE_FUNCS(mkdtemp timegm)
876
AC_REPLACE_FUNCS(mkdtemp timegm isascii memrchr)
903
878
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
1259
1234
CFLAGS="$CFLAGS -Wall"
1237
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
1239
_gcc_cflags_save=$CFLAGS
1240
CFLAGS="-Wno-pointer-sign"
1242
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
1243
AC_MSG_RESULT($_gcc_psign)
1245
CFLAGS=$_gcc_cflags_save;
1247
if test x"$_gcc_psign" = xyes ; then
1248
CFLAGS="$CFLAGS -Wno-pointer-sign"
1262
1251
# Non exec stack hack. Fixme: Write a test to check whether as
1263
1252
# can cope with it and use the enable-noexecstack option only to
1264
1253
# disable it in case it is required on sime platforms.