Help dirmngr to use supplied trust anchors.
[gnupg.git] / configure.ac
index ed7aa68..ec5361c 100644 (file)
@@ -26,10 +26,8 @@ min_automake_version="1.10"
 # "svn up" and "autogen.sh" right before creating a distribution.
 m4_define([my_version], [2.0.10])
 m4_define([my_issvn], [yes])
-
-
-m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
-            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
+m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
+          | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
 AC_INIT([gnupg], 
         [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
         [bug-gnupg@gnupg.org])
@@ -41,7 +39,7 @@ development_version=no
 NEED_GPG_ERROR_VERSION=1.4
 
 NEED_LIBGCRYPT_API=1
-NEED_LIBGCRYPT_VERSION=1.2.2
+NEED_LIBGCRYPT_VERSION=1.4.0
 
 NEED_LIBASSUAN_API=1
 NEED_LIBASSUAN_VERSION=1.0.4
@@ -847,6 +845,8 @@ if test "$have_adns" = "yes"; then
   ADNSLIBS="-ladns" 
 fi
 AC_SUBST(ADNSLIBS)
+# Newer adns versions feature a free function to be used under W32.
+AC_CHECK_FUNCS(adns_free)
 
 
 #
@@ -1248,6 +1248,24 @@ if test "$GCC" = yes; then
     if test "$USE_MAINTAINER_MODE" = "yes"; then
         CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
         CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
+        AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
+        _gcc_cflags_save=$CFLAGS
+        CFLAGS="-Wno-missing-field-initializers"
+        AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
+        AC_MSG_RESULT($_gcc_wopt)
+        CFLAGS=$_gcc_cflags_save;
+        if test x"$_gcc_wopt" = xyes ; then
+          CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
+        fi
+        AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
+        _gcc_cflags_save=$CFLAGS
+        CFLAGS="-Wdeclaration-after-statement"
+        AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no)
+        AC_MSG_RESULT($_gcc_wopt)
+        CFLAGS=$_gcc_cflags_save;
+        if test x"$_gcc_wopt" = xyes ; then
+          CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+        fi
     else
         CFLAGS="$CFLAGS -Wall"
     fi