dnl $Id: config.m4,v 1.3 2004/02/08 17:10:22 iliaa Exp $
dnl config.m4 for extension pop3
PHP_ARG_ENABLE(pop3, for pop3 support,
[ --enable-pop3 Enable pop3 support])
if test "$PHP_POP3" != "no"; then
dnl Write more examples of tests here...
dnl # --with-pop3 -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/pop3.h" # you most likely want to change this
dnl if test -r $PHP_POP3/; then # path given as parameter
dnl POP3_DIR=$PHP_POP3
dnl else # search default path list
dnl AC_MSG_CHECKING([for pop3 files in default path])
dnl for i in $SEARCH_PATH ; do
dnl if test -r $i/$SEARCH_FOR; then
dnl POP3_DIR=$i
dnl AC_MSG_RESULT(found in $i)
dnl fi
dnl done
dnl fi
dnl
dnl if test -z "$POP3_DIR"; then
dnl AC_MSG_RESULT([not found])
dnl AC_MSG_ERROR([Please reinstall the pop3 distribution])
dnl fi
dnl --with-pop3 -> add include path
PHP_ADD_INCLUDE($POP3_DIR/include)
dnl --with-pop3 -> check for lib and symbol presence
dnl LIBNAME=spopc
dnl LIBSYMBOL=popdelmsg
dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
dnl [
dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $POP3_DIR/lib, POP3_SHARED_LIBADD)
dnl AC_DEFINE(HAVE_POP3LIB,1,[ ])
dnl ],[
dnl AC_MSG_ERROR([wrong pop3 lib version or lib not found])
dnl ],[
dnl -L$POP3_DIR/lib -lm -ldl
dnl ])
dnl PHP_SUBST(POP3_SHARED_LIBADD)
PHP_NEW_EXTENSION(pop3, pop3.c, $ext_shared)
fi
syntax highlighted by Code2HTML, v. 0.9.1