Add --enable-strip configure option
authorAlexey Gladkov <legion@altlinux.org>
Wed, 2 Apr 2008 14:07:37 +0000 (18:07 +0400)
committerAlexey Gladkov <legion@altlinux.org>
Wed, 2 Apr 2008 14:07:37 +0000 (18:07 +0400)
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
configure.ac
src/Makefile.in

index 5cdff3e..cee93e0 100644 (file)
@@ -62,6 +62,12 @@ AC_ARG_ENABLE(optional-progs,
 
 AC_SUBST(OPTIONAL_PROGS)
 
+AC_ARG_ENABLE(strip,
+       AS_HELP_STRING(--enable-strip, [Enable stripping of executables]),
+       [ENABLE_STRIP=$enableval], [ENABLE_STRIP=no])
+
+AC_SUBST(ENABLE_STRIP)
+
 # For lib/nls.h: do we have <libintl.h> and gettext() ?
 
 AC_ARG_ENABLE(nls, AS_HELP_STRING(--enable-nls, [NLS support]),
index 9053fa7..bf1fdf1 100644 (file)
@@ -2,6 +2,7 @@ prefix         = @prefix@
 exec_prefix    = @exec_prefix@
 bindir         = $(DESTDIR)@bindir@
 datarootdir    = @datarootdir@
+ENABLE_STRIP   = @STRIP@
 KEYCODES_PROGS   = @KEYCODES_PROGS@
 RESIZECONS_PROGS = @RESIZECONS_PROGS@
 OPTIONAL_PROGS   = @OPTIONAL_PROGS@
@@ -30,6 +31,11 @@ PROGS += screendump setlogcons setvesablank spawn_console spawn_login \
         getunimap clrunimap outpsfheader setpalette
 endif
 
+INSTALL_STRIP =
+ifeq ($(ENABLE_STRIP),yes)
+       INSTALL_STRIP = -s
+endif
+
 # Installed by default
 SHCMDS  = unicode_start unicode_stop
 
@@ -52,7 +58,7 @@ setuid:
 
 install: all
        install -d -m 0755 $(bindir)
-       install -s -m 0755 $(PROGS) $(OLDPROGS) $(bindir)
+       install $(INSTALL_STRIP) -m 0755 $(PROGS) $(OLDPROGS) $(bindir)
        install -m 0755 $(SHCMDS) $(bindir)
        for i in psfaddtable psfgettable psfstriptable; do \
                rm -f $(bindir)/$$i; ln -s psfxtable $(bindir)/$$i; \