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 | |
parent | 5ef36a85c4d6d3239660983a4464b654d4584cea (diff) | |
download | mailfromd-gmach.tar.gz mailfromd-gmach.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
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | THANKS | 25 | ||||
-rw-r--r-- | configure.ac | 60 | ||||
-rw-r--r-- | pmult/Makefile.am | 3 | ||||
-rw-r--r-- | pmult/pmult.c | 31 |
5 files changed, 59 insertions, 70 deletions
@@ -1,6 +1,16 @@ +2008-02-09 Sergey Poznyakoff <gray@gnu.org.ua> + + * THANKS: Add Tom Lynch. Obfuscate email addresses. + * 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. + 2008-02-06 Sergey Poznyakoff <gray@gnu.org.ua> Ported r1606 from trunk. * src/dnsbase.c: Define MAX, if necessary. * src/mailfromd.h: Define INADDR_NONE. @@ -1,21 +1,22 @@ Mailfromd THANKS file. -Many people further contributed to Mailfromd, by reporting problems, -suggesting various improvements or submitting actual code. Here is a -list of these people in alphabetical order. Help us keep it -complete and exempt of errors. +Many people further contributed to mailfromd by reporting problems, +suggesting various improvements or submitting actual code. Here is a list +of these people in alphabetical order. Help us keep it complete and exempt +of errors. -Alan Dobkin <MailFromD@omnicomp.org> -Brent Spencer <bspencer@XsiteDesigns.com> -Jan Rafaj <jr-mailfromd@cedric.unob.cz> -Jeff Ballard <ballard@engr.wisc.edu> -Nacho González López <nacho@es.gnu.org> -Peter Markeloff <magic@farlep.net> -Sergey Afonin <a_s_y@sama.ru> -Zeus Panchenko <zeus@dn.farlep.net> +Alan Dobkin <MailFromD --AT-- omnicomp --DOT-- org> +Brent Spencer <bspencer --AT-- XsiteDesigns --DOT-- com> +Jan Rafaj <jr-mailfromd --AT-- cedric --DOT-- unob --DOT-- cz> +Jeff Ballard <ballard --AT-- engr --DOT-- wisc --DOT-- edu> +Nacho González López <nacho --AT-- es --DOT-- gnu --DOT-- org> +Peter Markeloff <magic --AT-- farlep --DOT-- net> +Tom Lynch <tlynch --AT-- primate --DOT-- wisc --DOT-- edu> +Sergey Afonin <a_s_y --AT-- sama --DOT-- ru> +Zeus Panchenko <zeus --AT-- dn --DOT-- farlep --DOT-- net> ;;;; Local Variables: ;;;; mode: Fundamental ;;;; coding: utf-8 ;;;; End: diff --git a/configure.ac b/configure.ac index 695d0b32..ebcbc9df 100644 --- a/configure.ac +++ b/configure.ac @@ -519,57 +519,61 @@ AC_TRY_COMPILE([#include <syslog.h>], [int lf = $DEFAULT_LOG_FACILITY], AC_MSG_RESULT($DEFAULT_LOG_FACILITY) 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 # Doc hints. # Select a rendition level: # DISTRIB for stable releases (at most one dot in the version number) diff --git a/pmult/Makefile.am b/pmult/Makefile.am index b32888b7..68c0f522 100644 --- a/pmult/Makefile.am +++ b/pmult/Makefile.am @@ -23,14 +23,13 @@ BUILT_SOURCES = pdbg.h INCLUDES = \ $(MAILUTILS_INCLUDES)\ $(MU_COMMON_INCLUDES)\ -I$(top_srcdir)/lib\ -I$(top_srcdir)/gnu\ -I../gnu\ - -I../gacopyz\ - @META1_INCLUDES@ + -I../gacopyz pmult_SOURCES = pmult.c pdbg.h LDADD = \ ../lib/libmf.a\ $(MAILUTILS_LIBS)\ ../gnu/libgnu.a\ diff --git a/pmult/pmult.c b/pmult/pmult.c index 0b1dff21..92cfc844 100644 --- a/pmult/pmult.c +++ b/pmult/pmult.c @@ -31,48 +31,23 @@ #include "libmf.h" /* FIXME */ #include <inttypes.h> const char *mu_umaxtostr (unsigned slot, uintmax_t val); -/* There are several problems with using libpmilter, as of - meta1-1.0.PreAlpha22.0: - - 1. libpmilter and libpmutl are installed, but none of the seven libraries - they depend on is; - 2. None of the necessary headers are installed, except pmfapi.h, - pmilter.h and pmfdef.h; - 3. The rest of headers include generic.h which defines PACKAGE_* symbols, - which no decent library should ever attempt to do; - - I compensate for these deficiences by: - - 1 and 2 - Special handling in configure.ac, which requires Meta1 sources - to be present; - 3 - Using the necessary symbols ASAP and undefining them before - including the pmilter headers; -*/ - -const char *program_version = "pmult (" PACKAGE_STRING ")"; -const char *package_bugreport = "<" PACKAGE_BUGREPORT ">"; -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef VERSION - #include "sm/error.h" #include "sm/smreplycodes.h" #include "sm/pmilter.h" #include "sm/pmfdef.h" #include "sm/pmfapi.h" #include "pdbg.h" +const char *program_version = "pmult (" PACKAGE_STRING ")"; +const char *package_bugreport = "<" PACKAGE_BUGREPORT ">"; + char *portspec; /* Communication socket */ int log_to_stderr; /* Use stderr for logging */ char *log_tag; /* override mu_log_tag */ mu_log_level_t debug_level; /* Debug verbosity level */ mu_debug_t pmult_debug; /* Debugging object */ static pthread_mutex_t pmult_debug_mutex = PTHREAD_MUTEX_INITIALIZER; |