Skip to content

Commit a91b113

Browse files
avargitster
authored andcommitted
configure: fix a regression in PCRE v1 detection
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 94da919 ("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 a119f91 ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fb6aef commit a91b113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ if test -n "$USE_LIBPCRE1"; then
549549
GIT_STASH_FLAGS($LIBPCREDIR)
550550

551551
AC_CHECK_LIB([pcre], [pcre_version],
552-
[USE_LIBPCRE=YesPlease],
553-
[USE_LIBPCRE=])
552+
[USE_LIBPCRE1=YesPlease],
553+
[USE_LIBPCRE1=])
554554

555555
GIT_UNSTASH_FLAGS($LIBPCREDIR)
556556

0 commit comments

Comments
 (0)