]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
warning fixes and cleanups for 64-bit machines
[citadel.git] / citadel / configure.ac
index 62f57cb636759cc2c4234c4c5ec62a4016141cca..776c40d1ec483440f5f76ae8bd23b352b71183c7 100644 (file)
@@ -1,7 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
 AC_PREREQ(2.52)
-AC_INIT([Citadel/UX], [\$Revision$], [http://uncensored.citadel.org/])
+AC_INIT([Citadel/UX], [5.80], [http://uncensored.citadel.org/])
+AC_REVISION([$Revision$])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_PREFIX_DEFAULT(/usr/local/citadel)
 if test "$prefix" = NONE; then
@@ -62,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
@@ -92,15 +92,16 @@ 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
 AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
@@ -173,7 +174,7 @@ if test "$enable_autologin" != no; then
                        AC_DEFINE(ENABLE_CHKPWD)
                        CHKPWD=chkpwd
                else
-                       AUTH=auth.ro
+                       AUTH=auth.lo
                fi
        fi
 fi
@@ -183,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
@@ -216,9 +220,15 @@ 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 "$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])
+AC_SUBST(SMTP)
+AC_SUBST(DOMAIN)
+
 dnl some systems require -pthread, -D_REENTRANT, etc to be passed to cc if we
 dnl include pthread.h:
 save_CPPFLAGS=$CPPFLAGS