configure.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:7k
- dnl $Id: configure.in,v 1.53 2000/07/05 00:51:46 mrsam Exp $
- dnl
- dnl Copyright 1998 - 2000 Double Precision, Inc. See COPYING for
- dnl distribution information.
- AC_INIT(dbobj.config.in)
- AM_INIT_AUTOMAKE(sqwebmail, 0.37a.38pre2, 0)
- AC_PROG_MAKE_SET
- AC_PROG_LN_S
- dnl Checks for programs.
- dnl Check whether we should use gdbm, or db.
- needs_withdb=0
- AC_ARG_WITH(db, [ --with-db=gdbm Use the GDBM library.
- --with-db=db Use the libdb.a library.],
- db="$withval", db=""; needs_withdb=1)
- case "$db" in
- gdbm)
- ;;
- db)
- ;;
- "")
- ;;
- *)
- AC_MSG_ERROR(Invalid --with-db option.)
- ;;
- esac
- saveLIBS="$LIBS"
- if test "$db" != "db"
- then
- AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ])
- AC_CHECK_FUNC(gdbm_open, [ HAVE_GDBM=y ])
- fi
- LIBS="$saveLIBS"
- if test "$db" != "gdbm"
- then
- AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ],
- AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"],
- AC_CHECK_LIB(db, db_env_create,
- [ LIBDB=-ldb; LIBS="-ldb $LIBS"])
- ))
- AC_CHECK_FUNC(dbopen, HAVE_BDB=1)
- AC_CHECK_FUNC(db_open, HAVE_BDB=1)
- AC_CHECK_FUNC(db_env_create, HAVE_BDB=1)
- fi
- LIBS="$saveLIBS"
- if test "$HAVE_GDBM$HAVE_BDB" = ""
- then
- AC_MSG_ERROR(Cannot find either the gdbm or the db library.)
- fi
- USE_GDBM=0
- USE_DB=0
- if test "$HAVE_GDBM" = "y"
- then
- USE_GDBM=1
- if test "$needs_withdb" = 1
- then
- ac_configure_args="$ac_configure_args --with-db=gdbm"
- fi
- DBSUBDIR=gdbmobj
- dblibrary=gdbmobj/libgdbmobj.a
- LIBDB=""
- else
- USE_DB=1
- if test "$needs_withdb" = 1
- then
- ac_configure_args="$ac_configure_args --with-db=db"
- fi
- DBSUBDIR=bdbobj
- dblibrary=bdbobj/libbdbobj.a
- LIBGDBM=""
- fi
- AC_SUBST(USE_GDBM)
- AC_SUBST(USE_DB)
- AC_SUBST(LIBDB)
- AC_SUBST(LIBGDBM)
- AC_SUBST(DBSUBDIR)
- AC_SUBST(dblibrary)
-
- dnl Checks for header files.
- dnl Checks for library functions.
- dnl Other
- dnl ***********************************************************************
- dnl Where to install HTML templates -- htmllibdir
- dnl ***********************************************************************
- AC_ARG_WITH(htmllibdir, [ --with-htmllibdir={dir} Install sqwebmail HTML data in {dir}, instead of
- PREFIX/share/sqwebmail (which is usually
- /usr/local/share/sqwebmail)],
- htmllibdir="$withval",
- htmllibdir='${datadir}/sqwebmail')
- AC_SUBST(htmllibdir)
- dnl ***********************************************************************
- dnl Find my cgi-bin directory
- dnl ***********************************************************************
- cgibindir=""
- imagedir=""
- for f in /var/lib/httpd /home/httpd /usr/local/apache /usr/local/www /var/lib/apache/share
- do
- if test -d $f/cgi-bin
- then
- cgibindir=$f/cgi-bin
- fi
- if test -d $f/htdocs
- then
- imagedir="$f/htdocs/webmail"
- fi
- if test -d $f/html
- then
- imagedir="$f/html/webmail"
- fi
- done
- AC_ARG_ENABLE(cgibindir, [ --enable-cgibindir={dir} HTTP server's cgi-bin directory.],
- cgibindir="$enableval",
- [
- if test "$cgibindir" = ""
- then
- AC_MSG_ERROR([Unable to find your cgi-bin directory, specify --enable-cgibindir.])
- fi
- if test "$imagedir" != ""
- then
- if test "$imageurl" = ""
- then
- imageurl="/webmail/"
- fi
- fi
- ] )
- AC_SUBST(cgibindir)
- AC_ARG_ENABLE(imagedir, [ --enable-imagedir={dir} HTTP server's document directory for images.],
- imagedir="$enableval",
- [
- if test "$imagedir" = ""
- then
- AC_MSG_ERROR([Unable to find your htdocs or html directory, specify --enable-imagedir.])
- fi
- ]
- )
- AC_SUBST(imagedir)
- AC_MSG_CHECKING(where to install sqwebmail cgi binary)
- AC_MSG_RESULT($cgibindir)
- AC_MSG_CHECKING(where to install images)
- AC_MSG_RESULT($imagedir)
- dnl ***********************************************************************
- dnl Userdb setup
- dnl ***********************************************************************
- AC_ARG_WITH(userdb, [ --with-userdb=path Use "path" instead of /etc/userdb, if authuserdb
- module is selected. ],
- userdb="$withval", userdb=/etc/userdb
- ac_configure_args="$ac_configure_args --with-userdb=$userdb")
- AC_ARG_WITH(makedatprog, [], ,
- ac_configure_args="$ac_configure_args --with-makedatprog='${libexecdir}/sqwebmail/makedatprog'")
- dnl for cgi subdir
- AC_ARG_WITH(formdata, [], , ac_configure_args="$ac_configure_args --with-formdata")
- dnl for authlib subdir
- AC_ARG_WITH(authlib-man, [], ,
- ac_configure_args="$ac_configure_args --without-authlib-man")
- AC_ARG_WITH(authuserdb, [
- --with-module Specifically includes or excludes an authentication
- --without-module module, "module". The following authentication
- modules are available:
- authpwd -- authenticates against /etc/passwd
- authshadow -- authenticates against /etc/shadow
- authpam -- authenticates using your PAM library (webmail service)
- authuserdb -- authenticates against /etc/userdb
- authvchkpw -- authenticates against vpopmail/vchkpw
- authldap -- authenticates against an LDAP server
- authdaemon -- use a background daemon for authentication
- ], authuserdb="$withval", authuserdb="yes")
- case "$authuserdb" in
- y*)
- authuserdb="yes"
- ;;
- Y*)
- authuserdb="yes"
- ;;
- esac
- AM_CONDITIONAL(HAS_USERDB, test "$authuserdb" = "yes")
- AC_ARG_WITH(authdaemonvar, [], authdaemonvar="$withval",
- authdaemonvar=$htmllibdir/authdaemon
- ac_configure_args="$ac_configure_args --with-authdaemonvar=$authdaemonvar")
- AC_SUBST(authdaemonvar)
- AC_ARG_WITH(plenty-of-beer, [
- --enable-imageurl={url} URL to the document directory for images.
- --without-fcgi Do not compile fastcgi support
- --with-fcgi Compile with fastcgi support
- --without-ispell Do not compile ispell support
- --with-ispell=prog Pathname to ispell (if not in default path)
- --enable-webpass=yes Enable ~/Maildir/sqwebmail-pass authentication
- --enable-webpass=vpopmail Change passwords via vpopmail
- --enable-https Generate https:// URLs for all accesses
- --enable-https=login Use https:// URLs for password transmission only
- --enable-hardtimeout=7200 Hard session timeout (2hrs default)
- --enable-softtimeout=1200 Inactivity timeout (20 min default)
- --enable-autopurge=7 Automatically purge deleted messages (days).
- --enable-maxpurge=90 Maximum value for autopurge (days).
- --with-htmllibdir={dir} Install sqwebmail HTML data in {dir}, instead of
- PREFIX/share/sqwebmail (which is usually
- /usr/local/share/sqwebmail)
- --with-defaultlang={lang} Default language to use (only en, so far)
- --enable-mimetypes={dir} Your mime.types file.
- --enable-bannerprog=prog Program which will generate a banner.
- --with-maxargsize=nbytes Limit maximum size of CGI args
- --with-maxformargsize=nbytes Maximum size of multipart/formdata uploads
- --with-cachedir Cache logins
- --with-cachedir=dir Use dir instead of /var/run/sqwebmail or /var/cache/sqwebmail
- --with-cacheowner=user Owner of the cache directory (default: bin)
- --without-gzip Do not use gzip to compress messages])
- AC_ARG_ENABLE(hostname, [],
- AC_MSG_ERROR(--enable-hostname option is obsolete, see INSTALL))
- if test "$sysconfdir" = '${prefix}/etc'
- then
- sysconfdir="$htmllibdir"
- ac_configure_args="$ac_configure_args --sysconfdir=$htmllibdir"
- fi
- INSTALL_SCRIPT='${INSTALL} -m 755'
- AC_CONFIG_SUBDIRS(numlib bdbobj gdbmobj maildir md5 random128 userdb
- liblock makedat rfc822 rfc2045 authlib http11 cgi ldapaddressbook
- sqwebmail)
- AC_OUTPUT(Makefile dbobj.h dbobj.config sqwebmail.spec)