[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-2.6.2 released [stable]
From: |
Jim Meyering |
Subject: |
Re: grep-2.6.2 released [stable] |
Date: |
Tue, 30 Mar 2010 08:02:32 +0200 |
Dmitry V. Levin wrote:
> On Mon, Mar 29, 2010 at 09:43:09PM +0200, Jim Meyering wrote:
> [...]
>> ** Build-related
>>
>> configure no longer relies on pkg-config to detect PCRE support.
>
> As result of this change, PCRE support is no longer enabled
> automatically on my system because "pkg-config libpcre --cflags"
> outputs "-I/usr/include/pcre".
> Now I have to define CPPFLAGS to build grep with PCRE support, e.g.
> export CPPFLAGS="$(pkg-config libpcre --cflags)"
Hi Dmitry,
Thanks for the report.
This should solve that problem for the vast majority
of people with pcre.h not in the default include path:
>From 4007d6ed26e0dbd22b5b5cd3914292e32ecd2028 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 30 Mar 2010 07:59:05 +0200
Subject: [PATCH] build: detect PCRE support also when <pcre/pcre.h> is the
header
* m4/pcre.m4: Also check for <pcre/pcre.h>.
* src/pcresearch.c: Include <pcre/pcre.h>, if needed.
Guard inclusions with HAVE_PCRE_H and HAVE_PCRE_PCRE_H, not HAVE_LIBPCRE.
* NEWS (Bug fixes): Mention it.
Dmitry V. Levin reported that PCRE support was not detected
on systems with <pcre.h> not in the default include path.
---
NEWS | 5 +++++
m4/pcre.m4 | 4 +++-
src/pcresearch.c | 4 +++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 42a1c6a..e822ea1 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline
-*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ PCRE support is once again detected on systems with <pcre/pcre.h>
+ [bug introduced in 2.6.2]
+
* Noteworthy changes in release 2.6.2 (2010-03-29) [stable]
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index 001806e..3fc931e 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -23,7 +23,9 @@ AC_DEFUN([gl_FUNC_PCRE],
if test x"$test_pcre" = x"yes"; then
AC_CHECK_HEADERS([pcre.h])
- if test $ac_cv_header_pcre_h = yes; then
+ AC_CHECK_HEADERS([pcre/pcre.h])
+ if test $ac_cv_header_pcre_h = yes \
+ || test $ac_cv_header_pcre_pcre_h = yes; then
pcre_saved_LIBS=$LIBS
AC_SEARCH_LIBS([pcre_compile], [pcre],
[test "$ac_cv_search_pcre_compile" = "none required" ||
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 6a82be2..795f4c4 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -20,8 +20,10 @@
#include <config.h>
#include "search.h"
-#if HAVE_LIBPCRE
+#if HAVE_PCRE_H
# include <pcre.h>
+#elif HAVE_PCRE_PCRE_H
+# include <pcre/pcre.h>
#endif
#if HAVE_LIBPCRE
--
1.7.0.3.448.g82eeb