]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
* Applied a patch sent in by Wilfried Goesgens which allows the various
[citadel.git] / citadel / configure.ac
index 72ce3086c3ff95013d2ef6e13cee778109ef5357..90b0b5e9e501896c0e55a71215d083c462e94c58 100644 (file)
@@ -6,11 +6,68 @@ AC_REVISION([$Revision$])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_PREFIX_DEFAULT(/usr/local/citadel)
 if test "$prefix" = NONE; then
-       AC_DEFINE_UNQUOTED(BBSDIR, "$ac_default_prefix")
+       AC_DEFINE_UNQUOTED(CTDLDIR, "$ac_default_prefix")
 else
-       AC_DEFINE_UNQUOTED(BBSDIR, "$prefix")
+       AC_DEFINE_UNQUOTED(CTDLDIR, "$prefix")
 fi
 
+dnl Checks for the Datadir
+AC_ARG_WITH(datadir, 
+                   [  --with-datadir          directory to store the databases under],
+                       [ if test "x$withval" != "xno" ; then
+                                             AC_DEFINE(HAVE_DATA_DIR)
+                                                 AC_DEFINE_UNQUOTED(DATA_DIR, "$withval")
+                         fi
+                       ]
+)
+
+dnl Checks for the spooldir
+AC_ARG_WITH(spooldir, 
+                       [  --with-spooldir         directory to keep queues under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_SPOOL_DIR)
+                                               AC_DEFINE_UNQUOTED(SPOOL_DIR,"$withval")
+                          fi
+                       ]
+)
+
+
+
+dnl Checks for the Configdir
+AC_ARG_WITH(sysconfdir, 
+                       [  --with-sysconfdir       directory to store the configs under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_ETC_DIR)
+                                               AC_DEFINE_UNQUOTED(ETC_DIR, "$withval")
+                         fi
+                       ]
+)
+
+
+dnl Checks for the run-dir for the sockets
+AC_ARG_WITH(rundir, 
+                       [  --with-rundir       directory to store the configs under],
+                       [ if test "x$withval" != "xno" ; then
+                                           AC_DEFINE(HAVE_RUN_DIR)
+                                               AC_DEFINE_UNQUOTED(RUN_DIR, "$withval")
+                         fi
+                       ]
+)
+
+
+dnl Checks for the Pseudo Random Generator sockets TODO: this keeps being default.
+AC_DEFINE_UNQUOTED(EGD_POOL, "/var/run/egd-pool")
+AC_ARG_WITH(egdpool, 
+                       [  --with-egdpool       the socket from Pseudo Random Generator, defaults to /var/run/egd-pool],
+                       [ if test "x$withval" != "xno" ; then
+                                               AC_DEFINE_UNQUOTED(EGD_POOL, "$withval")
+                         fi
+                       ]
+)
+
+
+
+
 AC_ARG_ENABLE(autologin, [  --disable-autologin     disable autologin (default is enabled if possible)])
 AC_ARG_ENABLE(chkpwd, [  --disable-chkpwd        don't build 'chkpwd'])
 
@@ -23,7 +80,7 @@ AC_ARG_WITH(pam, [  --with-pam              use PAM if present (see PAM.txt befo
 AC_ARG_WITH(kthread, [  --with-kthread          use kernel threads (on FreeBSD) (not recommended yet)])
 AC_ARG_WITH(db, [  --with-db@<:@=DIR@:>@         use Sleepycat DB 3.x @<:@DIR=/usr/local/BerkeleyDB.3.@<:@123@:>@@:>@])
 AC_ARG_WITH(ssl,
-       [  --with-ssl=PATH     Specify path to OpenSSL installation ],
+       [  --with-ssl=PATH         Specify path to OpenSSL installation ],
        [
                if test "x$withval" != "xno" ; then
                        tryssldir=$withval
@@ -35,7 +92,7 @@ AC_ARG_WITH(ncurses, [  --without-ncurses       don't use ncurses])
 AC_ARG_WITH(with_zlib, [  --with-zlib             use zlib compression if present])
 AC_ARG_WITH(with_ldap, [  --with-ldap             use OpenLDAP client library])
 AC_ARG_WITH(with_libical, [  --with-libical          use libical calendaring library])
-AC_ARG_WITH(with_newt, [  --with-newt          use newt window library])
+AC_ARG_WITH(with_newt, [  --with-newt             use newt window library])
 
 if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then
        db_dir="$with_db"
@@ -47,6 +104,7 @@ else
 
        test -d /usr/local/BerkeleyDB.4.1 && db_dir=/usr/local/BerkeleyDB.4.1
        test -d /usr/local/BerkeleyDB.4.2 && db_dir=/usr/local/BerkeleyDB.4.2
+       test -d /usr/local/BerkeleyDB.4.3 && db_dir=/usr/local/BerkeleyDB.4.3
 fi
 
 dnl By default, we only build the client (citadel and whobbs) unless we can
@@ -117,19 +175,24 @@ case "$host" in
 esac
 dnl DEFS="$DEFS $PTHREAD_DEFS"
 
+
 dnl Checks for programs.
 AC_PROG_CC
 
 dnl Set up system-dependent compiler flags.
 if test "$GCC" = yes; then
-       case "$host" in
-               *-*-solaris*|alpha*-dec-osf*)
-                       CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wno-char-subscripts $PTHREAD_DEFS"
-               ;;
-               *)
+       if test "$CC" = icc; then
+               CFLAGS="$CFLAGS -w1"
+       else
+               case "$host" in
+                       *-*-solaris*|alpha*-dec-osf*)
+                               CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wno-char-subscripts $PTHREAD_DEFS"
+                       ;;
+                       *)
                        CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wstrict-prototypes $PTHREAD_DEFS"
-               ;;
-       esac
+                       ;;
+               esac
+       fi
 fi
 
 if test "x$enable_pie" = xyes; then
@@ -373,7 +436,6 @@ if test "x$with_db" != xno; then
 
 fi
 
-
 dnl Checks for the zlib compression library.
 if test "x$with_zlib" != xno ; then
        AC_CHECK_HEADERS(zlib.h,
@@ -438,14 +500,12 @@ if test "x$ok_libical" = xyes ; then
                [
 #include <ical.h>
 main() {
-       float v;
-       int i;
-       sscanf(ICAL_VERSION, "%f", &v);
-       printf("libical version: %0.2f\n", v);
-       v = v * 100.0;
-       i = (int) v;
-       if (i >= 24) {
-               printf("This version is ok.\n");
+        int major, minor, v;
+        sscanf(ICAL_VERSION, "%d.%d", &major, &minor);
+        v = 100*major + minor;
+        printf("libical version: %i\n", v);
+        if (v >= 24) {
+                printf("This version is ok.\n");
                return(0);
        }
        printf("libical 0.24 or newer required.\n");