From d916a4c89741dc6a5266291275be4b497f6a9929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Sat, 22 Aug 2020 08:50:44 +0900 Subject: configure.ac: more checks on STRIP STRIP now depends on compilers, not on OS. Previous check against $target_os does no longer work. --- configure.ac | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ee4b214486..5f16c12b15 100644 --- a/configure.ac +++ b/configure.ac @@ -3087,14 +3087,21 @@ AC_SUBST(DLEXT) AS_IF([test "$with_dln_a_out" = yes], [ STRIP=true ], [ - AC_CHECK_TOOL(STRIP, strip, :)dnl + AC_MSG_CHECKING([for $STRIP flags]) + AC_LINK_IFELSE([AC_LANG_PROGRAM], [AS_IF( + ["${STRIP}" -A -n conftest$ac_exeext 2>/dev/null], [ + AC_MSG_RESULT([-A -n]) + STRIP="${STRIP} -A -n" + ], + ["${STRIP}" -S -x conftest$ac_exeext 2>/dev/null], [ + AC_MSG_RESULT([-S -x]) + STRIP="${STRIP} -S -x" + ], [ + AC_MSG_RESULT([none needed]) + ]) + ]) ]) -AS_CASE(["$target_os"], - [linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu], [ - STRIP="$STRIP -S -x"], - [darwin*], [ - STRIP="$STRIP -A -n"]) AC_ARG_WITH(ext, AC_HELP_STRING([--with-ext=EXTS], -- cgit v1.2.3