summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-06-12 20:43:31 +0200
committerDavid Lamparter <equinox@diac24.net>2019-06-13 13:35:33 +0200
commite8ef2be65bb0cb8ed60ff76ab5eda09175417aeb (patch)
tree327fce061c4295affa12156284c8ee5431eb2773
parentc7405ee25c64fbf280dc8c77b2187b51593c3875 (diff)
build: improve ranlib -D autoconf test
Signed-off-by: David Lamparter <equinox@diac24.net>
-rwxr-xr-xconfigure.ac11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 77d5ee1555..5047e33cc3 100755
--- a/configure.ac
+++ b/configure.ac
@@ -371,14 +371,19 @@ AC_SUBST([ARFLAGS])
AC_SUBST([AR_FLAGS])
AC_MSG_CHECKING([whether $RANLIB supports D option])
-if $RANLIB -D conftest.a >/dev/null 2>/dev/null; then
- AC_MSG_RESULT([yes])
- RANLIB="$RANLIB -D"
+if $RANLIB -D conftest.a >conftest.err 2>&1; then
+ if grep -q -- '-D' conftest.err; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ RANLIB="$RANLIB -D"
+ fi
else
AC_MSG_RESULT([no])
fi
AC_SUBST([RANLIB])
+test -f conftest.err && rm conftest.err
test -f conftest.a && rm conftest.a
dnl ----------------------