summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2000-09-04 04:06:05 (GMT)
committerSkip Montanaro <skip@pobox.com>2000-09-04 04:06:05 (GMT)
commitb89f41efbc28f1021323ec74f2ec40cc372a0862 (patch)
tree6cda2860b5fd4537e4ae474446919725aaab275e /configure.in
parent2cb176f3279060a55b650a826ccfe9db538d3cc5 (diff)
downloadcpython-b89f41efbc28f1021323ec74f2ec40cc372a0862.zip
cpython-b89f41efbc28f1021323ec74f2ec40cc372a0862.tar.gz
cpython-b89f41efbc28f1021323ec74f2ec40cc372a0862.tar.bz2
Fixes bug in --with-libdb. If --with-libdb was not specified (default is to
enable it), but db.h was not found, the WITH_LIBDB macros was still being defined, resulting in compilation errors. Also added a short explain when bsddb support wasn't enabled (because db.h wasn't found) when the user explicitly used --with-libdb on the configure command line.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index f9597a9..86b816d 100644
--- a/configure.in
+++ b/configure.in
@@ -813,14 +813,21 @@ AC_MSG_CHECKING(for --with-libdb)
AC_ARG_WITH(libdb,
[ --with(out)-libdb disable/enable bsddb module])
-# default is enabled
-if test -z "$with_libdb"
-then with_libdb="yes"
-fi
-# if we found db.h, enable, unless with_libdb is expressly set to "no"
-if test "$ac_cv_header_db_h" = "yes" -a "$with_libdb" != "no"
-then with_libdb="yes"
+# enabled by default, but db.h must be found
+if test "$ac_cv_header_db_h" = "yes"
+then
+ if test "$with_libdb" != "no"
+ then with_libdb="yes"
+ fi
+else
+ # make sure user knows why bsddb support wasn't enabled event
+ # though s/he requested it
+ if test "$with_libdb" = "yes"
+ then echo $ac_n "(requested, but db.h was not found) $ac_c"
+ fi
+ with_libdb="no"
fi
+
if test "$with_libdb" = "no"
then
USE_BSDDB_MODULE="#"