1999-05-21 13:17:23 +00:00
|
|
|
dnl $Id$
|
|
|
|
dnl config.m4 for extension pcre
|
|
|
|
|
1999-05-26 21:47:57 +00:00
|
|
|
dnl By default we'll compile and link against the bundled PCRE library
|
|
|
|
dnl if DIR is supplied, we'll use that for linking
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to use PCRE library)
|
|
|
|
AC_ARG_WITH(pcre-regex,
|
|
|
|
[ --with-pcre-regex[=DIR] Enable Perl Compatible Regular Expressions support],[
|
|
|
|
case "$withval" in
|
|
|
|
no)
|
|
|
|
AC_MSG_RESULT(no) ;;
|
|
|
|
yes)
|
1999-05-27 01:34:18 +00:00
|
|
|
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
|
|
|
INCLUDES="-Ipcrelib $INCLUDES"
|
1999-05-26 21:47:57 +00:00
|
|
|
PCRE_SUBDIR="pcrelib"
|
|
|
|
AC_DEFINE(HAVE_LIBPCRE, 1)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
PHP_EXTENSION(pcre) ;;
|
|
|
|
*)
|
1999-05-27 01:34:18 +00:00
|
|
|
test -f $withval/pcre.h && INCLUDES="-I$withval $INCLUDES"
|
|
|
|
test -f $withval/libpcre.a && EXTRA_LIBS="-L$withval -lpcre $EXTRA_LIBS"
|
1999-05-26 21:47:57 +00:00
|
|
|
|
|
|
|
if test -n "$PCRE_INCLUDE" && test -n "$PCRE_LIB" ; then
|
|
|
|
AC_DEFINE(HAVE_LIBPCRE, 1)
|
|
|
|
PCRE_SUBDIR=
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
PHP_EXTENSION(pcre)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR(Unable to find pcre.h and libpcre.a in $withval)
|
|
|
|
fi ;;
|
|
|
|
esac
|
1999-05-21 13:17:23 +00:00
|
|
|
],[
|
1999-05-27 01:34:18 +00:00
|
|
|
EXTRA_LIBS="-Lext/pcre/pcrelib -lpcre $EXTRA_LIBS"
|
|
|
|
INCLUDES="-Ipcrelib $INCLUDES"
|
1999-05-26 21:47:57 +00:00
|
|
|
PCRE_SUBDIR="pcrelib"
|
|
|
|
AC_DEFINE(HAVE_LIBPCRE, 1)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
PHP_EXTENSION(pcre)
|
1999-05-21 13:17:23 +00:00
|
|
|
])
|
1999-05-26 21:47:57 +00:00
|
|
|
AC_SUBST(PCRE_SUBDIR)
|