From: Nathan Bryant Date: Tue, 18 Dec 2001 08:24:56 +0000 (+0000) Subject: more lovely configure tweaks (include paths for db) X-Git-Tag: v7.86~6677 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=b5275acfaa321eac975dba5b00f9959fade81619;p=citadel.git more lovely configure tweaks (include paths for db) --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index f847cbb6a..142e9498a 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 590.14 2001/12/18 08:24:56 nbryant + more lovely configure tweaks (include paths for db) + Revision 590.13 2001/12/18 06:04:08 ajc * Moved the buffers in the_mime_parser() from the stack to the heap, because it was crashing boxen with small stack sizes. @@ -2989,3 +2992,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/configure.ac b/citadel/configure.ac index 91333cd06..83136278f 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -25,8 +25,6 @@ AC_ARG_WITH(db, [ --with-db@<:@=DIR@:>@ use Sleepycat DB 3.x @<:@DIR=/u if test "x$with_gdbm" != xno -a "x$with_gdbm" != xyes -a "$with_gdbm"; then db_dir="$with_gdbm" with_gdbm=yes -else - test -f /usr/local/lib/libgdbm.a -o -f /usr/local/lib/libgdbm.so && db_dir=/usr/local fi if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then @@ -180,8 +178,13 @@ if test "$enable_autologin" != no; then fi fi -test "$db_dir" && LDFLAGS="$LDFLAGS -L$db_dir/lib" if test "x$with_db" != xno -a "x$with_gdbm" != xyes; then + test "$db_dir" && LDFLAGS="$LDFLAGS -L$db_dir/lib" + + test "$db_dir" && CPPFLAGS="$CPPFLAGS -I$db_dir/include" || \ + ( test -d /usr/include/db3 && CPPFLAGS="$CPPFLAGS -I/usr/include/db3" ) || \ + ( test -d /usr/local/include/db3 && CPPFLAGS="$CPPFLAGS -I/usr/local/include/db3" ) + AC_CHECK_LIB(db3, db_env_create, [GDBM="$GDBM -ldb3" DATABASE=database_sleepycat.c @@ -192,6 +195,11 @@ if test "x$with_db" != xno -a "x$with_gdbm" != xyes; then fi if test "x$with_gdbm" != xno -a "x$with_db" != xyes; then + test -f /usr/local/lib/libgdbm.a -o -f /usr/local/lib/libgdbm.so && db_dir=/usr/local + test "$db_dir" && LDFLAGS="$LDFLAGS -L$db_dir/lib" + + test "$db_dir" && CPPFLAGS="$CPPFLAGS -I$db_dir/include" + AC_CHECK_LIB(gdbm, gdbm_open, [GDBM="$GDBM -lgdbm" DATABASE=database.c @@ -222,10 +230,6 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -test "$db_dir" && CPPFLAGS="$CPPFLAGS -I$db_dir/include" || \ - ( test -d /usr/include/db3 && CPPFLAGS="$CPPFLAGS -I/usr/include/db3" ) || \ - ( test -d /usr/local/include/db3 && CPPFLAGS="$CPPFLAGS -I/usr/local/include/db3" ) - AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db3/db.h) AC_CHECK_HEADER(resolv.h, [SMTP=modules/libsmtp.la; DOMAIN=domain.c])