diff options
-rwxr-xr-x | configure | 107 | ||||
-rw-r--r-- | configure.ac | 30 |
2 files changed, 105 insertions, 32 deletions
@@ -654,8 +654,8 @@ RPM_CFLAGS rpm_LIBS BUILD_GRAPHER_FALSE BUILD_GRAPHER_TRUE -GRAPHER_LIBS -GRAPHER_CFLAGS +gtkmm_LIBS +gtkmm_CFLAGS PKG_CONFIG HAVE_NSS_FALSE HAVE_NSS_TRUE @@ -808,8 +808,8 @@ CXXFLAGS CCC CPP PKG_CONFIG -GRAPHER_CFLAGS -GRAPHER_LIBS +gtkmm_CFLAGS +gtkmm_LIBS RPM_CFLAGS RPM_LIBS CXXCPP' @@ -1487,10 +1487,9 @@ Some influential environment variables: CXXFLAGS C++ compiler flags CPP C preprocessor PKG_CONFIG path to pkg-config utility - GRAPHER_CFLAGS - C compiler flags for GRAPHER, overriding pkg-config - GRAPHER_LIBS - linker flags for GRAPHER, overriding pkg-config + gtkmm_CFLAGS + C compiler flags for gtkmm, overriding pkg-config + gtkmm_LIBS linker flags for gtkmm, overriding pkg-config RPM_CFLAGS C compiler flags for RPM, overriding pkg-config RPM_LIBS linker flags for RPM, overriding pkg-config CXXCPP C++ preprocessor @@ -7315,13 +7314,12 @@ fi # Check whether --enable-grapher was given. if test "${enable_grapher+set}" = set; then - enableval=$enable_grapher; enable_grapher=$enableval + enableval=$enable_grapher; else - enable_grapher="check" + enable_grapher="check" fi - if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -7436,13 +7434,14 @@ $as_echo "no" >&6; } fi fi +if test "x$enable_grapher" != xno; then pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for GRAPHER" >&5 -$as_echo_n "checking for GRAPHER... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for gtkmm" >&5 +$as_echo_n "checking for gtkmm... " >&6; } -if test -n "$GRAPHER_CFLAGS"; then - pkg_cv_GRAPHER_CFLAGS="$GRAPHER_CFLAGS" +if test -n "$gtkmm_CFLAGS"; then + pkg_cv_gtkmm_CFLAGS="$gtkmm_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 @@ -7450,15 +7449,15 @@ if test -n "$GRAPHER_CFLAGS"; then ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_GRAPHER_CFLAGS=`$PKG_CONFIG --cflags "gtkmm-2.4 >= 2.8.0" 2>/dev/null` + pkg_cv_gtkmm_CFLAGS=`$PKG_CONFIG --cflags "gtkmm-2.4 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi -if test -n "$GRAPHER_LIBS"; then - pkg_cv_GRAPHER_LIBS="$GRAPHER_LIBS" +if test -n "$gtkmm_LIBS"; then + pkg_cv_gtkmm_LIBS="$gtkmm_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 @@ -7466,7 +7465,7 @@ if test -n "$GRAPHER_LIBS"; then ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_GRAPHER_LIBS=`$PKG_CONFIG --libs "gtkmm-2.4 >= 2.8.0" 2>/dev/null` + pkg_cv_gtkmm_LIBS=`$PKG_CONFIG --libs "gtkmm-2.4 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi @@ -7484,25 +7483,33 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GRAPHER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` + gtkmm_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` else - GRAPHER_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` + gtkmm_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GRAPHER_PKG_ERRORS" >&5 + echo "$gtkmm_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - have_gtkmm=no + have_gtkmm="no" elif test $pkg_failed = untried; then - have_gtkmm=no + have_gtkmm="no" else - GRAPHER_CFLAGS=$pkg_cv_GRAPHER_CFLAGS - GRAPHER_LIBS=$pkg_cv_GRAPHER_LIBS + gtkmm_CFLAGS=$pkg_cv_gtkmm_CFLAGS + gtkmm_LIBS=$pkg_cv_gtkmm_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - have_gtkmm=yes + have_gtkmm="yes" +fi +fi + +if test "x${have_gtkmm}" == "xno" -a x"$enable_grapher" == "xyes"; then + { { $as_echo "$as_me:$LINENO: error: systemtap cannot find required gtkmm-2.4 libs (gtkmm24-devel may need to be installed)" >&5 +$as_echo "$as_me: error: systemtap cannot find required gtkmm-2.4 libs (gtkmm24-devel may need to be installed)" >&2;} + { (exit 1); exit 1; }; } fi + if test "x${have_gtkmm}" == "xyes" -a x"$enable_grapher" != "xno"; then BUILD_GRAPHER_TRUE= BUILD_GRAPHER_FALSE='#' @@ -8607,6 +8614,50 @@ if test $build_elfutils = yes; then esac { $as_echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5 $as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} + + save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -fgnu89-inline" + CFLAGS="$CFLAGS -fgnu89-inline" + gnu89_inline_flag="" + cat >conftest.$ac_ext <<_ACEOF +int something (); +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: Compiling elfutils with gcc -fgnu89-inline" >&5 +$as_echo "$as_me: Compiling elfutils with gcc -fgnu89-inline" >&6;} + gnu89_inline_flag="-fgnu89-inline" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { $as_echo "$as_me:$LINENO: Compiler does not support -fgnu89-inline" >&5 +$as_echo "$as_me: Compiler does not support -fgnu89-inline" >&6;} +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + 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. @@ -8619,7 +8670,7 @@ $as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} --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... 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... |