diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 201 |
1 files changed, 199 insertions, 2 deletions
@@ -550,6 +550,66 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' exec 7<&0 </dev/null 6>&1 @@ -651,6 +711,7 @@ LIBS build_alias host_alias target_alias +ELFUTILS_REQUIRED_VERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA @@ -1766,6 +1827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ELFUTILS_REQUIRED_VERSION=0.127 + am__api_version='1.10' @@ -6454,6 +6517,139 @@ echo "$as_me: error: missing elfutils development headers/libraries (ebl 0.123+) { (exit 1); exit 1; }; } fi + + # Try to get the elfutils library version + { echo "$as_me:$LINENO: checking to see if we can get the elfutils version" >&5 +echo $ECHO_N "checking to see if we can get the elfutils version... $ECHO_C" >&6; } + + ax_elfutils_get_version_ok=no + ax_elfutils_get_version_VERSION='' + + ax_elfutils_get_version_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" + + ax_elfutils_get_version_save_LIBS="$LIBS" + LIBS="$LIBS -ldw" + + # Compile and run a program that returns the value of the library + # function dwfl_version. + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include <stdio.h> +#include <elfutils/libdwfl.h> + +int main(int argc,char **argv) +{ + const char *ver = dwfl_version(NULL); + if (ver != NULL) { + if (argc > 1) + printf("%s\n", ver); + return 0; + } + else + return 1; +} + + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +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_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (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_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + # Program compiled and ran, so get version by adding argument. + ax_elfutils_get_version_VERSION=`./conftest$ac_exeext x` + ax_elfutils_get_version_ok=yes + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + + CPPFLAGS="$ax_elfutils_get_version_save_CPPFLAGS" + LIBS="$ax_elfutils_get_version_save_LIBS" + + if test "$ax_elfutils_get_version_ok" = "yes" ; then + { echo "$as_me:$LINENO: result: $ax_elfutils_get_version_VERSION" >&5 +echo "${ECHO_T}$ax_elfutils_get_version_VERSION" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + + { { echo "$as_me:$LINENO: error: unable to get elfutils library version +See \`config.log' for more details." >&5 +echo "$as_me: error: unable to get elfutils library version +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + + + # Is the elfutils library version >= ELFUTILS_REQUIRED_VERSION? + { echo "$as_me:$LINENO: checking for elfutils version $ELFUTILS_REQUIRED_VERSION or higher" >&5 +echo $ECHO_N "checking for elfutils version $ELFUTILS_REQUIRED_VERSION or higher... $ECHO_C" >&6; } + current_version="`echo \"$ax_elfutils_get_version_VERSION\" | sed -e 's/^[^0-9]//g'`" + if test -z "$current_version" ; then + { { echo "$as_me:$LINENO: error: unsupported elfutils version format +See \`config.log' for more details." >&5 +echo "$as_me: error: unsupported elfutils version format +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + + as_arg_v1=$current_version +as_arg_v2=$ELFUTILS_REQUIRED_VERSION +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in +1) bad_elfutils_version=yes;; +0) bad_elfutils_version=no;; +2) bad_elfutils_version=no;; +esac + if test $bad_elfutils_version = yes; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { { echo "$as_me:$LINENO: error: elfutils library version ($current_version) must be version $ELFUTILS_REQUIRED_VERSION or higher" >&5 +echo "$as_me: error: elfutils library version ($current_version) must be version $ELFUTILS_REQUIRED_VERSION or higher" >&2;} + { (exit 1); exit 1; }; } + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + fi + stap_LIBS="$LIBS" LIBS="$SAVE_LIBS" else @@ -7318,6 +7514,7 @@ LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim +ELFUTILS_REQUIRED_VERSION!$ELFUTILS_REQUIRED_VERSION$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim @@ -7377,7 +7574,6 @@ BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim -BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -7419,6 +7615,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim stap_LIBS!$stap_LIBS$ac_delim DATE!$DATE$ac_delim PROCFLAGS!$PROCFLAGS$ac_delim @@ -7428,7 +7625,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 |