~ubuntu-branches/ubuntu/hardy/gnupg/hardy-updates

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-16 16:57:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051216165739-v0m2d1you6hd8jho
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
dnl 
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
20
21
dnl
21
22
dnl (Process this file with autoconf to produce a configure script.)
22
 
dnlAC_REVISION($Revision: 1.135 $)dnl
23
23
 
24
24
AC_PREREQ(2.59)
25
25
min_automake_version="1.9.3"
26
26
 
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
32
32
# sufficient.
122
122
AC_MSG_RESULT($selinux_support)
123
123
 
124
124
 
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)
131
 
 
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],
158
151
use_sha512=yes
159
152
use_bzip2=yes
160
153
use_exec=yes
 
154
card_support=yes
 
155
agent_support=yes
 
156
disable_keyserver_path=no
161
157
 
162
158
AC_ARG_ENABLE(minimal,
163
159
   AC_HELP_STRING([--enable-minimal],[build the smallest gpg binary possible]),
170
166
   use_sha256=no
171
167
   use_sha512=no
172
168
   use_bzip2=no
173
 
   use_exec=no)
 
169
   use_exec=no
 
170
   card_support=no
 
171
   agent_support=no)
 
172
 
 
173
 
 
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)
 
180
 
 
181
 
 
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)
 
189
 
174
190
 
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)
362
378
  fi
443
459
AC_ISC_POSIX
444
460
AC_SYS_LARGEFILE
445
461
AC_PROG_INSTALL
446
 
AC_PROG_LN_S
447
462
AC_PROG_AWK
448
463
AC_CHECK_PROG(DOCBOOK_TO_MAN, docbook-to-man, yes, no)
449
464
AM_CONDITIONAL(HAVE_DOCBOOK_TO_MAN, test "$ac_cv_prog_DOCBOOK_TO_MAN" = yes)
452
467
 
453
468
MPI_OPT_FLAGS=""
454
469
 
455
 
 
456
470
try_gettext=yes
457
471
have_dosish_system=no
458
472
need_dlopen=yes
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
474
489
        need_dlopen=no
475
490
        try_gettext="no"
 
491
        agent_support=no
476
492
        ;;
477
493
    i?86-emx-os2 | i?86-*-os2*emx )
478
494
        # OS/2 with the EMX environment
480
496
        AC_DEFINE(HAVE_DRIVE_LETTERS)
481
497
        have_dosish_system=yes
482
498
        try_gettext="no"
 
499
        agent_support=no
483
500
        ;;
484
501
 
485
502
    i?86-*-msdosdjgpp*)
488
505
        AC_DEFINE(HAVE_DRIVE_LETTERS)
489
506
        have_dosish_system=yes
490
507
        try_gettext="no"
 
508
        agent_support=no
491
509
        ;;
492
510
 
493
511
    *-*-freebsd*)
531
549
fi
532
550
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
533
551
 
 
552
if test "$disable_keyserver_path" = yes; then
 
553
    AC_DEFINE(DISABLE_KEYSERVER_PATH,1,
 
554
              [define to disable exec-path for keyserver helpers])
 
555
fi
 
556
 
534
557
AC_SUBST(MPI_OPT_FLAGS)
535
558
GNUPG_SYS_SYMBOL_UNDERSCORE
536
559
 
594
617
 
595
618
AC_SUBST(SRVLIBS)
596
619
 
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"
 
620
# Check for LDAP
604
621
 
605
622
if test "$try_ldap" = yes ; then
606
 
 
607
 
  AC_ARG_WITH(ldap,
608
 
     AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
609
 
     [
610
 
     if test -d "$withval" ; then
611
 
        CPPFLAGS="${CPPFLAGS} -I$withval/include"
612
 
        LDFLAGS="${LDFLAGS} -L$withval/lib"
613
 
     fi
614
 
     ])
