* g10.c (main): Enhance the version-specific config file code to try for
[gnupg.git] / configure.ac
index 5d24d15..c8d3229 100644 (file)
@@ -21,7 +21,7 @@ dnl
 dnl (Process this file with autoconf to produce a configure script.)
 dnlAC_REVISION($Revision$)dnl
 
-AC_PREREQ(2.52)
+AC_PREREQ(2.57)
 
 # Remember to change the version number immediately *after* a release
 # and remove the "-cvs" or "rc" suffix immediately *before* a release.
@@ -31,8 +31,6 @@ AC_INIT(gnupg, 1.3.4-cvs, bug-gnupg@gnu.org)
 # sufficient.
 development_version=yes
 
-ALL_LINGUAS="de"
-
 AC_CONFIG_AUX_DIR(scripts)
 AC_CONFIG_SRCDIR(g10/g10.c)
 AC_CANONICAL_TARGET()
@@ -344,6 +342,7 @@ MPI_OPT_FLAGS=""
 
 try_gettext=yes
 have_dosish_system=no
+need_dlopen=yes
 case "${target}" in
     *-*-mingw32*)
         # special stuff for Windoze NT
@@ -357,6 +356,7 @@ case "${target}" in
                    MingW32 systems and these systems lack Posix functions,
                    we use a simplified version of gettext])
         have_dosish_system=yes
+        need_dlopen=no
         try_gettext="no"
         ;;
     i?86-emx-os2 | i?86-*-os2*emx )
@@ -584,10 +584,6 @@ case "${target}" in
     *-linux*)
         PRINTABLE_OS_NAME="GNU/Linux"
         ;;
-dnl let that after linux to avoid gnu-linux problems
-    *-gnu*)
-        PRINTABLE_OS_NAME="GNU/Hurd"
-        ;;
     *)
         PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
         ;;
@@ -634,31 +630,37 @@ else
 fi
 
 if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
-  AC_CHECK_FUNC(dlopen,,AC_CHECK_LIB(dl,dlopen,found_dlopen=yes))
-  if test x"$found_dlopen" = "xyes" ; then
-    AC_DEFINE(HAVE_DL_DLOPEN,1,
-              [Defined when the dlopen function family is available])
-    AC_SUBST(DLLIBS,"-ldl")
-
-    if test "$try_extensions" = yes ; then
-       AC_DEFINE(USE_DYNAMIC_LINKING,1,
-                [define to enable the use of extensions])
+  if test "$need_dlopen" = yes; then
+    _dl_save_libs=$LIBS
+    LIBS=""
+    AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes)
+    if test x"$found_dlopen" = "xyes" ; then
+      AC_DEFINE(HAVE_DL_DLOPEN,1,
+                [Defined when the dlopen function family is available])
+      DLLIBS=$LIBS
+    else
+      if test "$try_extensions" = yes ; then
+         AC_MSG_WARN([dlopen not found.  Disabling extensions.])
+        try_extensions=no
+      fi
+  
+      if test "$card_support" = yes ; then
+         AC_MSG_WARN([dlopen not found.  Disabling OpenPGP card support.])
+         card_support=no
+      fi
     fi
+    LIBS=$_dl_save_libs
+  fi
+fi
 
-    if test "$card_support" = yes ; then
-       AC_DEFINE(ENABLE_CARD_SUPPORT,1,
-                [Define to include the OpenPGP card support])
-    fi
-  else
-    if test "$try_extensions" = yes ; then
-       AC_MSG_WARN([dlopen not found.  Disabling extensions.])
-    fi
+AC_SUBST(DLLIBS)
 
-    if test "$card_support" = yes ; then
-       AC_MSG_WARN([dlopen not found.  Disabling OpenPGP card support.])
-       card_support=no
-    fi
-  fi
+if test "$card_support" = yes ; then
+  AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include OpenPGP card support])
+fi
+
+if test "$try_extensions" = yes ; then
+  AC_DEFINE(USE_DYNAMIC_LINKING,1,[Define to enable the use of extensions])
 fi
 
 AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
@@ -1137,6 +1139,7 @@ DATADIRNAME=$DATADIRNAME
 
 AC_CONFIG_FILES([
 Makefile
+m4/Makefile
 intl/Makefile
 po/Makefile.in
 util/Makefile