diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-24 13:49:30 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-03-24 13:49:30 +0000 |
commit | e0df274f7064cbe1c3cca06a0e29dfd586dbb6e8 (patch) | |
tree | 1c4e053fce9aa76bf374c823abc138ce5f6c0676 /configure.ac | |
parent | 1c0cac4fc8e489d72a3a54144eeaeffdbcef3b76 (diff) | |
download | mailfromd-e0df274f7064cbe1c3cca06a0e29dfd586dbb6e8.tar.gz mailfromd-e0df274f7064cbe1c3cca06a0e29dfd586dbb6e8.tar.bz2 |
Switch to Autotest based testsuite
git-svn-id: file:///svnroot/mailfromd/trunk@1310 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 65 |
1 files changed, 62 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 952ddef5..2b19f7cb 100644 --- a/configure.ac +++ b/configure.ac @@ -289,6 +289,60 @@ if test "$status_dbm" = "no"; then AC_MSG_ERROR([Cannot find DBM library to link with.]) fi +AC_ARG_WITH([readline], + AC_HELP_STRING([--without-readline], + [do not use readline]), + [ +case "${withval}" in + yes) usereadline=yes ;; + no) usereadline=no ;; + *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; +esac],[usereadline=maybe]) + +# Test for GNU Readline +AC_SUBST(READLINE_LIBS) + +if test "$usereadline" != "no"; then + + dnl FIXME This should only link in the curses libraries if it's + dnl really needed! + + dnl Check for Curses libs. + CURSES_LIBS= + for lib in ncurses curses termcap + do + AC_CHECK_LIB($lib, tputs, [CURSES_LIBS="-l$lib"; break]) + done + + saved_LIBS=$LIBS + LIBS="$LIBS $CURSES_LIBS" + AC_CHECK_LIB(readline, readline, mf_have_readline=yes) + LIBS=$saved_LIBS + + if test "$mf_have_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 + usereadline="yes" + else + if test "$usereadline" = "yes"; then + AC_MSG_WARN(readline requested but does not seem to be installed) + fi + usereadline = "no" + fi +fi + +AH_BOTTOM([ +/* Some older versions of readline have completion_matches */ +#ifndef HAVE_RL_COMPLETION_MATCHES +# define rl_completion_matches completion_matches +#endif]) + + AC_SUBST(MILTER, '../gacopyz/libgacopyz.a') AC_SUBST(MILTER_INCLUDES, '-I$(top_srcdir)/gacopyz') @@ -421,6 +475,11 @@ case `echo $VERSION|sed 's/[[^.]]//g'` in *) RENDITION=PROOF;; esac +# Initialize the test suite. +AC_CONFIG_TESTDIR(tests) +AC_CONFIG_FILES([tests/Makefile tests/etc/Makefile tests/atlocal]) +AM_MISSING_PROG([AUTOM4TE], [autom4te]) + AC_CONFIG_COMMANDS([status],[ cat <<EOF @@ -434,6 +493,7 @@ Socket.................................... $socket Expiration interval....................... $expire Negative DNS answer expiration interval... $negative_dns_expire Rates expire interval..................... $rates_expire +Readline (for mtasim)..................... $usereadline Documentation rendition type.............. $rendition ******************************************************************* @@ -446,6 +506,7 @@ user=$DEFAULT_USER expire=$DEFAULT_EXPIRE_INTERVAL negative_dns_expire=$DEFAULT_DNS_NEGATIVE_EXPIRE_INTERVAL rates_expire=$DEFAULT_EXPIRE_RATES_INTERVAL +usereadline=$usereadline rendition=$RENDITION ]) @@ -455,9 +516,7 @@ AC_CONFIG_FILES([Makefile src/Makefile mflib/Makefile etc/Makefile - doc/Makefile - testsuite/Makefile - testsuite/etc/Makefile]) + doc/Makefile]) AC_OUTPUT |