diff --git a/build/shtool b/build/shtool index 8a4ffcfc73..539784c42a 100755 --- a/build/shtool +++ b/build/shtool @@ -993,7 +993,7 @@ install ) if [ ".$opt_t" = .yes ]; then echo "strip $dsttmp" 1>&2 fi - strip $dsttmp || shtool_exit $? + $STRIP $dsttmp || shtool_exit $? fi if [ ".$opt_o" != . ]; then if [ ".$opt_t" = .yes ]; then diff --git a/build/top.mk b/build/top.mk index 264b4bab2e..86fafca025 100644 --- a/build/top.mk +++ b/build/top.mk @@ -59,7 +59,7 @@ INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) -m 644 INSTALL_SCRIPT = $(INSTALL) -STRIP = -s +STRIP_OPTS = -s LINT = lint 5LINT = 5lint diff --git a/clients/tools/Makefile.in b/clients/tools/Makefile.in index ce7d377e12..b4e5037b43 100644 --- a/clients/tools/Makefile.in +++ b/clients/tools/Makefile.in @@ -129,7 +129,7 @@ install-local: FORCE -$(MKDIR) $(DESTDIR)$(bindir) @( \ for prg in $(PROGRAMS); do \ - $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT) \ + $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 $$prg$(EXEEXT) \ $(DESTDIR)$(bindir); \ done \ ) diff --git a/configure.in b/configure.in index 204912307d..5d15f7d48f 100644 --- a/configure.in +++ b/configure.in @@ -657,6 +657,15 @@ if test -z "${AR}"; then fi fi +if test -z "${STRIP}"; then + AC_CHECK_PROGS(STRIP,strip,missing) + + if test "${STRIP}" = "missing" ; then + AC_MSG_ERROR([Unable to locate strip(1) or suitable replacement. Check PATH or set STRIP.]) + fi +fi + + AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_MAKE_SET diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index a56a912413..59248350f5 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -372,7 +372,7 @@ install-local-srv: install-slapd install-tools \ install-slapd: FORCE -$(MKDIR) $(DESTDIR)$(libexecdir) -$(MKDIR) $(DESTDIR)$(localstatedir)/run - $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \ + $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 \ slapd$(EXEEXT) $(DESTDIR)$(libexecdir) @for i in $(SUBDIRS); do \ if test -d $$i && test -f $$i/Makefile ; then \