1dnl 2dnl $Id$ 3dnl 4 5PHP_ARG_WITH(milter, for Milter support, 6[ --with-milter[=DIR] Build PHP as Milter application], no, no) 7 8if test "$PHP_MILTER" != "no"; then 9 if test "$PHP_MILTER" = "yes"; then 10 if test -f /usr/lib/libmilter.a ; then 11 MILTERPATH=/usr/lib 12 else 13 if test -f /usr/lib/libmilter/libmilter.a ; then 14 MILTERPATH=/usr/lib/libmilter 15 else 16 AC_MSG_ERROR([Unable to find libmilter.a]) 17 fi 18 fi 19 else 20 MILTERPATH=$PHP_MILTER 21 fi 22 23 SAPI_MILTER_PATH=sapi/milter/php-milter 24 PHP_BUILD_THREAD_SAFE 25 PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/milter/Makefile.frag) 26 PHP_SELECT_SAPI(milter, program, php_milter.c getopt.c,,'$(SAPI_MILTER_PATH)') 27 PHP_ADD_LIBRARY_WITH_PATH(milter, $MILTERPATH,) 28 BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)" 29 INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_MILTER_PATH) \$(bindir)/php-milter" 30 PHP_SUBST(SAPI_MILTER_PATH) 31 PHP_SUBST(BUILD_MILTER) 32fi 33