From: Yury V. Zaytsev Date: Sun, 15 Sep 2024 11:37:28 +0000 (+0200) Subject: configure: fix shared build on Solaris 10 (#846) X-Git-Tag: upstream/3.4.7~13^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7437f671e20f8864fd98b06f167af6e8ab6514b;p=platform%2Fupstream%2Flibffi.git configure: fix shared build on Solaris 10 (#846) GNU tools are often installed with g-prefix on Solaris. Unfortunately, a check in configure was using grep directly instead of through a variable, which lead to wrong results due to missing option `-q`. Additionally, the check will fail silently if `readelf` is not on `PATH` instead of trying `greadelf`. --- diff --git a/configure.ac b/configure.ac index b35a999..b5a7a49 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AC_PROG_EGREP LT_INIT AC_CONFIG_MACRO_DIR([m4]) -AC_CHECK_TOOL(READELF, readelf) +AC_CHECK_TOOLS([READELF], [readelf greadelf]) # Test for 64-bit build. AC_CHECK_SIZEOF([size_t]) @@ -171,7 +171,7 @@ case "$TARGET" in libffi_cv_as_s390_zarch=no echo 'void foo(void) { bar(); bar(); }' > conftest.c if $CC $CFLAGS -S conftest.c > /dev/null 2>&1; then - if grep -q brasl conftest.s; then + if $GREP -q brasl conftest.s; then libffi_cv_as_s390_zarch=yes fi fi @@ -277,7 +277,7 @@ if test "x$GCC" = "xyes"; then libffi_cv_ro_eh_frame=yes echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then - if $READELF -WS conftest.o 2>/dev/null | grep -q -n 'eh_frame .* WA'; then + if $READELF -WS conftest.o 2>/dev/null | $GREP -q -n 'eh_frame .* WA'; then libffi_cv_ro_eh_frame=no fi fi