diff options
author | fche <fche> | 2005-06-21 17:18:11 +0000 |
---|---|---|
committer | fche <fche> | 2005-06-21 17:18:11 +0000 |
commit | b98a8d739983dec32c79cbd69c4295075df3133d (patch) | |
tree | 7ac46512eb1b5058035b951dd4663ca68e7f1c9f | |
parent | aac3ed25e8dc7355b5f28fae2878f644df14ef7d (diff) | |
download | systemtap-steved-b98a8d739983dec32c79cbd69c4295075df3133d.tar.gz systemtap-steved-b98a8d739983dec32c79cbd69c4295075df3133d.tar.xz systemtap-steved-b98a8d739983dec32c79cbd69c4295075df3133d.zip |
2005-06-21 Frank Ch. Eigler <fche@redhat.com>
* config.in, configure: Regenerated.
* tapsets.cxx: Make dwarf code conditional on new elfutils header.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | config.in | 6 | ||||
-rwxr-xr-x | configure | 77 | ||||
-rw-r--r-- | tapsets.cxx | 9 |
4 files changed, 94 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2005-06-21 Frank Ch. Eigler <fche@redhat.com> + + * config.in, configure: Regenerated. + * tapsets.cxx: Make dwarf code conditional on new elfutils header. + 2005-06-20 Graydon Hoare <graydon@redhat.com> * configure.ac: Scan for libdwfl. @@ -3,6 +3,9 @@ /* Configuration/build date */ #undef DATE +/* Define to 1 if you have the <elfutils/libdwfl.h> header file. */ +#undef HAVE_ELFUTILS_LIBDWFL_H + /* Define to 1 if you have the <elfutils/libdw.h> header file. */ #undef HAVE_ELFUTILS_LIBDW_H @@ -12,6 +15,9 @@ /* Define to 1 if you have the `dw' library (-ldw). */ #undef HAVE_LIBDW +/* Define to 1 if you have the `dwfl' library (-ldwfl). */ +#undef HAVE_LIBDWFL + /* Define to 1 if you have the `elf' library (-lelf). */ #undef HAVE_LIBELF @@ -5311,7 +5311,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -for ac_header in libelf.h elfutils/libdw.h + +for ac_header in libelf.h elfutils/libdw.h elfutils/libdwfl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -5609,6 +5610,80 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for dwfl_begin in -ldwfl" >&5 +echo $ECHO_N "checking for dwfl_begin in -ldwfl... $ECHO_C" >&6 +if test "${ac_cv_lib_dwfl_dwfl_begin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldwfl $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 gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dwfl_begin (); +int +main () +{ +dwfl_begin (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dwfl_dwfl_begin=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dwfl_dwfl_begin=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dwfl_dwfl_begin" >&5 +echo "${ECHO_T}$ac_cv_lib_dwfl_dwfl_begin" >&6 +if test $ac_cv_lib_dwfl_dwfl_begin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDWFL 1 +_ACEOF + + LIBS="-ldwfl $LIBS" + +fi + + date=`date +%Y-%m-%d` cat >>confdefs.h <<_ACEOF diff --git a/tapsets.cxx b/tapsets.cxx index cb4f68ea..0096a3a7 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -19,9 +19,11 @@ #include <stdexcept> #include <vector> +#ifdef HAVE_ELFUTILS_LIBDWFL_H extern "C" { #include <elfutils/libdwfl.h> } +#endif #include <fnmatch.h> @@ -334,7 +336,7 @@ be_derived_probe::emit_probe_entries (translator_output* o, unsigned j) // ------------------------------------------------------------------------ // Dwarf derived probes. // ------------------------------------------------------------------------ - +#ifdef HAVE_ELFUTILS_LIBDWFL_H // Helper for dealing with selected portions of libdwfl in a more readable // fashion, and with specific cleanup / checking / logging options. @@ -1220,6 +1222,7 @@ dwarf_derived_probe::emit_probe_entries (translator_output* o, unsigned i) { } +#endif /* HAVE_ELFUTILS_LIBDWFL_H */ // ------------------------------------------------------------------------ @@ -1232,6 +1235,8 @@ register_standard_tapsets(match_node & root) // Rudimentary binders for begin and end targets root.bind("begin").bind(new be_builder(true)); root.bind("end").bind(new be_builder(false)); - + +#ifdef HAVE_ELFUTILS_LIBDWFL_H dwarf_derived_probe::register_patterns(root); +#endif /* HAVE_ELFUTILS_LIBDWFL_H */ } |