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.
This commit is contained in:
Skip Montanaro 2000-09-04 04:06:05 +00:00
parent 2cb176f327
commit b89f41efbc
2 changed files with 455 additions and 416 deletions

846
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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"
# 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
# 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"
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="#"