~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to config/m4/pcre.m4

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2007-05-29 13:13:36 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529131336-85ygaddivvmkd3xc
Tags: 1.3.21pre22-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/rules: call dh_iconcache
  - Remove g++ build dependency
* Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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])
 
4
AC_ARG_WITH(pcre,
 
5
[  --with-pcre[[=prefix]]    compile xmlpcre part (via libpcre check)],,
 
6
     with_pcre="yes")
 
7
if test ".$with_pcre" = ".no" ; then
 
8
  AC_MSG_RESULT([disabled])
 
9
  m4_ifval($2,$2)
 
10
else
 
11
  AC_MSG_RESULT([(testing)])
 
12
  AC_CHECK_LIB(pcre, pcre_study)
 
13
  if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
 
14
     PCRE_LIBS="-lpcre"
 
15
     AC_MSG_CHECKING([lib pcre])
 
16
     AC_MSG_RESULT([$PCRE_LIBS])
 
17
     m4_ifval($1,$1)
 
18
  else
 
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"
 
23
     LDFLAGS="$OLDLDFLAGS"
 
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])
 
30
        m4_ifval($1,$1)
 
31
     else
 
32
        AC_MSG_CHECKING([lib pcre])
 
33
        AC_MSG_RESULT([no, (WARNING)])
 
34
        m4_ifval($2,$2)
 
35
     fi
 
36
  fi
 
37
fi
 
38
AC_SUBST([PCRE_LIBS], $PCRE_LIBS)
 
39
AC_SUBST([PCRE_CFLAGS], $PCRE_CFLAGS)
 
40
])