X-Git-Url: https://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/781cfcb8fd50934c470e0dabf79d32ab333dec68:/configure.in..f77892e671e1261ec26e5133f86b8a52635f3dd2:/static/git-favicon.png?ds=sidebyside diff --git a/configure.in b/configure.in deleted file mode 100644 index 5ff71cd..0000000 --- a/configure.in +++ /dev/null @@ -1,917 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl $Id: configure.in,v 1.177 2009/12/25 21:53:37 mrsam Exp $ -dnl -dnl Copyright 1998 - 2009 Double Precision, Inc. See COPYING for -dnl distribution information. - -AC_PREREQ(2.63) -AC_INIT([courier-authlib],[0.63.0],[courier-users@lists.sourceforge.net]) - -AC_CONFIG_SRCDIR([courierauth.h]) -AC_CONFIG_HEADERS([courier_auth_config.h]) -AC_CONFIG_MACRO_DIR([libltdl/m4]) - -AM_INIT_AUTOMAKE ->confdefs.h # Kill PACKAGE_ macros - -LPATH="$PATH:/usr/local/bin" - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_SYSCONFTOOL -LT_CONFIG_LTDL_DIR([libltdl]) -LT_INIT(dlopen) -LTDL_INIT -AC_SUBST(LTDLINCL) -AC_SUBST(LIBLTDL) -AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH) -AC_PATH_PROGS(COURIERCONFIG, courier-config, courier-config, $LPATH) - -if test "$PERL" = "perl" -then - AC_MSG_ERROR(Perl is required) -fi - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -eval "prefix=$prefix" -eval "exec_prefix=$exec_prefix" -eval "sysconfdir=$sysconfdir" -eval "bindir=$bindir" -eval "sbindir=$sbindir" -eval "localstatedir=$localstatedir" -eval "libexecdir=$libexecdir" - -AC_ARG_WITH(redhat, [], [ redhat=$withval ], [redhat=no]) - -if test "$srcdir" = "." -then - case `./config.guess` in - *-redhat-*) - if test "$redhat" = "no" - then - hash='#' - AC_MSG_WARN(=== I think you are trying to run this configure script) - AC_MSG_WARN([=== on Red Hat/Fedora. You're doing too much work!]) - AC_MSG_WARN([=== It's much faster to create installable binary RPMs]) - AC_MSG_WARN([=== like this: http://www.courier-mta.org/FAQ.html${hash}rpm]) - AC_MSG_WARN(=== When you do this you may find that RPM will tell you) - AC_MSG_WARN([=== to install some other software first, before trying to]) - AC_MSG_WARN([=== build this one, and even tell you the name of RPMs you]) - AC_MSG_WARN([=== need to install from the distribution CD. That's much]) - AC_MSG_WARN([=== easier than trying to figure out the same from some]) - AC_MSG_WARN([=== cryptic error message.]) - AC_MSG_WARN([]) - AC_MSG_WARN([=== Even if you don't intend to use everything you need to]) - AC_MSG_WARN([=== have in order to build via RPM, you should still do as]) - AC_MSG_WARN([=== you're told. All the extra stuff (LDAP, SQL, etc...)]) - AC_MSG_WARN([=== goes into RPM sub-packages, which do not need to be]) - AC_MSG_WARN([=== installed.]) - AC_MSG_WARN([=== But, if you insist, you can simply add '--with-redhat']) - AC_MSG_WARN(=== parameter to this configure script and not see this) - AC_MSG_WARN(=== error message. You should also do this when upgrading) - AC_MSG_WARN([=== and you didn't use RPM with the older version.]) - AC_MSG_ERROR(... in either case you better know what you're doing!) - fi - ;; - *) - ;; - esac -fi -AC_PATH_PROGS(EXPECT, expect, expect, $LPATH) - -if test "$EXPECT" = "expect" -then - AC_MSG_WARN(-----------------------------------------------------) - AC_MSG_WARN(expect not found - will not be able to change passwds) - AC_MSG_WARN(in webmail) - AC_MSG_WARN(-----------------------------------------------------) - sleep 5 -else - AC_DEFINE_UNQUOTED(HAVE_EXPECT, 1, [ Whether expect(1) is installed ]) -fi - -AC_PATH_PROGS(PASSWD, passwd, passwd, $LPATH) -AC_SUBST(PASSWD) - -if test "$GCC" = "yes" -then - CFLAGS="$CFLAGS -Wall" -fi - -CFLAGS="$CFLAGS -I.. -I${srcdir}/.." - -AC_MSG_CHECKING(whether -lm is needed for floor) -AC_TRY_LINK_FUNC(floor, - AC_MSG_RESULT(no), - LIBM="-lm" - AC_MSG_RESULT(yes)) - -AC_ARG_WITH(pkgconfdir, -[ --with-pkgconfdir=d Install config files in directory ], - [pkgconfdir="$withval"], - [pkgconfdir="$sysconfdir/authlib"]) - -saveLIBS="$LIBS" -NETLIBS="" -USENSL=no - -AC_CHECK_LIB(socket,socket,result=yes,result=no) -if test $result = yes; then - NETLIBS="-lsocket" -else - AC_CHECK_LIB(socket,socket,result=yes,result=no,-lnsl) - if test $result = yes; then - NETLIBS = "-lsocket -lnsl" - USENSL=yes - else - AC_CHECK_LIB(socket,connect,result=yes,result=no) - if test $result = yes; then - NETLIBS="-lsocket" - else - AC_CHECK_LIB(socket,connect,result=yes,result=no,-lnsl) - if test $result = yes; then - NETLIBS="-lsocket -lnsl" - USENSL=yes - fi - fi - fi -fi - -if test $USENSL != yes; then - LIBS="$LIBS $NETLIBS" - AC_TRY_LINK_FUNC(inet_addr, [ : ], - [ - AC_CHECK_LIB(nsl,inet_addr,result=yes,result=no) - if test $result = yes; then - NETLIBS="$NETLIBS -lnsl" - fi - ]) -fi - -LIBS="$saveLIBS" -AC_SUBST(NETLIBS) - -dnl ######################################################################### - -dnl Prepare authuserdb module if userdb library is available - -dnl ######################################################################### - - -AC_ARG_WITH(db, [ --with-db=gdbm Use the GDBM library. - --with-db=db Use the libdb.a library.], - db="$withval", 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 - LIBDB="" - USE_GDBM=1 - if test "$needs_withdb" = 1 - then - ac_configure_args="$ac_configure_args --with-db=gdbm" - fi - dblibrary=gdbmobj/libgdbmobj.la -else - LIBGDBM="" - USE_DB=1 - if test "$needs_withdb" = 1 - then - ac_configure_args="$ac_configure_args --with-db=db" - fi - dblibrary=bdbobj/libbdbobj.la -fi - -AC_SUBST(USE_GDBM) -AC_SUBST(USE_DB) - -AC_ARG_WITH(authuserdb, -[ --without-authuserdb Do not include the authuserdb module ], - doauthuserdb="$withval", - doauthuserdb="no" - if test -d ${srcdir}/userdb - then - doauthuserdb="yes" - fi) - -if test "$doauthuserdb" = "no" -then - AUTHUSERDB="" -else - AUTHUSERDB="authuserdb" - LIBAUTHUSERDB="libauthuserdb.la" - -fi - -AC_ARG_WITH(makedatprog, [ ], [ : ], - [ - ac_configure_args="$ac_configure_args --with-makedatprog=$libexecdir/courier-authlib/makedatprog" - ]) - -cat >dbobj.config < -#if HAVE_NETINET_IN_H -#include -#endif -#include - -void (*func)()= (void (*)())res_query; -], - [ (*func)(); ]), - AC_MSG_RESULT(no), - [ - LIBS="-lresolv $LIBS" - - AC_LINK_IFELSE(AC_LANG_PROGRAM([ -#include -#if HAVE_NETINET_IN_H -#include -#endif -#include - -void (*func)()= (void (*)())res_query; -], - [ (*func)(); ]), [ - LDAPLIBS="-lresolv $LDAPLIBS" - HAVE_LDAP=1 - AC_MSG_RESULT(yes) - ], - AC_MSG_ERROR(Cannot find function res_query)) - ]) - - AC_CHECK_LIB(lber, ber_scanf, - [ LDAPLIBS="-llber $LDAPLIBS" LIBS="-llber $LIBS" ]) - AC_CHECK_LIB(ldap, ldap_open, - [ LDAPLIBS="-lldap $LDAPLIBS" ; LIBS="-lldap $LIBS" ]) - AC_CHECK_FUNC(ldap_search_st, HAVE_LDAP=1, HAVE_LDAP=0) - AC_CHECK_FUNC(ldap_start_tls_s, HAVE_LDAP_TLS=1, HAVE_LDAP_TLS=0) - AC_CHECK_FUNC(ldap_result2error, HAVE_LDAP_RESULT2ERROR=1, HAVE_LDAP_RESULT2ERROR=0) - AC_CHECK_FUNC(ldap_parse_result, HAVE_LDAP_PARSE_RESULT=1, HAVE_LDAP_PARSE_RESULT=0) - LIBS="$saveLIBS" -fi - -AC_ARG_WITH(authldaprc, -[ --with-authldaprc=filename Expect to find authldaprc here ], - authldaprc="$withval", - authldaprc="$pkgconfdir/authldaprc") -AC_SUBST(authldaprc) - -LIBAUTHLDAP="" -if test "$HAVE_LDAP" = 1 -then - LIBAUTHLDAP="libauthldap.la" -else - authldaprc="" -fi -AC_SUBST(LDAPLIBS) -AC_SUBST(LIBAUTHLDAP) - -AM_CONDITIONAL(HAVE_LDAP, test "$HAVE_LDAP" = 1) -AC_DEFINE_UNQUOTED(HAVE_LDAP_TLS,$HAVE_LDAP_TLS, - [ Whether we have ldap_start_tls_s ]) -AC_DEFINE_UNQUOTED(HAVE_LDAP_RESULT2ERROR, $HAVE_LDAP_RESULT2ERROR, - [ Whether we have ldap_result2error() function ]) -AC_DEFINE_UNQUOTED(HAVE_LDAP_PARSE_RESULT, $HAVE_LDAP_PARSE_RESULT, - [ Whether we have ldap_parse_result() function]) -dnl ######################################################################### - -dnl Prepare authpwd module - -dnl ######################################################################### - -AC_ARG_WITH(authpwd, -[ --without-authpwd Do not include the authpwd module ], - doauthpwd="$withval", - doauthpwd="yes" - test "$HAVE_PAM" = 1 && doauthpwd="no" - test "$HAVE_LDAP" = 1 && doauthpwd="no" - ) - -HAVE_PWD=1 -if test "$doauthpwd" = "no" -then - HAVE_PWD=0 -fi -AC_CHECK_FUNCS(endpwent) - -dnl ######################################################################### - -dnl Prepare authshadow module if shadow functions are available. - -dnl ######################################################################### - -AC_ARG_WITH(authshadow, -[ --without-authshadow Do not include the authshadow module ], - doauthshadow="$withval", - doauthshadow="yes" - test "$HAVE_PAM" = 1 && doauthshadow="no" - test "$HAVE_LDAP" = 1 && doauthshadow="no") - -AC_CHECK_HEADERS(shadow.h) -saveLIBS="$LIBS" -SHADOWLIBS="" -AC_CHECK_LIB(shadow, getspent, - [ SHADOWLIBS="-lshadow" ; LIBS="-lshadow $LIBS" ]) -AC_CHECK_FUNCS(endspent getspent) -LIBS="$saveLIBS" - -if test "$doauthshadow" = "no" -then - HAVE_SHADOW=0 -else - - saveLIBS="$LIBS" - AC_CHECK_LIB(shadow, getspent) - AC_CHECK_FUNC(getspent, HAVE_SHADOW=1, HAVE_SHADOW=0) - LIBS="$saveLIBS" -fi - -LIBAUTHSHADOW="" -if test "$HAVE_SHADOW" = 1 -then - LIBAUTHSHADOW="libauthshadow.la" -fi -AC_SUBST(SHADOWLIBS) -AC_SUBST(LIBAUTHSHADOW) - -LIBAUTHPWD="" -if test "$HAVE_PWD" = 1 -then - LIBAUTHPWD="libauthpwd.la" -fi -AC_SUBST(LIBAUTHPWD) - -dnl ######################################################################### - -dnl Prepare authpgsql module - -dnl ######################################################################### - -AC_ARG_WITH(authpgsqlrc, -[ --with-authpgsqlrc=filename Expect to find authpgsql here ], - authpgsqlrc="$withval", - authpgsqlrc="$pkgconfdir/authpgsqlrc") -AC_SUBST(authpgsqlrc) - -AC_ARG_WITH(authpgsql, -[ --without-authpgsql Do not include the authpgsql module ], - doauthpgsql="$withval") - -AC_PATH_PROGS(PG_CONFIG, pg_config, pg_config, $LPATH) - -PGSQL_LIBS="-lpq" -AC_ARG_WITH(pgsql-libs, -[ --with-pgsql-libs=DIR Look for pgsql libs in this dir ], - PGSQL_LIBS="-L$withval $PGSQL_LIBS", - if test -x $PG_CONFIG - then - PGSQL_LIBS="-L`$PG_CONFIG --libdir` $PGSQL_LIBS" - fi -) -AC_ARG_WITH(pgsql-includes, -[ --with-pgsql-includes=DIR Look for pgsql includes in this dir ], - PGSQL_CFLAGS="-I$withval", - if test -x $PG_CONFIG - then - PGSQL_CFLAGS="-I`$PG_CONFIG --includedir`" - fi -) - -if test "$doauthpgsql" = "" -then - LIBS="$PGSQL_LIBS $LIBS" - AC_CHECK_FUNC(PQsetdbLogin, - doauthpgsql="yes" - ) - LIBS="$saveLIBS" -fi - -if test "$doauthpgsql" != "yes" -then - LIBAUTHPGSQL="" - HAVE_AUTHPGSQL=0 -else - saveLIBS="$LIBS" - LIBS="$PGSQL_LIBS $LIBS" - AC_CHECK_FUNC(PQsetdbLogin, - AUTHPGSQL="authpgsql" - HAVE_AUTHPGSQL=1, - AC_MSG_ERROR([--with-authpgsql specified but no libpq.so])) - LIBS="$saveLIBS" - HAVE_AUTHPGSQL=1 - CFLAGS="$PGSQL_CFLAGS $CFLAGS" - LIBAUTHPGSQL="libauthpgsql.la" -fi - -AC_SUBST(PGSQL_LIBS) -AC_SUBST(LIBAUTHPGSQL) -AM_CONDITIONAL(HAVE_AUTHPGSQL, test "$HAVE_AUTHPGSQL" = 1) - -dnl ######################################################################### - -dnl Prepare authmysql module - -dnl ######################################################################### - -AC_ARG_WITH(authmysqlrc, -[ --with-authmysqlrc=filename Expect to find authmysql here ], - authmysqlrc="$withval", - authmysqlrc="$pkgconfdir/authmysqlrc") -AC_SUBST(authmysqlrc) - -AC_ARG_WITH(authmysql, -[ --without-authmysql Do not include the authmysql module ], - doauthmysql="$withval") -AC_ARG_WITH(mysql-libs, -[ --with-mysql-libs=DIR Look for mysql libs in this dir ], - MYSQL_LIBS="-L$withval -lmysqlclient" -) -AC_ARG_WITH(mysql-includes, -[ --with-mysql-includes=DIR Look for mysql includes in this dir ], - MYSQL_CFLAGS="-I$withval" -) - -AC_PATH_PROGS(MYSQL_CONFIG, mysql_config, mysql_config, $LPATH) - -if test -x "$MYSQL_CONFIG" -then - MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" - MYSQL_LIBS="`$MYSQL_CONFIG --libs`" - - eval "MYSQL_CFLAGS=\"\`echo $MYSQL_CFLAGS\`\"" - eval "MYSQL_LIBS=\"\`echo $MYSQL_LIBS\`\"" -fi - -if test "$doauthmysql" = "" -then - LIBS="$MYSQL_LIBS $LIBS" - AC_CHECK_FUNC(mysql_connect, - doauthmysql="yes" - ) - AC_CHECK_FUNC(mysql_real_connect, - doauthmysql="yes" - ) - LIBS="$saveLIBS" -fi - -if test "$doauthmysql" != "yes" -then - LIBAUTHMYSQL="" - HAVE_AUTHMYSQL=0 -else - saveLIBS="$LIBS" - LIBS="$MYSQL_LIBS $LIBS" - AC_CHECK_FUNC(mysql_connect, - LIBAUTHMYSQL="libauthmysql.la" - HAVE_AUTHMYSQL=1, - [ - AC_CHECK_FUNC(mysql_real_connect, - LIBAUTHMYSQL="libauthmysql.la" - HAVE_AUTHMYSQL=1, - - AC_MSG_ERROR([--with-authmysql specified but no mysqlclient.so]) - ) - ] -) - LIBS="$saveLIBS" - HAVE_AUTHMYSQL=1 - CFLAGS="$MYSQL_CFLAGS $CFLAGS" -fi -AC_SUBST(LIBAUTHMYSQL) -AC_SUBST(MYSQL_LIBS) -AM_CONDITIONAL(HAVE_AUTHMYSQL, test "$HAVE_AUTHMYSQL" = 1) - - -dnl ######################################################################### - -dnl Prepare authcustom stub module. - -dnl ######################################################################### - - -AC_ARG_WITH(authcustom, -[ --without-authcustom Do not include the authcustom module ], - doauthcustom="$withval", - doauthcustom=yes) - -LIBAUTHCUSTOM="" - -if test "$doauthcustom" = "yes" -then - LIBAUTHCUSTOM="libauthcustom.la" -fi - -AM_CONDITIONAL(HAVE_CUSTOM, test "$AUTHCUSTOM" != "") -AC_SUBST(LIBAUTHCUSTOM) - - -dnl ######################################################################### - -dnl Prepare authpipe module. - -dnl ######################################################################### - - -AC_ARG_WITH(pipeprog, -[ --with-pipeprog=filename Expect to find the pipe-prog here ], - authProg="$withval", - authProg="$pkgconfdir/authProg") -AC_SUBST(authProg) - -AC_ARG_WITH(authpipe, -[ --without-authpipe Do not include the authpipe module ], - doauthpipe="$withval", - doauthpipe=yes) - -LIBAUTHPIPE="" - -if test "$doauthpipe" = "yes" -then - LIBAUTHPIPE="libauthpipe.la" -fi - -AM_CONDITIONAL(HAVE_PIPE, test "$AUTHPIPE" != "") -AC_SUBST(LIBAUTHPIPE) - - - -dnl Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(sys/stat.h sys/time.h sys/wait.h sys/select.h unistd.h fcntl.h crypt.h termios.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_UID_T -dnl Other checks -AC_CHECK_FUNCS(setsid setlogin) -AC_CHECK_LIB(crypt, crypt, CRYPTLIBS="-lcrypt") -saveLIBS="$LIBS" -LIBS="$CRYPTLIBS $LIBS" -AC_CHECK_FUNC(crypt, AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, - [ Whether we have the crypt() function ])) -LIBS="$saveLIBS" -AC_CACHE_CHECK([for crypt() prototype],userdb_cv_NEED_CRYPT_PROTOTYPE, - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #if HAVE_CRYPT_H - #include - #endif - #if HAVE_UNISTD_H - #include - #endif - int crypt(int, int); - - ]], [[]])],[userdb_cv_NEED_CRYPT_PROTOTYPE=1],[userdb_cv_NEED_CRYPT_PROTOTYPE=0 ]) - - ) - -AC_DEFINE_UNQUOTED(NEED_CRYPT_PROTOTYPE, $userdb_cv_NEED_CRYPT_PROTOTYPE, - [ Whether we must a prototype for crypt()] ) -AC_SUBST(CRYPTLIBS) - -dnl ######################################################################### - -dnl Prepare the authdaemon module. - -dnl ######################################################################### - -AC_ARG_WITH(authdaemonrc, -[ --with-authdaemonrc=filename Expect to find authdaemonrc here ], - authdaemonrc="$withval", - authdaemonrc="$pkgconfdir/authdaemonrc") -AC_SUBST(authdaemonrc) - -AC_ARG_WITH(authdaemonvar, -[ --with-authdaemonvar=directory Directory where authdaemon.pid and - the listening socket is created], - authdaemonvar="$withval", - authdaemonvar="$localstatedir/spool/authdaemon") - -AC_SUBST(authdaemonvar) - -AC_SUBST(LIBM) - -rm -f authdaemonrc.h authldaprc.h authmysqlrc.h authpgsqlrc.h vpopmail_config.h - -dnl -dnl Need to settle on our uid/gids here -dnl - -result="" - -if test -x "$COURIERCONFIG" -then - $COURIERCONFIG >conftest.out || exit 1 - sed -n '/^mail/p' conftest2.out || exit 1 - . ./conftest2.out - rm -f conftest.out conftest2.out - - cmailuser="$mailuser" - cmailgroup="$mailgroup" - result=" (from courier-config)" -fi - -if test -x "$bindir/courierauthconfig" -then - $bindir/courierauthconfig --configfiles >conftest.out || exit 1 - sed -n '/^mail/p' conftest2.out || exit 1 - . ./conftest2.out - rm -f conftest.out conftest2.out - - cmailuser="$mailuser" - cmailgroup="$mailgroup" - result=" (from previous courierauthconfig)" -fi - -changequote() - -LB='[' -RB=']' - -changequote([,]) - -AC_MSG_CHECKING(for mail userid) - -AC_ARG_WITH(mailuser,[ --with-mailuser=user Specify mail user name (defaults to - courier, daemon, admin, bin, or root)], - mailuser="$withval", - - if test "$cmailuser" = "" - then - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include - -static const char *ids $LB $RB={"courier","daemon","adm","bin","root", 0}; - -int main() -{ -int i; -FILE *f; -char *p; - - for (i=0; ids $LB i $RB; i++) - if (getpwnam(ids $LB i $RB)) break; - - f=fopen("conftest.out", "w"); - if (f && ids $LB i $RB) - { - fprintf(f, "%s\n", ids $LB i $RB); - fclose(f); - exit(0); - } - fclose(f); - exit (1); - return (1); -} - ]])],[mailuser=`cat conftest.out`],[AC_MSG_ERROR(Cannot determine mail user, use --with-mailuser.)],[AC_MSG_ERROR(Must use --with-mailuser when cross compiling.)]) - else - mailuser="$cmailuser" - fi - ac_configure_args="$ac_configure_args --with-mailuser=$mailuser") - -AC_MSG_RESULT([$mailuser $result]) - -AC_MSG_CHECKING(for mail group id) - -AC_ARG_WITH(mailgroup, [ --with-mailgroup=group Specify mail group name (defaults to courier, - daemon, sys, adm, or root)], - mailgroup="$withval", - - if test "$cmailgroup" = "" - then - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include - -static const char *ids $LB $RB={"courier", "daemon","sys","adm", "root", 0}; - -int main() -{ -int i; -FILE *f; - - for (i=0; ids $LB i $RB; i++) - if (getgrnam(ids $LB i $RB)) break; - - f=fopen("conftest.out", "w"); - if (f && ids $LB i $RB) - { - fprintf(f, "%s\n", ids $LB i $RB); - fclose(f); - exit(0); - } - fclose(f); - exit (1); - return (1); -} - ]])],[mailgroup=`cat conftest.out`],[AC_MSG_ERROR(Cannot determine mail group, use --with-mailgroup.)],[AC_MSG_ERROR(Must use --with-mailgroup when cross compiling.)]) - else - mailgroup="$cmailgroup" - fi - ac_configure_args="$ac_configure_args --with-mailgroup=$mailgroup" - ) -AC_MSG_RESULT([$mailgroup $result]) -AC_SUBST(mailuser) -AC_SUBST(mailgroup) -rm -f conftest.out - -AC_ARG_WITH(stdheaderdir, -[ --without-stdheaderdir Header files will be installed into a directory - not in the compiler's default search path.], - [ - if test "$withval" = "no" - then - AC_DEFINE_UNQUOTED(HAVE_NOSTDHEADERDIR, 1, - [ Whether header installation directory is nontstandard ]) - fi - ]) - -AC_CACHE_CHECK([for socklen_t], - authlib_cv_hassocklen_t, - -AC_COMPILE_IFELSE( -AC_LANG_SOURCE( [ -#include -#include - -socklen_t sl_t; -],[ - accept(0, 0, &sl_t); -]), - authlib_cv_hassocklen_t=yes, - authlib_cv_hassocklen_t=no) -) - -socklen_t="int" - -if test $authlib_cv_hassocklen_t = yes -then - : -else - AC_DEFINE_UNQUOTED(socklen_t, int, [ Default definition for socklen_t ]) -fi - -AC_ARG_WITH(repository, [], REPOSITORY="$withval") -AC_SUBST(REPOSITORY) - -AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/docbook) -AC_CONFIG_SUBDIRS(bdbobj gdbmobj md5 sha1 libhmac numlib makedat userdb unicode rfc822 random128 liblock liblog) - -AC_CONFIG_FILES(Makefile authdaemond authdaemonrc authsystem.passwd README.authdebug.html dbobj.config dbobj.h authmigrate courier-authlib.spec courier-authlib.lpspec courier-authlib.sysvinit userdb-test-cram-md5.pl) -AC_OUTPUT -