This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via 335fcd3f53f078f22602e90ef844fb4938098e20 (commit)
via 2e19d07ef1c08c3ce4771bb1bfee1ae6541f1c0d (commit)
from b871c3e428479794b4101774c97e2e588f15e385 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=335fcd3f53f078f22602e90ef844fb4938098e20
commit 335fcd3f53f078f22602e90ef844fb4938098e20
Author: Paul Eggert <[email protected]>
Date: Sat Apr 19 23:14:33 2025 -0700
build: port to pkg.m4 serial 12
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/grep-devel/2025-04/msg00005.html
* bootstrap.conf (bootstrap_post_import_hook):
Simplify. Donât recommend against pkg.m4 serial 12,
since the following patches port to it.
* configure.ac: Donât fail if pkg-config is missing.
* m4/pcre.m4 (gl_FUNC_PCRE): If pkg-config works use that;
otherwise if PCRE_CFLAGS='' PCRE_LIBS='-lpcre2-8' use that;
otherwise donât use PCRE.
diff --git a/bootstrap.conf b/bootstrap.conf
index 780b035..45f8c42 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -157,23 +157,19 @@ bootstrap_post_import_hook ()
test -s "$ac_dir/dirlist" && ac_dir=$ac_dir:`tr '\n' : < "$ac_dir/dirlist"`
oIFS=$IFS
IFS=:
- local found=0
+ local found=false
for dir in \
$ACLOCAL_PATH $ac_dir /usr/share/aclocal ''
do
IFS=$oIFS
if test -n "$dir" && test -r "$dir/pkg.m4"; then
cp "$dir/pkg.m4" m4/pkg.m4
- found=1
+ found=:
break
fi
done
IFS=$oIFS
- test $found = 0 \
- && die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
- local url=https://lists.gnu.org/r/grep-devel/2025-04/msg00005.html
- grep '^# serial 12' m4/pkg.m4 \
- && die "do not use pkg.m4 serial 12; see $url" || :
+ $found || die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
}
bootstrap_epilogue()
diff --git a/configure.ac b/configure.ac
index 4ead5a2..881d771 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_PROG_INSTALL
AC_PROG_CC
gl_EARLY
AC_PROG_RANLIB
-PKG_PROG_PKG_CONFIG([0.9.0])
+PKG_PROG_PKG_CONFIG([0.9.0], [PKG_CONFIG=false])
# grep never invokes mbrtowc or mbrlen on empty input,
# so don't worry about this common bug,
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index fac7106..8f55eb7 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -22,23 +22,37 @@ AC_DEFUN([gl_FUNC_PCRE],
if test $test_pcre != no; then
- if test -z "${PCRE_CFLAGS+set}" && test -z "${PCRE_LIBS+set}"; then
- PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [: ${PCRE_LIBS=-lpcre2-8}])
- fi
+ AS_CASE([${PCRE_CFLAGS+set}@${PCRE_LIBS+set}@$PKG_CONFIG],
+ [@@false], [],
+ [@@*], [PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [:])])
AC_CACHE_CHECK([for pcre2_compile], [pcre_cv_have_pcre2_compile],
[pcre_saved_CFLAGS=$CFLAGS
pcre_saved_LIBS=$LIBS
- CFLAGS="$CFLAGS $PCRE_CFLAGS"
- LIBS="$PCRE_LIBS $LIBS"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#define PCRE2_CODE_UNIT_WIDTH 8
- #include <pcre2.h>
- ]],
- [[pcre2_code *p = pcre2_compile (0, 0, 0, 0, 0, 0);
- return !p;]])],
- [pcre_cv_have_pcre2_compile=yes],
- [pcre_cv_have_pcre2_compile=no])
+ pcre_cv_have_pcre2_compile=no
+
+ while
+ CFLAGS="$pcre_saved_CFLAGS $PCRE_CFLAGS"
+ LIBS="$pcre_saved_LIBS $PCRE_LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#define PCRE2_CODE_UNIT_WIDTH 8
+ #include <pcre2.h>
+ ]],
+ [[pcre2_code *p = pcre2_compile (0, 0, 0, 0, 0, 0);
+ return !p;]])],
+ [pcre_cv_have_pcre2_compile=yes])
+ test $pcre_cv_have_pcre2_compile = no
+ do
+ AS_CASE([$PCRE_CFLAGS@$PCRE_LIBS],
+ [@-lpcre2-8],
+ [# Even the fallback setting fails; give up.
+ PCRE_LIBS=
+ break])
+ # Fallback setting.
+ PCRE_CFLAGS=
+ PCRE_LIBS=-lpcre2-8
+ done
+
CFLAGS=$pcre_saved_CFLAGS
LIBS=$pcre_saved_LIBS])
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=2e19d07ef1c08c3ce4771bb1bfee1ae6541f1c0d
commit 335fcd3f53f078f22602e90ef844fb4938098e20
Author: Paul Eggert <[email protected]>
Date: Sat Apr 19 23:14:33 2025 -0700
build: port to pkg.m4 serial 12
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/grep-devel/2025-04/msg00005.html
* bootstrap.conf (bootstrap_post_import_hook):
Simplify. Donât recommend against pkg.m4 serial 12,
since the following patches port to it.
* configure.ac: Donât fail if pkg-config is missing.
* m4/pcre.m4 (gl_FUNC_PCRE): If pkg-config works use that;
otherwise if PCRE_CFLAGS='' PCRE_LIBS='-lpcre2-8' use that;
otherwise donât use PCRE.
diff --git a/bootstrap.conf b/bootstrap.conf
index 780b035..45f8c42 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -157,23 +157,19 @@ bootstrap_post_import_hook ()
test -s "$ac_dir/dirlist" && ac_dir=$ac_dir:`tr '\n' : < "$ac_dir/dirlist"`
oIFS=$IFS
IFS=:
- local found=0
+ local found=false
for dir in \
$ACLOCAL_PATH $ac_dir /usr/share/aclocal ''
do
IFS=$oIFS
if test -n "$dir" && test -r "$dir/pkg.m4"; then
cp "$dir/pkg.m4" m4/pkg.m4
- found=1
+ found=:
break
fi
done
IFS=$oIFS
- test $found = 0 \
- && die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
- local url=https://lists.gnu.org/r/grep-devel/2025-04/msg00005.html
- grep '^# serial 12' m4/pkg.m4 \
- && die "do not use pkg.m4 serial 12; see $url" || :
+ $found || die 'Cannot find pkg.m4; perhaps you need to install pkg-config'
}
bootstrap_epilogue()
diff --git a/configure.ac b/configure.ac
index 4ead5a2..881d771 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_PROG_INSTALL
AC_PROG_CC
gl_EARLY
AC_PROG_RANLIB
-PKG_PROG_PKG_CONFIG([0.9.0])
+PKG_PROG_PKG_CONFIG([0.9.0], [PKG_CONFIG=false])
# grep never invokes mbrtowc or mbrlen on empty input,
# so don't worry about this common bug,
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index fac7106..8f55eb7 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -22,23 +22,37 @@ AC_DEFUN([gl_FUNC_PCRE],
if test $test_pcre != no; then
- if test -z "${PCRE_CFLAGS+set}" && test -z "${PCRE_LIBS+set}"; then
- PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [: ${PCRE_LIBS=-lpcre2-8}])
- fi
+ AS_CASE([${PCRE_CFLAGS+set}@${PCRE_LIBS+set}@$PKG_CONFIG],
+ [@@false], [],
+ [@@*], [PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [:])])
AC_CACHE_CHECK([for pcre2_compile], [pcre_cv_have_pcre2_compile],
[pcre_saved_CFLAGS=$CFLAGS
pcre_saved_LIBS=$LIBS
- CFLAGS="$CFLAGS $PCRE_CFLAGS"
- LIBS="$PCRE_LIBS $LIBS"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#define PCRE2_CODE_UNIT_WIDTH 8
- #include <pcre2.h>
- ]],
- [[pcre2_code *p = pcre2_compile (0, 0, 0, 0, 0, 0);
- return !p;]])],
- [pcre_cv_have_pcre2_compile=yes],
- [pcre_cv_have_pcre2_compile=no])
+ pcre_cv_have_pcre2_compile=no
+
+ while
+ CFLAGS="$pcre_saved_CFLAGS $PCRE_CFLAGS"
+ LIBS="$pcre_saved_LIBS $PCRE_LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#define PCRE2_CODE_UNIT_WIDTH 8
+ #include <pcre2.h>
+ ]],
+ [[pcre2_code *p = pcre2_compile (0, 0, 0, 0, 0, 0);
+ return !p;]])],
+ [pcre_cv_have_pcre2_compile=yes])
+ test $pcre_cv_have_pcre2_compile = no
+ do
+ AS_CASE([$PCRE_CFLAGS@$PCRE_LIBS],
+ [@-lpcre2-8],
+ [# Even the fallback setting fails; give up.
+ PCRE_LIBS=
+ break])
+ # Fallback setting.
+ PCRE_CFLAGS=
+ PCRE_LIBS=-lpcre2-8
+ done
+
CFLAGS=$pcre_saved_CFLAGS
LIBS=$pcre_saved_LIBS])
-----------------------------------------------------------------------
Summary of changes:
bootstrap.conf | 10 +++-------
configure.ac | 2 +-
gnulib | 2 +-
m4/pcre.m4 | 40 +++++++++++++++++++++++++++-------------
4 files changed, 32 insertions(+), 22 deletions(-)
hooks/post-receive
--
grep