summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-06-25 18:58:53 +0800
committerGitHub <noreply@github.com>2022-06-25 06:58:53 -0400
commit280fe78d37f58927b280e2e316a2ae19201f2b83 (patch)
tree6fcd94b33cd5674cb99412977a59794ba0bbc9a8 /configure.ac
parent1f14b3fa92d4442a60233e9596ddec428a985e3c (diff)
downloadlibffi-280fe78d37f58927b280e2e316a2ae19201f2b83.tar.gz
configure.ac: use grep -E instead of egrep if possible (#720)
Upstream will start to emit a warning if egrep is invoked in the next grep release. Stop invoking it explicitly. Use AC_PROG_EGREP to try "grep -E" first, and fallback to egrep if "grep -E" does not work. We need this fallback for some non-GNU grep implementations (like Solaris). Url: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a951562
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 70f6d2c..8feb248 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,7 @@ AC_SUBST(CFLAGS)
AM_PROG_AS
AM_PROG_CC_C_O
+AC_PROG_EGREP
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
@@ -294,7 +295,7 @@ if test "x$GCC" = "xyes"; then
echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c
libffi_cv_hidden_visibility_attribute=no
if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
- if egrep '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
+ if $EGREP '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
libffi_cv_hidden_visibility_attribute=yes
fi
fi