From 510d14db73a50e1e002b8483167c8ba755513c6a Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Thu, 10 Jun 1999 15:18:02 +0000 Subject: [PATCH] Add a configure flag --enable-strip-libs to make it easy to force the libraries to strip. --- config/autoconf.mk.in | 2 ++ config/rules.mk | 5 +++++ configure.in | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 6be7153e884..cd8d26ccb84 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -55,6 +55,8 @@ ClientWallet=@ClientWallet@ CookieManagement=@CookieManagement@ SingleSignon=@SingleSignon@ +MOZ_POST_DSO_LIB_COMMAND = @MOZ_POST_DSO_LIB_COMMAND@ +MOZ_POST_AR_LIB_COMMAND = @MOZ_POST_AR_LIB_COMMAND@ MOZ_ENABLE_GTK_MOZILLA = @MOZ_ENABLE_GTK_MOZILLA@ MOZ_BUILD_ROOT = @MOZ_BUILD_ROOT@ diff --git a/config/rules.mk b/config/rules.mk index 8c377258682..b6a1d0764b9 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -524,17 +524,20 @@ endif $(AR) $(OBJS) $(LOBJS) $(SUB_LOBJS) $(RANLIB) $@ @rm -f foodummyfilefoo $(SUB_LOBJS) + $(MOZ_POST_AR_LIB_COMMAND) $@ else ifdef OS2_IMPLIB $(LIBRARY): $(OBJS) $(DEF_FILE) rm -f $@ $(IMPLIB) $@ $(DEF_FILE) $(RANLIB) $@ + $(MOZ_POST_AR_LIB_COMMAND) $@ else $(LIBRARY): $(OBJS) rm -f $@ $(AR) $(LIBOBJS),, $(RANLIB) $@ + $(MOZ_POST_AR_LIB_COMMAND) $@ endif endif @@ -543,11 +546,13 @@ $(SHARED_LIBRARY): $(OBJS) $(LOBJS) rm -f $@ $(MKSHLIB) -o $@ $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) chmod +x $@ + $(MOZ_POST_DSO_LIB_COMMAND) $@ else $(SHARED_LIBRARY): $(OBJS) $(DEF_FILE) rm -f $@ $(LINK_DLL) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) chmod +x $@ + $(MOZ_POST_DSO_LIB_COMMAND) $@ endif ifneq (,$(filter OS2 WINNT,$(OS_ARCH))) diff --git a/configure.in b/configure.in index 099e9070818..4621a74d6b2 100644 --- a/configure.in +++ b/configure.in @@ -1479,6 +1479,20 @@ then CXXFLAGS="$CXXFLAGS $MOZ_DEBUG_FLAGS" fi +dnl ======================================================== +dnl = +dnl = --enable-strip-libs +dnl = +dnl = Enable stripping of .so and .a libs +dnl = +dnl ======================================================== +MOZ_POST_DSO_LIB_COMMAND=true +MOZ_POST_AR_LIB_COMMAND=true + +MOZ_ARG_ENABLE_BOOL(strip-libs, +[ --enable-strip-libs Enable stripping of .so and .a libs ], + [ MOZ_POST_DSO_LIB_COMMAND=strip MOZ_POST_AR_LIB_COMMAND=strip ]) + dnl ======================================================== dnl = dnl = --with-debug-modules=module1,module1,etc @@ -1715,6 +1729,9 @@ AC_SUBST(BUILD_IDLC) AC_SUBST(MOZ_ENABLE_GTK_MOZILLA) AC_SUBST(MOZ_BUILD_ROOT) +AC_SUBST(MOZ_POST_DSO_LIB_COMMAND) +AC_SUBST(MOZ_POST_AR_LIB_COMMAND) + AC_SUBST(ClientWallet) AC_SUBST(CookieManagement) AC_SUBST(SingleSignon)