aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.in4
-rw-r--r--src/configure.ac24
2 files changed, 9 insertions, 19 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index ae68ab0..ac80b61 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -12,7 +12,7 @@ MAKEDEP_FLAGS = @MAKEDEP_FLAGS@
CC = @CC@
LD = @LD@
-STRIP = @STRIP@
+STRIP = @STRIP@ @STRIPFLAGS@
AFLAGS =
LFLAGS = @LFLAGS@
@@ -34,7 +34,7 @@ all: $(LIBNAME)
$(LIBNAME): $(TARGETS)
$(LD) $(LFLAGS) -o $(LIBNAME).$(EXT) *.o $(LIBS)
- $(STRIP) @STRIPFLAGS@ $(LIBNAME).$(EXT)
+ $(STRIP) $(LIBNAME).$(EXT)
## dependencies: as proposed by the GNU-make documentation
## see http://www.gnu.org/software/make/manual/html_node/make_47.html#SEC51
diff --git a/src/configure.ac b/src/configure.ac
index ff88fb1..498f0bb 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -111,21 +111,15 @@ fi
LD=${LD:=$CC}
dnl if we don't have $STRIP set, we set it to ${host}-strip or strip
-if test "x$STRIP" = "x"
+AC_CHECK_TOOL([STRIP], [strip], [true])
+AC_MSG_CHECKING([if strip is GNU strip])
+if $STRIP -V 2>&1 | grep GNU > /dev/null
then
- if test "x$host" != "x"
- then
- STRIP=${host}-strip
- else
-# we need a method to check arguments for arbitrary commands like strip
- STRIP="strip"
- fi
-fi
-if $(which ${STRIP} > /dev/null)
-then
- STRIPFLAGS="--strip-uneeded"
+ AC_SUBST(STRIPFLAGS, "--strip-unneeded")
+ AC_MSG_RESULT([yes])
else
- STRIP="echo fake strip"
+ AC_SUBST(STRIPFLAGS,"-x")
+ AC_MSG_RESULT([no])
fi
DFLAGS=""
@@ -138,7 +132,6 @@ then
LFLAGS="-export_dynamic -shared"
CFLAGS="-fPIC $CFLAGS"
EXT=pd_linux
- STRIPFLAGS="--strip-unneeded"
fi
dnl This should use '-bundle_loader /path/to/pd/bin/pd' instead of'-undefined suppress'
@@ -148,7 +141,6 @@ then
LD=cc
LFLAGS="-bundle -undefined suppress -flat_namespace"
EXT=pd_darwin
- STRIPFLAGS=
fi
if test `uname | sed -e 's/^MINGW.*/NT/'` = NT;
@@ -169,7 +161,6 @@ then
-shared -rdata_shared"
EXT=pd_irix6
dnl DFLAGS="-DUNIX -DIRIX6"
- STRIPFLAGS="--strip-unneeded"
fi
if test `uname -s` = IRIX32;
@@ -178,7 +169,6 @@ then
-shared -rdata_shared"
EXT=pd_irix5
dnl DFLAGS="-DUNIX -DIRIX5"
- STRIPFLAGS="--strip-unneeded"
fi