summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-09-23 15:37:37 -0500
committerDavid Smith <dsmith@redhat.com>2009-09-23 15:37:37 -0500
commit29b694a70f0720649c3335a6efe23613d6ef8d79 (patch)
tree39ab385ef4882ab82b8ef1ddae6e5797cee982b7 /configure.ac
parent430411789c9c9540a8260bedc76d86fdf6053713 (diff)
downloadsystemtap-steved-29b694a70f0720649c3335a6efe23613d6ef8d79.tar.gz
systemtap-steved-29b694a70f0720649c3335a6efe23613d6ef8d79.tar.xz
systemtap-steved-29b694a70f0720649c3335a6efe23613d6ef8d79.zip
Fix configure on systems without 'gcc -fgnu89-inline' support (rhel4).
* configure.ac: Only compile elfutils with '-fgnu89-inline' if the compiler actually supports it. * configure: Regenerated.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fa3a09bb..6136b48d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -543,6 +543,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 +568,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...