git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] configure: fix a regression in PCRE v1 detection

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 11, 2018, 13:26 UTC
Message-ID
<20180311132609.32154-2-avarab@gmail.com>
In-Reply-To
<20180311132609.32154-1-avarab@gmail.com>

Change the check for PCRE v1 to disable the --with-libpcre1 option if the pcre_version() function can't be found in the pcre library. I unintentionally changed this in my 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) while renaming moving some variables.

The intent of this check ever since it was added in a119f91e57 ("configure: Check for libpcre", 2011-05-09) is to second-guess the user and turn off an explicitly provided --with-libpcre if the library can't be found.

I don't think that behavior makes any sense, we shouldn't be second-guessing the user with an auto-detection, but changing that needs a bigger refactoring of this script, and only has marginal benefits. So let's fix it to work as it was intended to work again.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7f8415140f..41ceb2ac81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -549,8 +549,8 @@ if test -n "$USE_LIBPCRE1"; then
 GIT_STASH_FLAGS($LIBPCREDIR)
 
 AC_CHECK_LIB([pcre], [pcre_version],
-[USE_LIBPCRE=YesPlease],
-[USE_LIBPCRE=])
+[USE_LIBPCRE1=YesPlease],
+[USE_LIBPCRE1=])
 
 GIT_UNSTASH_FLAGS($LIBPCREDIR)
 
-- 
2.15.1.424.g9478a66081
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 5 in “Switch the default PCRE from v1 to v2 + configure fixes”
  1. 0/3 Switch the default PCRE from v1 to v2 + configure fixesÆvar Arnfjörð Bjarmason, Mar 11, 2018
  2. 1/3 configure: fix a regression in PCRE v1 detectionÆvar Arnfjörð Bjarmason, Mar 11, 2018
  3. 2/3 configure: detect redundant --with-libpcre & --with-libpcre1Ævar Arnfjörð Bjarmason, Mar 11, 2018
  4. 3/3 Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1Ævar Arnfjörð Bjarmason, Mar 11, 2018
  5. Junio C HamanoMar 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.