From: Sebastien Godard Date: Mon, 2 Jan 2012 13:50:53 +0000 (+0100) Subject: configure script updated: Added --disable-stripping option. X-Git-Tag: v10.0.4~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d4ae819e27aa007cc6877f8091072ba6f969d35;p=sysstat configure script updated: Added --disable-stripping option. The configure script has been updated, with the addition of a new option (--disable-stripping) which tells configure to NOT strip object files (option "-s" is no longer passed to gcc when linking the binaries). From Petr Uzel 13/11/2011 11:45 AM Could you please add something like make install_nostrip to the Makefile? By default, the buildsystem uses LDFLAGS = -s, which always strips the resulting binary. In openSUSE, we have to patch this, because we need to strip the binaries on our own (to create sysstat-debug{source,info} packages). --- diff --git a/CHANGES b/CHANGES index 57b0f51..001b6e2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Changes: xxxx/xx/xx: Version 10.0.4 - Sebastien Godard (sysstat orange.fr) + * configure script updated: Added --disable-stripping option. + Using this option tells configure to NOT strip object files. * NLS updated. Serbian translation added. 2011/11/27: Version 10.0.3 - Sebastien Godard (sysstat orange.fr) diff --git a/Makefile.in b/Makefile.in index 2cc8e3a..b09a832 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,7 +71,7 @@ SYSCONFIG_DIR = @SYSCONFIG_DIR@ # Compiler flags CFLAGS = @CFLAGS@ -Wall -Wstrict-prototypes -pipe -O2 DFLAGS = @DFLAGS@ -LFLAGS = -s +LFLAGS = @STRIP@ DFLAGS += -DSA_DIR=\"$(SA_DIR)\" -DSADC_PATH=\"$(SADC_PATH)\" DFLAGS += $(DFSENSORS) diff --git a/build/stripping b/build/stripping new file mode 100644 index 0000000..89d5728 --- /dev/null +++ b/build/stripping @@ -0,0 +1,6 @@ + +Answer y if you don't want binaries to be stripped. +This will result in commands being slightly bigger but may be +necessary for debugging purposes. +Default answer is n here (binaries will be stripped). + diff --git a/configure b/configure index 92b42d7..b3076d4 100755 --- a/configure +++ b/configure @@ -637,6 +637,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +STRIP DFLAGS WITH_DEBUG INSTALL_DOC @@ -749,6 +750,7 @@ enable_clean_sa_dir enable_install_cron enable_documentation enable_debuginfo +enable_stripping ' ac_precious_vars='build_alias host_alias @@ -1400,6 +1402,7 @@ Optional Features: --enable-install-cron install a crontab to start sar --disable-documentation do not install documentation --enable-debuginfo enable debug output (--debuginfo option) + --disable-stripping do not strip object files Some influential environment variables: CC C compiler command @@ -7329,6 +7332,7 @@ echo . # --enable-debuginfo enable debug output (--debuginfo option) # --disable-documentation do not install documentation (man pages...) # --disable-sensors do not link against libsensors even if available +# --disable-stripping do not strip object files # # Some influential environment variables: # rcdir directory where startup scripts are installed @@ -7757,6 +7761,42 @@ fi +# Check whether object files should be stripped +{ $as_echo "$as_me:$LINENO: checking whether object files should be stripped" >&5 +$as_echo_n "checking whether object files should be stripped... " >&6; } +# Check whether --enable-stripping was given. +if test "${enable_stripping+set}" = set; then + enableval=$enable_stripping; AUX_STRIP=$enableval +else + AUX_STRIP=yes +fi + +if test $AUX_STRIP != "no"; then + AUX_STRIP="yes" + STRIP="-s" +else + AUX_STRIP="no" + STRIP= +fi +{ $as_echo "$as_me:$LINENO: result: $AUX_STRIP" >&5 +$as_echo "$AUX_STRIP" >&6; } + +# National Language Support +#AC_MSG_CHECKING(National Language Support) +#AC_ARG_ENABLE(nls, +# AC_HELP_STRING([--disable-nls], +# [disable National Language Support]), +# AUX_NLS=$enableval,AUX_NLS=yes) +#if test $AUX_NLS != "no" && test $HAVE_LIBINTL_H && test $HAVE_LOCALE_H; then +# AUX_NLS="yes" +# NLS="y" +#else +# AUX_NLS="no" +# NLS="n" +#fi +#AC_MSG_RESULT($AUX_NLS) +#AC_SUBST(NLS) + # Create files echo . echo Now create files: diff --git a/configure.in b/configure.in index f3f880c..d646cbf 100644 --- a/configure.in +++ b/configure.in @@ -127,6 +127,7 @@ echo . # --enable-debuginfo enable debug output (--debuginfo option) # --disable-documentation do not install documentation (man pages...) # --disable-sensors do not link against libsensors even if available +# --disable-stripping do not strip object files # # Some influential environment variables: # rcdir directory where startup scripts are installed @@ -489,6 +490,37 @@ AC_ARG_ENABLE(debuginfo, AC_SUBST(WITH_DEBUG) AC_SUBST(DFLAGS) +# Check whether object files should be stripped +AC_MSG_CHECKING(whether object files should be stripped) +AC_ARG_ENABLE(stripping, + AC_HELP_STRING([--disable-stripping], + [do not strip object files]), + AUX_STRIP=$enableval,AUX_STRIP=yes) +if test $AUX_STRIP != "no"; then + AUX_STRIP="yes" + STRIP="-s" +else + AUX_STRIP="no" + STRIP= +fi +AC_MSG_RESULT($AUX_STRIP) +AC_SUBST(STRIP) +# National Language Support +#AC_MSG_CHECKING(National Language Support) +#AC_ARG_ENABLE(nls, +# AC_HELP_STRING([--disable-nls], +# [disable National Language Support]), +# AUX_NLS=$enableval,AUX_NLS=yes) +#if test $AUX_NLS != "no" && test $HAVE_LIBINTL_H && test $HAVE_LOCALE_H; then +# AUX_NLS="yes" +# NLS="y" +#else +# AUX_NLS="no" +# NLS="n" +#fi +#AC_MSG_RESULT($AUX_NLS) +#AC_SUBST(NLS) + # Create files echo . echo Now create files: diff --git a/iconfig b/iconfig index 987ca4f..dbc7201 100755 --- a/iconfig +++ b/iconfig @@ -1,6 +1,6 @@ #!/bin/sh #@(#) Configuration script for sysstat -# (C) 2000-2010 Sebastien GODARD (sysstat orange.fr) +# (C) 2000-2012 Sebastien GODARD (sysstat orange.fr) ASK="sh build/Ask.sh" @@ -173,13 +173,22 @@ else echo "Parameter --enable-install-isag is NOT set" fi +# Strip object files +STRIP=`${ASK} 'Do not strip object files? (y/n)' "--disable-stripping" "stripping"` +if [ "${STRIP}" = "y" ]; then + STRIP="--disable-stripping " +else + STRIP="" + echo "Parameter --disable-stripping is NOT set" +fi + echo echo "./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \ ${YESTERDAY}${HISTORY}${COMPRESSAFTER}${MAN}${IGNORE_MAN}${CRON}${RCDIR} \ -${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}" +${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}" echo ./configure ${PREFIX}${SA_LIB_DIR}${SA_DIR}${SYSCONFIG_DIR}${CLEAN_SA_DIR}${NLS} \ ${YESTERDAY}${HISTORY}${COMPRESSAFTER}${MAN}${IGNORE_MAN}${CRON}${RCDIR} \ -${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS} +${COMPRESSMANPG}${INSTALL_DOC}${DEBUGINFO}${INSTALL_ISAG}${SENSORS}${STRIP}