diff configure @ 4401:01970033faa6

Configure fixes from Hans de Graaff, as used in Gentoo. 2008-01-17 Aidan Kehoe <kehoea@parhasard.net> * configure.ac: If using a version of the gdbm library that sticks dbm_open in libgdbm_compat.so, also link to that library. Correct a thinko with DBM version 4 checks. Both from Hans de Graaff, in http://mid.gmane.org/20050812092756.6850.qmail@graaff.xs4all.nl and http://mid.gmane.org/pan.2007.06.24.10.10.57@gentoo.org; thank you Hans! * configure: Regenerate.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 17 Jan 2008 11:52:45 +0100
parents 50889296c05c
children 2f000e022a8b fd8a9a4d81d9
line wrap: on
line diff
--- a/configure	Wed Jan 16 15:43:01 2008 +0100
+++ b/configure	Thu Jan 17 11:52:45 2008 +0100
@@ -37246,12 +37246,81 @@
    enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm
 else
 
+       { echo "$as_me:$LINENO: checking for dbm_open in -lgdbm_compat" >&5
+echo $ECHO_N "checking for dbm_open in -lgdbm_compat... $ECHO_C" >&6; }
+if test "${ac_cv_lib_gdbm_compat_dbm_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgdbm_compat -lgdbm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbm_open ();
+int
+main ()
+{
+return dbm_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_gdbm_compat_dbm_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_gdbm_compat_dbm_open=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5
+echo "${ECHO_T}$ac_cv_lib_gdbm_compat_dbm_open" >&6; }
+if test $ac_cv_lib_gdbm_compat_dbm_open = yes; then
+
+       enable_database_gdbm=yes enable_database_dbm=no libdbm="-lgdbm_compat -lgdbm"
+else
+
    if test "$enable_database_gdbm" = "yes"; then
      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
    fi
    enable_database_gdbm=no
 fi
 
+
+fi
+
 fi
 
 if test "$enable_database_dbm" != "no"; then
@@ -37902,7 +37971,7 @@
 
   fi
 
-    if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then
+    if test "$enable_database_berkdb" = "yes" -a "$dbver" = "4"; then
     rm -f $tempcname
     echo "#include <$db_h_file>" > $tempcname
     echo "configure___ dbfunc=db_create" >> $tempcname