615
 
 
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"
619
 
 
620
 
    AC_MSG_CHECKING([whether LDAP via \"$MY_LDAPLIBS\" is present and sane])
621
 
    AC_TRY_LINK([
622
 
#ifdef _WIN32
623
 
#include <winsock2.h>
624
 
#include <winldap.h>
625
 
#else
626
 
#include <ldap.h>
627
 
#endif
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])
631
 
 
632
 
    if test "$gnupg_cv_func_ldap_init" = yes ; then
633
 
       LDAPLIBS=$MY_LDAPLIBS
634
 
       GPGKEYS_LDAP="gpgkeys_ldap$EXEEXT"
635
 
 
636
 
       AC_CHECK_FUNCS(ldap_get_option ldap_set_option ldap_start_tls_s)
637
 
 
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])
644
 
 
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])
647
 
          fi
648
 
       fi
649
 
    fi
650
 
 
651
 
    LIBS=$_ldap_save_libs
652
 
 
653
 
    if test "$GPGKEYS_LDAP" != "" ; then break; fi
654
 
  done
 
623
   GNUPG_CHECK_LDAP($NETLIBS)
655
624
fi
656
625
 
657
 
AC_SUBST(GPGKEYS_LDAP)
658
 
AC_SUBST(LDAPLIBS)
659
 
AM_CONDITIONAL(GPGKEYS_LDAP, test "$GPGKEYS_LDAP" != "")
 
626
# Special hack to test curl
660
627
 
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)
665
632
 
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
668
636
else
669
637
   # If we have neither FTP or HTTP defined, then don't bother to check
670
638
   # for curl.
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])
673
641
   fi
674
642
fi
675
643
 
 
644
AM_CONDITIONAL(WITH_CURL,test x"$with_curl" = xyes || test x"$fake_curl" = xyes)
 
645
 
676
646
# Are we doing HTTP?
677
647
 
678
648
if test x"$try_http" = xyes ; then
812
782
  AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
813
783
fi
814
784
 
 
785
if test "$agent_support" = yes ; then
 
786
  AC_DEFINE(ENABLE_AGENT_SUPPORT,1,[Define to include gpg-agent support])
 
787
fi
 
788
 
815
789
if test "$try_extensions" = yes ; then
816
790
  AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
817
791
fi
829
803
fi
830
804
 
831
805
AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
 
806
AM_CONDITIONAL(ENABLE_AGENT_SUPPORT, test "$agent_support" = yes)
832
807
 
833
808
dnl Checks for header files.
834
809
AC_HEADER_STDC
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)
902
877
 
903
878
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
904
879
 
1247
1222
AC_SUBST(NETLIBS)
1248
1223
AC_SUBST(W32LIBS)
1249
1224
 
1250
 
# Special options used fith gcc.
 
1225
# Special options used with gcc.
1251
1226
if test "$GCC" = yes; then
1252
1227
    # Note that it is okay to use CFLAGS here because this are just
1253
1228
    # warning options and the user should have a chance of overriding
1259
1234
        CFLAGS="$CFLAGS -Wall"
1260
1235
    fi
1261
1236
 
 
1237
    AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
 
1238
 
 
1239
    _gcc_cflags_save=$CFLAGS
 
1240
    CFLAGS="-Wno-pointer-sign"
 
1241
 
 
1242
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_psign=yes,_gcc_psign=no)
 
1243
    AC_MSG_RESULT($_gcc_psign)
 
1244
 
 
1245
    CFLAGS=$_gcc_cflags_save;
 
1246
 
 
1247
    if test x"$_gcc_psign" = xyes ; then
 
1248
       CFLAGS="$CFLAGS -Wno-pointer-sign"
 
1249
    fi
 
1250
 
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.
1318
1307
#define EXTSEP_C '.'
1319
1308
#define DIRSEP_S "\\\\"
1320
1309
#define EXTSEP_S "."
 
1310
#define PATHSEP_C ';'
 
1311
#define PATHSEP_S ";"
1321
1312
#else
1322
1313
#define DIRSEP_C '/'
1323
1314
#define EXTSEP_C '.'
1324
1315
#define DIRSEP_S "/"
1325
1316
#define EXTSEP_S "."
 
1317
#define PATHSEP_C ':'
 
1318
#define PATHSEP_S ":"
1326
1319
#endif
1327
1320
/* This is the same as VERSION, but should be overridden if the
1328
1321
   platform cannot handle things like dots'.' in filenames.  Set