dnl Configuration for GNU Mailutils -- a suite of utilities for electronic mail dnl dnl Copyright (C) 1999-2019 Free Software Foundation, Inc. dnl dnl GNU Mailutils is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3, or (at your option) dnl any later version. dnl dnl GNU Mailutils is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License along dnl with GNU Mailutils. If not, see . AC_PREREQ(2.63) AC_INIT([GNU Mailutils], [3.8.90], [bug-mailutils@gnu.org], [mailutils], [http://mailutils.org]) AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) # Enable silent rules by default: AM_SILENT_RULES([yes]) dnl Autobuild stuff AB_INIT dnl Library versioning AC_SUBST(VI_CURRENT, 6) AC_SUBST(VI_REVISION, 0) AC_SUBST(VI_AGE, 0) dnl Library paths AC_SUBST(MU_LIB_AUTH,'${top_builddir}/libmu_auth/libmu_auth.la') AC_SUBST(MU_LIB_MAILUTILS,'${top_builddir}/libmailutils/libmailutils.la') AC_SUBST(MU_LIB_SQL,'${top_builddir}/sql/libsql.la') AC_SUBST(MU_LIB_MAILER,'${top_builddir}/libproto/mailer/libmu_mailer.la') AC_SUBST(MU_LIB_MBOX,'${top_builddir}/libproto/mbox/libmu_mbox.la') AC_SUBST(MU_LIB_SIEVE,'${top_builddir}/libmu_sieve/libmu_sieve.la') AC_SUBST(MU_LIB_SCM) AC_SUBST(MU_LIB_CPP) AC_SUBST(MU_LIB_PY) dnl Other variables AC_SUBST(mu_aux_dir,'$(top_srcdir)/mu-aux') AC_SUBST(MU_SIEVE_MODDIR,'$(libdir)/$(PACKAGE)') AC_SUBST(MU_COMMON_LIBRARIES,'$(LTLIBINTL) $(LTLIBICONV)') AC_SUBST(MU_APP_LIBRARIES,'${top_builddir}/lib/libmuaux.la') # There are two sets of include directories: MU_LIB_COMMON_INCLUDES, used # by the libraries, and MU_APP_COMMON_INCLUDES, which is used by applications. # The principal difference between them is that the latter contains gnulib # directory. # # Libraries are isolated from gnulib and are not allowed to include its # header files. There are two exceptions, though. See NOTE before the # AC_CONFIG_LINKS statements, below. AC_SUBST(MU_LIB_COMMON_INCLUDES,'-I${top_builddir} -I${top_srcdir}/include -I${top_builddir}/include') AC_SUBST(MU_APP_COMMON_INCLUDES,'-I${srcdir} -I${top_srcdir}/include -I${top_srcdir}/lib -I${top_srcdir}/lib/gnu -I${top_builddir}/lib/gnu -I${top_builddir} -I${top_builddir}/include') # Use our replacement for the ylwrap tool AC_SUBST([MU_YLWRAP],'$(mu_aux_dir)/gylwrap --') dnl Check for programs AC_PROG_CC AM_PROG_CC_C_O gl_EARLY AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL MU_PROG_BISON MU_PROG_FLEX AM_PROG_LIBTOOL ## Predefine several variables used to display configuration status status_pam=no status_ltdl=no status_dbm= status_gsasl=no status_mysql=no status_pgsql=no status_ldap=no status_tcpwrap=maybe status_readline=probe dnl Internationalization macros. AM_GNU_GETTEXT([external], [need-ngettext]) AM_GNU_GETTEXT_VERSION(0.19) AM_ICONV AC_CHECK_HEADERS(iconv.h) AC_CHECK_TYPE(iconv_t,:, AC_DEFINE(iconv_t, int, [Conversion descriptor type]), [ #ifdef HAVE_ICONV_H # include #endif ]) # NOTE: Generally speaking, Mailutils libraries are not allowed to include # gnulib headers. The only exception is gettext.h, which is needed for # proper i18n. # # To make it accessible for the libraries, it is linked to include/. # AC_CONFIG_LINKS(include/gettext.h:lib/gnu/gettext.h) AC_CONFIG_LINKS(include/mailutils/sys/wordsplit.h:libmailutils/wordsplit/wordsplit.h) AH_BOTTOM([ #define DEFAULT_TEXT_DOMAIN PACKAGE ]) AC_SUBST(MU_LINK_POSTFLAGS,[`for opt in $LTLIBICONV; do case $opt in -[[lL]]*) echo $opt;; esac; done|tr '\n' ' '`]) # Check for large file support AC_SYS_LARGEFILE gl_INIT dnl Check for libraries USE_LOADABLE_MODULES=no AC_CHECK_LIB(resolv, res_query) LTDL_LIB= AC_SUBST(LTDL_LIB) if test "$enable_shared" = yes; then AC_CHECK_LIB(ltdl, lt_dlinit,[ AC_DEFINE(HAVE_LIBLTDL, 1, [Define to 1 if you have the `ltdl' library (-lltdl).]) status_ltdl=yes LTDL_LIB=-lltdl _USE_LOADABLE_MODULES=yes], # FIXME: Remove leading _ when ltd support # is added to SQL. [LTDL_LIB=""]) fi if test $USE_LOADABLE_MODULES = yes; then AC_DEFINE(USE_LOADABLE_MODULES,1, [Define if mailutils is able to use loadable modules]) fi MU_DEBUG_MODE # For adventurous characters: enable experimental/unfinished/buggy stuff AC_ARG_ENABLE([experimental], AC_HELP_STRING([--enable-experimental], [build experimental and/or unfinished utilities]), [mu_build_experimental="${enableval}"], [mu_build_experimental=no]) # Initialize authlibs AC_SUBST(MU_AUTHLIBS) AC_SUBST(MU_AUTHINCS) dnl Check for arguments AC_ARG_ENABLE([pam], AC_HELP_STRING([--disable-pam], [disable pam]), [ case "${enableval}" in yes) testpam=yes ;; no) testpam=no ;; *) AC_MSG_ERROR([bad value ${enableval} for --disable-pam]) ;; esac],[testpam=yes]) AC_ARG_WITH(tcp-wrappers, AC_HELP_STRING([--with-tcp-wrappers], [compile with TCP wrappers (libwrap) support]), [status_tcpwrap=${withval}], [status_tcpwrap=maybe]) saved_LIBS=$LIBS TCPWRAP_LIBRARIES= case $status_tcpwrap in yes) AC_CHECK_LIB(wrap, main,, [AC_MSG_ERROR([Required library libwrap not found])]) AC_CHECK_LIB(nsl, main, [TCPWRAP_LIBRARIES=-lnsl]) AC_CHECK_HEADERS(tcpd.h,, [AC_MSG_ERROR([Required header tcpd.h not found])]) status_tcpwrap=yes ;; maybe) AC_CHECK_LIB(wrap, main, [status_tcpwrap=yes], [status_tcpwrap=no]) AC_CHECK_LIB(nsl, main, [TCPWRAP_LIBRARIES=-lnsl]) AC_CHECK_HEADERS(tcpd.h, [status_tcpwrap=yes], [status_tcpwrap=no]) ;; no) ;; esac LIBS=$saved_LIBS if test "$status_tcpwrap" = "yes"; then TCPWRAP_LIBRARIES="$TCPWRAP_LIBRARIES -lwrap" AC_DEFINE_UNQUOTED(WITH_LIBWRAP, 1, [Define to 1 to use tcp wrappers.]) else # Provide placeholder functions only TCPWRAP_LIBRARIES= fi AC_SUBST([MU_TCPWRAP_LIBRARIES], "\${top_builddir}/lib/libmutcpwrap.a $TCPWRAP_LIBRARIES") AC_ARG_ENABLE([pthread], AC_HELP_STRING([--disable-pthread], [disable pthread]), [ case "${enableval}" in yes) usepthread=yes ;; no) usepthread=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-pthread) ;; esac],[usepthread=yes]) AC_ARG_WITH([readline], AC_HELP_STRING([--without-readline], [do not use readline]), [ case "${withval}" in yes) status_readline=yes ;; no) status_readline=no ;; *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; esac],[status_readline=probe]) AC_SUBST(SERV_AUTHLIBS) AC_SUBST(SERV_AUTHINCS) AC_ARG_WITH([gssapi], AC_HELP_STRING([--with-gssapi@<:@=PATH@:>@], [use GSSAPI authentication]), [status_gssapi=$withval], [status_gssapi=no]) if test "x$status_gssapi" != "xno"; then MU_CHECK_GSSAPI($status_gssapi) if test "$GSSAPI_IMPL" = "none"; then AC_CACHE_SAVE AC_MSG_RESULT([GSSAPI libraries not found]) else # Output produced by `krb5-config --libs' may contain `-Wl,-rpath -Wl,DIR' # options. Once they are added to SERV_AUTHLIBS, libtool, when creating # relink command line in wrapper files for executables, places them at the # beginnig of the option list and adds its own -rpath directives at # the end. Executables created by such command will look for the runtime # libraries first in DIR and then in the local tree subdirectories. Thus, # if DIR contains libraries from a previous installation of Mailutils, the # programs will use old libraries. # # Obviously, libtool should be fixed to place user-added -rpath directives # after the ones added by it. For the time being I work around this bug by # removing any -Wl directives from GSSAPI_LIBS. # for arg in $GSSAPI_LIBS do case $arg in -Wl,*) ;; *) SERV_AUTHLIBS="$SERV_AUTHLIBS $arg" esac done SERV_AUTHINCS="$SERV_AUTHINCS $GSSAPI_CFLAGS" AC_DEFINE(WITH_GSSAPI,1,[Define if mailutils is using GSSAPI]) fi fi AM_CONDITIONAL([MU_COND_GSSAPI],[test "$status_gssapi" = "yes"]) MU_CHECK_GSASL(0.2.3, [ AC_DEFINE(WITH_GSASL,1,[Define if mailutils is using GNU SASL]) MU_AUTHLIBS="$MU_AUTHLIBS $GSASL_LIBS" status_gsasl=yes]) AM_CONDITIONAL([MU_COND_GSASL],[test "$status_gsasl" = "yes"]) AC_SUBST(SITE_CRAM_MD5_PWD,"\$(sysconfdir)/cram-md5.pwd") AC_ARG_WITH(cram-passwd, AC_HELP_STRING([--with-cram-passwd=FILE], [keep passwords for CRAM-MD5 authentication method in FILE (default $SITE_CRAM_MD5_PWD)]), [case "${withval}" in /*) SITE_CRAM_MD5_PWD="${withval}";; ./*|../*) AC_MSG_ERROR(Bad value for --with-cram-passwd);; *) SITE_CRAM_MD5_PWD="\$(sysconfdir)/${withval}";; esac]) MU_CHECK_GNUTLS([1.2.1],[ MU_AUTHLIBS="$MU_AUTHLIBS $TLS_LIBS" AC_DEFINE(WITH_GNUTLS,1,[Define if mailutils is using GNU TLS]) AC_DEFINE(WITH_TLS,1,[Define if mailutils is using TLS]) status_gnutls=yes ],[ status_gnutls=no ]) AM_CONDITIONAL([MU_COND_GNUTLS], [test "$status_gnutls" = yes]) AC_SUBST(SITE_MAIL_RC) AC_ARG_WITH([mail-rc], AC_HELP_STRING([--with-mail-rc=FILE], [use FILE instead of $sysconfdir/mail.rc]), [ case "${withval}" in /*) SITE_MAIL_RC="${withval}";; *) SITE_MAIL_RC="\$(sysconfdir)/${withval}";; esac], [SITE_MAIL_RC="\$(sysconfdir)/mail.rc"]) MU_CONF_MAILDIR= AC_ARG_WITH([mail-spool], AC_HELP_STRING([--with-mail-spool=PATH], [use PATH instead of /var/spool/mail]), [ case "$withval" in /*/) MU_CONF_MAILDIR="\"${withval}\"";; /*) MU_CONF_MAILDIR="\"${withval}/\"";; *:*[[/=]]) MU_CONF_MAILDIR="\"${withval}\"";; *) AC_MSG_ERROR(--with-mail-spool must be an absolute path or a valid URL);; esac]) if test "x$MU_CONF_MAILDIR" != x; then AC_DEFINE_UNQUOTED(MU_CONF_MAILDIR,$MU_CONF_MAILDIR, [Pathname of the mail spool directory]) fi PATHDEFS_H=pathdefs.h MU_CONFIG_PATHS($srcdir/paths,PATHDEFS_H) AH_BOTTOM( [/* Defaults for PATH_ variables. */ #include #ifdef MU_CONF_MAILDIR # define MU_PATH_MAILDIR MU_CONF_MAILDIR #else # define MU_PATH_MAILDIR PATH_MAILDIR #endif]) ################################## # DBM Support ################################## AC_SUBST(DBMLIBS) AC_SUBST(DBMINCLUDES) enable_dbm= disable_dbm=no all_dbm="GDBM BDB TC NDBM" AC_ARG_WITH([dbm], AC_HELP_STRING([--with-dbm], [build DBM support (default yes)]), [ case "${withval}" in yes) enable_dbm="$all_dbm";; no) enable_dbm=no;; *) enable_dbm="$withval" ;; esac]) AC_ARG_WITH([gdbm], AC_HELP_STRING([--with-gdbm], [use GNU DBM]), [ case "${withval}" in yes) enable_dbm="$enable_dbm GDBM";; no) disable_dbm="$disable_dbm GDBM";; *) AC_MSG_ERROR(bad value ${withval} for --with-gdbm) ;; esac]) AC_ARG_WITH([berkeley-db], AC_HELP_STRING([--with-berkeley-db@<:@=LIBDB@:>@], [use Berkeley DB]), [ case "${withval}" in yes) enable_dbm="$enable_dbm BDB";; no) disable_dbm="$disable_dbm BDB";; *) enable_dbm="$enable_dbm BDB=${withval}";; esac]) AC_ARG_WITH([ndbm], AC_HELP_STRING([--with-ndbm], [use NDBM]), [ case "${withval}" in yes) enable_dbm="$enable_dbm NDBM";; no) disable_dbm="$disable_dbm NDBM";; *) AC_MSG_ERROR(bad value ${withval} for --with-ndbm) ;; esac]) AC_ARG_WITH([tokyocabinet], AC_HELP_STRING([--with-tokyocabinet], [use Tokyo Cabinet]), [ case "${withval}" in yes) enable_dbm="$enable_dbm TC";; no) disable_dbm="$disable_dbm TC";; *) AC_MSG_ERROR(bad value ${withval} for --with-tokyocabinet) ;; esac]) AC_ARG_WITH([kyotocabinet], AC_HELP_STRING([--with-kyotocabinet], [use Kyoto Cabinet]), [ case "${withval}" in yes) enable_dbm="$enable_dbm KC";; no) disable_dbm="$disable_dbm KC";; *) AC_MSG_ERROR(bad value ${withval} for --with-kyotocabinet) ;; esac]) dnl Check for DBM AH_TEMPLATE([WITH_BDB], [Define to the major version of Berkeley DB library to use]) status_bdb=no ## Set the variable status_bdb to $1 if: ## ## 1. Function $3 is defined in the library $2 ## 2. Header file db.h is available ## ## Then check if the major version, minor version and patchlevel of the ## library matches those from the header. If so, define WITH_BDB ## to the version (i.e. $1 with all dots removed). Otherwise, report ## an error and stop. ## check_bdb() { ver=`echo $1 | tr -d '.'` major=`expr $ver : '\(.\).*'` status_bdb=no AC_CHECK_LIB($2, $3, [AC_CHECK_HEADERS(db.h) if test $ac_cv_header_db_h = yes; then DBMLIBS="$DBMLIBS -l$2" MU_DB2_CURSOR status_bdb="$1" fi]) if test "$status_bdb" = no; then : else save_LIBS=$LIBS LIBS="$LIBS $DBMLIBS" AC_RUN_IFELSE( [AC_LANG_PROGRAM([#include "db.h"], [int v_major, v_minor, v_patch; db_version(&v_major, &v_minor, &v_patch); return !(DB_VERSION_MAJOR == $major && v_major == DB_VERSION_MAJOR && v_minor == DB_VERSION_MINOR && v_patch == DB_VERSION_PATCH); ])], [], [status_bdb=no]) LIBS=$save_LIBS if test "$status_bdb" != no; then AC_DEFINE_UNQUOTED(WITH_BDB,$ver) fi fi } ## Check for the Berkeley DB library version $1, assuming Slackware-like ## installation layout (header files in /usr/incude/db$vn and library named ## libdb-$version.so, where $version is the library version and $vn is ## $version with all dots removed. ## check_slackware_bdb() { dir=db`echo $1|tr -d '.'` save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I/usr/include/$dir" check_bdb "$1" db-$1 db_create CPPFLAGS=$save_CPPFLAGS if test "$status_bdb" = "$1"; then DBMINCLUDES="$DBMINCLUDES -I/usr/include/$dir" status_dbm="$status_dbm,Berkeley DB v. $status_bdb" fi } check_dbm_impl() { case "$1" in GDBM) AC_CHECK_LIB(gdbm, gdbm_open, [AC_CHECK_HEADERS(gdbm.h, AC_DEFINE(WITH_GDBM,1, [Enable use of GNU DBM library])) DBMLIBS="$DBMLIBS -lgdbm" status_dbm="$status_dbm,GDBM"]);; BDB) for version in 6 5 4 3 2 do case $version in 6|5|4|3) func=db_create;; 2) func=db_open;; esac check_bdb $version db $func if test "$status_bdb" != no; then status_dbm="$status_dbm,Berkeley DB v. $status_bdb" break; fi done;; BDB=*) name=`expr $1 : 'BDB=\(.*\)'` case $name in [[0-9]]*) check_slackware_bdb $name;; *) for version in 6 5 4 3 2 do case $version in 6|5|4|3) func=db_create;; 2) func=db_open;; esac check_bdb $version $name $func if test "$status_bdb" != no; then status_dbm="$status_dbm,Berkeley DB v. $status_bdb" break; fi done ;; esac ;; NDBM) has_ndbm=no AC_CHECK_HEADERS(ndbm.h,[has_ndbm=yes]) if test $has_ndbm = yes; then AC_CHECK_FUNC(dbm_open,:,[has_ndbm=no]) if test $has_ndbm = no; then AC_CHECK_LIB(ndbm, dbm_open, [DBMLIBS="$DBMLIBS -lndbm"]) fi fi if test $has_ndbm = yes; then AC_DEFINE(WITH_NDBM,1,[Enable use of NDBM]) status_dbm="$status_dbm,NDBM" save_LIBS=$LIBS LIBS="$LIBS $DBMLIBS" AC_CHECK_FUNCS(dbm_dirfno dbm_pagfno) LIBS=$save_LIBS fi ;; TC) AC_CHECK_LIB(tokyocabinet, tchdbnew, [AC_CHECK_HEADERS(tchdb.h, AC_DEFINE(WITH_TOKYOCABINET,1, [Enable use of Tokyo Cabinet])) DBMLIBS="$DBMLIBS -ltokyocabinet" status_dbm="$status_dbm,Tokyo Cabinet"]);; KC) AC_CHECK_LIB(kyotocabinet, kcdbnew, [AC_CHECK_HEADERS(kclangc.h, AC_DEFINE(WITH_KYOTOCABINET,1, [Enable use of Kyoto Cabinet])) DBMLIBS="$DBMLIBS -lkyotocabinet" status_dbm="$status_dbm,Kyoto Cabinet"]);; esac } if test -z "$enable_dbm"; then enable_dbm=$all_dbm fi for impl in $enable_dbm do if echo "$disable_dbm" | grep $impl >/dev/null; then : # skip it else check_dbm_impl $impl fi done if test -z "$status_dbm"; then status_dbm=no else status_dbm=`echo "$status_dbm" | sed 's/^,//'` AC_DEFINE([ENABLE_DBM], 1, [Define if DBM interface is compiled]) fi AM_CONDITIONAL([MU_COND_DBM], [test "$status_dbm" != no]) #################### AC_MSG_CHECKING(for log facility) log_facility="LOG_MAIL" AC_ARG_WITH([log-facility], AC_HELP_STRING([--with-log-facility=facility], [enable logging to the given facility]), [AC_TRY_COMPILE([#include ], int lf = $withval, log_facility=$withval)]) AC_DEFINE_UNQUOTED(LOG_FACILITY, $log_facility, [Default syslog facility]) fstr=`echo "$log_facility" | tr A-Z a-z | sed 's/log_//'` AC_DEFINE_UNQUOTED(LOG_FACILITY_STRING, "$fstr", [String representation of the default syslog facility]) AC_MSG_RESULT($log_facility) dnl Check for headers AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(errno.h fcntl.h inttypes.h libgen.h limits.h\ malloc.h obstack.h paths.h shadow.h socket.h sys/socket.h stdarg.h stdio.h\ stdlib.h string.h strings.h sys/file.h sysexits.h syslog.h termcap.h\ termios.h termio.h sgtty.h utmp.h utmpx.h unistd.h wchar.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_INTPTR_T AC_CHECK_TYPE(ssize_t, , AC_DEFINE(ssize_t, int, [Define to int if does not define])) AC_TYPE_SIGNAL AC_DECL_SYS_SIGLIST AC_STRUCT_TIMEZONE AC_CHECK_TYPE(ino_t, , AC_DEFINE(ino_t, unsigned long, [Define to unsigned long if does not define])) AC_CHECK_TYPE(dev_t, , AC_DEFINE(dev_t, unsigned long, [Define to unsigned long if does not define])) AC_CHECK_TYPE(socklen_t, , AC_DEFINE(socklen_t, int, [Define to int if does not define]), [ #if HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif #ifdef HAVE_SOCKET_H # include #endif ]) AC_CHECK_TYPE(long long, , AC_DEFINE(LONG_LONG, long, [Define to long if compiler does not support])) AC_CHECK_TYPE(long double, , AC_DEFINE(LONG_DOUBLE, double, [Define to double if compiler does not support])) AC_SUBST(MU_ULONG_MAX_1) AC_RUN_IFELSE([AC_LANG_PROGRAM( [#include #include #include ], [ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); fprintf(f, "%lu\n", ULONG_MAX-1); fclose(f); return 0;] )], [MU_ULONG_MAX_1=`cat conftest.val`], [MU_ULONG_MAX_1=0], [MU_ULONG_MAX_1=0]) AC_STRUCT_TM AC_CHECK_MEMBERS([struct tm.tm_zone, struct tm.tm_gmtoff, struct tm.tm_isdst], ,, [#include #include <$ac_cv_struct_tm>]) dnl Check for working functions ##### # Determine the size of off_t and define an equivalent mu_off_t type. # We cannot use off_t in the library since its size depends on whether # large file support is used or not, which will lead to arbitrary crashes # if a user application and the library use off_t of different sizes. AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) AC_SUBST(MU_OFF_TYPE) AC_SUBST(MU_PRI_OFF_T) if test $ac_cv_sizeof_off_t -eq $ac_cv_sizeof_long; then MU_OFF_TYPE=long MU_PRI_OFF_T='ld' elif test $ac_cv_sizeof_off_t -eq $ac_cv_sizeof_long_long; then MU_OFF_TYPE="long long" MU_PRI_OFF_T='lld' else AC_MSG_ERROR([Cannot find ${ac_cv_sizeof_off_t}-byte type, suitable for mu_off_t]) fi AC_FUNC_MMAP AC_CHECK_DECLS([strsignal]) AC_CHECK_DECLS(environ, , , [ #include #include ]) AH_BOTTOM([ #if !HAVE_DECL_STRSIGNAL extern char *strsignal (int); #endif ]) AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim setreuid \ setresuid seteuid setlocale vfork _exit tcgetattr tcsetattr) AC_FUNC_FSEEKO AC_FUNC_SETVBUF_REVERSED AH_BOTTOM([ #if !defined (HAVE_FSEEKO) # define fseeko fseek #endif #if defined (SETVBUF_REVERSED) # define SETVBUF(str,buf,mode,size) setvbuf(str,mode,buf,size) #else # define SETVBUF(str,buf,mode,size) setvbuf(str,buf,mode,size) #endif ]) AC_CHECK_FUNCS(fgetpwent) ## Check for presence of utmp.h and utmp-related functions MU_CHECK_UTMP dnl Check for libraries AH_BOTTOM([ /* program_name is used by lib/error.c */ #define program_name program_invocation_name ]) # IPv6 support MU_ENABLE_IPV6 ## FriBidi support AC_CHECK_FUNCS(wcwidth) AC_SUBST(FRIBIDI_LIBS) use_fribidi=yes AC_ARG_WITH([fribidi], AC_HELP_STRING([--without-fribidi], [do not compile FriBidi support]), [use_fribidi=$withval]) AH_TEMPLATE(HAVE_LIBFRIBIDI, [Define to 1 if you have the `fribidi' library (-lfribidi).]) AH_TEMPLATE(HAVE_FRIBIDI_CHARSET_CAP_RTL, [Define to 1 if fribidi headers declare FRIBIDI_CHARSET_CAP_RTL type]) AH_BOTTOM([ #ifndef HAVE_FRIBIDI_CHARSET_CAP_RTL # define FRIBIDI_CHARSET_CAP_RTL FRIBIDI_CHAR_SET_CAP_RTL #endif]) if test "$use_fribidi" = "yes"; then AC_CHECK_HEADERS(fribidi/fribidi.h) if test $ac_cv_header_fribidi_fribidi_h = yes; then AC_CHECK_LIB(fribidi, fribidi_log2vis, [AC_DEFINE(HAVE_LIBFRIBIDI,1) FRIBIDI_LIBS=-lfribidi], [use_fribidi=no]) AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], [FriBidiCharSet s = FRIBIDI_CHARSET_CAP_RTL;])], [AC_DEFINE(HAVE_FRIBIDI_CHARSET_CAP_RTL)]) else use_fribidi=no fi fi ## SQL support AH_TEMPLATE(USE_SQL,[Enables SQL support]) AH_TEMPLATE(HAVE_MYSQL,[Define if you have libmysql]) AH_TEMPLATE(HAVE_PGSQL,[Define if you have libpq]) SQL_MODULES= AC_SUBST(SQL_MODULES) SQL_LIBOBJS= AC_SUBST(SQL_LIBOBJS) SQL_LTLIBOBJS= AC_SUBST(SQL_LTLIBOBJS) BUILD_SQL= AC_SUBST(BUILD_SQL) AC_SUBST(SQLLIB) SQL_LOADABLE_MODULES= AC_SUBST(SQL_LOADABLE_MODULES) AC_DEFUN([MU_SQL_LDADD],[ if test "$USE_LOADABLE_MODULES" = yes; then $1=$2 else SQLLIB="$SQLLIB $2" fi ]) add_sql_module() { case $SQL_MODULES in *$1*) AC_MSG_FAILURE([$1 specified twice]);; *) SQL_MODULES="$SQL_MODULES $1";; esac } ## ********* ## MySQL ## ********* AC_SUBST(MYSQLLIBS) mysql_init() { MU_CHECK_LIB(mysqlclient, mysql_real_connect, [-lm], [ AC_DEFINE(USE_SQL) AC_DEFINE(HAVE_MYSQL) MU_SQL_LDADD(MYSQLLIBS, $mu_cv_lib_mysqlclient) status_mysql=yes ], [ AC_MSG_FAILURE([The requested library libmysqlclient is not found or is unusable])], [/usr/local/lib/mysql /usr/lib/mysql]) } AC_ARG_WITH(mysql, AC_HELP_STRING([--with-mysql], [Configure to work with MySQL]), [case $withval in yes) add_sql_module "mysql" ;; no) ;; esac]) # ********* # Postgres # ********* postgres_init() { MU_CHECK_LIB(pq, PQconnectStart, [], [ AC_DEFINE(USE_SQL) AC_DEFINE(HAVE_PGSQL) MU_SQL_LDADD(POSTGRESLIBS, $mu_cv_lib_pq) status_pgsql=yes ], [ AC_MSG_FAILURE([The requested library libpq is not found or is unusable])], [/usr/local/pgsql/lib /usr/pgsql/lib]) } AC_ARG_WITH(postgres, AC_HELP_STRING([--with-postgres], [Configure to work with Postgres]), [case $withval in yes) add_sql_module "postgres" ;; no) ;; esac]) # ********* # ODBC # ********* AH_TEMPLATE(USE_SQL_ODBC,[When defined, enable ODBC support]) AH_TEMPLATE(HAVE_LIBODBC,[Define if you have libodbc or libiodbc]) AC_SUBST(ODBCLIBS) check_lib_odbc() { MU_CHECK_LIB(odbc, SQLAllocHandle, [], [ AC_DEFINE(USE_SQL_ODBC) AC_DEFINE(HAVE_LIBODBC) MU_SQL_LDADD(ODBCLIBS, $mu_cv_lib_odbc)], [AC_MSG_FAILURE([The requested library libobdc is not found or is unusable])], [/usr/local/lib]) } check_lib_iodbc() { MU_CHECK_LIB(iodbc, SQLAllocHandle, [], [ AC_DEFINE(USE_SQL_ODBC) AC_DEFINE(HAVE_LIBODBC) MU_SQL_LDADD(ODBCLIBS, $mu_cv_lib_iodbc)], [AC_MSG_FAILURE([The requested library libiodbc is not found or is unusable])], [/usr/local/lib]) } with_flag_used=odbc odbc_init() { case $with_flag_used in yes|odbc|ODBC) check_lib_odbc ;; iodbc|iODBC|IODBC) check_lib_iodbc ;; no) ;; esac } AC_ARG_WITH(odbc, AC_HELP_STRING([--with-odbc[={odbc|iodbc}]], [Configure to work with ODBC]), [case $withval in yes|odbc|ODBC|iodbc|iODBC|IODBC) add_sql_module "odbc" with_flag_used=$withval ;; no) with_flag_used=$withval ;; *) AC_MSG_ERROR([unsupported option value: $withval]) esac]) ### General SQL support AC_ARG_WITH(sql, AC_HELP_STRING([--with-sql=modlist], [Configure to work with SQL]), [for mod in `echo $withval | tr ':,' ' '` do if test -r $srcdir/sql/${mod}.c; then add_sql_module "${mod}" else AC_MSG_ERROR(No such SQL module: $mod) fi done]) dummy_init() { : } if test -n "$SQL_MODULES"; then USE_SQL=1 AC_DEFINE(USE_SQL) BUILD_SQL=libsql.la SQLLIB='${top_builddir}/sql/libsql.la' for module in $SQL_MODULES do ${module:-dummy}_init if test $USE_LOADABLE_MODULES = yes; then SQL_LOADABLE_MODULES="$SQL_LOADABLE_MODULES ${module}.la" else SQL_LIBOBJS="$SQL_LIBOBJS ${module}.o" fi done S=`echo "$SQL_LIBOBJS" | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` SQL_LTLIBOBJS=`echo "$S" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` AC_CONFIG_COMMANDS([sql/modlist.h], [$srcdir/mu-aux/sqlmod.sh $SQL_MODULES > sql/modlist.h], [if test $USE_LOADABLE_MODULES = yes; then SQL_MODULES= else SQL_MODULES="$SQL_MODULES" fi]) fi # LDAP support AC_ARG_WITH(ldap, AC_HELP_STRING([--with-ldap], [Configure to work with OpenLDAP]), [case $withval in yes) status_ldap=maybe ;; no) status_ldap=no ;; esac], [status_ldap=maybe]) if test $status_ldap = maybe; then AC_CHECK_LIB(ldap, ldap_bind,[ status_ldap=yes AC_DEFINE(WITH_LDAP, 1, [Define to 1 if you want to use -lldap]) MU_AUTHLIBS="$MU_AUTHLIBS -lldap"], [status_ldap=no]) fi # Mailbox quota support AM_CONDITIONAL([MU_COND_MAILBOX_QUOTA],[test -n "$status_dbm$status_mysql"]) # Virtual domain support MU_ENABLE_SUPPORT(virtual-domains) AC_SUBST(SITE_VIRTUAL_PWDDIR) AC_ARG_WITH([virtual-pwddir], AC_HELP_STRING([--with-virtual-pwddir=DIR], [use DIR instead of $sysconfdir/domain]),[ case "${withval}" in /*) SITE_VIRTUAL_PWDDIR="${withval}";; *) SITE_VIRTUAL_PWDDIR="\$(sysconfdir)/${withval}";; esac], [SITE_VIRTUAL_PWDDIR="\$(sysconfdir)/domain"]) # Mailbox formats MU_LIB_LOCAL_MAILBOX='$(MU_LIB_MBOX)' MU_ENABLE_REMOTE_MAILBOX_FORMAT([imap]) # This is not a full-fledged testsuite yet, but it might be useful anyways AC_CONFIG_FILES([libproto/imap/tests/Makefile]) MU_ENABLE_REMOTE_MAILBOX_FORMAT([pop]) MU_ENABLE_LOCAL_MAILBOX_FORMAT([nntp],[],[],["$mu_build_experimental" = "yes"]) MU_ENABLE_LOCAL_MAILBOX_FORMAT([mh]) MU_ENABLE_LOCAL_MAILBOX_FORMAT([maildir]) MU_ENABLE_LOCAL_MAILBOX_FORMAT([dotmail]) AC_SUBST(MU_SMTP_PROGRAMS_BUILD) AC_SUBST(MU_SMTP_DEJATOOL) MU_ENABLE_SUPPORT(smtp, [MU_SMTP_PROGRAMS_BUILD='$(MU_SMTP_PROGRAMS_LIST)' MU_SMTP_DEJATOOL='$(SMTP_DEJATOOL)']) MU_ENABLE_SUPPORT(sendmail) MU_ENABLE_SUPPORT(prog) # FIXME: Should be --with-radius MU_ENABLE_SUPPORT(radius, [AM_GNU_RADIUS(1.6, [MU_AUTHLIBS="$MU_AUTHLIBS -lgnuradius" mu_cv_enable_radius=yes], [mu_cv_enable_radius=no])]) if test x"$testpam" = x"yes"; then AC_CHECK_HEADERS(security/pam_appl.h) if test x"$ac_cv_header_security_pam_appl_h" = x"yes"; then AC_CHECK_LIB(dl, dlopen, [LDL=-ldl], [LDL=]) AC_CHECK_LIB(pam, pam_start, [MU_AUTHLIBS="$MU_AUTHLIBS -lpam $LDL" ac_cv_have_libpam="yes"],, $LDL) AC_DEFINE(USE_LIBPAM,1,[Enable use of PAM]) status_pam=yes fi fi AC_CHECK_HEADERS(crypt.h) AC_CHECK_DECLS(crypt, , ,[ #include #ifdef HAVE_CRYPT_H # include #endif]) AH_BOTTOM([ #if !HAVE_DECL_CRYPT char *crypt(const char *key, const char *salt); #endif]) AC_CHECK_LIB(crypt, crypt) # When using thread support some platforms need -D_REENTRANT to get the # right prototypes including errno. dnl Check threading support # We have to rearrange things a little, it appears that the new autoconf # does not like long cascading AC_CHECK_LIB. if test x"$usepthread" = x"yes"; then AC_CHECK_LIB(pthread, pthread_cancel, have_libpthread=yes, have_libpthread=no) if test x"$have_libpthread" = x"yes"; then AC_CHECK_HEADERS(pthread.h, AC_DEFINE(WITH_PTHREAD,1, [Define this to enable POSIX threads safety])) LIBS="$LIBS -lpthread" AC_DEFINE(_REENTRANT,1,[Reentrant calls]) AC_CHECK_FUNCS(pthread_rwlock_init) else AC_SEARCH_LIBS(pthread_cancel, pthread, [AC_CHECK_FUNCS(pthread_rwlock_init) AC_CHECK_HEADERS(pthread.h, AC_DEFINE(WITH_PTHREAD,1, [Define this to enable POSIX threads safety])) AC_DEFINE(_REENTRANT,1,[Reentrant calls])]) fi fi dnl Do we need extra libs for networking? AC_CHECK_FUNC(gethostbyname, [true], AC_CHECK_LIB(nsl, gethostbyaddr, LIBS="-lnsl $LIBS")) AC_CHECK_FUNC(socket, [true], AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS")) dnl Check for Curses libs. for lib in ncurses curses termcap do AC_CHECK_LIB($lib, tputs, [CURSES_LIBS="-l$lib"; break]) done AC_SUBST(CURSES_LIBS) dnl Check for GNU Readline AC_SUBST(READLINE_LIBS) if test "$status_readline" != "no"; then dnl FIXME This should only link in the curses libraries if it's dnl really needed! saved_LIBS=$LIBS LIBS="$LIBS $CURSES_LIBS" AC_CHECK_LIB(readline, readline, [status_readline=yes], [if test "$status_readline" = "yes"; then AC_MSG_ERROR(readline requested but does not seem to be installed) else status_readline=no fi ]) LIBS=$saved_LIBS if test "$status_readline" = "yes"; then AC_CHECK_HEADERS(readline/readline.h, AC_DEFINE(WITH_READLINE,1,[Enable use of readline])) READLINE_LIBS="-lreadline $CURSES_LIBS" saved_LIBS=$LIBS LIBS="$LIBS $READLINE_LIBS" AC_CHECK_FUNCS(rl_completion_matches) LIBS=$saved_LIBS fi else status_readline=no fi AM_CONDITIONAL([MU_COND_READLINE], [test "$status_readline" = "yes"]) # Check for libunistring AC_ARG_WITH([unistring], AC_HELP_STRING([--without-unistring], [do not use unistring]), [ case "${withval}" in yes) status_unistring=yes ;; no) status_unistring=no ;; *) AC_MSG_ERROR(bad value ${withval} for --without-unistring) ;; esac],[status_unistring=probe]) AC_SUBST(UNISTRING_LIBS) if test "$status_unistring" != "no"; then AC_CHECK_HEADERS([unicase.h unistr.h]) if test "$ac_cv_header_unicase_h$ac_cv_header_unistr_h" = yesyes; then AC_CHECK_LIB(unistring, u8_tolower, [UNISTRING_LIBS=-lunistring status_unistring=yes], [if test "$status_unistring" = "yes"; then AC_MSG_ERROR(required library libunistring not found) else status_unistring=no fi]) elif test "$status_unistring" = "yes"; then AC_MSG_ERROR(header files for the required library libunistring not found) else status_unistring=no fi fi AH_TEMPLATE([WITH_UNISTRING],[Define to 1 if using libunistring]) if test "$status_unistring" = "yes"; then AC_DEFINE(WITH_UNISTRING,1,[Using libunistring]) fi AM_CONDITIONAL([MU_COND_UNISTRING],[test "$status_unistring" = "yes"]) AH_BOTTOM([ /* Newer versions of readline have rl_completion_matches */ #ifndef HAVE_RL_COMPLETION_MATCHES # define rl_completion_matches completion_matches #endif]) AC_SUBST(POPAUTH) if test "$status_dbm" != no; then POPAUTH='popauth$(EXEEXT)' fi dnl Check for Guile AC_SUBST([GUILE_BINDIR]) AC_SUBST([LIBMU_SCM]) AC_SUBST([LIBMU_SCM_DEPS]) AC_SUBST([MU_GUILE_SIEVE_MOD_DIR]) GINT_INIT([gint],[2.2.0 with-guile], [useguile=yes AC_DEFINE([WITH_GUILE],1,[Enable Guile support]) GUILE_BINDIR=`guile-config info bindir` if test -z "$GUILE_BINDIR"; then GUILE_BINDIR="`guile-config info prefix`/bin" fi LIBMU_SCM='${top_builddir}/libmu_scm/libmu_scm.la' LIBMU_SCM_DEPS='${MU_LIB_MAILBOX} ${MU_LIB_MAILER}' MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/$(PACKAGE)/sieve-modules' GINT_INCLUDES='${MU_APP_COMMON_INCLUDES}' if test $REPLACE_STRERROR = 1; then GINT_LDADD='${top_builddir}/lib/gnu/libgnu.la' fi ],[useguile=no]) AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"]) dnl Check for Emacs site-lisp directory AM_PATH_LISPDIR if test "$EMACS" != "no"; then lisp_LISP='$(LISPSRC)' fi AC_SUBST(lisp_LISP) # Check for Python AC_ARG_ENABLE([python], AC_HELP_STRING([--disable-python], [do not build Python interface]), [ case "${enableval}" in yes) status_python=yes ;; no) status_python=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;; esac],[status_python=yes]) AC_SUBST(PYTHON_LIBS) AC_SUBST(PYTHON_INCLUDES) AC_SUBST(PYTHON_MAJOR) if test "$status_python" = yes; then AM_PATH_PYTHON(2.5.0,, [status_python=no]) if test "$status_python" = yes; then AC_ARG_VAR([PYTHON_CONFIG], [The name of python-config binary]) AC_PATH_PROG([PYTHON_CONFIG], python-config) if test -n "$PYTHON_CONFIG"; then case $PYTHON_VERSION in 2.*) PYTHON_MAJOR=2;; 3.*) PYTHON_MAJOR=3;; *) AC_MSG_WARN([unsupported Python version $PYTHON_VERSION]) status_python=no esac PYTHON_LIBS=`$PYTHON_CONFIG --libs` PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` else status_python=no fi if test "$status_python" = yes; then AC_DEFINE(WITH_PYTHON,1,[Enable Python support]) MU_LIB_PY='${top_builddir}/python/$(PYTHON_MAJOR)/libmu_py/libmu_py.la' AC_SUBST([PYTHON_SITE_DIR]) AC_SUBST([PYTHON_EXEC_DIR]) AC_ARG_WITH([pythondir], AC_HELP_STRING([--with-pythondir=DIR], [Specify the directory to install Python modules to]), [case $withval in /*) PYTHON_SITE_DIR="${withval}/mailutils" PYTHON_EXEC_DIR="${withval}/mailutils";; *) AC_MSG_ERROR([Argument to --with-pythondir must be an absolute directory name]);; esac], [PYTHON_SITE_DIR='$(pkgpythondir)' PYTHON_EXEC_DIR='$(pkgpyexecdir)']) fi fi fi AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes]) AM_CONDITIONAL([MU_COND_PYTHON2], [test "$status_python" = yes && test "$PYTHON_MAJOR" = "2"]) AM_CONDITIONAL([MU_COND_PYTHON3], [test "$status_python" = yes && test "$PYTHON_MAJOR" = "3"]) AC_SUBST(MU_CXX_EXAMPLES_BUILD) MU_ENABLE_SUPPORT(cxx, [MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)' MU_LIB_CPP='${top_builddir}/libmu_cpp/libmu_cpp.la'], [], ["$mu_build_experimental" = "yes"]) # Default mailbox record # Note: 1. Support for mbox type is always enabled. # 2. Only local mailbox types are allowed for MU_DEFAULT_SCHEME AC_ARG_VAR([MU_DEFAULT_SCHEME], [Default mailbox record. Allowed values are: mbox (default), dotmail, mh, and maildir.]) if test -z "$MU_DEFAULT_SCHEME"; then MU_DEFAULT_SCHEME=mbox fi case $MU_DEFAULT_SCHEME in mbox) ;; mh|maildir|dotmail) eval testval=\$mu_cv_enable_$MU_DEFAULT_SCHEME if test "$testval" != yes; then AC_MSG_ERROR([Cannot set default mailbox record type: support for $MU_DEFAULT_SCHEME is disabled]) fi ;; *) AC_MSG_ERROR([Unknown or not allowed mailbox scheme: $MU_DEFAULT_SCHEME]);; esac AC_DEFINE_UNQUOTED(MU_DEFAULT_SCHEME, "$MU_DEFAULT_SCHEME", [Default mailbox scheme.]) AC_SUBST(MU_DEFAULT_RECORD,mu_${MU_DEFAULT_SCHEME}_record) AC_ARG_VAR([DEFAULT_CUPS_CONFDIR], [Set the location of CUPS configuration directory. Default is \$sysconfdir/cups]) AC_SUBST(DEFAULT_CUPS_CONFDIR) if test -z "$DEFAULT_CUPS_CONFDIR"; then DEFAULT_CUPS_CONFDIR='$(sysconfdir)/cups' fi dnl *********************************************************************** dnl Configure particular utilities dnl *********************************************************************** AC_ARG_ENABLE([build-servers], AC_HELP_STRING([--enable-build-servers], [build servers]), [mu_build_servers="${enableval}"], [mu_build_servers=yes]) AC_ARG_ENABLE([build-clients], AC_HELP_STRING([--enable-build-clients], [build client utilities]), [mu_build_clients="${enableval}"], [mu_build_clients=yes]) server_list= client_list= MU_ENABLE_BUILD(pop3d,,,["$mu_build_servers" = yes],,[server_list]) MU_ENABLE_BUILD(imap4d,,,["$mu_build_servers" = yes],,[server_list]) MU_ENABLE_BUILD(comsat,,,["$mu_build_servers" = yes],,[server_list]) MU_ENABLE_BUILD(mda,[mu_build_mda_tools=yes],,["$mu_build_servers" = yes],,[server_list]) MU_ENABLE_BUILD(lmtpd,[mu_build_mda_tools=yes],,["$mu_build_servers" = yes],,[server_list]) MU_ENABLE_BUILD(putmail,[mu_build_mda_tools=yes],,["$mu_build_clients" = yes],,[client_list]) AM_CONDITIONAL([MU_COND_MDA_TOOLS],[test "$mu_build_mda_tools" = yes]) MU_ENABLE_BUILD(frm,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(mail,,,["$mu_build_clients" = yes],,[client_list]) AC_SUBST([MAILBINDIR],'${bindir}') AC_ARG_WITH([mailbindir], [AC_HELP_STRING([--with-mailbindir=DIR], [install mail to DIR [[BINDIR]]])], [MAILBINDIR=$withval]) MU_ENABLE_BUILD(sieve,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(messages,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(readmsg,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(dotlock,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(movemail,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(mimeview,,,["$mu_build_clients" = yes],,[client_list]) MU_ENABLE_BUILD(mh,,,["$mu_build_clients$mu_cv_enable_mh" = yesyes],,[client_list]) AC_SUBST(MH_BIN_DIR) AC_ARG_WITH([mh-bindir], AC_HELP_STRING([--with-mh-bindir], [Set the directory where to install the MH binaries. If it starts with '/' it is taken as an absolute path specification, otherwise ${prefix} is prepended to it. (Default: ${exec_prefix}/bin/mu-mh)]), [case "${withval}" in /*) MH_BIN_DIR=${withval};; *) MH_BIN_DIR="\${prefix}/${withval}";; esac], [MH_BIN_DIR='${exec_prefix}/bin/mu-mh']) test -z "$server_list" && server_list=" [NONE]" test -z "$client_list" && client_list=" [NONE]" # Create the installable types.h AC_CONFIG_FILES([include/mailutils/types.h:include/mailutils/types.hin]) # Initialize the (autotest) test suite. AC_CONFIG_TESTDIR(testsuite) AC_CONFIG_FILES([testsuite/Makefile testsuite/atlocal]) AC_CONFIG_FILES([testsuite/package.m4]) MU_CONFIG_TESTSUITE(libmailutils) MU_CONFIG_TESTSUITE(frm) MU_CONFIG_TESTSUITE(mda/lmtpd) MU_CONFIG_TESTSUITE(mda/mda) MU_CONFIG_TESTSUITE(mda/putmail) MU_CONFIG_TESTSUITE(mail) MU_CONFIG_TESTSUITE(messages) MU_CONFIG_TESTSUITE(readmsg) MU_CONFIG_TESTSUITE(sieve) MU_CONFIG_TESTSUITE(mh) MU_CONFIG_TESTSUITE(comsat) MU_CONFIG_TESTSUITE(imap4d) MU_CONFIG_TESTSUITE(mimeview) MU_CONFIG_TESTSUITE(libmu_scm) AM_MISSING_PROG([AUTOM4TE], [autom4te]) dnl Make sysconfdir available to the application dnl This must be done LAST, since CPPFLAGS is passed by configure dnl to build tests, but this relies on being run in make to dnl get sysconfdir expanded. CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\"" # Doc hints. IMPRIMATUR_INIT([doc/imprimatur]) AC_PATH_PROG([PERL], perl) if test -z "$PERL"; then PERL=false fi AC_SUBST([GITINFO],'$(PERL) $(mu_aux_dir)/gitinfo') AC_CONFIG_COMMANDS([status],[ cat <