diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-09 19:53:30 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-09 19:53:30 +0000 |
commit | 1b637bf2926c395d8b9dd4f52c0167dae5ed6707 (patch) | |
tree | a2301b7b58be3e17ff67ea0d848055e993edcccd /configure.ac | |
parent | 5ef36a85c4d6d3239660983a4464b654d4584cea (diff) | |
download | mailfromd-1b637bf2926c395d8b9dd4f52c0167dae5ed6707.tar.gz mailfromd-1b637bf2926c395d8b9dd4f52c0167dae5ed6707.tar.bz2 |
* THANKS: Add Tom Lynch. Obfuscate email addresses.gmach
* pmult/pmult.c: Remove kludges that were necessary to include
files from meta1 source tree. Assume PreAlpha24.1 at least.
* pmult/Makefile.am (INCLUDES): Remove @META1_INCLUDES@
* configure.ac (--enable-pmilter option): Assume all the necessary
libraries are installed under ${path}/include/sm, and libraries
under ${path}/lib/meta1.
git-svn-id: file:///svnroot/mailfromd/branches/gmach@1608 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index 695d0b32..ebcbc9df 100644 --- a/configure.ac +++ b/configure.ac @@ -522,51 +522,55 @@ AC_DEFINE_UNQUOTED(DEFAULT_LOG_FACILITY, $DEFAULT_LOG_FACILITY, [Default log facility]) # Test for libpmilter +AC_SUBST(META1_LIBS) + AC_ARG_ENABLE([pmilter], - AC_HELP_STRING([--enable-pmilter=PATH-TO-META1], + AC_HELP_STRING([--enable-pmilter[[=PATH]]], [enable pmilter support (EXPERIMENTAL)]), [case "${enableval}" in - /*) meta1_dir=`echo ${enableval} | sed 's,/$,,'` - enable_pmilter=yes - ;; - *) AC_MSG_ERROR([Argument to --enable-pmilter is not a directory name]) + yes) enable_pmilter=yes;; + no) enable_pmilter=no;; + /*) dir=$enableval/lib/meta1 + if test -d $dir; then + META1_LIBS="-L$dir" + else + AC_MSG_ERROR([$dir: No such directory]) + fi + enable_pmilter=yes + ;; + *) AC_MSG_ERROR([Bad argument to --enable-pmilter]) esac],[enable_pmilter=no]) if test "$enable_pmilter" = yes; then saved_LIBS=$LIBS AC_SUBST(PTHREAD_LIBRARIES) AC_CHECK_LIB(pthread, pthread_self, - [ have_pthread=yes - PTHREAD_LIBRARIES="-lpthread -lc" ], - [ PTHREAD_LIBRARIES="-lpthread" - AC_CHECK_FUNC(pthread_self, - [HAVE_PTHREAD=yes]) ]) + [ have_pthread=yes + PTHREAD_LIBRARIES="-lpthread -lc" ], + [ PTHREAD_LIBRARIES="-lpthread" + AC_CHECK_FUNC(pthread_self, + [HAVE_PTHREAD=yes]) ]) if test $have_pthread != yes; then AC_MSG_ERROR([POSIX threads library not found. Please install it and then reconfigure]) fi - libs="libpmilter/libpmilter.a \ - libpmilter/libpmutil.a\ - libevthr/libevthr.a\ - libthr/libthr.a\ - libmta/librcbcomm.a\ - libmta/librcb.a\ - libmta/libmtar.a\ - libmta/libcstrr.a\ - libcheck/libcheck.a\ - librepl/libreplr.a" - - AC_SUBST(META1_LIBS) + AC_CHECK_HEADERS([sm/error.h sm/hdrmoddef.h sm/pmfapi.h sm/pmilter.h sm/smreplycodes.h sm/generic.h sm/mfapi.h sm/pmfdef.h sm/smmts.h], + [], + [AC_MSG_ERROR([Required header file $ac_header not found])], + [ +#ifdef HAVE_SM_ERROR_H +# include <sm/error.h> +#endif]) + + libs="pmilter pmutil evthr thr rcbcomm rcb mtar cstrr replr" + LDFLAGS="$LDFLAGS $META1_LIBS" for file in $libs do - if test -f $meta1_dir/$file; then - META1_LIBS="$META1_LIBS $meta1_dir/$file" - else - AC_MSG_ERROR([Required library $file not found in $meta1_dir]) - fi + AC_CHECK_LIB($file, main, + [META1_LIBS="$META1_LIBS -l$file"], + [AC_MSG_ERROR([Required library lib$file not found])]) done AC_SUBST(ENABLE_PMULT,'${PMULT_PROG}') - AC_SUBST(META1_INCLUDES,"-I$meta1_dir/include") LIBS=$saved_LIBS fi |