aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-11-03 13:09:54 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-11-03 13:09:54 +0000
commita2ee2bb9bbb1411fb1da32861a6e43e30ee634e7 (patch)
tree89d6697079da5577424f9f4db0e373eda83be631 /configure.ac
parentb0c16d4d163aa30f8cfd368978331a57453a7b79 (diff)
downloadmailfromd-a2ee2bb9bbb1411fb1da32861a6e43e30ee634e7.tar.gz
mailfromd-a2ee2bb9bbb1411fb1da32861a6e43e30ee634e7.tar.bz2
Raise version number to 2.0.4
Default to using libgacopyz. If the user really calls for trouble, allow him to use libmilter (possibly forked), instead. git-svn-id: file:///svnroot/mailfromd/trunk@750 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac97
1 files changed, 54 insertions, 43 deletions
diff --git a/configure.ac b/configure.ac
index 6fee24d9..a54f1dcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
# MA 02110-1301 USA
AC_PREREQ(2.59)
-AC_INIT([mailfromd], [2.0.3], [bug-mailfromd@gnu.org.ua])
+AC_INIT([mailfromd], [2.0.4], [bug-mailfromd@gnu.org.ua])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
@@ -79,43 +79,6 @@ AH_BOTTOM([#ifndef HAVE_ARGCV_UNESCAPE_CHAR
#endif
])
-AC_SUBST(MILTER)
-MILTER=-lmilter
-AC_MSG_CHECKING(for libmilter variant to use)
-AC_ARG_WITH([forks],
- AC_HELP_STRING([--with-forks@<:@=FILENAME@:>@],
- [link with forked version of libmilter (Recommended. See chapter 'Building' in the docs.)]),
- [case $withval in
- yes) MILTER=-lmilter-fork;;
- no) ;;
- /*) MILTER=$withval;;
- *) AC_MSG_ERROR([Invalid --with-forks option.])
- esac])
-AC_MSG_RESULT($MILTER)
-
-if test "$MILTER" = "-lmilter"; then
- # Check for pthreads (required by milter)
- HAVE_PTHREAD=no
- AC_CHECK_LIB(pthread, pthread_self,
- [ HAVE_PTHREAD=yes
- LIBS="$LIBS -lpthread -lc" ],
- [ LIBS="$LIBS -pthread"
- AC_CHECK_FUNC(pthread_self,
- [HAVE_PTHREAD=yes]) ])
-
- if test $HAVE_PTHREAD != yes; then
- AC_MSG_ERROR("POSIX threads library not found. Please install one and then reconfigure")
- fi
-fi
-
-save_LIBS=$LIBS
-LIBS="$LIBS $MILTER"
-AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <libmilter/mfapi.h>],
- [return smfi_main();]),
- [:],
- [AC_MSG_ERROR(Required library $MILTER not found or unusable)])
-LIBS=$save_LIBS
-
# Check for DBM flavor
AH_TEMPLATE(BDB2_CURSOR_LASTARG,
[Last argument to the cursor member of Berkeley 2 DB structure])
@@ -275,17 +238,65 @@ BDB=*)
esac
+AC_SUBST(BUILD_LIBGACOPYZ_A,'libgacopyz.a')
+AC_SUBST(BUILD_DUMMY, 'dummy')
+AC_SUBST(MILTER, '../gacopyz/libgacopyz.a')
+AC_SUBST(MILTER_INCLUDES, '-I$(top_srcdir)/gacopyz')
+
AC_ARG_ENABLE([gacopyz],
- AC_HELP_STRING([--with-gacopyz],
+ AC_HELP_STRING([--disable-gacopyz],
[gacopyz, panie, mowia ze to mysa ... a to nie je mysa, ino gacopyz!]),
[
case "${enableval}" in
- yes) AC_SUBST(BUILD_LIBMILTER_A,'libmilter.a')
- AC_SUBST(BUILD_DUMMY, 'dummy');;
- no) ;;
+ yes) ;;
+ no) BUILD_LIBGACOPYZ_A=
+ BUILD_DUMMY=
+ MILTER=
+ ;;
*) AC_MSG_ERROR([Prosze? Co to za opcja taka?]);;
esac])
+## BEGIN legacy section
+if test -z "$MILTER"; then
+ MILTER=-lmilter
+ AC_MSG_CHECKING(for libmilter variant to use)
+ AC_ARG_WITH([forks],
+ AC_HELP_STRING([--with-forks@<:@=FILENAME@:>@],
+ [link with forked version of libmilter (Recommended. See chapter 'Building' in the docs.)]),
+ [case $withval in
+ yes) MILTER=-lmilter-fork;;
+ no) ;;
+ /*) MILTER=$withval;;
+ *) AC_MSG_ERROR([Invalid --with-forks option.])
+ esac])
+ AC_MSG_RESULT($MILTER)
+
+ if test "$MILTER" = "-lmilter"; then
+ # Check for pthreads (required by milter)
+ HAVE_PTHREAD=no
+ AC_CHECK_LIB(pthread, pthread_self,
+ [ HAVE_PTHREAD=yes
+ LIBS="$LIBS -lpthread -lc" ],
+ [ LIBS="$LIBS -pthread"
+ AC_CHECK_FUNC(pthread_self,
+ [HAVE_PTHREAD=yes]) ])
+
+ if test $HAVE_PTHREAD != yes; then
+ AC_MSG_ERROR("POSIX threads library not found. Please install one and then reconfigure")
+ fi
+ fi
+
+ save_LIBS=$LIBS
+ LIBS="$LIBS $MILTER"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <libmilter/mfapi.h>],
+ [return smfi_main();]),
+ [:],
+ [AC_MSG_ERROR(Required library $MILTER not found or unusable)] )
+ MILTER_INCLUDES='-I/usr/include/libmilter/'
+ LIBS=$save_LIBS
+fi
+##END legacy section
+
# Set default state directory
AC_SUBST(MAILFROMSTATEDIR)
AC_MSG_CHECKING(for default mailfromd state directory)
@@ -365,7 +376,7 @@ esac
AC_CONFIG_FILES([Makefile
lib/Makefile
- libmilter/Makefile
+ gacopyz/Makefile
src/Makefile
etc/Makefile
doc/Makefile

Return to:

Send suggestions and report system problems to the System administrator.