From 6b535ce2ea1aebf408afe6cc51ef45b50f9a7879 Mon Sep 17 00:00:00 2001 From: dsmith Date: Wed, 23 Jan 2008 19:58:41 +0000 Subject: 2008-01-23 David Smith PR 5661. * configure.ac: Checks elfutils version number. * acsite.m4: New file containing macro to return elfutils version number. * configure: Regenerated. * systemtap.spec.in: Minimum elfutils version number is now filled in by configure. --- configure.ac | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2e9072d8..c8b43fe0 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,8 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([systemtap], 0.6.1, systemtap@sources.redhat.com, systemtap) dnl ^^^ see also NEWS, testsuite/configure.ac +dnl Version number of oldest elfutils release that works with systemtap. +AC_SUBST(ELFUTILS_REQUIRED_VERSION, 0.127) AC_PREREQ(2.59) AM_INIT_AUTOMAKE @@ -122,6 +124,31 @@ if test $build_elfutils = no; then AC_MSG_ERROR([missing elfutils development headers/libraries (dw 0.123+)])]) AC_CHECK_LIB(ebl, ebl_openbackend,,[ AC_MSG_ERROR([missing elfutils development headers/libraries (ebl 0.123+)])]) + + # Try to get the elfutils library version + AC_MSG_CHECKING([to see if we can get the elfutils version]) + AX_ELFUTILS_GET_VERSION(, [ + AC_MSG_FAILURE([unable to get elfutils library version])]) + + # Is the elfutils library version >= ELFUTILS_REQUIRED_VERSION? + AC_MSG_CHECKING([for elfutils version $ELFUTILS_REQUIRED_VERSION or higher]) + [current_version="`echo \"$ax_elfutils_get_version_VERSION\" | sed -e 's/^[^0-9]//g'`"] + if test -z "$current_version" ; then + AC_MSG_FAILURE([unsupported elfutils version format]) + fi + + AS_VERSION_COMPARE($current_version, $ELFUTILS_REQUIRED_VERSION, + [bad_elfutils_version=yes], dnl ACTION-IF-LESS + [bad_elfutils_version=no], dnl ACTION-IF-EQUAL + [bad_elfutils_version=no]) dnl ACTION-IF-GREATER + + if test $bad_elfutils_version = yes; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([elfutils library version ($current_version) must be version $ELFUTILS_REQUIRED_VERSION or higher]) + else + AC_MSG_RESULT([yes]) + fi + stap_LIBS="$LIBS" LIBS="$SAVE_LIBS" else -- cgit