diff options
author | David Smith <dsmith@redhat.com> | 2009-09-23 15:37:37 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-09-23 15:37:37 -0500 |
commit | 29b694a70f0720649c3335a6efe23613d6ef8d79 (patch) | |
tree | 39ab385ef4882ab82b8ef1ddae6e5797cee982b7 | |
parent | 430411789c9c9540a8260bedc76d86fdf6053713 (diff) | |
download | systemtap-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.
-rwxr-xr-x | configure | 46 | ||||
-rw-r--r-- | configure.ac | 15 |
2 files changed, 59 insertions, 2 deletions
@@ -8607,6 +8607,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 +8663,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..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... |