more lovely configure tweaks (include paths for db)
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 18 Dec 2001 08:24:56 +0000 (08:24 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 18 Dec 2001 08:24:56 +0000 (08:24 +0000)
citadel/ChangeLog
citadel/configure.ac

index f847cbb6afcf5536b4e86b0d1554bf736fc6c77a..142e9498ac8ef72ac783a2367cebb5a487b32dfa 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 91333cd0629d277c0e71f12796ca8149c0b8a430..83136278fad76830294959b80e3872d08311d5a1 100644 (file)
@@ -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])