comparison configure.ac @ 4699:0e1461b592ce

Check for gdbm/ndbm.h, too.
author Stephen J. Turnbull <stephen@xemacs.org>
date Thu, 24 Sep 2009 09:36:49 +0900
parents 24224362882c
children 1cecc3e9f0a0
comparison
equal deleted inserted replaced
4698:a9493cab536f 4699:0e1461b592ce
5408 test "$enable_database_gdbm $enable_database_dbm $enable_database_berkdb" \ 5408 test "$enable_database_gdbm $enable_database_dbm $enable_database_berkdb" \
5409 != "no no no" && AC_MSG_CHECKING([for database support]) && \ 5409 != "no no no" && AC_MSG_CHECKING([for database support]) && \
5410 AC_MSG_RESULT() 5410 AC_MSG_RESULT()
5411 5411
5412 dnl Check for ndbm.h, required for either kind of DBM support. 5412 dnl Check for ndbm.h, required for either kind of DBM support.
5413 dnl #### Should we check for gdbm.h, too? (Seen on MacPorts.)
5413 if test "$enable_database_gdbm $enable_database_dbm" != "no no"; then 5414 if test "$enable_database_gdbm $enable_database_dbm" != "no no"; then
5414 AC_CHECK_HEADER(ndbm.h, [:], [ 5415 ndbm_h_file=""
5416 AC_CHECK_HEADERS([ndbm.h gdbm/ndbm.h],[ndbm_h_file=$ac_header; break;],[],[])
5417 if test "$ndbm_h_found" != "yes"; then
5415 test "$enable_database_gdbm" = "yes" -o \ 5418 test "$enable_database_gdbm" = "yes" -o \
5416 "$enable_database_dbm" = "yes" && \ 5419 "$enable_database_dbm" = "yes" && \
5417 XE_DIE("Required DBM support cannot be provided.") 5420 XE_DIE("Required DBM support cannot be provided.")
5418 enable_database_gdbm=no enable_database_dbm=no]) 5421 enable_database_gdbm=no enable_database_dbm=no]
5422 fi
5419 fi 5423 fi
5420 5424
5421 dnl Check for DBM support in libgdbm. 5425 dnl Check for DBM support in libgdbm.
5422 if test "$enable_database_gdbm" != "no"; then 5426 if test "$enable_database_gdbm" != "no"; then
5423 AC_CHECK_LIB(gdbm, dbm_open, [ 5427 AC_CHECK_LIB(gdbm, dbm_open, [
5440 enable_database_dbm=no])]) 5444 enable_database_dbm=no])])
5441 fi 5445 fi
5442 5446
5443 dnl Tell make about the DBM support we detected. 5447 dnl Tell make about the DBM support we detected.
5444 test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS) 5448 test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS)
5445 test "$enable_database_gdbm" = "yes" -o \ 5449 if test "$enable_database_gdbm" = "yes" -o \
5446 "$enable_database_dbm" = "yes" && \ 5450 "$enable_database_dbm" = "yes"; then
5451 AC_DEFINE_UNQUOTED(NDBM_H_FILE,"$ndbm_h_file")
5447 AC_DEFINE(HAVE_DBM) 5452 AC_DEFINE(HAVE_DBM)
5453 $as_unset ndbm_h_file
5454 fi
5448 5455
5449 dnl Check for u_int*_t typedefs. 5456 dnl Check for u_int*_t typedefs.
5450 AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t]) 5457 AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t])
5451 5458
5452 dnl Check for Berkeley DB. 5459 dnl Check for Berkeley DB.