summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <joshua.i.stone@intel.com>2008-06-27 16:19:19 -0700
committerJosh Stone <joshua.i.stone@intel.com>2008-06-27 16:19:19 -0700
commitcfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4 (patch)
tree9296b39e54c6cca8ac0a482350ee679ac527867d
parent5e86a4eef7e29d89849d522bcdbe96e7a1e4b6b8 (diff)
downloadsystemtap-steved-cfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4.tar.gz
systemtap-steved-cfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4.tar.xz
systemtap-steved-cfa2ca3cbf2da7bbabcdf35c3085a969bd2370e4.zip
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.
-rwxr-xr-xconfigure256
-rw-r--r--configure.ac29
2 files changed, 7 insertions, 278 deletions
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;}
diff --git a/configure.ac b/configure.ac
index ed099702..c7338f80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,36 +180,17 @@ AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes)
AC_SUBST(elfutils_abs_srcdir, `AS_IF([test $build_elfutils = yes],
[cd $with_elfutils && pwd])`)
-AC_ARG_ENABLE([staticdw],
- [AS_HELP_STRING([--enable-staticdw], [support distributions with static libdw])])
-
if test $build_elfutils = no; then
# Need libdwfl-capable recent elfutils from Fedora
save_LIBS="$LIBS"
- AS_IF([test "x$enable_staticdw" != xyes],[
- AC_CHECK_LIB(dw, dwfl_module_getsym,,[
- 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+)])])
-
- stap_LIBS="$LIBS"
- ],[
- # Debian ships with a static libdw, which has a circular dependency on libebl
- AC_CHECK_LIB(dw, dwfl_module_getsym,[],[
- AC_MSG_ERROR([missing elfutils development headers/libraries (dw 0.123+)])],
- [-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf])
- dnl XXX Do we need the ebl check, since it was referenced above?
- AC_CHECK_LIB(ebl, ebl_openbackend,[],[
- AC_MSG_ERROR([missing elfutils development headers/libraries (ebl 0.123+)])],
- [-lelf])
-
- stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"
- ])
+ AC_CHECK_LIB(dw, dwfl_module_getsym,[],[
+ AC_MSG_ERROR([missing elfutils development headers/libraries (dw 0.123+)])],
+ [-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf])
+ 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.
- AS_IF([test "x$enable_staticdw" != xyes],[stap_LIBS="-ldw -lebl"],
- [stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"])
+ stap_LIBS="-Wl,--start-group -ldw -lebl -Wl,--end-group -lelf"
fi
AC_SUBST(stap_LIBS)