comparison configure.in @ 327:03446687b7cc r21-0-61

Import from CVS: tag r21-0-61
author cvs
date Mon, 13 Aug 2007 10:48:16 +0200
parents 19dcec799385
children 4f79e16b1112
comparison
equal deleted inserted replaced
326:e2671bc7f66a 327:03446687b7cc
226 226
227 dnl XE_PREPEND(value, varname) 227 dnl XE_PREPEND(value, varname)
228 define([XE_PREPEND], 228 define([XE_PREPEND],
229 [[$2]="[$1] $[$2]" && dnl 229 [[$2]="[$1] $[$2]" && dnl
230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) 230 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
231
232 dnl XE_DIE(message)
233 define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }])
231 234
232 235
233 dnl Initialize some variables set by options. 236 dnl Initialize some variables set by options.
234 dnl The variables have the same names as the options, with 237 dnl The variables have the same names as the options, with
235 dnl dashes changed to underlines. 238 dnl dashes changed to underlines.
3483 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. 3486 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
3484 dnl On FreeBSD, both DB and DBM are part of libc. 3487 dnl On FreeBSD, both DB and DBM are part of libc.
3485 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always 3488 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always
3486 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be 3489 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be
3487 dnl checked if we have the libraries. 3490 dnl checked if we have the libraries.
3488 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm,
3489 dnl nor does libc implement it, we are a bit lost :)
3490 3491
3491 AC_CHECKING(for database support) 3492 AC_CHECKING(for database support)
3492 3493
3494 dnl Check for ndbm.h, required for either kind of DBM support.
3495 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
3496 AC_CHECK_HEADER(ndbm.h, [:], [
3497 test "$with_database_gnudbm" = "yes" -o \
3498 "$with_database_dbm" = "yes" && \
3499 XE_DIE("Required DBM support cannot be provided.")
3500 with_database_gnudbm=no with_database_dbm=no])
3501 fi
3502
3503 dnl Check for DBM support in libgdbm.
3493 if test "$with_database_gnudbm" != "no"; then 3504 if test "$with_database_gnudbm" != "no"; then
3494 AC_CHECK_HEADERS(ndbm.h, have_ndbm_h=yes) 3505 AC_CHECK_LIB(gdbm, dbm_open, [
3495 if test "$have_ndbm_h" = "yes"; then 3506 with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm], [
3496 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) 3507 if test "$with_database_gnudbm" = "yes"; then
3497 fi 3508 XE_DIE("Required GNU DBM support cannot be provided.")
3498 if test "$with_database_gnudbm" != "yes"; then 3509 fi
3499 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) 3510 with_database_gnudbm=no])
3500 fi 3511 fi
3501 if test "$with_database_gnudbm" = "yes"; then 3512
3502 AC_DEFINE(HAVE_DBM) 3513 dnl Check for DBM support in libc and libdbm.
3503 test "$have_libgdbm" = "yes" && XE_PREPEND(-lgdbm, LIBS)
3504 with_database_dbm=no
3505 else with_database_gnudbm=no
3506 fi
3507 fi
3508
3509 if test "$with_database_dbm" != "no"; then 3514 if test "$with_database_dbm" != "no"; then
3510 AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no) 3515 AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [
3511 if test "$need_libdbm" != "no"; then 3516 AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [
3512 AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes) 3517 test "$with_database_dbm" = "yes" && \
3513 fi 3518 XE_DIE("Required DBM support cannot be provided.")
3514 if test "$with_database_dbm" = "yes"; then 3519 with_database_dbm=no])])
3515 AC_DEFINE(HAVE_DBM) 3520 fi
3516 test "$need_libdbm" = "yes" && XE_PREPEND(-ldbm, LIBS) 3521
3517 else with_database_dbm=no 3522 dnl Tell make about the DBM support we detected.
3518 fi 3523 if test -n "$libdbm"; then XE_PREPEND("$libdbm", LIBS); fi
3519 fi 3524 if test "$with_database_gnudbm" = "yes" -o \
3520 3525 "$with_database_dbm" = "yes"; then
3526 AC_DEFINE(HAVE_DBM)
3527 fi
3528
3529 dnl Check for Berkeley DB.
3521 if test "$with_database_berkdb" != "no"; then 3530 if test "$with_database_berkdb" != "no"; then
3522 AC_MSG_CHECKING(for Berkeley db.h) 3531 AC_MSG_CHECKING(for Berkeley db.h)
3523 for path in "db/db.h" "db.h"; do 3532 for path in "db/db.h" "db.h"; do
3524 AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H 3533 AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H
3525 #define __BIT_TYPES_DEFINED__ 3534 #define __BIT_TYPES_DEFINED__