blob: 6c0286457cdd67a81a5651b5a756e92d73527260 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001From d2cedfa3394365689a3f7c8cfe8e0dd56b29bed9 Mon Sep 17 00:00:00 2001
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08002From: Koen Kooi <koen.kooi@linaro.org>
3Date: Tue, 17 Jun 2014 09:10:57 +0200
4Subject: [PATCH] configure: use pkg-config for PCRE detection
5
6Upstream-Status: Pending
7
8Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009---
10 configure.in | 27 +++++----------------------
11 1 file changed, 5 insertions(+), 22 deletions(-)
12
13diff --git a/configure.in b/configure.in
Brad Bishopc342db32019-05-15 21:57:59 -040014index 9feaceb..dc6ea15 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015--- a/configure.in
16+++ b/configure.in
17@@ -215,28 +215,11 @@ fi
18 AC_ARG_WITH(pcre,
19 APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
20
21-AC_PATH_PROG(PCRE_CONFIG, pcre-config, false)
22-if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then
23- PCRE_CONFIG=$with_pcre/bin/pcre-config
24-elif test -x "$with_pcre"; then
25- PCRE_CONFIG=$with_pcre
26-fi
27-
28-if test "$PCRE_CONFIG" != "false"; then
29- if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
30- AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
31- fi
32- case `$PCRE_CONFIG --version` in
33- [[1-5].*])
34- AC_MSG_ERROR([Need at least pcre version 6.0])
35- ;;
36- esac
37- AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
38- APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
39- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
40-else
41- AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
42-fi
43+PKG_CHECK_MODULES([PCRE], [libpcre], [
44+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
45+], [
46+ AC_MSG_ERROR([$PCRE_PKG_ERRORS])
47+])
48 APACHE_SUBST(PCRE_LIBS)
49
50 AC_MSG_NOTICE([])
Brad Bishopc342db32019-05-15 21:57:59 -040051--
522.7.4
53