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

[PATCH 2/3] configure: detect redundant --with-libpcre & --with-libpcre1

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

The --with-libpcre option is a synonym for the --with-libpcre1 flag, but the configure script allowed for redundantly specifying both.

Nothing broke as a result of this, but it's confusing, so let's disallow it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 41ceb2ac81..d1b3b143c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -280,6 +280,10 @@ AS_HELP_STRING([--with-libpcre],[synonym for --with-libpcre1]),
 AC_ARG_WITH(libpcre1,
 AS_HELP_STRING([--with-libpcre1],[support Perl-compatible regexes via libpcre1 (default is NO)])
 AS_HELP_STRING([],           [ARG can be also prefix for libpcre library and headers]),
+    if test -n "$USE_LIBPCRE1"; then
+        AC_MSG_ERROR([Only supply one of --with-libpcre or its synonym --with-libpcre1!])
+    fi
+
     if test "$withval" = "no"; then
 	USE_LIBPCRE1=
     elif test "$withval" = "yes"; then
-- 
2.15.1.424.g9478a66081
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 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.