~ubuntu-branches/ubuntu/natty/libgcrypt11/natty-proposed

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-05-16 20:13:32 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090516201332-czkobpu32w318i16
Tags: 1.4.4-2ubuntu1
* Merge from Debian unstable (LP: #364535), remaining changes:
  - Add libgcrypt11-udeb for use by cryptsetup-udeb.
  - Add clean-la.mk, and add a symlink for the .la
  - Install to /lib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Configure.ac script for Libgcrypt
2
2
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
3
 
#               2007, 2008 Free Software Foundation, Inc.
 
3
#               2007, 2008, 2009 Free Software Foundation, Inc.
4
4
#
5
5
# This file is part of Libgcrypt.
6
6
#
18
18
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
# (Process this file with autoconf to produce a configure script.)
21
 
AC_REVISION($Revision: 1288 $)
 
21
AC_REVISION($Revision: 1382 $)
22
22
AC_PREREQ(2.60)
23
23
min_automake_version="1.10"
24
24
 
26
26
# Remember to change the version number immediately *after* a release.
27
27
# Set my_issvn to "yes" for non-released code.  Remember to run an
28
28
# "svn up" and "autogen.sh" right before creating a distribution.
29
 
m4_define([my_version], [1.4.1])
 
29
m4_define([my_version], [1.4.4])
30
30
m4_define([my_issvn], [no])
31
31
 
32
 
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
33
 
            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
 
32
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
 
33
          | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
34
34
AC_INIT([libgcrypt], 
35
35
        [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
36
36
        [bug-libgcrypt@gnupg.org])
38
38
#   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
39
39
#   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
40
40
#   (No interfaces changed:                   REVISION++)
41
 
LIBGCRYPT_LT_CURRENT=15
42
 
LIBGCRYPT_LT_AGE=4
43
 
LIBGCRYPT_LT_REVISION=4
 
41
LIBGCRYPT_LT_CURRENT=16
 
42
LIBGCRYPT_LT_AGE=5
 
43
LIBGCRYPT_LT_REVISION=2
44
44
 
45
45
 
46
46
# If the API is changed in an incompatible way: increment the next counter.
86
86
   properly prefixed.  */
87
87
#define CAMELLIA_EXT_SYM_PREFIX _gcry_
88
88
 
 
89
/* This error code is only available with gpg-error 1.7.  Thus
 
90
   we define it here with the usual gcry prefix.  */
 
91
#define GCRY_GPG_ERR_NOT_OPERATIONAL  176
 
92
 
89
93
 
90
94
#endif /*_GCRYPT_CONFIG_H_INCLUDED*/
91
95
])
445
449
            [use_capabilities="$withval"],[use_capabilities=no])
446
450
AC_MSG_RESULT($use_capabilities)
447
451
 
 
452
# Implementation of the --enable-hmac-binary-check.
 
453
AC_MSG_CHECKING([whether a HMAC binary check is requested])
 
454
AC_ARG_ENABLE(hmac-binary-check,
 
455
              AC_HELP_STRING([--enable-hmac-binary-check],
 
456
                             [Enable library integrity check]),
 
457
              [use_hmac_binary_check=$enableval],
 
458
              [use_hmac_binary_check=no])
 
459
AC_MSG_RESULT($use_hmac_binary_check)
 
460
if test "$use_hmac_binary_check" = yes ; then
 
461
    AC_DEFINE(ENABLE_HMAC_BINARY_CHECK,1,
 
462
              [Define to support an HMAC based integrity check])
 
463
fi
 
464
 
448
465
 
449
466
# Implementation of the --disable-padlock-support switch.
450
467
AC_MSG_CHECKING([whether padlock support is requested])
683
700
AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise)
684
701
# Other checks
685
702
AC_CHECK_FUNCS(strerror rand mmap getpagesize sysconf waitpid wait4)
686
 
AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime)
 
703
AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime syslog)
687
704
AC_CHECK_FUNCS(fcntl ftruncate)
688
705
 
689
706
GNUPG_CHECK_MLOCK
690
707
 
 
708
 
 
709
#
 
710
# Check wether it is necessary to link against libdl.
 
711
#
 
712
DL_LIBS=""
 
713
if test "$use_hmac_binary_check" = yes ; then
 
714
  _gcry_save_libs="$LIBS"
 
715
  LIBS=""
 
716
  AC_SEARCH_LIBS(dlopen, c dl,,,)
 
