1
dnl http://autoconf-archive.cryp.to/ax_path_lib_pcre.html
2
AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
3
AC_MSG_CHECKING([lib pcre])
5
[ --with-pcre[[=prefix]] compile xmlpcre part (via libpcre check)],,
7
if test ".$with_pcre" = ".no" ; then
8
AC_MSG_RESULT([disabled])
11
AC_MSG_RESULT([(testing)])
12
AC_CHECK_LIB(pcre, pcre_study)
13
if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
15
AC_MSG_CHECKING([lib pcre])
16
AC_MSG_RESULT([$PCRE_LIBS])
19
OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib"
20
OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include"
21
AC_CHECK_LIB(pcre, pcre_compile)
22
CPPFLAGS="$OLDCPPFLAGS"
24
if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
25
AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre)
26
PCRE_LIBS="-L$with_pcre/lib -lpcre"
27
test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
28
AC_MSG_CHECKING([lib pcre])
29
AC_MSG_RESULT([$PCRE_LIBS])
32
AC_MSG_CHECKING([lib pcre])
33
AC_MSG_RESULT([no, (WARNING)])
38
AC_SUBST([PCRE_LIBS], $PCRE_LIBS)
39
AC_SUBST([PCRE_CFLAGS], $PCRE_CFLAGS)