summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-12-31 14:41:29 -0500
committerFrank Ch. Eigler <fche@elastic.org>2008-12-31 14:41:29 -0500
commite016a49a83276fc061df86b1b4d72ec8c4efdd29 (patch)
tree71b63e6c4c5c36a9061c56db61b3aa6643443f36 /configure
parent57e8bac13b43fa6f84f5fc1925d254f051a789a9 (diff)
downloadsystemtap-steved-e016a49a83276fc061df86b1b4d72ec8c4efdd29.tar.gz
systemtap-steved-e016a49a83276fc061df86b1b4d72ec8c4efdd29.tar.xz
systemtap-steved-e016a49a83276fc061df86b1b4d72ec8c4efdd29.zip
build: make compatible with elfutils 0.138 too
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure201
1 files changed, 175 insertions, 26 deletions
diff --git a/configure b/configure
index c89cbfbb..ea305667 100755
--- a/configure
+++ b/configure
@@ -7351,16 +7351,189 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $build_elfutils = yes; then
+ case "$with_elfutils" in
+ /*) elfutils_srcdir="$with_elfutils" ;;
+ *) elfutils_srcdir="../$with_elfutils" ;;
+ esac
+ { echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5
+echo "$as_me: running ${elfutils_srcdir}/configure" >&6;}
+ # 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.
+ # So we must make sure to pass those settings to elfutils configure.
+ elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}"
+ here=`pwd`
+ (mkdir -p build-elfutils && cd build-elfutils &&
+ ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \
+ --includedir="${here}/include-elfutils" \
+ --libdir="${here}/lib-elfutils" \
+ --exec-prefix="$exec_prefix" \
+ --prefix="$prefix" \
+ CFLAGS="${CFLAGS/-Wall/}" \
+ LDFLAGS="$LDFLAGS $elfutils_rpath" &&
+ make install-data # so that elfutils/version.h - if any - may be found.
+ )
+fi
+
+save_CPPFLAGS=${CPPFLAGS}
+CPPFLAGS="${CPPFLAGS} -Iinclude-elfutils" # in case bundled elfutils
+
+for ac_header in elfutils/version.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_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 "echo \"\$as_me:$LINENO: $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
+ 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
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------------- ##
+## Report this to systemtap@sources.redhat.com ##
+## ------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+CPPFLAGS="$save_CPPFLAGS"
+
ac_config_headers="$ac_config_headers config.h:config.in"
ac_config_files="$ac_config_files Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile stap.1 stapprobes.5 stapfuncs.5 stapvars.5 stapex.5 staprun.8 stap-server.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5"
subdirs="$subdirs testsuite"
-
ac_config_files="$ac_config_files run-stap"
-
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -9007,30 +9180,6 @@ echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
fi
-if test $build_elfutils = yes; then
- case "$with_elfutils" in
- /*) elfutils_srcdir="$with_elfutils" ;;
- *) elfutils_srcdir="../$with_elfutils" ;;
- esac
- { echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5
-echo "$as_me: running ${elfutils_srcdir}/configure" >&6;}
- # 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.
- # So we must make sure to pass those settings to elfutils configure.
- elfutils_rpath="-Wl,--enable-new-dtags,-rpath,${libdir}/${PACKAGE_NAME}"
- here=`pwd`
- (mkdir -p build-elfutils && cd build-elfutils &&
- ${elfutils_srcdir}/configure --enable-libebl-subdir=${PACKAGE_NAME} \
- --includedir="${here}/include-elfutils" \
- --libdir="${here}/lib-elfutils" \
- --exec-prefix="$exec_prefix" \
- --prefix="$prefix" \
- CFLAGS="${CFLAGS/-Wall/}" \
- LDFLAGS="$LDFLAGS $elfutils_rpath"
- )
-fi
-
if test "${prefix}" = "/usr/local"; then
{ echo "$as_me:$LINENO: " >&5
echo "$as_me: " >&6;}