717
  DL_LIBS=$LIBS
 
718
  LIBS="$_gcry_save_libs"
 
719
  LIBGCRYPT_CONFIG_LIBS="${LIBGCRYPT_CONFIG_LIBS} ${DL_LIBS}"
 
720
fi
 
721
AC_SUBST(DL_LIBS)
 
722
 
 
723
 
 
724
#
691
725
# Check whether we can use Linux capabilities as requested.
 
726
#
692
727
if test "$use_capabilities" = "yes" ; then
693
728
use_capabilities=no
694
729
AC_CHECK_HEADERS(sys/capability.h)
817
852
                         CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//'`
818
853
                       fi])
819
854
 
820
 
AC_ARG_ENABLE(gcc-warnings,
821
 
              AC_HELP_STRING([--enable-gcc-warnings],
822
 
                             [enable more verbose gcc warnings]),
823
 
              [more_gcc_warnings="$enableval"],
824
 
              [more_gcc_warnings="no"])
825
 
 
 
855
# CFLAGS mangling when using gcc.
826
856
if test "$GCC" = yes; then
827
 
    if test "$USE_MAINTAINER_MODE" = "yes" ||
828
 
       test "$more_gcc_warnings" = "yes"; then
829
 
        CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
830
 
        if test "$more_gcc_warnings" = "yes"; then
831
 
            CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
832
 
            CFLAGS="$CFLAGS -Wwrite-strings"
833
 
            CFLAGS="$CFLAGS -Wdeclaration-after-statement"
834
 
            CFLAGS="$CFLAGS -Wno-missing-field-initializers"
835
 
            CFLAGS="$CFLAGS -Wno-sign-compare"
836
 
            # Note: We don't use -Wunreachable-code because this gives
837
 
            # warnings for all asserts and many inline functions like
838
 
            # gpg_error (gcc 4.1.2 20060928).
839
 
        fi
840
 
    else
841
 
        CFLAGS="$CFLAGS -Wall"
842
 
    fi
843
 
 
844
 
    AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
845
 
    _gcc_cflags_save=$CFLAGS
846
 
    CFLAGS="-Wpointer-arith"
847
 
    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
848
 
    AC_MSG_RESULT($_gcc_wopt)
849
 
    CFLAGS=$_gcc_cflags_save;
850
 
    if test x"$_gcc_wopt" = xyes ; then
851
 
       CFLAGS="$CFLAGS -Wpointer-arith"
852
 
    fi
 
857
    CFLAGS="$CFLAGS -Wall"
 
858
    if test "$USE_MAINTAINER_MODE" = "yes"; then
 
859
        CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
 
860
        CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
 
861
 
 
862
        # If -Wno-missing-field-initializers is supported we can enable a 
 
863
        # a bunch of really useful warnings.
 
864
        AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
 
865
        _gcc_cflags_save=$CFLAGS
 
866
        CFLAGS="-Wno-missing-field-initializers"
 
867
        AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
 
868
        AC_MSG_RESULT($_gcc_wopt)
 
869
        CFLAGS=$_gcc_cflags_save;
 
870
        if test x"$_gcc_wopt" = xyes ; then
 
871
          CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
 
872
          CFLAGS="$CFLAGS -Wwrite-strings"
 
873
          CFLAGS="$CFLAGS -Wdeclaration-after-statement"
 
874
          CFLAGS="$CFLAGS -Wno-missing-field-initializers"
 
875
          CFLAGS="$CFLAGS -Wno-sign-compare"
 
876
        fi
 
877
 
 
878
        AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
 
879
        _gcc_cflags_save=$CFLAGS
 
880
        CFLAGS="-Wpointer-arith"
 
881
        AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
 
882
        AC_MSG_RESULT($_gcc_wopt)
 
883
        CFLAGS=$_gcc_cflags_save;
 
884
        if test x"$_gcc_wopt" = xyes ; then
 
885
          CFLAGS="$CFLAGS -Wpointer-arith"
 
886
        fi
 
887
    fi
 
888
 
853
889
fi
854
890
 
855
891
# Check whether as(1) supports a noeexecstack feature.  This test
1081
1117
m4/Makefile
1082
1118
mpi/Makefile
1083
1119
cipher/Makefile
 
1120
random/Makefile
1084
1121
doc/Makefile
1085
1122
src/Makefile
1086
1123
src/gcrypt.h