diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-09-23 22:37:19 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-09-23 22:37:19 -0400 |
commit | 1c625307539ca5a0bae6a7a6e297f8d8841a8911 (patch) | |
tree | 2a4d42f4de01617d7d551d4e5ac8fdf6599af462 /configure.ac | |
parent | 243a16e69fa639092a58df581b1aba91269c8fba (diff) | |
parent | c3f070d9ef42f9b8ceea7ddb9c69496872f7f44c (diff) | |
download | systemtap-steved-1c625307539ca5a0bae6a7a6e297f8d8841a8911.tar.gz systemtap-steved-1c625307539ca5a0bae6a7a6e297f8d8841a8911.tar.xz systemtap-steved-1c625307539ca5a0bae6a7a6e297f8d8841a8911.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
* 'master' of ssh://sources.redhat.com/git/systemtap:
Better grapher option handling.
Fix configure on systems without 'gcc -fgnu89-inline' support (rhel4).
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index fa3a09bb..5d2a010d 100644 --- a/configure.ac +++ b/configure.ac @@ -274,9 +274,18 @@ dnl Handle the optional grapher AC_ARG_ENABLE([grapher], AS_HELP_STRING([--enable-grapher], [enable building of grapher (default on if gtkmm is found).]), - [enable_grapher=$enableval], - [enable_grapher="check"]) -PKG_CHECK_MODULES([GRAPHER], [gtkmm-2.4 >= 2.8.0],have_gtkmm=yes,have_gtkmm=no) + [], dnl ACTION-IF-GIVEN + [enable_grapher="check"]) dnl ACTION-IF-NOT-GIVEN +dnl If the user didn't disable the grapher, check for gtkmm. +AS_IF([test "x$enable_grapher" != xno], + [PKG_CHECK_MODULES([gtkmm], [gtkmm-2.4 >= 2.8.0], + have_gtkmm="yes", have_gtkmm="no")]) +dnl If the user explicitly said to enable the grapher, but we can't +dnl (since gtkmm isn't installed), error. +AS_IF([test "x${have_gtkmm}" == "xno" -a x"$enable_grapher" == "xyes"], + AC_MSG_ERROR([systemtap cannot find required gtkmm-2.4 libs (gtkmm24-devel may need to be installed)])) +dnl If the user didn't say to disable the grapher, and gtkmm is +dnl installed, enable the grapher. AM_CONDITIONAL([BUILD_GRAPHER], [test "x${have_gtkmm}" == "xyes" -a x"$enable_grapher" != "xno"]) @@ -543,6 +552,19 @@ if test $build_elfutils = yes; then *) elfutils_srcdir="../$with_elfutils" ;; esac AC_MSG_NOTICE([running ${elfutils_srcdir}/configure]) + + save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fgnu89-inline" + CFLAGS="$CFLAGS -fgnu89-inline" + gnu89_inline_flag="" + AC_COMPILE_IFELSE([int something ();], [ + AC_MSG_NOTICE([Compiling elfutils with gcc -fgnu89-inline]) + gnu89_inline_flag="-fgnu89-inline"],[ + AC_MSG_NOTICE([Compiler does not support -fgnu89-inline])]) + CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" + # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. @@ -555,7 +577,7 @@ if test $build_elfutils = yes; then --libdir="${here}/lib-elfutils" \ --exec-prefix="$exec_prefix" \ --prefix="$prefix" \ - CFLAGS="${CFLAGS/-Wall/} -fgnu89-inline" \ + CFLAGS="${CFLAGS/-Wall/} $gnu89_inline_flag" \ LDFLAGS="$LDFLAGS $elfutils_rpath" && if test -f ${elfutils_srcdir}/config/version.h.in; then echo Trying to install elfutils version header... |