]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
- further configure tweaks for FreeBSD and Tru64 Unix
[citadel.git] / citadel / configure.ac
index 41b853d20ebb28fb39b8ab6d806cafcc5179a861..31334de8cda77ba330532c3196325f7310fa62d0 100644 (file)
@@ -62,7 +62,6 @@ case "$host" in
        dnl Digital Unix has an odd way to build for pthreads, and we can't
        dnl build pthreads programs with gcc due to header problems.
        alpha*-dec-osf*)
-               test -z "$CC" && CC=cc
                PTHREAD_LIBS="-lpthread -lexc"
                check_pthread=no
        ;;
@@ -87,7 +86,14 @@ case "$host" in
 esac
 
 dnl Checks for programs.
-AC_PROG_CC
+case "$host" in
+       alpha*-dec-osf*)
+               AC_PROG_CC(cc gcc /usr/ucb/cc c89)
+       ;;
+       *)
+               AC_PROG_CC
+       ;;
+esac
 
 dnl Set up system-dependent compiler flags.
 if test "$GCC" = yes; then
@@ -184,7 +190,10 @@ if test "x$with_db" != xno -a "x$with_gdbm" != xyes; then
        AC_CHECK_LIB(db, db_env_create,
                [GDBM="$GDBM -ldb"
                DATABASE=database_sleepycat.c
-               with_gdbm=no], [], [$NETLIBS])
+               with_gdbm=no], [AC_CHECK_LIB(db3, db_env_create,
+                                       [GDBM="$GDBM -ldb3"
+                                       DATABASE=database_sleepycat.c
+                                       with_gdbm=no], [], [$NETLIBS])], [$NETLIBS])
 fi
 
 if test "x$with_gdbm" != xno -a "x$with_db" != xyes; then
@@ -217,7 +226,9 @@ dnl Checks for header files.
 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 "$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)
 
 AC_CHECK_HEADER(resolv.h, [SMTP=modules/libsmtp.la; DOMAIN=domain.c])