Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Use pkg-config for pcre dependency instead of -config script. |
| 2 | |
| 3 | Upstream-Status: Pending |
| 4 | |
| 5 | RP 2014/5/22 |
| 6 | |
| 7 | |
| 8 | Index: lighttpd-1.4.35/configure.ac |
| 9 | =================================================================== |
| 10 | --- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000 |
| 11 | +++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000 |
| 12 | @@ -309,16 +309,14 @@ |
| 13 | AC_MSG_RESULT([$WITH_PCRE]) |
| 14 | |
| 15 | if test "$WITH_PCRE" != "no"; then |
| 16 | - AC_PATH_PROG(PCRECONFIG, pcre-config) |
| 17 | - |
| 18 | - if test x"$PCRECONFIG" != x; then |
| 19 | - PCRE_LIB=`$PCRECONFIG --libs` |
| 20 | - CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`" |
| 21 | + PKG_CHECK_MODULES(PCREPKG, [libpcre], [ |
| 22 | + PCRE_LIB=${PCREPKG_LIBS} |
| 23 | + CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" |
| 24 | AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) |
| 25 | AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) |
| 26 | - else |
| 27 | + ], [ |
| 28 | AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre]) |
| 29 | - fi |
| 30 | + ]) |
| 31 | fi |
| 32 | |
| 33 | AC_SUBST(PCRE_LIB) |