summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-22 08:50:44 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-22 09:49:08 +0900
commitd916a4c89741dc6a5266291275be4b497f6a9929 (patch)
tree993be66ed11fee7f56574e1f124c3d5a951f641f /configure.ac
parent1ab60345297aa5130cebc98063158059951bc407 (diff)
configure.ac: more checks on STRIP
STRIP now depends on compilers, not on OS. Previous check against $target_os does no longer work.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 13 insertions, 6 deletions
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],