From: dsmith Date: Fri, 25 Jan 2008 18:00:37 +0000 (+0000) Subject: 2008-01-25 David Smith X-Git-Tag: release-0.6.2~108 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=e8f3c2c29944c00788274f7f7e850dd50e24463f;p=systemtap.git 2008-01-25 David Smith * configure.ac: Compressed the two perfmon options into one. Made other small fixes and whitespace changes. * configure: Regenerated. --- diff --git a/ChangeLog b/ChangeLog index 810a4d1d4..6a2b8c27b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-25 David Smith + + * configure.ac: Compressed the two perfmon options into one. + Made other small fixes and whitespace changes. + * configure: Regenerated. + 2008-01-24 Frank Ch. Eigler * Makefile.am: Make another $(MKDIR) call visible. diff --git a/configure b/configure index b0fdfdcfd..b9cfb80a2 100755 --- a/configure +++ b/configure @@ -706,11 +706,11 @@ U ANSI2KNR RANLIB sqlite3_LIBS +BUILD_CRASHMOD_TRUE +BUILD_CRASHMOD_FALSE BUILD_ELFUTILS_TRUE BUILD_ELFUTILS_FALSE elfutils_abs_srcdir -BUILD_CRASHMOD_TRUE -BUILD_CRASHMOD_FALSE stap_LIBS DATE PROCFLAGS @@ -1310,7 +1310,11 @@ Optional Features: (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-perfmon enable perfmon support (default is disabled) + --enable-perfmon[=DIRECTORY] + enable perfmon support (default is disabled). + Optional DIRECTORY is the path to the perfmon + installation (needed if installed in a non-standard + location). --enable-prologues make -P prologue-searching default --enable-ssp enable gcc stack-protector --enable-sqlite build with sqlite support @@ -1318,8 +1322,6 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-perfmon=DIRECTORY - Path to Perfmon installation to use --with-elfutils=DIRECTORY find elfutils source code in DIRECTORY @@ -5825,28 +5827,16 @@ fi # Check whether --enable-perfmon was given. if test "${enable_perfmon+set}" = set; then - enableval=$enable_perfmon; perfmon_support=$enableval -else - perfmon_support=no -fi - - - -# Check whether --with-perfmon was given. -if test "${with_perfmon+set}" = set; then - withval=$with_perfmon; -case "$with_perfmon" in -yes ) { { echo "$as_me:$LINENO: error: --with-perfmon requires an argument" >&5 -echo "$as_me: error: --with-perfmon requires an argument" >&2;} - { (exit 1); exit 1; }; } ;; -''|no) ;; -*) perfmon_support=yes ;; -esac -fi - - - -if test $perfmon_support = yes; then + enableval=$enable_perfmon; + + CFLAGS="$CFLAGS -DPERFMON" + CXXFLAGS="$CXXFLAGS -DPERFMON" + LIBS="$LIBS -lpfm" + if test "$enable_perfmon" != "yes"; then + CFLAGS="$CFLAGS -DPERFMON -I$enable_perfmon/include" + CXXFLAGS="$CXXFLAGS -DPERFMON -I$enable_perfmon/include" + LDFLAGS="$LDFLAGS -L$enable_perfmon/lib" + fi { echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5 echo $ECHO_N "checking for pfm_start in -lpfm... $ECHO_C" >&6; } @@ -5923,12 +5913,30 @@ echo "$as_me: error: systemtap cannot find required perfmon libs" >&2;} { (exit 1); exit 1; }; } fi - CFLAGS="$CFLAGS -DPERFMON -I$with_perfmon/include" - CXXFLAGS="$CXXFLAGS -DPERFMON -I$with_perfmon/include" - LDFLAGS="$LDFLAGS -DPERFMON -L$with_perfmon/lib -lpfm" + fi +#AC_ARG_WITH([perfmon], +# AS_HELP_STRING([--with-perfmon=DIRECTORY], +# [Path to Perfmon installation to use]), +# [ +#case "$with_perfmon" in +#yes ) AC_MSG_ERROR([--with-perfmon requires an argument]) ;; +#''|no) ;; +#*) perfmon_support=yes ;; +#esac]) + + +#if test $perfmon_support = yes; then +# AC_CHECK_LIB(pfm, pfm_start,,[ +# AC_MSG_ERROR([systemtap cannot find required perfmon libs])]) +# CFLAGS="$CFLAGS -DPERFMON -I$with_perfmon/include" +# CXXFLAGS="$CXXFLAGS -DPERFMON -I$with_perfmon/include" +# LDFLAGS="$LDFLAGS -DPERFMON -L$with_perfmon/lib -lpfm" +#fi + + if test "${enable_prologues+set}" != set; then { echo "$as_me:$LINENO: checking to see if prologue searching should be the default" >&5 echo $ECHO_N "checking to see if prologue searching should be the default... $ECHO_C" >&6; } @@ -5943,7 +5951,6 @@ echo "${ECHO_T}yes" >&6; } echo "${ECHO_T}no" >&6; } fi fi - # Check whether --enable-prologues was given. if test "${enable_prologues+set}" = set; then enableval=$enable_prologues; @@ -5957,6 +5964,7 @@ fi fi + # Check whether --enable-ssp was given. if test "${enable_ssp+set}" = set; then enableval=$enable_ssp; @@ -5964,8 +5972,8 @@ fi if test "x$enable_ssp" == xyes; then CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} fi @@ -5974,7 +5982,7 @@ fi if test "${enable_sqlite+set}" = set; then enableval=$enable_sqlite; else - enable_sqlite=check + enable_sqlite=check fi sqlite3_LIBS= if test "x$enable_sqlite" != xno; then @@ -6055,47 +6063,6 @@ fi fi -# Check whether --enable-ssp was given. -if test "${enable_ssp+set}" = set; then - enableval=$enable_ssp; -fi - -if test "x$enable_ssp" == xyes; then - CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 -echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} -fi - - -build_elfutils=no - -# Check whether --with-elfutils was given. -if test "${with_elfutils+set}" = set; then - withval=$with_elfutils; -case "$with_elfutils" in -yes) { { echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 -echo "$as_me: error: --with-elfutils requires an argument" >&2;} - { (exit 1); exit 1; }; } ;; -''|no) ;; -*) build_elfutils=yes ;; -esac -fi - - if test $build_elfutils = yes; then - BUILD_ELFUTILS_TRUE= - BUILD_ELFUTILS_FALSE='#' -else - BUILD_ELFUTILS_TRUE='#' - BUILD_ELFUTILS_FALSE= -fi - -elfutils_abs_srcdir=`if test $build_elfutils = yes; then - cd $with_elfutils && pwd -fi -` - - for ac_header in crash/defs.h do @@ -6317,6 +6284,34 @@ fi done +build_elfutils=no + +# Check whether --with-elfutils was given. +if test "${with_elfutils+set}" = set; then + withval=$with_elfutils; +case "$with_elfutils" in +yes) { { echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 +echo "$as_me: error: --with-elfutils requires an argument" >&2;} + { (exit 1); exit 1; }; } ;; +''|no) ;; +*) build_elfutils=yes ;; +esac +fi + + if test $build_elfutils = yes; then + BUILD_ELFUTILS_TRUE= + BUILD_ELFUTILS_FALSE='#' +else + BUILD_ELFUTILS_TRUE='#' + BUILD_ELFUTILS_FALSE= +fi + +elfutils_abs_srcdir=`if test $build_elfutils = yes; then + cd $with_elfutils && pwd +fi +` + + if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils from Fedora save_LIBS="$LIBS" @@ -6474,7 +6469,7 @@ fi stap_LIBS="$LIBS" - LIBS="$SAVE_LIBS" + LIBS="$save_LIBS" else # We built our own and stap_LDFLAGS points at the install. stap_LIBS="-ldw -lebl" @@ -6592,9 +6587,9 @@ LIBS="$SAVE_LIBS" CFLAGS="$SAVE_CFLAGS" if test -d $srcdir/.git -a ! -f $srcdir/SNAPSHOT; then - snapshot=`cd $srcdir; git-rev-list --abbrev-commit --max-count=1 HEAD` - echo $snapshot > SNAPSHOT - { echo "$as_me:$LINENO: Created git SNAPSHOT $snapshot" >&5 + snapshot=`cd $srcdir; git-rev-list --abbrev-commit --max-count=1 HEAD` + echo $snapshot > SNAPSHOT + { echo "$as_me:$LINENO: Created git SNAPSHOT $snapshot" >&5 echo "$as_me: Created git SNAPSHOT $snapshot" >&6;} fi @@ -6736,17 +6731,17 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. +if test -z "${BUILD_CRASHMOD_TRUE}" && test -z "${BUILD_CRASHMOD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. +echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BUILD_CRASHMOD_TRUE}" && test -z "${BUILD_CRASHMOD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. +if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. +echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi @@ -7392,11 +7387,11 @@ U!$U$ac_delim ANSI2KNR!$ANSI2KNR$ac_delim RANLIB!$RANLIB$ac_delim sqlite3_LIBS!$sqlite3_LIBS$ac_delim +BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim +BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim -BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim -BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then diff --git a/configure.ac b/configure.ac index f53fca84f..f5fcc9686 100644 --- a/configure.ac +++ b/configure.ac @@ -24,33 +24,28 @@ AC_PROG_MAKE_SET AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) -dnl enable option to generate code for using perfmon -AC_ARG_ENABLE(perfmon, - [ --enable-perfmon enable perfmon support (default is disabled)], - perfmon_support=$enableval, perfmon_support=no) - -AC_ARG_WITH([perfmon], - AC_HELP_STRING([--with-perfmon=DIRECTORY], - [Path to Perfmon installation to use]), - [ -case "$with_perfmon" in -yes ) AC_MSG_ERROR([--with-perfmon requires an argument]) ;; -''|no) ;; -*) perfmon_support=yes ;; -esac]) - - -dnl XXX fixme so that it it can use perfmon installed for real -dnl check that perfmon libraries are actually there -if test $perfmon_support = yes; then - AC_CHECK_LIB(pfm, pfm_start,,[ +dnl Handle the perfmon option. +AC_ARG_ENABLE([perfmon], + AS_HELP_STRING([--enable-perfmon@<:@=DIRECTORY@:>@], + [enable perfmon support (default is disabled). Optional DIRECTORY + is the path to the perfmon installation (needed if installed in a + non-standard location).]), [ + dnl Add perfmon define and library + CFLAGS="$CFLAGS -DPERFMON" + CXXFLAGS="$CXXFLAGS -DPERFMON" + LIBS="$LIBS -lpfm" + dnl Handle custom install dir (if needed) + if test "$enable_perfmon" != "yes"; then + CFLAGS="$CFLAGS -I$enable_perfmon/include" + CXXFLAGS="$CXXFLAGS -I$enable_perfmon/include" + LDFLAGS="$LDFLAGS -L$enable_perfmon/lib" + fi + AC_CHECK_LIB([pfm], [pfm_start], [], [ AC_MSG_ERROR([systemtap cannot find required perfmon libs])]) - CFLAGS="$CFLAGS -DPERFMON -I$with_perfmon/include" - CXXFLAGS="$CXXFLAGS -DPERFMON -I$with_perfmon/include" - LDFLAGS="$LDFLAGS -DPERFMON -L$with_perfmon/lib -lpfm" -fi - +]) +dnl Handle the prologues option. +dnl dnl If the user didn't specify --enable-prologues/--disable-prologues dnl and the x86 system has a version of gcc less than version 4, dnl automatically enable prologues. @@ -65,28 +60,28 @@ if test "${enable_prologues+set}" != set; then AC_MSG_RESULT([no]) fi fi - -AC_ARG_ENABLE(prologues, - AC_HELP_STRING([--enable-prologues],[make -P prologue-searching default]), - [ +AC_ARG_ENABLE([prologues], + AS_HELP_STRING([--enable-prologues], [make -P prologue-searching default]), + [ if test "$enable_prologues" = yes; then AC_DEFINE([ENABLE_PROLOGUES],[],[make -P prologue-searching default]) fi]) + AC_ARG_ENABLE([ssp], - [AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])]) + [AS_HELP_STRING([--enable-ssp], [enable gcc stack-protector])]) AS_IF([test "x$enable_ssp" == xyes], - [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])]) + [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])]) dnl Handle optional sqlite support. If enabled/disabled by the user, dnl do the right thing. If not specified by the user, use it if dnl present. AC_ARG_ENABLE([sqlite], - AS_HELP_STRING([--enable-sqlite], [build with sqlite support]), - [], dnl ACTION-IF-GIVEN - [enable_sqlite=check]) dnl ACTION-IF-NOT-GIVEN + AS_HELP_STRING([--enable-sqlite], [build with sqlite support]), + [], dnl ACTION-IF-GIVEN + [enable_sqlite=check]) dnl ACTION-IF-NOT-GIVEN sqlite3_LIBS= AS_IF([test "x$enable_sqlite" != xno], [AC_CHECK_LIB([sqlite3], [sqlite3_open], @@ -95,18 +90,23 @@ AS_IF([test "x$enable_sqlite" != xno], AC_MSG_FAILURE([--enable-sqlite was given, but test for sqlite failed]) fi])]) -AC_ARG_ENABLE([ssp], - [AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])]) -AS_IF([test "x$enable_ssp" == xyes], - [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" - AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])]) +AC_CHECK_HEADERS(crash/defs.h, + build_crashmod=yes,build_crashmod=no, + [ +#define NR_CPUS 256 +]) +AM_CONDITIONAL(BUILD_CRASHMOD, test $build_crashmod = yes) +AC_CHECK_HEADERS([sys/capability.h], , + [AC_MSG_ERROR([cannot find required libcap header (libcap-devel may need to be installed)])]) + +dnl Handle elfutils. If '--with-elfutils=DIR' wasn't specified, used +dnl the system's elfutils. build_elfutils=no AC_ARG_WITH([elfutils], - AC_HELP_STRING([--with-elfutils=DIRECTORY], - [find elfutils source code in DIRECTORY]), - [ + AS_HELP_STRING([--with-elfutils=DIRECTORY], + [find elfutils source code in DIRECTORY]), + [ case "$with_elfutils" in yes) AC_MSG_ERROR([--with-elfutils requires an argument]) ;; ''|no) ;; @@ -116,16 +116,6 @@ AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes) AC_SUBST(elfutils_abs_srcdir, `AS_IF([test $build_elfutils = yes], [cd $with_elfutils && pwd])`) -AC_CHECK_HEADERS(crash/defs.h, - build_crashmod=yes,build_crashmod=no, - [ -#define NR_CPUS 256 -]) -AM_CONDITIONAL(BUILD_CRASHMOD, test $build_crashmod = yes) - -AC_CHECK_HEADERS([sys/capability.h], , - [AC_MSG_ERROR([cannot find required libcap header (libcap-devel may need to be installed)])]) - if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils from Fedora save_LIBS="$LIBS" @@ -135,7 +125,7 @@ if test $build_elfutils = no; then AC_MSG_ERROR([missing elfutils development headers/libraries (ebl 0.123+)])]) stap_LIBS="$LIBS" - LIBS="$SAVE_LIBS" + LIBS="$save_LIBS" else # We built our own and stap_LDFLAGS points at the install. stap_LIBS="-ldw -lebl" @@ -175,9 +165,9 @@ CFLAGS="$SAVE_CFLAGS" dnl Create SNAPSHOT file from git commit id if possible if test -d $srcdir/.git -a ! -f $srcdir/SNAPSHOT; then - snapshot=`cd $srcdir; git-rev-list --abbrev-commit --max-count=1 HEAD` - echo $snapshot > SNAPSHOT - AC_MSG_NOTICE([Created git SNAPSHOT $snapshot]) + snapshot=`cd $srcdir; git-rev-list --abbrev-commit --max-count=1 HEAD` + echo $snapshot > SNAPSHOT + AC_MSG_NOTICE([Created git SNAPSHOT $snapshot]) fi AC_CONFIG_HEADERS([config.h:config.in])