php-src/sapi/milter/config.m4
Michael Wallner 6ed9991a6f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #67715 (php-milter does not build and crashes randomly).
2014-07-30 20:12:50 +02:00

32 lines
1.1 KiB
Plaintext

dnl
dnl $Id$
dnl
PHP_ARG_WITH(milter, for Milter support,
[ --with-milter[=DIR] Build PHP as Milter application], no, no)
if test "$PHP_MILTER" != "no"; then
if test "$PHP_MILTER" = "yes"; then
if test -f /usr/lib/libmilter.a ; then
MILTERPATH=/usr/lib
else
if test -f /usr/lib/libmilter/libmilter.a ; then
MILTERPATH=/usr/lib/libmilter
else
AC_MSG_ERROR([Unable to find libmilter.a])
fi
fi
else
MILTERPATH=$PHP_MILTER
fi
SAPI_MILTER_PATH=sapi/milter/php-milter
PHP_BUILD_THREAD_SAFE
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/milter/Makefile.frag,$abs_srcdir/sapi/milter,sapi/milter)
PHP_SELECT_SAPI(milter, program, php_milter.c getopt.c,,'$(SAPI_MILTER_PATH)')
PHP_ADD_LIBRARY_WITH_PATH(milter, $MILTERPATH,)
BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_MILTER_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)"
PHP_SUBST(SAPI_MILTER_PATH)
PHP_SUBST(BUILD_MILTER)
fi