From cfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 27 Jun 2008 16:19:19 -0700 Subject: Always include libdw using link groups. This is necessary for distros that ship static libdw, Roland suggested that it shouldn't hurt to do it this way on other distros too. It's nicer now not to require the extra "--enable-staticdw" configure flag. --- configure | 256 +------------------------------------------------------------- 1 file changed, 2 insertions(+), 254 deletions(-) (limited to 'configure') diff --git a/configure b/configure index e05e7321..32a850cb 100755 --- a/configure +++ b/configure @@ -1336,7 +1336,6 @@ Optional Features: location). --enable-docs enable building documentation (default on if latex etc. found). - --enable-staticdw support distributions with static libdw Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -6605,175 +6604,9 @@ fi ` -# Check whether --enable-staticdw was given. -if test "${enable_staticdw+set}" = set; then - enableval=$enable_staticdw; -fi - - if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils from Fedora save_LIBS="$LIBS" - if test "x$enable_staticdw" != xyes; then - - -{ echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5 -echo $ECHO_N "checking for dwfl_module_getsym in -ldw... $ECHO_C" >&6; } -if test "${ac_cv_lib_dw_dwfl_module_getsym+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldw $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dwfl_module_getsym (); -int -main () -{ -return dwfl_module_getsym (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext 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>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_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_dw_dwfl_module_getsym=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dw_dwfl_module_getsym=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5 -echo "${ECHO_T}$ac_cv_lib_dw_dwfl_module_getsym" >&6; } -if test $ac_cv_lib_dw_dwfl_module_getsym = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBDW 1 -_ACEOF - - LIBS="-ldw $LIBS" - -else - - { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5 -echo "$as_me: error: missing elfutils development headers/libraries (dw 0.123+)" >&2;} - { (exit 1); exit 1; }; } -fi - - -{ echo "$as_me:$LINENO: checking for ebl_openbackend in -lebl" >&5 -echo $ECHO_N "checking for ebl_openbackend in -lebl... $ECHO_C" >&6; } -if test "${ac_cv_lib_ebl_ebl_openbackend+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lebl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ebl_openbackend (); -int -main () -{ -return ebl_openbackend (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext 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>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_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ebl_ebl_openbackend=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ebl_ebl_openbackend=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ebl_ebl_openbackend" >&5 -echo "${ECHO_T}$ac_cv_lib_ebl_ebl_openbackend" >&6; } -if test $ac_cv_lib_ebl_ebl_openbackend = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBEBL 1 -_ACEOF - - LIBS="-lebl $LIBS" - -else - - { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (ebl 0.123+)" >&5 -echo "$as_me: error: missing elfutils development headers/libraries (ebl 0.123+)" >&2;} - { (exit 1); exit 1; }; } -fi - - - stap_LIBS="$LIBS" - -else - - # Debian ships with a static libdw, which has a circular dependency on libebl { echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5 echo $ECHO_N "checking for dwfl_module_getsym in -ldw... $ECHO_C" >&6; } @@ -6845,103 +6678,18 @@ _ACEOF else - { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5 + { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (dw 0.123+)" >&5 echo "$as_me: error: missing elfutils development headers/libraries (dw 0.123+)" >&2;} { (exit 1); exit 1; }; } fi - -{ echo "$as_me:$LINENO: checking for ebl_openbackend in -lebl" >&5 -echo $ECHO_N "checking for ebl_openbackend in -lebl... $ECHO_C" >&6; } -if test "${ac_cv_lib_ebl_ebl_openbackend+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lebl -lelf $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ebl_openbackend (); -int -main () -{ -return ebl_openbackend (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext 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>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_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_ebl_ebl_openbackend=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ebl_ebl_openbackend=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ebl_ebl_openbackend" >&5 -echo "${ECHO_T}$ac_cv_lib_ebl_ebl_openbackend" >&6; } -if test $ac_cv_lib_ebl_ebl_openbackend = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBEBL 1 -_ACEOF - - LIBS="-lebl $LIBS" - -else - - { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (ebl 0.123+)" >&5 -echo "$as_me: error: missing elfutils development headers/libraries (ebl 0.123+)" >&2;} - { (exit 1); exit 1; }; } -fi - - - stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" - -fi - + stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" LIBS="$save_LIBS" else # We built our own and stap_LDFLAGS points at the install. - if test "x$enable_staticdw" != xyes; then - stap_LIBS="-ldw -lebl" -else stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf" fi -fi - { echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5 echo "$as_me: stap will link $stap_LIBS" >&6;} -- cgit