]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
warning fixes and cleanups for 64-bit machines
[citadel.git] / citadel / configure.ac
index fd622c3ceeabb81c82c94f89db907eeca618e21b..776c40d1ec483440f5f76ae8bd23b352b71183c7 100644 (file)
@@ -63,11 +63,10 @@ case "$host" in
        dnl build pthreads programs with gcc due to header problems.
        alpha*-dec-osf*)
                test -z "$CC" && CC=cc
-               PTHREAD_DEFS=-pthread
-               PTHREAD_LIBS=-pthread
+               PTHREAD_LIBS="-lpthread -lexc"
                check_pthread=no
        ;;
-       dnl FreeBSD is similar to Digital UNIX:
+       dnl FreeBSD is similar to Digital UNIX with DEC C, which has a -pthread flag:
        *-*-freebsd*)
                if test "$with_kthread" = yes; then
                        PTHREAD_LIBS=-kthread
@@ -93,11 +92,11 @@ AC_PROG_CC
 dnl Set up system-dependent compiler flags.
 if test "$GCC" = yes; then
        case "$host" in
-               *-*-solaris*)
-                       CFLAGS="$CFLAGS -Wall -Wno-char-subscripts"
+               *-*-solaris*|alpha*-dec-osf*)
+                       CFLAGS="$CFLAGS -Wall -Wcast-align -Wno-char-subscripts"
                ;;
                *)
-                       CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
+                       CFLAGS="$CFLAGS -Wall -Wcast-align -Wstrict-prototypes"
                ;;
        esac
 fi
@@ -185,7 +184,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
@@ -218,7 +220,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])