diff options
author | Dave Brolley <brolley@redhat.com> | 2009-05-19 11:42:20 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-05-19 11:42:20 -0400 |
commit | 88a931144b278916dd157e0f69636e87f8fdc949 (patch) | |
tree | 4cdd8928f2a0e4e506005e6d864fde0d07ddfedb | |
parent | e9cb523875a37b2d809afbbe0fffae980d8080a1 (diff) | |
parent | c897e941ca645ab1e2aa325e5feaae30cc43060e (diff) | |
download | systemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.tar.gz systemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.tar.xz systemtap-steved-88a931144b278916dd157e0f69636e87f8fdc949.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
51 files changed, 7703 insertions, 5959 deletions
@@ -21,6 +21,7 @@ Jim Keniston Josh Stone K.Prasad Kai Meyer +Keiichi KII Kent Sebastian Kevin Stafford Li Guanglei @@ -35,6 +36,7 @@ Maynard Johnson Michael Meeks Mike Mason Nobuhiro Tachino +Petr Muller Phil Muldoon Prerna Saxena Przemyslaw Pawelczyk diff --git a/Makefile.am b/Makefile.am index 35f9a68b..77681c83 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,7 @@ stap_SOURCES = main.cxx \ cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \ tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx \ tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \ - tapset-utrace.cxx task_finder.cxx + tapset-utrace.cxx task_finder.cxx dwflpp.cxx stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ BUILT_SOURCES = diff --git a/Makefile.in b/Makefile.in index d111d397..062b0639 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -125,7 +125,8 @@ am_stap_OBJECTS = stap-main.$(OBJEXT) stap-parse.$(OBJEXT) \ stap-tapset-procfs.$(OBJEXT) stap-tapset-timers.$(OBJEXT) \ stap-tapset-perfmon.$(OBJEXT) stap-tapset-mark.$(OBJEXT) \ stap-tapset-itrace.$(OBJEXT) stap-tapset-utrace.$(OBJEXT) \ - stap-task_finder.$(OBJEXT) $(am__objects_1) + stap-task_finder.$(OBJEXT) stap-dwflpp.$(OBJEXT) \ + $(am__objects_1) stap_OBJECTS = $(am_stap_OBJECTS) stap_LINK = $(CXXLD) $(stap_CXXFLAGS) $(CXXFLAGS) $(stap_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -308,6 +309,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -333,7 +335,7 @@ stap_SOURCES = main.cxx parse.cxx staptree.cxx elaborate.cxx \ mdfour.c cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \ tapset-been.cxx tapset-procfs.cxx tapset-timers.cxx \ tapset-perfmon.cxx tapset-mark.cxx tapset-itrace.cxx \ - tapset-utrace.cxx task_finder.cxx $(am__append_4) + tapset-utrace.cxx task_finder.cxx dwflpp.cxx $(am__append_4) stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ $(am__append_6) # Arrange for git_version.h to be regenerated at every "make". @@ -598,6 +600,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-coveragedb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwarf_wrappers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-dwflpp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-elaborate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-loc2c.Po@am__quote@ @@ -1207,6 +1210,20 @@ stap-task_finder.obj: task_finder.cxx @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-task_finder.obj `if test -f 'task_finder.cxx'; then $(CYGPATH_W) 'task_finder.cxx'; else $(CYGPATH_W) '$(srcdir)/task_finder.cxx'; fi` +stap-dwflpp.o: dwflpp.cxx +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwflpp.o -MD -MP -MF $(DEPDIR)/stap-dwflpp.Tpo -c -o stap-dwflpp.o `test -f 'dwflpp.cxx' || echo '$(srcdir)/'`dwflpp.cxx +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-dwflpp.Tpo $(DEPDIR)/stap-dwflpp.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dwflpp.cxx' object='stap-dwflpp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwflpp.o `test -f 'dwflpp.cxx' || echo '$(srcdir)/'`dwflpp.cxx + +stap-dwflpp.obj: dwflpp.cxx +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-dwflpp.obj -MD -MP -MF $(DEPDIR)/stap-dwflpp.Tpo -c -o stap-dwflpp.obj `if test -f 'dwflpp.cxx'; then $(CYGPATH_W) 'dwflpp.cxx'; else $(CYGPATH_W) '$(srcdir)/dwflpp.cxx'; fi` +@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-dwflpp.Tpo $(DEPDIR)/stap-dwflpp.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dwflpp.cxx' object='stap-dwflpp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwflpp.obj `if test -f 'dwflpp.cxx'; then $(CYGPATH_W) 'dwflpp.cxx'; else $(CYGPATH_W) '$(srcdir)/dwflpp.cxx'; fi` + stap-modsign.o: modsign.cxx @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-modsign.o -MD -MP -MF $(DEPDIR)/stap-modsign.Tpo -c -o stap-modsign.o `test -f 'modsign.cxx' || echo '$(srcdir)/'`modsign.cxx @am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-modsign.Tpo $(DEPDIR)/stap-modsign.Po @@ -1231,8 +1248,8 @@ install-man1: $(man1_MANS) $(man_MANS) esac; \ done; \ for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ @@ -1276,8 +1293,8 @@ install-man3: $(man3_MANS) $(man_MANS) esac; \ done; \ for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 3*) ;; \ @@ -1321,8 +1338,8 @@ install-man8: $(man8_MANS) $(man_MANS) esac; \ done; \ for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ @@ -1448,8 +1465,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -1474,8 +1491,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -1485,13 +1502,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,10 +11,13 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # @@ -84,16 +87,14 @@ fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -137,9 +138,9 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -174,7 +175,7 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -189,7 +190,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -203,10 +204,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.10.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -479,19 +482,28 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 4 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do +[# Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -501,7 +513,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -549,13 +561,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -660,16 +672,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -787,14 +800,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 6 # AM_PROG_CC_C_O # -------------- @@ -806,8 +819,9 @@ AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC -ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then +am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. @@ -885,13 +899,13 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -908,7 +922,7 @@ AC_DEFUN([_AM_SET_OPTION], # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -1030,7 +1044,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for systemtap 0.9.7. +# Generated by GNU Autoconf 2.63 for systemtap 0.9.7. # # Report bugs to <systemtap@sources.redhat.com>. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -65,8 +93,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -89,7 +115,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -102,17 +128,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -160,7 +179,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -242,7 +261,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -263,7 +282,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -343,10 +362,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -415,9 +434,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -453,7 +473,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -481,7 +501,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -494,19 +513,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -531,10 +553,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -614,139 +636,156 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -MAINTAINER_MODE_TRUE -MAINTAINER_MODE_FALSE +enable_option_checking=no +ac_subst_vars='LTLIBOBJS +LIBOBJS +subdirs +CXXCPP +PROCFLAGS +DATE +stap_LIBS +elfutils_abs_srcdir +BUILD_ELFUTILS_FALSE +BUILD_ELFUTILS_TRUE +BUILD_GRAPHER_FALSE +BUILD_GRAPHER_TRUE +GRAPHER_LIBS +GRAPHER_CFLAGS +PKG_CONFIG +HAVE_NSS_FALSE +HAVE_NSS_TRUE +BUILD_SERVER_FALSE +BUILD_SERVER_TRUE +nspr_CFLAGS +nss_CFLAGS +have_certutil +BUILD_PDFREFDOCS_FALSE +BUILD_PDFREFDOCS_TRUE +BUILD_REFDOCS_FALSE +BUILD_REFDOCS_TRUE +have_xmlto +BUILD_DOCS_FALSE +BUILD_DOCS_TRUE +have_latex2html +have_ps2pdf +have_dvips +have_latex +BUILD_CRASHMOD_FALSE +BUILD_CRASHMOD_TRUE +staplog_CPPFLAGS +sqlite3_LIBS +PIECXXFLAGS +PIECFLAGS +PIELDFLAGS +RANLIB +ANSI2KNR +U +EGREP +GREP +CPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +LN_S MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p MKDIR_P -LN_S -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CPP -GREP -EGREP -U -ANSI2KNR -RANLIB -PIELDFLAGS -PIECFLAGS -PIECXXFLAGS -sqlite3_LIBS -staplog_CPPFLAGS -BUILD_CRASHMOD_TRUE -BUILD_CRASHMOD_FALSE -have_latex -have_dvips -have_ps2pdf -have_latex2html -BUILD_DOCS_TRUE -BUILD_DOCS_FALSE -have_xmlto -BUILD_REFDOCS_TRUE -BUILD_REFDOCS_FALSE -BUILD_PDFREFDOCS_TRUE -BUILD_PDFREFDOCS_FALSE -have_certutil -nss_CFLAGS -nspr_CFLAGS -BUILD_SERVER_TRUE -BUILD_SERVER_FALSE -HAVE_NSS_TRUE -HAVE_NSS_FALSE -PKG_CONFIG -GRAPHER_CFLAGS -GRAPHER_LIBS -BUILD_GRAPHER_TRUE -BUILD_GRAPHER_FALSE -BUILD_ELFUTILS_TRUE -BUILD_ELFUTILS_FALSE -elfutils_abs_srcdir -stap_LIBS -DATE -PROCFLAGS -CXXCPP -subdirs -LIBOBJS -LTLIBOBJS' +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_perfmon +enable_prologues +enable_ssp +enable_pie +enable_sqlite +enable_crash +enable_docs +enable_refdocs +enable_server +enable_grapher +with_elfutils +' ac_precious_vars='build_alias host_alias target_alias @@ -768,6 +807,8 @@ ac_subdirs_all='testsuite' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -866,13 +907,21 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -885,13 +934,21 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1082,22 +1139,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1117,7 +1190,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1126,16 +1199,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1144,22 +1217,38 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1174,7 +1263,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1190,10 +1279,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 + { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1201,12 +1290,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1233,12 +1322,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1287,9 +1376,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1299,25 +1388,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1336,6 +1425,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful @@ -1400,15 +1490,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1444,7 +1536,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1454,10 +1546,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF systemtap configure 0.9.7 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1468,7 +1560,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by systemtap $as_me 0.9.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1504,7 +1596,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1539,7 +1631,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1591,11 +1683,12 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1625,9 +1718,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1642,9 +1735,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1660,8 +1753,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1703,21 +1796,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1727,16 +1823,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1750,29 +1846,38 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1782,10 +1887,12 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1841,8 +1948,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1868,11 +1975,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1901,17 +2009,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -1924,8 +2044,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1935,8 +2055,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -1959,9 +2079,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -1972,26 +2092,23 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! +$as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -2002,15 +2119,15 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -2045,8 +2162,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -2058,10 +2175,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2074,7 +2191,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2085,22 +2202,23 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -2117,12 +2235,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2141,8 +2259,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi @@ -2197,10 +2315,10 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -2213,7 +2331,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2224,11 +2342,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2237,10 +2355,10 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -2253,7 +2371,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2264,11 +2382,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2276,12 +2394,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2305,8 +2419,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval @@ -2314,8 +2428,8 @@ else USE_MAINTAINER_MODE=no fi - { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -2335,15 +2449,15 @@ case $mkdir_p in esac -{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6; } + { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi ac_ext=c @@ -2354,10 +2468,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2370,7 +2484,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2381,11 +2495,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2394,10 +2508,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2410,7 +2524,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2421,11 +2535,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2433,12 +2547,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2451,10 +2561,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2467,7 +2577,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2478,11 +2588,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2491,10 +2601,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2512,7 +2622,7 @@ do continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2535,11 +2645,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2550,10 +2660,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2566,7 +2676,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2577,11 +2687,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2594,10 +2704,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2610,7 +2720,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2621,11 +2731,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2637,12 +2747,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2652,44 +2758,50 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2708,27 +2820,22 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2739,10 +2846,11 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -2753,7 +2861,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2780,25 +2888,27 @@ else ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2807,49 +2917,53 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } 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_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2858,31 +2972,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2905,40 +3021,43 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2964,20 +3083,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2987,15 +3107,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -3022,20 +3146,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3060,20 +3185,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3099,20 +3225,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3127,8 +3254,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3144,10 +3271,10 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3218,20 +3345,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3247,15 +3375,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3276,8 +3404,8 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none @@ -3304,8 +3432,8 @@ if test "$am__include" = "#"; then fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. @@ -3329,10 +3457,10 @@ fi depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3420,8 +3548,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -3449,10 +3577,10 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -3465,7 +3593,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3476,11 +3604,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3493,10 +3621,10 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -3509,7 +3637,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3520,11 +3648,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 -echo "${ECHO_T}$ac_ct_CXX" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3536,12 +3664,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -3551,43 +3675,47 @@ fi fi fi # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C++ compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3613,20 +3741,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -3636,15 +3765,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } -GXX=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 -echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes @@ -3671,20 +3804,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" @@ -3709,20 +3843,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag @@ -3748,20 +3883,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3776,8 +3912,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -3801,10 +3937,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3892,8 +4028,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if @@ -3912,15 +4048,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3952,20 +4088,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -3989,13 +4126,14 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -4003,7 +4141,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4028,8 +4166,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4057,20 +4195,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -4094,13 +4233,14 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -4108,7 +4248,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -4124,11 +4264,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -4145,10 +4287,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4161,7 +4303,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4172,11 +4314,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4185,10 +4327,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4201,7 +4343,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4212,11 +4354,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4224,12 +4366,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4242,10 +4380,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4258,7 +4396,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4269,11 +4407,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4282,10 +4420,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4303,7 +4441,7 @@ do continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4326,11 +4464,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4341,10 +4479,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -4357,7 +4495,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4368,11 +4506,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4385,10 +4523,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -4401,7 +4539,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4412,11 +4550,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4428,12 +4566,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4443,50 +4577,56 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4512,20 +4652,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -4535,15 +4676,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -4570,20 +4715,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -4608,20 +4754,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -4647,20 +4794,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -4675,8 +4823,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -4692,10 +4840,10 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -4766,20 +4914,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -4795,15 +4944,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -4815,10 +4964,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -4906,8 +5055,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4925,16 +5074,16 @@ fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc if test "x$CC" != xcc; then - { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else - { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi -set dummy $CC; ac_cc=`echo $2 | +set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4960,19 +5109,21 @@ if { (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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes @@ -4983,10 +5134,11 @@ then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* @@ -4994,19 +5146,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. @@ -5024,11 +5178,11 @@ rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 @@ -5039,8 +5193,9 @@ fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC -ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. @@ -5050,11 +5205,11 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then fi -{ echo "$as_me:$LINENO: checking for function prototypes" >&5 -echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5 +$as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 @@ -5066,48 +5221,43 @@ cat >>confdefs.h <<\_ACEOF _ACEOF else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5122,74 +5272,60 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5204,40 +5340,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5264,20 +5391,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -5369,37 +5497,40 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -5421,11 +5552,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5443,20 +5574,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -5464,12 +5596,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5488,20 +5623,21 @@ fi for ac_header in string.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5517,32 +5653,33 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5556,51 +5693,52 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -5609,21 +5747,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5634,10 +5775,10 @@ done if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -5650,7 +5791,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5661,11 +5802,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5674,10 +5815,10 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -5690,7 +5831,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5701,11 +5842,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5713,12 +5854,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5742,11 +5879,12 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5775,17 +5913,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -5798,8 +5948,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -5809,11 +5959,12 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -5830,12 +5981,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -5853,10 +6004,10 @@ if test "${enable_perfmon+set}" = set; then LDFLAGS="$LDFLAGS -L$enable_perfmon/lib" fi -{ echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5 -echo $ECHO_N "checking for pfm_start in -lpfm... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for pfm_start in -lpfm" >&5 +$as_echo_n "checking for pfm_start in -lpfm... " >&6; } if test "${ac_cv_lib_pfm_pfm_start+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpfm $LIBS" @@ -5888,33 +6039,37 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pfm_pfm_start=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pfm_pfm_start=no fi +rm -rf conftest.dSYM 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_pfm_pfm_start" >&5 -echo "${ECHO_T}$ac_cv_lib_pfm_pfm_start" >&6; } -if test $ac_cv_lib_pfm_pfm_start = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pfm_pfm_start" >&5 +$as_echo "$ac_cv_lib_pfm_pfm_start" >&6; } +if test "x$ac_cv_lib_pfm_pfm_start" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPFM 1 _ACEOF @@ -5923,8 +6078,8 @@ _ACEOF else - { { echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&5 -echo "$as_me: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&2;} + { { $as_echo "$as_me:$LINENO: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&5 +$as_echo "$as_me: error: systemtap cannot find required perfmon libs (libpfm-devel may need to be installed" >&2;} { (exit 1); exit 1; }; } fi @@ -5933,17 +6088,17 @@ fi if test "${enable_prologues+set}" != set; then - { echo "$as_me:$LINENO: checking to see if prologue searching should be the default" >&5 -echo $ECHO_N "checking to see if prologue searching should be the default... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking to see if prologue searching should be the default" >&5 +$as_echo_n "checking to see if prologue searching should be the default... " >&6; } if { echo '#if __i386__ == 1 && __GNUC__ < 4' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then enable_prologues=yes - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi fi # Check whether --enable-prologues was given. @@ -5952,7 +6107,7 @@ if test "${enable_prologues+set}" = set; then if test "$enable_prologues" = yes; then cat >>confdefs.h <<\_ACEOF -#define ENABLE_PROLOGUES +#define ENABLE_PROLOGUES /**/ _ACEOF fi @@ -5979,29 +6134,30 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 -echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} + { $as_echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 +$as_echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" CXFXLAGS="$save_CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: Compiler does not support -fstack-protector-all et al." >&5 -echo "$as_me: Compiler does not support -fstack-protector-all et al." >&6;} + { $as_echo "$as_me:$LINENO: Compiler does not support -fstack-protector-all et al." >&5 +$as_echo "$as_me: Compiler does not support -fstack-protector-all et al." >&6;} CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" fi @@ -6033,21 +6189,24 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then - { echo "$as_me:$LINENO: Compiling with gcc pie et al." >&5 -echo "$as_me: Compiling with gcc pie et al." >&6;} + { $as_echo "$as_me:$LINENO: Compiling with gcc pie et al." >&5 +$as_echo "$as_me: Compiling with gcc pie et al." >&6;} # LDFLAGS is special since it may be passed down to bundled-elfutils, # and interfere with the .so's built therein PIELDFLAGS="$LDFLAGS" @@ -6058,12 +6217,12 @@ echo "$as_me: Compiling with gcc pie et al." >&6;} CXXFLAGS="$save_CXXFLAGS" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: Compiler does not support -pie et al." >&5 -echo "$as_me: Compiler does not support -pie et al." >&6;} + { $as_echo "$as_me:$LINENO: Compiler does not support -pie et al." >&5 +$as_echo "$as_me: Compiler does not support -pie et al." >&6;} PIECFLAGS="" CFLAGS="$save_CFLAGS" PIECXXFLAGS="" @@ -6072,6 +6231,7 @@ echo "$as_me: Compiler does not support -pie et al." >&6;} LDFLAGS="$save_LDFLAGS" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -6088,10 +6248,10 @@ else fi sqlite3_LIBS= if test "x$enable_sqlite" != xno; then - { echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 -echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 +$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; } if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" @@ -6123,33 +6283,37 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_sqlite3_sqlite3_open=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sqlite3_sqlite3_open=no fi +rm -rf conftest.dSYM 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_sqlite3_sqlite3_open" >&5 -echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_open" >&6; } -if test $ac_cv_lib_sqlite3_sqlite3_open = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5 +$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; } +if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then sqlite3_LIBS=-lsqlite3 @@ -6159,11 +6323,13 @@ _ACEOF else if test "x$enable_sqlite" != xcheck; then - { { echo "$as_me:$LINENO: error: --enable-sqlite was given, but test for sqlite failed + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: --enable-sqlite was given, but test for sqlite failed See \`config.log' for more details." >&5 -echo "$as_me: error: --enable-sqlite was given, but test for sqlite failed +$as_echo "$as_me: error: --enable-sqlite was given, but test for sqlite failed See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi @@ -6182,11 +6348,11 @@ if test "${enable_crash+set}" = set; then for ac_header in crash/defs.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6206,20 +6372,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -6227,17 +6394,20 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else - { { echo "$as_me:$LINENO: error: cannot find required crash header (crash-devel may need to be installed)" >&5 -echo "$as_me: error: cannot find required crash header (crash-devel may need to be installed)" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find required crash header (crash-devel may need to be installed)" >&5 +$as_echo "$as_me: error: cannot find required crash header (crash-devel may need to be installed)" >&2;} { (exit 1); exit 1; }; } fi @@ -6268,10 +6438,10 @@ fi # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_latex+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_latex"; then ac_cv_prog_have_latex="$have_latex" # Let the user override the test. @@ -6284,7 +6454,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_latex="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6296,20 +6466,20 @@ fi fi have_latex=$ac_cv_prog_have_latex if test -n "$have_latex"; then - { echo "$as_me:$LINENO: result: $have_latex" >&5 -echo "${ECHO_T}$have_latex" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_latex" >&5 +$as_echo "$have_latex" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_dvips+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_dvips"; then ac_cv_prog_have_dvips="$have_dvips" # Let the user override the test. @@ -6322,7 +6492,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_dvips="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6334,20 +6504,20 @@ fi fi have_dvips=$ac_cv_prog_have_dvips if test -n "$have_dvips"; then - { echo "$as_me:$LINENO: result: $have_dvips" >&5 -echo "${ECHO_T}$have_dvips" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_dvips" >&5 +$as_echo "$have_dvips" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "ps2pdf", so it can be a program name with args. set dummy ps2pdf; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_ps2pdf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_ps2pdf"; then ac_cv_prog_have_ps2pdf="$have_ps2pdf" # Let the user override the test. @@ -6360,7 +6530,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_ps2pdf="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6372,20 +6542,20 @@ fi fi have_ps2pdf=$ac_cv_prog_have_ps2pdf if test -n "$have_ps2pdf"; then - { echo "$as_me:$LINENO: result: $have_ps2pdf" >&5 -echo "${ECHO_T}$have_ps2pdf" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_ps2pdf" >&5 +$as_echo "$have_ps2pdf" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi # Extract the first word of "latex2html", so it can be a program name with args. set dummy latex2html; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_latex2html+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_latex2html"; then ac_cv_prog_have_latex2html="$have_latex2html" # Let the user override the test. @@ -6398,7 +6568,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_latex2html="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6410,23 +6580,23 @@ fi fi have_latex2html=$ac_cv_prog_have_latex2html if test -n "$have_latex2html"; then - { echo "$as_me:$LINENO: result: $have_latex2html" >&5 -echo "${ECHO_T}$have_latex2html" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_latex2html" >&5 +$as_echo "$have_latex2html" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then if test "$enable_docs" == "yes"; then - { { echo "$as_me:$LINENO: error: cannot find all tools for building documentation" >&5 -echo "$as_me: error: cannot find all tools for building documentation" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find all tools for building documentation" >&5 +$as_echo "$as_me: error: cannot find all tools for building documentation" >&2;} { (exit 1); exit 1; }; } fi if test "$enable_docs" == "check"; then - { echo "$as_me:$LINENO: WARNING: will not build documentation, cannot find all tools" >&5 -echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: will not build documentation, cannot find all tools" >&5 +$as_echo "$as_me: WARNING: will not build documentation, cannot find all tools" >&2;} fi fi if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"; then @@ -6450,16 +6620,16 @@ else fi if test "$building_docs" == "no" -a "$enable_refdocs" == "yes" ; then - { { echo "$as_me:$LINENO: error: must use --enable-docs with --enable-refdocs" >&5 -echo "$as_me: error: must use --enable-docs with --enable-refdocs" >&2;} + { { $as_echo "$as_me:$LINENO: error: must use --enable-docs with --enable-refdocs" >&5 +$as_echo "$as_me: error: must use --enable-docs with --enable-refdocs" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_xmlto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_xmlto"; then ac_cv_prog_have_xmlto="$have_xmlto" # Let the user override the test. @@ -6472,7 +6642,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_xmlto="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6484,18 +6654,18 @@ fi fi have_xmlto=$ac_cv_prog_have_xmlto if test -n "$have_xmlto"; then - { echo "$as_me:$LINENO: result: $have_xmlto" >&5 -echo "${ECHO_T}$have_xmlto" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_xmlto" >&5 +$as_echo "$have_xmlto" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "$enable_refdocs" == "yes"; then if test "x${have_xmlto}" != "xyes"; then - { { echo "$as_me:$LINENO: error: cannot find xmlto for building reference documentation" >&5 -echo "$as_me: error: cannot find xmlto for building reference documentation" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find xmlto for building reference documentation" >&5 +$as_echo "$as_me: error: cannot find xmlto for building reference documentation" >&2;} { (exit 1); exit 1; }; } fi fi @@ -6512,8 +6682,8 @@ fi if test "x${building_refdocs}" == "xyes"; then -{ echo "$as_me:$LINENO: checking for xmlto pdf support" >&5 -echo $ECHO_N "checking for xmlto pdf support... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for xmlto pdf support" >&5 +$as_echo_n "checking for xmlto pdf support... " >&6; } cat > conftest.$ac_ext << EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" @@ -6527,13 +6697,13 @@ EOF xmlto pdf conftest.$ac_ext >& /dev/null if test $? == 0; then have_xmlto_pdf="yes" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: WARNING: Not building reference documentation in PDF format" >&5 -echo "$as_me: WARNING: Not building reference documentation in PDF format" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:$LINENO: WARNING: Not building reference documentation in PDF format" >&5 +$as_echo "$as_me: WARNING: Not building reference documentation in PDF format" >&2;} fi fi if test "have_xmlto_pdf" == "yes"; then @@ -6554,10 +6724,10 @@ fi # Extract the first word of "certutil", so it can be a program name with args. set dummy certutil; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_have_certutil+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$have_certutil"; then ac_cv_prog_have_certutil="$have_certutil" # Let the user override the test. @@ -6570,7 +6740,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_certutil="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6582,22 +6752,22 @@ fi fi have_certutil=$ac_cv_prog_have_certutil if test -n "$have_certutil"; then - { echo "$as_me:$LINENO: result: $have_certutil" >&5 -echo "${ECHO_T}$have_certutil" >&6; } + { $as_echo "$as_me:$LINENO: result: $have_certutil" >&5 +$as_echo "$have_certutil" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking for /usr/include/nss3" >&5 -echo $ECHO_N "checking for /usr/include/nss3... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for /usr/include/nss3" >&5 +$as_echo_n "checking for /usr/include/nss3... " >&6; } if test "${ac_cv_file__usr_include_nss3+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/nss3"; then ac_cv_file__usr_include_nss3=yes @@ -6605,20 +6775,20 @@ else ac_cv_file__usr_include_nss3=no fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss3" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_nss3" >&6; } -if test $ac_cv_file__usr_include_nss3 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss3" >&5 +$as_echo "$ac_cv_file__usr_include_nss3" >&6; } +if test "x$ac_cv_file__usr_include_nss3" = x""yes; then nssdir=nss3 else - { echo "$as_me:$LINENO: checking for /usr/include/nss" >&5 -echo $ECHO_N "checking for /usr/include/nss... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for /usr/include/nss" >&5 +$as_echo_n "checking for /usr/include/nss... " >&6; } if test "${ac_cv_file__usr_include_nss+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/nss"; then ac_cv_file__usr_include_nss=yes @@ -6626,23 +6796,23 @@ else ac_cv_file__usr_include_nss=no fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_nss" >&6; } -if test $ac_cv_file__usr_include_nss = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nss" >&5 +$as_echo "$ac_cv_file__usr_include_nss" >&6; } +if test "x$ac_cv_file__usr_include_nss" = x""yes; then nssdir=nss fi fi -{ echo "$as_me:$LINENO: checking for /usr/include/nspr4" >&5 -echo $ECHO_N "checking for /usr/include/nspr4... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for /usr/include/nspr4" >&5 +$as_echo_n "checking for /usr/include/nspr4... " >&6; } if test "${ac_cv_file__usr_include_nspr4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/nspr4"; then ac_cv_file__usr_include_nspr4=yes @@ -6650,20 +6820,20 @@ else ac_cv_file__usr_include_nspr4=no fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr4" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_nspr4" >&6; } -if test $ac_cv_file__usr_include_nspr4 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr4" >&5 +$as_echo "$ac_cv_file__usr_include_nspr4" >&6; } +if test "x$ac_cv_file__usr_include_nspr4" = x""yes; then nsprdir=nspr4 else - { echo "$as_me:$LINENO: checking for /usr/include/nspr" >&5 -echo $ECHO_N "checking for /usr/include/nspr... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for /usr/include/nspr" >&5 +$as_echo_n "checking for /usr/include/nspr... " >&6; } if test "${ac_cv_file__usr_include_nspr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "/usr/include/nspr"; then ac_cv_file__usr_include_nspr=yes @@ -6671,9 +6841,9 @@ else ac_cv_file__usr_include_nspr=no fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_nspr" >&6; } -if test $ac_cv_file__usr_include_nspr = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_nspr" >&5 +$as_echo "$ac_cv_file__usr_include_nspr" >&6; } +if test "x$ac_cv_file__usr_include_nspr" = x""yes; then nsprdir=nspr fi @@ -6696,20 +6866,21 @@ CPPFLAGS="$CFLAGS $nss_CFLAGS $nspr_CFLAGS" for ac_header in "$nsprdir/nspr.h" "$nsprdir/plgetopt.h" "$nsprdir/prerror.h" "$nssdir/ssl.h" "$nssdir/nss.h" "$nssdir/pk11func.h" "$nssdir/secerr.h" do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6725,32 +6896,33 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6764,51 +6936,52 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -6817,21 +6990,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_nss_includes=yes else @@ -6842,10 +7018,10 @@ done CPPFLAGS="$save_CPPFLAGS" have_nss_libs=no -{ echo "$as_me:$LINENO: checking for PR_Connect in -lnspr4" >&5 -echo $ECHO_N "checking for PR_Connect in -lnspr4... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for PR_Connect in -lnspr4" >&5 +$as_echo_n "checking for PR_Connect in -lnspr4... " >&6; } if test "${ac_cv_lib_nspr4_PR_Connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnspr4 $LIBS" @@ -6877,38 +7053,42 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nspr4_PR_Connect=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nspr4_PR_Connect=no fi +rm -rf conftest.dSYM 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_nspr4_PR_Connect" >&5 -echo "${ECHO_T}$ac_cv_lib_nspr4_PR_Connect" >&6; } -if test $ac_cv_lib_nspr4_PR_Connect = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nspr4_PR_Connect" >&5 +$as_echo "$ac_cv_lib_nspr4_PR_Connect" >&6; } +if test "x$ac_cv_lib_nspr4_PR_Connect" = x""yes; then - { echo "$as_me:$LINENO: checking for SSL_ReHandshake in -lssl3" >&5 -echo $ECHO_N "checking for SSL_ReHandshake in -lssl3... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for SSL_ReHandshake in -lssl3" >&5 +$as_echo_n "checking for SSL_ReHandshake in -lssl3... " >&6; } if test "${ac_cv_lib_ssl3_SSL_ReHandshake+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl3 $LIBS" @@ -6940,33 +7120,37 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ssl3_SSL_ReHandshake=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ssl3_SSL_ReHandshake=no fi +rm -rf conftest.dSYM 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_ssl3_SSL_ReHandshake" >&5 -echo "${ECHO_T}$ac_cv_lib_ssl3_SSL_ReHandshake" >&6; } -if test $ac_cv_lib_ssl3_SSL_ReHandshake = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssl3_SSL_ReHandshake" >&5 +$as_echo "$ac_cv_lib_ssl3_SSL_ReHandshake" >&6; } +if test "x$ac_cv_lib_ssl3_SSL_ReHandshake" = x""yes; then have_nss_libs=yes fi @@ -6976,13 +7160,13 @@ fi fi if test "x${have_nss_includes}${have_nss_libs}${have_certutil}" != "xyesyesyes"; then if test "$enable_server" == "yes"; then - { { echo "$as_me:$LINENO: error: cannot find all libraries or tools for stap-server" >&5 -echo "$as_me: error: cannot find all libraries or tools for stap-server" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find all libraries or tools for stap-server" >&5 +$as_echo "$as_me: error: cannot find all libraries or tools for stap-server" >&2;} { (exit 1); exit 1; }; } fi if test "$enable_server" == "check"; then - { echo "$as_me:$LINENO: WARNING: will not build stap-server, cannot find all libraries or tools" >&5 -echo "$as_me: WARNING: will not build stap-server, cannot find all libraries or tools" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: will not build stap-server, cannot find all libraries or tools" >&5 +$as_echo "$as_me: WARNING: will not build stap-server, cannot find all libraries or tools" >&2;} fi else @@ -7021,10 +7205,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -7039,7 +7223,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7051,11 +7235,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7064,10 +7248,10 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -7082,7 +7266,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7094,11 +7278,11 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -7106,12 +7290,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -7123,58 +7303,54 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no -{ echo "$as_me:$LINENO: checking for GRAPHER" >&5 -echo $ECHO_N "checking for GRAPHER... $ECHO_C" >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$GRAPHER_CFLAGS"; then - pkg_cv_GRAPHER_CFLAGS="$GRAPHER_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 +{ $as_echo "$as_me:$LINENO: checking for GRAPHER" >&5 +$as_echo_n "checking for GRAPHER... " >&6; } + +if test -n "$GRAPHER_CFLAGS"; then + pkg_cv_GRAPHER_CFLAGS="$GRAPHER_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtkmm-2.4 >= 2.8.0") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GRAPHER_CFLAGS=`$PKG_CONFIG --cflags "gtkmm-2.4 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$GRAPHER_LIBS"; then - pkg_cv_GRAPHER_LIBS="$GRAPHER_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 +if test -n "$GRAPHER_LIBS"; then + pkg_cv_GRAPHER_LIBS="$GRAPHER_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtkmm-2.4 >= 2.8.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gtkmm-2.4 >= 2.8.0") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GRAPHER_LIBS=`$PKG_CONFIG --libs "gtkmm-2.4 >= 2.8.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7187,23 +7363,23 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GRAPHER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtkmm-2.4 >= 2.8.0"` + GRAPHER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` else - GRAPHER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtkmm-2.4 >= 2.8.0"` + GRAPHER_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtkmm-2.4 >= 2.8.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GRAPHER_PKG_ERRORS" >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_gtkmm=no elif test $pkg_failed = untried; then have_gtkmm=no else GRAPHER_CFLAGS=$pkg_cv_GRAPHER_CFLAGS GRAPHER_LIBS=$pkg_cv_GRAPHER_LIBS - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } have_gtkmm=yes fi if test "x${have_gtkmm}" == "xyes" -a x"$enable_grapher" != "xno"; then @@ -7221,8 +7397,8 @@ build_elfutils=no if test "${with_elfutils+set}" = set; then withval=$with_elfutils; case "$with_elfutils" in -yes) { { echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 -echo "$as_me: error: --with-elfutils requires an argument" >&2;} +yes) { { $as_echo "$as_me:$LINENO: error: --with-elfutils requires an argument" >&5 +$as_echo "$as_me: error: --with-elfutils requires an argument" >&2;} { (exit 1); exit 1; }; } ;; ''|no) ;; *) build_elfutils=yes ;; @@ -7247,10 +7423,10 @@ if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils http://elfutils.fedorahosted.org/ save_LIBS="$LIBS" -{ 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; } +{ $as_echo "$as_me:$LINENO: checking for dwfl_module_getsym in -ldw" >&5 +$as_echo_n "checking for dwfl_module_getsym in -ldw... " >&6; } if test "${ac_cv_lib_dw_dwfl_module_getsym+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS" @@ -7282,33 +7458,37 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dw_dwfl_module_getsym=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dw_dwfl_module_getsym=no fi +rm -rf conftest.dSYM 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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwfl_module_getsym" >&5 +$as_echo "$ac_cv_lib_dw_dwfl_module_getsym" >&6; } +if test "x$ac_cv_lib_dw_dwfl_module_getsym" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF @@ -7317,16 +7497,16 @@ _ACEOF else - { { echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&5 -echo "$as_me: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&2;} + { { $as_echo "$as_me:$LINENO: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&5 +$as_echo "$as_me: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: checking for dwarf_getelf in -ldw" >&5 -echo $ECHO_N "checking for dwarf_getelf in -ldw... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for dwarf_getelf in -ldw" >&5 +$as_echo_n "checking for dwarf_getelf in -ldw... " >&6; } if test "${ac_cv_lib_dw_dwarf_getelf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldw -Wl,--start-group -ldw -lebl -Wl,--end-group -lelf $LIBS" @@ -7358,33 +7538,37 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$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 + $as_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 + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dw_dwarf_getelf=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dw_dwarf_getelf=no fi +rm -rf conftest.dSYM 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_dwarf_getelf" >&5 -echo "${ECHO_T}$ac_cv_lib_dw_dwarf_getelf" >&6; } -if test $ac_cv_lib_dw_dwarf_getelf = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dw_dwarf_getelf" >&5 +$as_echo "$ac_cv_lib_dw_dwarf_getelf" >&6; } +if test "x$ac_cv_lib_dw_dwarf_getelf" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDW 1 _ACEOF @@ -7393,8 +7577,8 @@ _ACEOF else - { { echo "$as_me:$LINENO: error: elfutils, libdw too old, need 0.126+" >&5 -echo "$as_me: error: elfutils, libdw too old, need 0.126+" >&2;} + { { $as_echo "$as_me:$LINENO: error: elfutils, libdw too old, need 0.126+" >&5 +$as_echo "$as_me: error: elfutils, libdw too old, need 0.126+" >&2;} { (exit 1); exit 1; }; } fi @@ -7406,8 +7590,8 @@ else fi -{ echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5 -echo "$as_me: stap will link $stap_LIBS" >&6;} +{ $as_echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5 +$as_echo "$as_me: stap will link $stap_LIBS" >&6;} date=`date +%Y-%m-%d` @@ -7445,11 +7629,11 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 -echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" @@ -7481,20 +7665,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -7518,13 +7703,14 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err @@ -7532,7 +7718,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -7557,8 +7743,8 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 -echo "${ECHO_T}$CXXCPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do @@ -7586,20 +7772,21 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -7623,13 +7810,14 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err @@ -7637,7 +7825,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -7653,11 +7841,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=cpp @@ -7670,20 +7860,21 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_header in tr1/unordered_map do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7699,32 +7890,33 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7738,51 +7930,52 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -7791,21 +7984,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7825,8 +8021,8 @@ if test $build_elfutils = yes; then /*) elfutils_srcdir="$with_elfutils" ;; *) elfutils_srcdir="../$with_elfutils" ;; esac - { echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5 -echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} + { $as_echo "$as_me:$LINENO: running ${elfutils_srcdir}/configure" >&5 +$as_echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} # Our libdw.so's libebl will look in $ORIGIN/../lib/... but that # $ORIGIN is where libdw.so resides, which is not where there is a ../lib. # Note that $libdir might be using a quoted use of $exec_prefix or $prefix. @@ -7854,20 +8050,21 @@ echo "$as_me: running ${elfutils_srcdir}/configure" >&6;} for ac_header in elfutils/version.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7883,32 +8080,33 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7922,51 +8120,52 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -7975,21 +8174,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -8001,20 +8203,21 @@ else for ac_header in elfutils/version.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8030,32 +8233,33 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8069,51 +8273,52 @@ 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_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 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 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------- ## ## Report this to systemtap@sources.redhat.com ## @@ -8122,21 +8327,24 @@ _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -8155,6 +8363,8 @@ ac_config_headers="$ac_config_headers config.h:config.in" ac_config_files="$ac_config_files Makefile doc/Makefile doc/SystemTap_Tapset_Reference/Makefile grapher/Makefile stap.1 stapprobes.3stap stapfuncs.3stap stapvars.3stap stapex.3stap staprun.8 stap-server.8 man/stapprobes.iosched.3stap man/stapprobes.netdev.3stap man/stapprobes.nfs.3stap man/stapprobes.nfsd.3stap man/stapprobes.pagefault.3stap man/stapprobes.kprocess.3stap man/stapprobes.rpc.3stap man/stapprobes.scsi.3stap man/stapprobes.signal.3stap man/stapprobes.socket.3stap man/stapprobes.tcp.3stap man/stapprobes.udp.3stap initscript/systemtap" + + subdirs="$subdirs testsuite" ac_config_files="$ac_config_files run-stap" @@ -8188,11 +8398,12 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -8225,12 +8436,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -8246,7 +8457,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -8258,103 +8469,104 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_CRASHMOD_TRUE}" && test -z "${BUILD_CRASHMOD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_CRASHMOD\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_DOCS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_REFDOCS_TRUE}" && test -z "${BUILD_REFDOCS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_REFDOCS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_REFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_PDFREFDOCS_TRUE}" && test -z "${BUILD_PDFREFDOCS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_PDFREFDOCS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_PDFREFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_PDFREFDOCS\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_PDFREFDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_SERVER_TRUE}" && test -z "${BUILD_SERVER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_SERVER\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_SERVER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_SERVER\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_SERVER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_NSS_TRUE}" && test -z "${HAVE_NSS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_NSS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NSS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_NSS\" was never defined. +$as_echo "$as_me: error: conditional \"HAVE_NSS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_GRAPHER_TRUE}" && test -z "${BUILD_GRAPHER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_GRAPHER\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_GRAPHER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_GRAPHER\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_GRAPHER\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_ELFUTILS_TRUE}" && test -z "${BUILD_ELFUTILS_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. +$as_echo "$as_me: error: conditional \"BUILD_ELFUTILS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -8367,7 +8579,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -8377,7 +8589,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -8399,17 +8611,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -8425,8 +8665,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -8449,7 +8687,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -8462,17 +8700,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -8494,7 +8725,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -8545,7 +8776,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -8573,7 +8804,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -8586,19 +8816,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -8623,10 +8856,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -8649,7 +8882,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by systemtap $as_me 0.9.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8662,7 +8895,16 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" @@ -8670,22 +8912,23 @@ config_commands="$ac_config_commands" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -8699,13 +8942,13 @@ $config_commands Report bugs to <bug-autoconf@gnu.org>." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ systemtap config.status 0.9.7 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8713,11 +8956,12 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -8739,30 +8983,36 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 + { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -8781,27 +9031,29 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # @@ -8809,7 +9061,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -8844,8 +9096,8 @@ do "run-stap") CONFIG_FILES="$CONFIG_FILES run-stap" ;; "run-staprun") CONFIG_FILES="$CONFIG_FILES run-staprun" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -8886,238 +9138,144 @@ $debug || (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim -MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim -MAINT!$MAINT$ac_delim -MKDIR_P!$MKDIR_P$ac_delim -LN_S!$LN_S$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -U!$U$ac_delim -ANSI2KNR!$ANSI2KNR$ac_delim -RANLIB!$RANLIB$ac_delim -PIELDFLAGS!$PIELDFLAGS$ac_delim -PIECFLAGS!$PIECFLAGS$ac_delim -PIECXXFLAGS!$PIECXXFLAGS$ac_delim -sqlite3_LIBS!$sqlite3_LIBS$ac_delim -staplog_CPPFLAGS!$staplog_CPPFLAGS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr='
' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -BUILD_CRASHMOD_TRUE!$BUILD_CRASHMOD_TRUE$ac_delim -BUILD_CRASHMOD_FALSE!$BUILD_CRASHMOD_FALSE$ac_delim -have_latex!$have_latex$ac_delim -have_dvips!$have_dvips$ac_delim -have_ps2pdf!$have_ps2pdf$ac_delim -have_latex2html!$have_latex2html$ac_delim -BUILD_DOCS_TRUE!$BUILD_DOCS_TRUE$ac_delim -BUILD_DOCS_FALSE!$BUILD_DOCS_FALSE$ac_delim -have_xmlto!$have_xmlto$ac_delim -BUILD_REFDOCS_TRUE!$BUILD_REFDOCS_TRUE$ac_delim -BUILD_REFDOCS_FALSE!$BUILD_REFDOCS_FALSE$ac_delim -BUILD_PDFREFDOCS_TRUE!$BUILD_PDFREFDOCS_TRUE$ac_delim -BUILD_PDFREFDOCS_FALSE!$BUILD_PDFREFDOCS_FALSE$ac_delim -have_certutil!$have_certutil$ac_delim -nss_CFLAGS!$nss_CFLAGS$ac_delim -nspr_CFLAGS!$nspr_CFLAGS$ac_delim -BUILD_SERVER_TRUE!$BUILD_SERVER_TRUE$ac_delim -BUILD_SERVER_FALSE!$BUILD_SERVER_FALSE$ac_delim -HAVE_NSS_TRUE!$HAVE_NSS_TRUE$ac_delim -HAVE_NSS_FALSE!$HAVE_NSS_FALSE$ac_delim -PKG_CONFIG!$PKG_CONFIG$ac_delim -GRAPHER_CFLAGS!$GRAPHER_CFLAGS$ac_delim -GRAPHER_LIBS!$GRAPHER_LIBS$ac_delim -BUILD_GRAPHER_TRUE!$BUILD_GRAPHER_TRUE$ac_delim -BUILD_GRAPHER_FALSE!$BUILD_GRAPHER_FALSE$ac_delim -BUILD_ELFUTILS_TRUE!$BUILD_ELFUTILS_TRUE$ac_delim -BUILD_ELFUTILS_FALSE!$BUILD_ELFUTILS_FALSE$ac_delim -elfutils_abs_srcdir!$elfutils_abs_srcdir$ac_delim -stap_LIBS!$stap_LIBS$ac_delim -DATE!$DATE$ac_delim -PROCFLAGS!$PROCFLAGS$ac_delim -CXXCPP!$CXXCPP$ac_delim -subdirs!$subdirs$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -9133,19 +9291,133 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -9174,26 +9446,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -9203,7 +9487,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9229,7 +9513,7 @@ echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9238,7 +9522,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9259,17 +9543,17 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -9314,12 +9598,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -9328,13 +9613,14 @@ case `sed -n '/datarootdir/ { /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -9348,15 +9634,16 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -9367,135 +9654,75 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9515,14 +9742,23 @@ echo X$ac_file | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files +# are listed without --file. Let's play safe and only enable the eval +# if we detect the quoting. +case $CONFIG_FILES in +*\'*) eval set x "$CONFIG_FILES" ;; +*) set x $CONFIG_FILES ;; +esac +shift +for mf +do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -9532,13 +9768,13 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9582,7 +9818,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | +$as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9608,7 +9844,7 @@ echo X"$file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9617,7 +9853,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9638,8 +9874,8 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -9658,6 +9894,11 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -9685,7 +9926,8 @@ fi # if test "$no_recursion" != yes; then - # Remove --cache-file and --srcdir arguments so they do not pile up. + # Remove --cache-file, --srcdir, and --disable-option-checking arguments + # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" @@ -9714,9 +9956,11 @@ if test "$no_recursion" != yes; then ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; + --disable-option-checking) + ;; *) case $ac_arg in - *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac @@ -9726,7 +9970,7 @@ if test "$no_recursion" != yes; then # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -9735,6 +9979,10 @@ if test "$no_recursion" != yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi + # Always prepend --disable-option-checking to silence warnings, since + # different subdirs can have different --enable and --with options. + ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue @@ -9743,8 +9991,8 @@ if test "$no_recursion" != yes; then test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - echo "$as_me:$LINENO: $ac_msg" >&5 - echo "$ac_msg" >&6 + $as_echo "$as_me:$LINENO: $ac_msg" >&5 + $as_echo "$ac_msg" >&6 { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; @@ -9753,7 +10001,7 @@ if test "$no_recursion" != yes; then as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -9762,7 +10010,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -9783,17 +10031,17 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -9832,8 +10080,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else - { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 -echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -9846,32 +10094,36 @@ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 -echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi if test "${prefix}" = "/usr/local"; then - { echo "$as_me:$LINENO: " >&5 -echo "$as_me: " >&6;} - { echo "$as_me:$LINENO: For a private or temporary build of systemtap, we recommend" >&5 -echo "$as_me: For a private or temporary build of systemtap, we recommend" >&6;} - { echo "$as_me:$LINENO: configuring with a prefix. For example, try" >&5 -echo "$as_me: configuring with a prefix. For example, try" >&6;} - { echo "$as_me:$LINENO: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&5 -echo "$as_me: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&6;} - { echo "$as_me:$LINENO: Running systemtap uninstalled, entirely out of the build tree," >&5 -echo "$as_me: Running systemtap uninstalled, entirely out of the build tree," >&6;} - { echo "$as_me:$LINENO: is not supported." >&5 -echo "$as_me: is not supported." >&6;} + { $as_echo "$as_me:$LINENO: " >&5 +$as_echo "$as_me: " >&6;} + { $as_echo "$as_me:$LINENO: For a private or temporary build of systemtap, we recommend" >&5 +$as_echo "$as_me: For a private or temporary build of systemtap, we recommend" >&6;} + { $as_echo "$as_me:$LINENO: configuring with a prefix. For example, try" >&5 +$as_echo "$as_me: configuring with a prefix. For example, try" >&6;} + { $as_echo "$as_me:$LINENO: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&5 +$as_echo "$as_me: $0 $ac_configure_args --prefix=$HOME/systemtap-${PACKAGE_VERSION}-$$" >&6;} + { $as_echo "$as_me:$LINENO: Running systemtap uninstalled, entirely out of the build tree," >&5 +$as_echo "$as_me: Running systemtap uninstalled, entirely out of the build tree," >&6;} + { $as_echo "$as_me:$LINENO: is not supported." >&5 +$as_echo "$as_me: is not supported." >&6;} fi diff --git a/doc/Makefile.in b/doc/Makefile.in index 25b8bba2..2f1683c1 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -167,6 +167,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ PDF_FILES = tutorial.pdf langref.pdf @@ -181,8 +182,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -282,8 +283,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -308,8 +309,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -319,13 +320,12 @@ ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in index 2e8b411d..ae0b2f59 100644 --- a/doc/SystemTap_Tapset_Reference/Makefile.in +++ b/doc/SystemTap_Tapset_Reference/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -46,7 +46,7 @@ PROGRAMS = $(noinst_PROGRAMS) docproc_SOURCES = docproc.c docproc_OBJECTS = docproc.$(OBJEXT) docproc_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -170,6 +170,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap @@ -186,8 +187,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -245,8 +246,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -258,8 +259,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -269,13 +270,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/dwarf_wrappers.cxx b/dwarf_wrappers.cxx index 3627b989..d7183dc3 100644 --- a/dwarf_wrappers.cxx +++ b/dwarf_wrappers.cxx @@ -12,6 +12,7 @@ #include <cstring> #include <string> #include <elfutils/libdwfl.h> +#include <dwarf.h> using std::string; @@ -45,4 +46,16 @@ void dwfl_assert(const std::string& desc, bool condition) dwfl_assert(desc, -1); } + +// Helper for dealing with selected portions of libdwfl in a more readable +// fashion, and with specific cleanup / checking / logging options. + +const char * +dwarf_diename_integrate (Dwarf_Die *die) +{ + Dwarf_Attribute attr_mem; + return dwarf_formstring (dwarf_attr_integrate (die, DW_AT_name, &attr_mem)); +} + + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/dwarf_wrappers.h b/dwarf_wrappers.h index 959ece92..1442a17c 100644 --- a/dwarf_wrappers.h +++ b/dwarf_wrappers.h @@ -89,6 +89,8 @@ public: } }; +const char *dwarf_diename_integrate (Dwarf_Die *die); + #endif diff --git a/dwflpp.cxx b/dwflpp.cxx new file mode 100644 index 00000000..bfae1354 --- /dev/null +++ b/dwflpp.cxx @@ -0,0 +1,2093 @@ +// C++ interface to dwfl +// Copyright (C) 2005-2009 Red Hat Inc. +// Copyright (C) 2005-2007 Intel Corporation. +// Copyright (C) 2008 James.Bottomley@HansenPartnership.com +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. + +#include "dwflpp.h" +#include "config.h" +#include "staptree.h" +#include "elaborate.h" +#include "tapsets.h" +#include "task_finder.h" +#include "translate.h" +#include "session.h" +#include "util.h" +#include "buildrun.h" +#include "dwarf_wrappers.h" +#include "auto_free.h" +#include "hash.h" + +#include <cstdlib> +#include <algorithm> +#include <deque> +#include <iostream> +#include <map> +#include <set> +#include <sstream> +#include <stdexcept> +#include <vector> +#include <cstdarg> +#include <cassert> +#include <iomanip> +#include <cerrno> + +extern "C" { +#include <fcntl.h> +#include <elfutils/libdwfl.h> +#include <elfutils/libdw.h> +#include <dwarf.h> +#include <elf.h> +#include <obstack.h> +#include <regex.h> +#include <glob.h> +#include <fnmatch.h> +#include <stdio.h> +#include <sys/types.h> + +#include "loc2c.h" +#define __STDC_FORMAT_MACROS +#include <inttypes.h> +} + + +using namespace std; +using namespace __gnu_cxx; + + +static string TOK_KERNEL("kernel"); + + +dwflpp::dwflpp(systemtap_session & session, const string& user_module): + sess(session), module(NULL), module_bias(0), mod_info(NULL), + module_start(0), module_end(0), cu(NULL), dwfl(NULL), + module_dwarf(NULL), function(NULL) +{ + if (user_module.empty()) + setup_kernel(); + else + setup_user(user_module); +} + + +dwflpp::~dwflpp() +{ + if (dwfl) + dwfl_end(dwfl); +} + + +string const +dwflpp::default_name(char const * in, char const *) +{ + if (in) + return in; + return string(""); +} + + +void +dwflpp::get_module_dwarf(bool required, bool report) +{ + module_dwarf = dwfl_module_getdwarf(module, &module_bias); + mod_info->dwarf_status = (module_dwarf ? info_present : info_absent); + if (!module_dwarf && report) + { + string msg = "cannot find "; + if (module_name == "") + msg += "kernel"; + else + msg += string("module ") + module_name; + msg += " debuginfo"; + + int i = dwfl_errno(); + if (i) + msg += string(": ") + dwfl_errmsg (i); + + if (required) + throw semantic_error (msg); + else + cerr << "WARNING: " << msg << "\n"; + } +} + + +void +dwflpp::focus_on_module(Dwfl_Module * m, module_info * mi) +{ + module = m; + mod_info = mi; + if (m) + { + module_name = default_name(dwfl_module_info(module, NULL, + &module_start, &module_end, + NULL, NULL, NULL, NULL), + "module"); + } + else + { + assert(mi && mi->name && mi->name == TOK_KERNEL); + module_name = mi->name; + module_start = 0; + module_end = 0; + module_bias = mi->bias; + } + + // Reset existing pointers and names + + module_dwarf = NULL; + + cu_name.clear(); + cu = NULL; + + function_name.clear(); + function = NULL; +} + + +void +dwflpp::focus_on_cu(Dwarf_Die * c) +{ + assert(c); + assert(module); + + cu = c; + cu_name = default_name(dwarf_diename(c), "CU"); + + // Reset existing pointers and names + function_name.clear(); + function = NULL; +} + + +void +dwflpp::focus_on_function(Dwarf_Die * f) +{ + assert(f); + assert(module); + assert(cu); + + function = f; + function_name = default_name(dwarf_diename(function), "function"); +} + + +Dwarf_Die * +dwflpp::query_cu_containing_address(Dwarf_Addr a) +{ + Dwarf_Addr bias; + assert(dwfl); + assert(module); + get_module_dwarf(); + + // globalize the module-relative address + if (module_name != TOK_KERNEL && dwfl_module_relocations (module) > 0) + a += module_start; + + Dwarf_Die* cudie = dwfl_module_addrdie(module, a, &bias); + assert(bias == module_bias); + return cudie; +} + + +bool +dwflpp::module_name_matches(string pattern) +{ + bool t = (fnmatch(pattern.c_str(), module_name.c_str(), 0) == 0); + if (t && sess.verbose>3) + clog << "pattern '" << pattern << "' " + << "matches " + << "module '" << module_name << "'" << "\n"; + return t; +} + + +bool +dwflpp::name_has_wildcard(string pattern) +{ + return (pattern.find('*') != string::npos || + pattern.find('?') != string::npos || + pattern.find('[') != string::npos); +} + + +bool +dwflpp::module_name_final_match(string pattern) +{ + // Assume module_name_matches(). Can there be any more matches? + // Not unless the pattern is a wildcard, since module names are + // presumed unique. + return !name_has_wildcard(pattern); +} + + +bool +dwflpp::function_name_matches_pattern(string name, string pattern) +{ + bool t = (fnmatch(pattern.c_str(), name.c_str(), 0) == 0); + if (t && sess.verbose>3) + clog << "pattern '" << pattern << "' " + << "matches " + << "function '" << name << "'" << "\n"; + return t; +} + + +bool +dwflpp::function_name_matches(string pattern) +{ + assert(function); + return function_name_matches_pattern(function_name, pattern); +} + + +bool +dwflpp::function_name_final_match(string pattern) +{ + return module_name_final_match (pattern); +} + + +void +dwflpp::setup_kernel(bool debuginfo_needed) +{ + // XXX: See also translate.cxx:emit_symbol_data + + if (! sess.module_cache) + sess.module_cache = new module_cache (); + + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; + static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); + static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr ); + + static const Dwfl_Callbacks kernel_callbacks = + { + dwfl_linux_kernel_find_elf, + dwfl_standard_find_debuginfo, + dwfl_offline_section_address, + (char **) & debuginfo_path + }; + + dwfl = dwfl_begin (&kernel_callbacks); + if (!dwfl) + throw semantic_error ("cannot open dwfl"); + dwfl_report_begin (dwfl); + + // We have a problem with -r REVISION vs -r BUILDDIR here. If + // we're running against a fedora/rhel style kernel-debuginfo + // tree, s.kernel_build_tree is not the place where the unstripped + // vmlinux will be installed. Rather, it's over yonder at + // /usr/lib/debug/lib/modules/$REVISION/. It seems that there is + // no way to set the dwfl_callback.debuginfo_path and always + // passs the plain kernel_release here. So instead we have to + // hard-code this magic here. + string elfutils_kernel_path; + if (sess.kernel_build_tree == string("/lib/modules/" + sess.kernel_release + "/build")) + elfutils_kernel_path = sess.kernel_release; + else + elfutils_kernel_path = sess.kernel_build_tree; + + int rc = dwfl_linux_kernel_report_offline (dwfl, + elfutils_kernel_path.c_str(), + &dwfl_report_offline_predicate); + + if (debuginfo_needed) + dwfl_assert (string("missing ") + sess.architecture + + string(" kernel/module debuginfo under '") + + sess.kernel_build_tree + string("'"), + rc); + + // XXX: it would be nice if we could do a single + // ..._report_offline call for an entire systemtap script, so + // that a selection predicate would filter out modules outside + // the union of all the requested wildcards. But we build + // derived_probes one-by-one and we don't have lookahead. + // PR 3498. + + // XXX: a special case: if we have only kernel.* probe points, + // we shouldn't waste time looking for module debug-info (and + // vice versa). + + // NB: the result of an _offline call is the assignment of + // virtualized addresses to relocatable objects such as + // modules. These have to be converted to real addresses at + // run time. See the dwarf_derived_probe ctor and its caller. + + dwfl_assert ("dwfl_report_end", dwfl_report_end(dwfl, NULL, NULL)); +} + + +void +dwflpp::setup_user(const string& module_name, bool debuginfo_needed) +{ + if (! sess.module_cache) + sess.module_cache = new module_cache (); + + static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; + static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); + // NB: kernel_build_tree doesn't enter into this, as it's for + // kernel-side modules only. + static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr); + + static const Dwfl_Callbacks user_callbacks = + { + NULL, /* dwfl_linux_kernel_find_elf, */ + dwfl_standard_find_debuginfo, + dwfl_offline_section_address, + (char **) & debuginfo_path + }; + + dwfl = dwfl_begin (&user_callbacks); + if (!dwfl) + throw semantic_error ("cannot open dwfl"); + dwfl_report_begin (dwfl); + + // XXX: should support buildid-based naming + + Dwfl_Module *mod = dwfl_report_offline (dwfl, + module_name.c_str(), + module_name.c_str(), + -1); + // XXX: save mod! + + if (debuginfo_needed) + dwfl_assert (string("missing process ") + + module_name + + string(" ") + + sess.architecture + + string(" debuginfo"), + mod); + + if (!module) + module = mod; + + // NB: the result of an _offline call is the assignment of + // virtualized addresses to relocatable objects such as + // modules. These have to be converted to real addresses at + // run time. See the dwarf_derived_probe ctor and its caller. + + dwfl_assert ("dwfl_report_end", dwfl_report_end(dwfl, NULL, NULL)); +} + + +void +dwflpp::iterate_over_modules(int (* callback)(Dwfl_Module *, void **, + const char *, Dwarf_Addr, + void *), + base_query *data) +{ + ptrdiff_t off = 0; + do + { + if (pending_interrupts) return; + off = dwfl_getmodules (dwfl, callback, data, off); + } + while (off > 0); + // Don't complain if we exited dwfl_getmodules early. + // This could be a $target variable error that will be + // reported soon anyway. + // dwfl_assert("dwfl_getmodules", off == 0); + + // PR6864 XXX: For dwarfless case (if .../vmlinux is missing), then the + // "kernel" module is not reported in the loop above. However, we + // may be able to make do with symbol table data. +} + + +void +dwflpp::iterate_over_cus (int (*callback)(Dwarf_Die * die, void * arg), + void * data) +{ + get_module_dwarf(false); + Dwarf *dw = module_dwarf; + if (!dw) return; + + vector<Dwarf_Die>* v = module_cu_cache[dw]; + if (v == 0) + { + v = new vector<Dwarf_Die>; + module_cu_cache[dw] = v; + + Dwarf_Off off = 0; + size_t cuhl; + Dwarf_Off noff; + while (dwarf_nextcu (dw, off, &noff, &cuhl, NULL, NULL, NULL) == 0) + { + if (pending_interrupts) return; + Dwarf_Die die_mem; + Dwarf_Die *die; + die = dwarf_offdie (dw, off + cuhl, &die_mem); + v->push_back (*die); /* copy */ + off = noff; + } + } + + for (unsigned i = 0; i < v->size(); i++) + { + if (pending_interrupts) return; + Dwarf_Die die = v->at(i); + int rc = (*callback)(& die, data); + if (rc != DWARF_CB_OK) break; + } +} + + +bool +dwflpp::func_is_inline() +{ + assert (function); + return dwarf_func_inline (function) != 0; +} + + +int +dwflpp::cu_inl_function_caching_callback (Dwarf_Die* func, void *arg) +{ + vector<Dwarf_Die>* v = static_cast<vector<Dwarf_Die>*>(arg); + v->push_back (* func); + return DWARF_CB_OK; +} + + +void +dwflpp::iterate_over_inline_instances (int (* callback)(Dwarf_Die * die, void * arg), + void * data) +{ + assert (function); + assert (func_is_inline ()); + + string key = module_name + ":" + cu_name + ":" + function_name; + vector<Dwarf_Die>* v = cu_inl_function_cache[key]; + if (v == 0) + { + v = new vector<Dwarf_Die>; + cu_inl_function_cache[key] = v; + dwarf_func_inline_instances (function, cu_inl_function_caching_callback, v); + } + + for (unsigned i=0; i<v->size(); i++) + { + if (pending_interrupts) return; + Dwarf_Die die = v->at(i); + int rc = (*callback)(& die, data); + if (rc != DWARF_CB_OK) break; + } +} + + +int +dwflpp::global_alias_caching_callback(Dwarf_Die *die, void *arg) +{ + cu_function_cache_t *cache = static_cast<cu_function_cache_t*>(arg); + const char *name = dwarf_diename(die); + + if (!name) + return DWARF_CB_OK; + + string structure_name = name; + + if (!dwarf_hasattr(die, DW_AT_declaration) && + cache->find(structure_name) == cache->end()) + (*cache)[structure_name] = *die; + + return DWARF_CB_OK; +} + + +Dwarf_Die * +dwflpp::declaration_resolve(const char *name) +{ + if (!name) + return NULL; + + string key = module_name + ":" + cu_name; + cu_function_cache_t *v = global_alias_cache[key]; + if (v == 0) // need to build the cache, just once per encountered module/cu + { + v = new cu_function_cache_t; + global_alias_cache[key] = v; + iterate_over_globals(global_alias_caching_callback, v); + if (sess.verbose > 4) + clog << "global alias cache " << key << " size " << v->size() << endl; + } + + // XXX: it may be desirable to search other modules' declarations + // too, in case a module/shared-library processes a + // forward-declared pointer type only, where the actual definition + // may only be in vmlinux or the application. + + // XXX: it is probably desirable to search other CU's declarations + // in the same module. + + if (v->find(name) == v->end()) + return NULL; + + return & ((*v)[name]); +} + + +int +dwflpp::cu_function_caching_callback (Dwarf_Die* func, void *arg) +{ + cu_function_cache_t* v = static_cast<cu_function_cache_t*>(arg); + const char *name = dwarf_diename(func); + if (!name) + return DWARF_CB_OK; + + string function_name = name; + (*v)[function_name] = * func; + return DWARF_CB_OK; +} + + +int +dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), + base_query * q, const string& function, + bool has_statement_num) +{ + int rc = DWARF_CB_OK; + assert (module); + assert (cu); + + string key = module_name + ":" + cu_name; + cu_function_cache_t *v = cu_function_cache[key]; + if (v == 0) + { + v = new cu_function_cache_t; + cu_function_cache[key] = v; + dwarf_getfuncs (cu, cu_function_caching_callback, v, 0); + if (sess.verbose > 4) + clog << "function cache " << key << " size " << v->size() << endl; + } + + string subkey = function; + if (v->find(subkey) != v->end()) + { + Dwarf_Die die = v->find(subkey)->second; + if (sess.verbose > 4) + clog << "function cache " << key << " hit " << subkey << endl; + return (*callback)(& die, q); + } + else if (name_has_wildcard (subkey)) + { + for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++) + { + if (pending_interrupts) return DWARF_CB_ABORT; + string func_name = it->first; + Dwarf_Die die = it->second; + if (function_name_matches_pattern (func_name, subkey)) + { + if (sess.verbose > 4) + clog << "function cache " << key << " match " << func_name << " vs " + << subkey << endl; + + rc = (*callback)(& die, q); + if (rc != DWARF_CB_OK) break; + } + } + } + else if (has_statement_num) // searching all for kernel.statement + { + for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++) + { + Dwarf_Die die = it->second; + rc = (*callback)(& die, q); + if (rc != DWARF_CB_OK) break; + } + } + else // not a wildcard and no match in this CU + { + // do nothing + } + return rc; +} + + +/* This basically only goes one level down from the compile unit so it + * only picks up top level stuff (i.e. nothing in a lower scope) */ +int +dwflpp::iterate_over_globals (int (* callback)(Dwarf_Die *, void *), + void * data) +{ + int rc = DWARF_CB_OK; + Dwarf_Die die; + + assert (module); + assert (cu); + assert (dwarf_tag(cu) == DW_TAG_compile_unit); + + if (dwarf_child(cu, &die) != 0) + return rc; + + do + /* We're only currently looking for named types, + * although other types of declarations exist */ + switch (dwarf_tag(&die)) + { + case DW_TAG_base_type: + case DW_TAG_enumeration_type: + case DW_TAG_structure_type: + case DW_TAG_typedef: + case DW_TAG_union_type: + rc = (*callback)(&die, data); + break; + } + while (rc == DWARF_CB_OK && dwarf_siblingof(&die, &die) == 0); + + return rc; +} + + +// This little test routine represents an unfortunate breakdown in +// abstraction between dwflpp (putatively, a layer right on top of +// elfutils), and dwarf_query (interpreting a systemtap probe point). +// It arises because we sometimes try to fix up slightly-off +// .statement() probes (something we find out in fairly low-level). +// +// An alternative would be to put some more intelligence into query_cu(), +// and have it print additional suggestions after finding that +// q->dw.iterate_over_srcfile_lines resulted in no new finished_results. + +bool +dwflpp::has_single_line_record (dwarf_query * q, char const * srcfile, int lineno) +{ + if (lineno < 0) + return false; + + Dwarf_Line **srcsp = NULL; + size_t nsrcs = 0; + + dwarf_assert ("dwarf_getsrc_file", + dwarf_getsrc_file (module_dwarf, + srcfile, lineno, 0, + &srcsp, &nsrcs)); + + if (nsrcs != 1) + { + if (sess.verbose>4) + clog << "alternative line " << lineno << " rejected: nsrcs=" << nsrcs << endl; + return false; + } + + // We also try to filter out lines that leave the selected + // functions (if any). + + dwarf_line_t line(srcsp[0]); + Dwarf_Addr addr = line.addr(); + + func_info_map_t *filtered_functions = get_filtered_functions(q); + for (func_info_map_t::iterator i = filtered_functions->begin(); + i != filtered_functions->end(); ++i) + { + if (die_has_pc (i->die, addr)) + { + if (sess.verbose>4) + clog << "alternative line " << lineno << " accepted: fn=" << i->name << endl; + return true; + } + } + + inline_instance_map_t *filtered_inlines = get_filtered_inlines(q); + for (inline_instance_map_t::iterator i = filtered_inlines->begin(); + i != filtered_inlines->end(); ++i) + { + if (die_has_pc (i->die, addr)) + { + if (sess.verbose>4) + clog << "alternative line " << lineno << " accepted: ifn=" << i->name << endl; + return true; + } + } + + if (sess.verbose>4) + clog << "alternative line " << lineno << " rejected: leaves selected fns" << endl; + return false; +} + + +void +dwflpp::iterate_over_srcfile_lines (char const * srcfile, + int lines[2], + bool need_single_match, + enum line_t line_type, + void (* callback) (const dwarf_line_t& line, + void * arg), + void *data) +{ + Dwarf_Line **srcsp = NULL; + size_t nsrcs = 0; + dwarf_query * q = static_cast<dwarf_query *>(data); + int lineno = lines[0]; + auto_free_ref<Dwarf_Line**> free_srcsp(srcsp); + + get_module_dwarf(); + + if (line_type == RELATIVE) + { + Dwarf_Addr addr; + Dwarf_Line *line; + int line_number; + + dwarf_assert ("dwarf_entrypc", dwarf_entrypc (this->function, &addr)); + line = dwarf_getsrc_die (this->cu, addr); + dwarf_assert ("dwarf_getsrc_die", line == NULL); + dwarf_assert ("dwarf_lineno", dwarf_lineno (line, &line_number)); + lineno += line_number; + } + else if (line_type == WILDCARD) + function_line (&lineno); + + for (int l = lineno; ; l = l + 1) + { + set<int> lines_probed; + pair<set<int>::iterator,bool> line_probed; + dwarf_assert ("dwarf_getsrc_file", + dwarf_getsrc_file (module_dwarf, + srcfile, l, 0, + &srcsp, &nsrcs)); + if (line_type == WILDCARD || line_type == RANGE) + { + Dwarf_Addr line_addr; + dwarf_lineno (srcsp [0], &lineno); + line_probed = lines_probed.insert(lineno); + if (lineno != l || line_probed.second == false || nsrcs > 1) + continue; + dwarf_lineaddr (srcsp [0], &line_addr); + if (dwarf_haspc (function, line_addr) != 1) + break; + } + + // NB: Formerly, we used to filter, because: + + // dwarf_getsrc_file gets one *near hits* for line numbers, not + // exact matches. For example, an existing file but a nonexistent + // line number will be rounded up to the next definition in that + // file. This may be similar to the GDB breakpoint algorithm, but + // we don't want to be so fuzzy in systemtap land. So we filter. + + // But we now see the error of our ways, and skip this filtering. + + // XXX: the code also fails to match e.g. inline function + // definitions when the srcfile is a header file rather than the + // CU name. + + size_t remaining_nsrcs = nsrcs; + + if (need_single_match && remaining_nsrcs > 1) + { + // We wanted a single line record (a unique address for the + // line) and we got a bunch of line records. We're going to + // skip this probe (throw an exception) but before we throw + // we're going to look around a bit to see if there's a low or + // high line number nearby which *doesn't* have this problem, + // so we can give the user some advice. + + int lo_try = -1; + int hi_try = -1; + for (size_t i = 1; i < 6; ++i) + { + if (lo_try == -1 && has_single_line_record(q, srcfile, lineno - i)) + lo_try = lineno - i; + + if (hi_try == -1 && has_single_line_record(q, srcfile, lineno + i)) + hi_try = lineno + i; + } + + stringstream advice; + advice << "multiple addresses for " << srcfile << ":" << lineno; + if (lo_try > 0 || hi_try > 0) + { + advice << " (try "; + if (lo_try > 0) + advice << srcfile << ":" << lo_try; + if (lo_try > 0 && hi_try > 0) + advice << " or "; + if (hi_try > 0) + advice << srcfile << ":" << hi_try; + advice << ")"; + } + throw semantic_error (advice.str()); + } + + for (size_t i = 0; i < nsrcs; ++i) + { + if (pending_interrupts) return; + if (srcsp [i]) // skip over mismatched lines + callback (dwarf_line_t(srcsp[i]), data); + } + + if (line_type == ABSOLUTE || line_type == RELATIVE) + break; + else if (line_type == RANGE && l == lines[1]) + break; + } +} + + +void +dwflpp::iterate_over_labels (Dwarf_Die *begin_die, + const char *sym, + const char *symfunction, + void *data, + void (* callback)(const string &, + const char *, + int, + Dwarf_Die *, + Dwarf_Addr, + dwarf_query *)) +{ + dwarf_query * q __attribute__ ((unused)) = static_cast<dwarf_query *>(data) ; + + get_module_dwarf(); + + Dwarf_Die die; + int res = dwarf_child (begin_die, &die); + if (res != 0) + return; // die without children, bail out. + + static string function_name = dwarf_diename (begin_die); + do + { + Dwarf_Attribute attr_mem; + Dwarf_Attribute *attr = dwarf_attr (&die, DW_AT_name, &attr_mem); + int tag = dwarf_tag(&die); + const char *name = dwarf_formstring (attr); + if (name == 0) + continue; + switch (tag) + { + case DW_TAG_label: + break; + case DW_TAG_subprogram: + if (!dwarf_hasattr(&die, DW_AT_declaration)) + function_name = name; + else + continue; + default: + if (dwarf_haschildren (&die)) + iterate_over_labels (&die, sym, symfunction, q, callback); + continue; + } + + if (strcmp(function_name.c_str(), symfunction) == 0 + || (name_has_wildcard(symfunction) + && function_name_matches (symfunction))) + { + } + else + continue; + if (strcmp(name, sym) == 0 + || (name_has_wildcard(sym) + && function_name_matches_pattern (name, sym))) + { + const char *file = dwarf_decl_file (&die); + // Get the line number for this label + Dwarf_Attribute attr; + dwarf_attr (&die,DW_AT_decl_line, &attr); + Dwarf_Sword dline; + dwarf_formsdata (&attr, &dline); + Dwarf_Addr stmt_addr; + if (dwarf_lowpc (&die, &stmt_addr) != 0) + { + // There is no lowpc so figure out the address + // Get the real die for this cu + Dwarf_Die cudie; + dwarf_diecu (cu, &cudie, NULL, NULL); + size_t nlines = 0; + // Get the line for this label + Dwarf_Line **aline; + dwarf_getsrc_file (module_dwarf, file, (int)dline, 0, &aline, &nlines); + // Get the address + for (size_t i = 0; i < nlines; i++) + { + dwarf_lineaddr (*aline, &stmt_addr); + if ((dwarf_haspc (&die, stmt_addr))) + break; + } + } + + Dwarf_Die *scopes; + int nscopes = 0; + nscopes = dwarf_getscopes_die (&die, &scopes); + if (nscopes > 1) + { + callback(function_name.c_str(), file, + (int)dline, &scopes[1], stmt_addr, q); + add_label_name(q, name); + } + } + } + while (dwarf_siblingof (&die, &die) == 0); +} + + +void +dwflpp::collect_srcfiles_matching (string const & pattern, + set<char const *> & filtered_srcfiles) +{ + assert (module); + assert (cu); + + size_t nfiles; + Dwarf_Files *srcfiles; + + // PR 5049: implicit * in front of given path pattern. + // NB: fnmatch() is used without FNM_PATHNAME. + string prefixed_pattern = string("*/") + pattern; + + dwarf_assert ("dwarf_getsrcfiles", + dwarf_getsrcfiles (cu, &srcfiles, &nfiles)); + { + for (size_t i = 0; i < nfiles; ++i) + { + char const * fname = dwarf_filesrc (srcfiles, i, NULL, NULL); + if (fnmatch (pattern.c_str(), fname, 0) == 0 || + fnmatch (prefixed_pattern.c_str(), fname, 0) == 0) + { + filtered_srcfiles.insert (fname); + if (sess.verbose>2) + clog << "selected source file '" << fname << "'\n"; + } + } + } +} + + +void +dwflpp::resolve_prologue_endings (func_info_map_t & funcs) +{ + // This heuristic attempts to pick the first address that has a + // source line distinct from the function declaration's. In a + // perfect world, this would be the first statement *past* the + // prologue. + + assert(module); + assert(cu); + + size_t nlines = 0; + Dwarf_Lines *lines = NULL; + + /* trouble cases: + malloc do_symlink in init/initramfs.c tail-recursive/tiny then no-prologue + sys_get?id in kernel/timer.c no-prologue + sys_exit_group tail-recursive + {do_,}sys_open extra-long-prologue (gcc 3.4) + cpu_to_logical_apicid NULL-decl_file + */ + + // Fetch all srcline records, sorted by address. + dwarf_assert ("dwarf_getsrclines", + dwarf_getsrclines(cu, &lines, &nlines)); + // XXX: free lines[] later, but how? + + for(func_info_map_t::iterator it = funcs.begin(); it != funcs.end(); it++) + { +#if 0 /* someday */ + Dwarf_Addr* bkpts = 0; + int n = dwarf_entry_breakpoints (& it->die, & bkpts); + // ... + free (bkpts); +#endif + + Dwarf_Addr entrypc = it->entrypc; + Dwarf_Addr highpc; // NB: highpc is exclusive: [entrypc,highpc) + dwfl_assert ("dwarf_highpc", dwarf_highpc (& it->die, + & highpc)); + + if (it->decl_file == 0) it->decl_file = ""; + + unsigned entrypc_srcline_idx = 0; + dwarf_line_t entrypc_srcline; + // open-code binary search for exact match + { + unsigned l = 0, h = nlines; + while (l < h) + { + entrypc_srcline_idx = (l + h) / 2; + const dwarf_line_t lr(dwarf_onesrcline(lines, + entrypc_srcline_idx)); + Dwarf_Addr addr = lr.addr(); + if (addr == entrypc) { entrypc_srcline = lr; break; } + else if (l + 1 == h) { break; } // ran off bottom of tree + else if (addr < entrypc) { l = entrypc_srcline_idx; } + else { h = entrypc_srcline_idx; } + } + } + if (!entrypc_srcline) + { + if (sess.verbose > 2) + clog << "missing entrypc dwarf line record for function '" + << it->name << "'\n"; + // This is probably an inlined function. We'll end up using + // its lowpc as a probe address. + continue; + } + + if (sess.verbose>2) + clog << "prologue searching function '" << it->name << "'" + << " 0x" << hex << entrypc << "-0x" << highpc << dec + << "@" << it->decl_file << ":" << it->decl_line + << "\n"; + + // Now we go searching for the first line record that has a + // file/line different from the one in the declaration. + // Normally, this will be the next one. BUT: + // + // We may have to skip a few because some old compilers plop + // in dummy line records for longer prologues. If we go too + // far (addr >= highpc), we take the previous one. Or, it may + // be the first one, if the function had no prologue, and thus + // the entrypc maps to a statement in the body rather than the + // declaration. + + unsigned postprologue_srcline_idx = entrypc_srcline_idx; + bool ranoff_end = false; + while (postprologue_srcline_idx < nlines) + { + dwarf_line_t lr(dwarf_onesrcline(lines, postprologue_srcline_idx)); + Dwarf_Addr postprologue_addr = lr.addr(); + const char* postprologue_file = lr.linesrc(); + int postprologue_lineno = lr.lineno(); + + if (sess.verbose>2) + clog << "checking line record 0x" << hex << postprologue_addr << dec + << "@" << postprologue_file << ":" << postprologue_lineno << "\n"; + + if (postprologue_addr >= highpc) + { + ranoff_end = true; + postprologue_srcline_idx --; + continue; + } + if (ranoff_end || + (strcmp (postprologue_file, it->decl_file) || // We have a winner! + (postprologue_lineno != it->decl_line))) + { + it->prologue_end = postprologue_addr; + + if (sess.verbose>2) + { + clog << "prologue found function '" << it->name << "'"; + // Add a little classification datum + if (postprologue_srcline_idx == entrypc_srcline_idx) clog << " (naked)"; + if (ranoff_end) clog << " (tail-call?)"; + clog << " = 0x" << hex << postprologue_addr << dec << "\n"; + } + + break; + } + + // Let's try the next srcline. + postprologue_srcline_idx ++; + } // loop over srclines + + // if (strlen(it->decl_file) == 0) it->decl_file = NULL; + + } // loop over functions + + // XXX: how to free lines? +} + + +bool +dwflpp::function_entrypc (Dwarf_Addr * addr) +{ + assert (function); + return (dwarf_entrypc (function, addr) == 0); + // XXX: see also _lowpc ? +} + + +bool +dwflpp::die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr) +{ + int rc = 0; + string lookup_method; + + * addr = 0; + + lookup_method = "dwarf_entrypc"; + rc = dwarf_entrypc (die, addr); + + if (rc) + { + lookup_method = "dwarf_lowpc"; + rc = dwarf_lowpc (die, addr); + } + + if (rc) + { + lookup_method = "dwarf_ranges"; + + Dwarf_Addr base; + Dwarf_Addr begin; + Dwarf_Addr end; + ptrdiff_t offset = dwarf_ranges (die, 0, &base, &begin, &end); + if (offset < 0) rc = -1; + else if (offset > 0) + { + * addr = begin; + rc = 0; + + // Now we need to check that there are no more ranges + // associated with this function, which could conceivably + // happen if a function is inlined, then pieces of it are + // split amongst different conditional branches. It's not + // obvious which of them to favour. As a heuristic, we + // pick the beginning of the first range, and ignore the + // others (but with a warning). + + unsigned extra = 0; + while ((offset = dwarf_ranges (die, offset, &base, &begin, &end)) > 0) + extra ++; + if (extra) + lookup_method += ", ignored " + lex_cast<string>(extra) + " more"; + } + } + + if (sess.verbose > 2) + clog << "entry-pc lookup (" << lookup_method << ") = 0x" << hex << *addr << dec + << " (rc " << rc << ")" + << endl; + return (rc == 0); +} + + +void +dwflpp::function_die (Dwarf_Die *d) +{ + assert (function); + *d = *function; +} + + +void +dwflpp::function_file (char const ** c) +{ + assert (function); + assert (c); + *c = dwarf_decl_file (function); +} + + +void +dwflpp::function_line (int *linep) +{ + assert (function); + dwarf_decl_line (function, linep); +} + + +bool +dwflpp::die_has_pc (Dwarf_Die & die, Dwarf_Addr pc) +{ + int res = dwarf_haspc (&die, pc); + // dwarf_ranges will return -1 if a function die has no DW_AT_ranges + // if (res == -1) + // dwarf_assert ("dwarf_haspc", res); + return res == 1; +} + + +void +dwflpp::loc2c_error (void *, const char *fmt, ...) +{ + const char *msg = "?"; + char *tmp = NULL; + int rc; + va_list ap; + va_start (ap, fmt); + rc = vasprintf (& tmp, fmt, ap); + if (rc < 0) + msg = "?"; + else + msg = tmp; + va_end (ap); + throw semantic_error (msg); +} + + +// This function generates code used for addressing computations of +// target variables. +void +dwflpp::emit_address (struct obstack *pool, Dwarf_Addr address) +{ + #if 0 + // The easy but incorrect way is to just print a hard-wired + // constant. + obstack_printf (pool, "%#" PRIx64 "UL", address); + #endif + + // Turn this address into a section-relative offset if it should be one. + // We emit a comment approximating the variable+offset expression that + // relocatable module probing code will need to have. + Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); + dwfl_assert ("dwfl_addrmodule", mod); + const char *modname = dwfl_module_info (mod, NULL, NULL, NULL, + NULL, NULL, NULL, NULL); + int n = dwfl_module_relocations (mod); + dwfl_assert ("dwfl_module_relocations", n >= 0); + Dwarf_Addr reloc_address = address; + int i = dwfl_module_relocate_address (mod, &reloc_address); + dwfl_assert ("dwfl_module_relocate_address", i >= 0); + dwfl_assert ("dwfl_module_info", modname); + const char *secname = dwfl_module_relocation_info (mod, i, NULL); + + if (sess.verbose > 2) + { + clog << "emit dwarf addr 0x" << hex << address << dec + << " => module " << modname + << " section " << (secname ?: "null") + << " relocaddr 0x" << hex << reloc_address << dec + << endl; + } + + if (n > 0 && !(n == 1 && secname == NULL)) + { + dwfl_assert ("dwfl_module_relocation_info", secname); + if (n > 1 || secname[0] != '\0') + { + // This gives us the module name, and section name within the + // module, for a kernel module (or other ET_REL module object). + obstack_printf (pool, "({ static unsigned long addr = 0; "); + obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", + modname, secname, reloc_address); + obstack_printf (pool, "addr; })"); + } + else if (n == 1 && module_name == TOK_KERNEL && secname[0] == '\0') + { + // elfutils' way of telling us that this is a relocatable kernel address, which we + // need to treat the same way here as dwarf_query::add_probe_point does: _stext. + address -= sess.sym_stext; + secname = "_stext"; + obstack_printf (pool, "({ static unsigned long addr = 0; "); + obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", + modname, secname, address); // PR10000 NB: not reloc_address + obstack_printf (pool, "addr; })"); + } + else + { + throw semantic_error ("cannot relocate user-space dso (?) address"); +#if 0 + // This would happen for a Dwfl_Module that's a user-level DSO. + obstack_printf (pool, " /* %s+%#" PRIx64 " */", + modname, address); +#endif + } + } + else + obstack_printf (pool, "%#" PRIx64 "UL", address); // assume as constant +} + + +void +dwflpp::loc2c_emit_address (void *arg, struct obstack *pool, + Dwarf_Addr address) +{ + static_cast<dwflpp *>(arg)->emit_address (pool, address); +} + + +void +dwflpp::print_locals(Dwarf_Die *die, ostream &o) +{ + // Try to get the first child of die. + Dwarf_Die child; + if (dwarf_child (die, &child) == 0) + { + do + { + const char *name; + // Output each sibling's name (that is a variable or + // parameter) to 'o'. + switch (dwarf_tag (&child)) + { + case DW_TAG_variable: + case DW_TAG_formal_parameter: + name = dwarf_diename (&child); + if (name) + o << " " << name; + break; + default: + break; + } + } + while (dwarf_siblingof (&child, &child) == 0); + } +} + + +Dwarf_Attribute * +dwflpp::find_variable_and_frame_base (Dwarf_Die *scope_die, + Dwarf_Addr pc, + string const & local, + const target_symbol *e, + Dwarf_Die *vardie, + Dwarf_Attribute *fb_attr_mem) +{ + Dwarf_Die *scopes; + int nscopes = 0; + Dwarf_Attribute *fb_attr = NULL; + + assert (cu); + + nscopes = dwarf_getscopes (cu, pc, &scopes); + int sidx; + // if pc and scope_die are disjoint then we need dwarf_getscopes_die + for (sidx = 0; sidx < nscopes; sidx++) + if (scopes[sidx].addr == scope_die->addr) + break; + if (sidx == nscopes) + nscopes = dwarf_getscopes_die (scope_die, &scopes); + + if (nscopes <= 0) + { + throw semantic_error ("unable to find any scopes containing " + + lex_cast_hex<string>(pc) + + ((scope_die == NULL) ? "" + : (string (" in ") + + (dwarf_diename(scope_die) ?: "<unknown>") + + "(" + (dwarf_diename(cu) ?: "<unknown>") + + ")")) + + " while searching for local '" + local + "'", + e->tok); + } + + int declaring_scope = dwarf_getscopevar (scopes, nscopes, + local.c_str(), + 0, NULL, 0, 0, + vardie); + if (declaring_scope < 0) + { + stringstream alternatives; + print_locals (scopes, alternatives); + throw semantic_error ("unable to find local '" + local + "'" + + " near pc " + lex_cast_hex<string>(pc) + + ((scope_die == NULL) ? "" + : (string (" in ") + + (dwarf_diename(scope_die) ?: "<unknown>") + + "(" + (dwarf_diename(cu) ?: "<unknown>") + + ")")) + + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")), + e->tok); + } + + for (int inner = 0; inner < nscopes; ++inner) + { + switch (dwarf_tag (&scopes[inner])) + { + default: + continue; + case DW_TAG_subprogram: + case DW_TAG_entry_point: + case DW_TAG_inlined_subroutine: /* XXX */ + if (inner >= declaring_scope) + fb_attr = dwarf_attr_integrate (&scopes[inner], + DW_AT_frame_base, + fb_attr_mem); + break; + } + } + return fb_attr; +} + + +struct location * +dwflpp::translate_location(struct obstack *pool, + Dwarf_Attribute *attr, Dwarf_Addr pc, + Dwarf_Attribute *fb_attr, + struct location **tail, + const target_symbol *e) +{ + Dwarf_Op *expr; + size_t len; + + /* PR9768: formerly, we added pc+module_bias here. However, that bias value + is not present in the pc value by the time we get it, so adding it would + result in false negatives of variable reachibility. In other instances + further below, the c_translate_FOO functions, the module_bias value used + to be passed in, but instead should now be zero for the same reason. */ + + switch (dwarf_getlocation_addr (attr, pc /*+ module_bias*/, &expr, &len, 1)) + { + case 1: /* Should always happen. */ + if (len > 0) + break; + /* Fall through. */ + + case 0: /* Shouldn't happen. */ + throw semantic_error ("not accessible at this address", e->tok); + + default: /* Shouldn't happen. */ + case -1: + throw semantic_error (string ("dwarf_getlocation_addr failed") + + string (dwarf_errmsg (-1)), + e->tok); + } + + return c_translate_location (pool, &loc2c_error, this, + &loc2c_emit_address, + 1, 0 /* PR9768 */, + pc, expr, len, tail, fb_attr); +} + + +void +dwflpp::print_members(Dwarf_Die *vardie, ostream &o) +{ + const int typetag = dwarf_tag (vardie); + + if (typetag != DW_TAG_structure_type && typetag != DW_TAG_union_type) + { + o << " Error: " + << (dwarf_diename_integrate (vardie) ?: "<anonymous>") + << " isn't a struct/union"; + return; + } + + // Try to get the first child of vardie. + Dwarf_Die die_mem; + Dwarf_Die *die = &die_mem; + switch (dwarf_child (vardie, die)) + { + case 1: // No children. + o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") + << (dwarf_diename_integrate (die) ?: "<anonymous>") + << " is empty"; + break; + + case -1: // Error. + default: // Shouldn't happen. + o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") + << (dwarf_diename_integrate (die) ?: "<anonymous>") + << ": " << dwarf_errmsg (-1); + break; + + case 0: // Success. + break; + } + + // Output each sibling's name to 'o'. + while (dwarf_tag (die) == DW_TAG_member) + { + const char *member = dwarf_diename_integrate (die) ; + + if ( member != NULL ) + o << " " << member; + else + { + Dwarf_Die temp_die = *die; + Dwarf_Attribute temp_attr ; + + if (!dwarf_attr_integrate (&temp_die, DW_AT_type, &temp_attr)) + { + clog << "\n Error in obtaining type attribute for " + << (dwarf_diename(&temp_die)?:"<anonymous>"); + return; + } + + if (!dwarf_formref_die (&temp_attr, &temp_die)) + { + clog << "\n Error in decoding type attribute for " + << (dwarf_diename(&temp_die)?:"<anonymous>"); + return; + } + + print_members(&temp_die,o); + } + + if (dwarf_siblingof (die, &die_mem) != 0) + break; + } +} + + +bool +dwflpp::find_struct_member(const string& member, + Dwarf_Die *parentdie, + const target_symbol *e, + Dwarf_Die *memberdie, + vector<Dwarf_Attribute>& locs) +{ + Dwarf_Attribute attr; + Dwarf_Die die = *parentdie; + + switch (dwarf_child (&die, &die)) + { + case 0: /* First child found. */ + break; + case 1: /* No children. */ + return false; + case -1: /* Error. */ + default: /* Shouldn't happen */ + throw semantic_error (string (dwarf_tag(&die) == DW_TAG_union_type ? "union" : "struct") + + string (dwarf_diename_integrate (&die) ?: "<anonymous>") + + string (dwarf_errmsg (-1)), + e->tok); + } + + do + { + if (dwarf_tag(&die) != DW_TAG_member) + continue; + + const char *name = dwarf_diename_integrate(&die); + if (name == NULL) + { + // need to recurse for anonymous structs/unions + Dwarf_Die subdie; + + if (!dwarf_attr_integrate (&die, DW_AT_type, &attr) || + !dwarf_formref_die (&attr, &subdie)) + continue; + + if (find_struct_member(member, &subdie, e, memberdie, locs)) + goto success; + } + else if (name == member) + { + *memberdie = die; + goto success; + } + } + while (dwarf_siblingof (&die, &die) == 0); + + return false; + +success: + /* As we unwind the recursion, we need to build the chain of + * locations that got to the final answer. */ + if (dwarf_attr_integrate (&die, DW_AT_data_member_location, &attr)) + locs.insert(locs.begin(), attr); + + /* Union members don't usually have a location, + * but just use the containing union's location. */ + else if (dwarf_tag(parentdie) != DW_TAG_union_type) + throw semantic_error ("no location for field '" + member + + "': " + string(dwarf_errmsg (-1)), + e->tok); + + return true; +} + + +Dwarf_Die * +dwflpp::translate_components(struct obstack *pool, + struct location **tail, + Dwarf_Addr pc, + const target_symbol *e, + Dwarf_Die *vardie, + Dwarf_Die *die_mem, + Dwarf_Attribute *attr_mem) +{ + Dwarf_Die *die = NULL; + + unsigned i = 0; + + if (vardie) + *die_mem = *vardie; + + if (e->components.empty()) + return die_mem; + + while (i < e->components.size()) + { + /* XXX: This would be desirable, but we don't get the target_symbol token, + and printing that gives us the file:line number too early anyway. */ +#if 0 + // Emit a marker to note which field is being access-attempted, to give + // better error messages if deref() fails. + string piece = string(...target_symbol token...) + string ("#") + stringify(components[i].second); + obstack_printf (pool, "c->last_stmt = %s;", lex_cast_qstring(piece).c_str()); +#endif + + die = die ? dwarf_formref_die (attr_mem, die_mem) : die_mem; + const int typetag = dwarf_tag (die); + switch (typetag) + { + case DW_TAG_typedef: + case DW_TAG_const_type: + case DW_TAG_volatile_type: + /* Just iterate on the referent type. */ + break; + + case DW_TAG_pointer_type: + if (e->components[i].first == target_symbol::comp_literal_array_index) + throw semantic_error ("cannot index pointer", e->tok); + // XXX: of course, we should support this the same way C does, + // by explicit pointer arithmetic etc. PR4166. + + c_translate_pointer (pool, 1, 0 /* PR9768*/, die, tail); + break; + + case DW_TAG_array_type: + if (e->components[i].first == target_symbol::comp_literal_array_index) + { + c_translate_array (pool, 1, 0 /* PR9768 */, die, tail, + NULL, lex_cast<Dwarf_Word>(e->components[i].second)); + ++i; + } + else + throw semantic_error("bad field '" + + e->components[i].second + + "' for array type", + e->tok); + break; + + case DW_TAG_structure_type: + case DW_TAG_union_type: + if (dwarf_hasattr(die, DW_AT_declaration)) + { + Dwarf_Die *tmpdie = dwflpp::declaration_resolve(dwarf_diename(die)); + if (tmpdie == NULL) + throw semantic_error ("unresolved struct " + + string (dwarf_diename_integrate (die) ?: "<anonymous>"), + e->tok); + *die_mem = *tmpdie; + } + + { + vector<Dwarf_Attribute> locs; + if (!find_struct_member(e->components[i].second, die, e, die, locs)) + { + string alternatives; + stringstream members; + print_members(die, members); + if (members.str().size() != 0) + alternatives = " (alternatives:" + members.str(); + throw semantic_error("unable to find member '" + + e->components[i].second + "' for struct " + + string(dwarf_diename_integrate(die) ?: "<unknown>") + + alternatives, + e->tok); + } + + for (unsigned j = 0; j < locs.size(); ++j) + translate_location (pool, &locs[j], pc, NULL, tail, e); + } + + ++i; + break; + + case DW_TAG_enumeration_type: + throw semantic_error ("field '" + + e->components[i].second + + "' vs. enum type " + + string(dwarf_diename_integrate (die) ?: "<anonymous type>"), + e->tok); + break; + case DW_TAG_base_type: + throw semantic_error ("field '" + + e->components[i].second + + "' vs. base type " + + string(dwarf_diename_integrate (die) ?: "<anonymous type>"), + e->tok); + break; + case -1: + throw semantic_error ("cannot find type: " + string(dwarf_errmsg (-1)), + e->tok); + break; + + default: + throw semantic_error (string(dwarf_diename_integrate (die) ?: "<anonymous type>") + + ": unexpected type tag " + + lex_cast<string>(dwarf_tag (die)), + e->tok); + break; + } + + /* Now iterate on the type in DIE's attribute. */ + if (dwarf_attr_integrate (die, DW_AT_type, attr_mem) == NULL) + throw semantic_error ("cannot get type of field: " + string(dwarf_errmsg (-1)), e->tok); + } + return die; +} + + +Dwarf_Die * +dwflpp::resolve_unqualified_inner_typedie (Dwarf_Die *typedie_mem, + Dwarf_Attribute *attr_mem, + const target_symbol *e) +{ + Dwarf_Die *typedie; + int typetag = 0; + while (1) + { + typedie = dwarf_formref_die (attr_mem, typedie_mem); + if (typedie == NULL) + throw semantic_error ("cannot get type: " + string(dwarf_errmsg (-1)), e->tok); + typetag = dwarf_tag (typedie); + if (typetag != DW_TAG_typedef && + typetag != DW_TAG_const_type && + typetag != DW_TAG_volatile_type) + break; + if (dwarf_attr_integrate (typedie, DW_AT_type, attr_mem) == NULL) + throw semantic_error ("cannot get type of pointee: " + string(dwarf_errmsg (-1)), e->tok); + } + return typedie; +} + + +void +dwflpp::translate_final_fetch_or_store (struct obstack *pool, + struct location **tail, + Dwarf_Addr module_bias, + Dwarf_Die *die, + Dwarf_Attribute *attr_mem, + bool lvalue, + const target_symbol *e, + string &, + string &, + exp_type & ty) +{ + /* First boil away any qualifiers associated with the type DIE of + the final location to be accessed. */ + + Dwarf_Die typedie_mem; + Dwarf_Die *typedie; + int typetag; + char const *dname; + string diestr; + + typedie = resolve_unqualified_inner_typedie (&typedie_mem, attr_mem, e); + typetag = dwarf_tag (typedie); + + /* Then switch behavior depending on the type of fetch/store we + want, and the type and pointer-ness of the final location. */ + + switch (typetag) + { + default: + dname = dwarf_diename(die); + diestr = (dname != NULL) ? dname : "<unknown>"; + throw semantic_error ("unsupported type tag " + + lex_cast<string>(typetag) + + " for " + diestr, e->tok); + break; + + case DW_TAG_structure_type: + case DW_TAG_union_type: + dname = dwarf_diename(die); + diestr = (dname != NULL) ? dname : "<unknown>"; + throw semantic_error ("struct/union '" + diestr + + "' is being accessed instead of a member of the struct/union", e->tok); + break; + + case DW_TAG_enumeration_type: + case DW_TAG_base_type: + + // Reject types we can't handle in systemtap + { + dname = dwarf_diename(die); + diestr = (dname != NULL) ? dname : "<unknown>"; + + Dwarf_Attribute encoding_attr; + Dwarf_Word encoding = (Dwarf_Word) -1; + dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, &encoding_attr), + & encoding); + if (encoding < 0) + { + // clog << "bad type1 " << encoding << " diestr" << endl; + throw semantic_error ("unsupported type (mystery encoding " + lex_cast<string>(encoding) + ")" + + " for " + diestr, e->tok); + } + + if (encoding == DW_ATE_float + || encoding == DW_ATE_complex_float + /* XXX || many others? */) + { + // clog << "bad type " << encoding << " diestr" << endl; + throw semantic_error ("unsupported type (encoding " + lex_cast<string>(encoding) + ")" + + " for " + diestr, e->tok); + } + } + + ty = pe_long; + if (lvalue) + c_translate_store (pool, 1, 0 /* PR9768 */, die, typedie, tail, + "THIS->value"); + else + c_translate_fetch (pool, 1, 0 /* PR9768 */, die, typedie, tail, + "THIS->__retvalue"); + break; + + case DW_TAG_array_type: + case DW_TAG_pointer_type: + + { + Dwarf_Die pointee_typedie_mem; + Dwarf_Die *pointee_typedie; + Dwarf_Word pointee_encoding; + Dwarf_Word pointee_byte_size = 0; + + pointee_typedie = resolve_unqualified_inner_typedie (&pointee_typedie_mem, attr_mem, e); + + if (dwarf_attr_integrate (pointee_typedie, DW_AT_byte_size, attr_mem)) + dwarf_formudata (attr_mem, &pointee_byte_size); + + dwarf_formudata (dwarf_attr_integrate (pointee_typedie, DW_AT_encoding, attr_mem), + &pointee_encoding); + + if (lvalue) + { + ty = pe_long; + if (typetag == DW_TAG_array_type) + throw semantic_error ("cannot write to array address", e->tok); + assert (typetag == DW_TAG_pointer_type); + c_translate_pointer_store (pool, 1, 0 /* PR9768 */, typedie, tail, + "THIS->value"); + } + else + { + // We have the pointer: cast it to an integral type via &(*(...)) + + // NB: per bug #1187, at one point char*-like types were + // automagically converted here to systemtap string values. + // For several reasons, this was taken back out, leaving + // pointer-to-string "conversion" (copying) to tapset functions. + + ty = pe_long; + if (typetag == DW_TAG_array_type) + c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, NULL, 0); + else + c_translate_pointer (pool, 1, 0 /* PR9768 */, typedie, tail); + c_translate_addressof (pool, 1, 0 /* PR9768 */, NULL, pointee_typedie, tail, + "THIS->__retvalue"); + } + } + break; + } +} + + +string +dwflpp::express_as_string (string prelude, + string postlude, + struct location *head) +{ + size_t bufsz = 1024; + char *buf = static_cast<char*>(malloc(bufsz)); + assert(buf); + + FILE *memstream = open_memstream (&buf, &bufsz); + assert(memstream); + + fprintf(memstream, "{\n"); + fprintf(memstream, "%s", prelude.c_str()); + bool deref = c_emit_location (memstream, head, 1); + fprintf(memstream, "%s", postlude.c_str()); + fprintf(memstream, " goto out;\n"); + + // dummy use of deref_fault label, to disable warning if deref() not used + fprintf(memstream, "if (0) goto deref_fault;\n"); + + // XXX: deref flag not reliable; emit fault label unconditionally + (void) deref; + fprintf(memstream, + "deref_fault:\n" + " goto out;\n"); + fprintf(memstream, "}\n"); + + fclose (memstream); + string result(buf); + free (buf); + return result; +} + + +string +dwflpp::literal_stmt_for_local (Dwarf_Die *scope_die, + Dwarf_Addr pc, + string const & local, + const target_symbol *e, + bool lvalue, + exp_type & ty) +{ + Dwarf_Die vardie; + Dwarf_Attribute fb_attr_mem, *fb_attr = NULL; + + fb_attr = find_variable_and_frame_base (scope_die, pc, local, e, + &vardie, &fb_attr_mem); + + if (sess.verbose>2) + clog << "finding location for local '" << local + << "' near address 0x" << hex << pc + << ", module bias 0x" << module_bias << dec + << "\n"; + + Dwarf_Attribute attr_mem; + if (dwarf_attr_integrate (&vardie, DW_AT_location, &attr_mem) == NULL) + { + throw semantic_error("failed to retrieve location " + "attribute for local '" + local + + "' (dieoffset: " + + lex_cast_hex<string>(dwarf_dieoffset (&vardie)) + + ")", + e->tok); + } + +#define obstack_chunk_alloc malloc +#define obstack_chunk_free free + + struct obstack pool; + obstack_init (&pool); + struct location *tail = NULL; + + /* Given $foo->bar->baz[NN], translate the location of foo. */ + + struct location *head = translate_location (&pool, + &attr_mem, pc, fb_attr, &tail, + e); + + if (dwarf_attr_integrate (&vardie, DW_AT_type, &attr_mem) == NULL) + throw semantic_error("failed to retrieve type " + "attribute for local '" + local + "'", + e->tok); + + /* Translate the ->bar->baz[NN] parts. */ + + Dwarf_Die die_mem, *die = dwarf_formref_die (&attr_mem, &die_mem); + die = translate_components (&pool, &tail, pc, e, + die, &die_mem, &attr_mem); + + /* Translate the assignment part, either + x = $foo->bar->baz[NN] + or + $foo->bar->baz[NN] = x + */ + + string prelude, postlude; + translate_final_fetch_or_store (&pool, &tail, module_bias, + die, &attr_mem, lvalue, e, + prelude, postlude, ty); + + /* Write the translation to a string. */ + return express_as_string(prelude, postlude, head); +} + + +string +dwflpp::literal_stmt_for_return (Dwarf_Die *scope_die, + Dwarf_Addr pc, + const target_symbol *e, + bool lvalue, + exp_type & ty) +{ + if (sess.verbose>2) + clog << "literal_stmt_for_return: finding return value for " + << (dwarf_diename(scope_die) ?: "<unknown>") + << "(" + << (dwarf_diename(cu) ?: "<unknown>") + << ")\n"; + + struct obstack pool; + obstack_init (&pool); + struct location *tail = NULL; + + /* Given $return->bar->baz[NN], translate the location of return. */ + const Dwarf_Op *locops; + int nlocops = dwfl_module_return_value_location (module, scope_die, + &locops); + if (nlocops < 0) + { + throw semantic_error("failed to retrieve return value location" + " for " + + string(dwarf_diename(scope_die) ?: "<unknown>") + + "(" + string(dwarf_diename(cu) ?: "<unknown>") + + ")", + e->tok); + } + // the function has no return value (e.g. "void" in C) + else if (nlocops == 0) + { + throw semantic_error("function " + + string(dwarf_diename(scope_die) ?: "<unknown>") + + "(" + string(dwarf_diename(cu) ?: "<unknown>") + + ") has no return value", + e->tok); + } + + struct location *head = c_translate_location (&pool, &loc2c_error, this, + &loc2c_emit_address, + 1, 0 /* PR9768 */, + pc, locops, nlocops, + &tail, NULL); + + /* Translate the ->bar->baz[NN] parts. */ + + Dwarf_Attribute attr_mem; + if (dwarf_attr_integrate (scope_die, DW_AT_type, &attr_mem) == NULL) + throw semantic_error("failed to retrieve return value type attribute for " + + string(dwarf_diename(scope_die) ?: "<unknown>") + + "(" + string(dwarf_diename(cu) ?: "<unknown>") + + ")", + e->tok); + + Dwarf_Die die_mem, *die = dwarf_formref_die (&attr_mem, &die_mem); + die = translate_components (&pool, &tail, pc, e, + die, &die_mem, &attr_mem); + + /* Translate the assignment part, either + x = $return->bar->baz[NN] + or + $return->bar->baz[NN] = x + */ + + string prelude, postlude; + translate_final_fetch_or_store (&pool, &tail, module_bias, + die, &attr_mem, lvalue, e, + prelude, postlude, ty); + + /* Write the translation to a string. */ + return express_as_string(prelude, postlude, head); +} + + +string +dwflpp::literal_stmt_for_pointer (Dwarf_Die *type_die, + const target_symbol *e, + bool lvalue, + exp_type & ty) +{ + if (sess.verbose>2) + clog << "literal_stmt_for_pointer: finding value for " + << (dwarf_diename(type_die) ?: "<unknown>") + << "(" + << (dwarf_diename(cu) ?: "<unknown>") + << ")\n"; + + struct obstack pool; + obstack_init (&pool); + struct location *head = c_translate_argument (&pool, &loc2c_error, this, + &loc2c_emit_address, + 1, "THIS->pointer"); + struct location *tail = head; + + /* Translate the ->bar->baz[NN] parts. */ + + Dwarf_Attribute attr_mem; + Dwarf_Die die_mem, *die = NULL; + die = translate_components (&pool, &tail, 0, e, + type_die, &die_mem, &attr_mem); + + /* Translate the assignment part, either + x = (THIS->pointer)->bar->baz[NN] + or + (THIS->pointer)->bar->baz[NN] = x + */ + + string prelude, postlude; + translate_final_fetch_or_store (&pool, &tail, module_bias, + die, &attr_mem, lvalue, e, + prelude, postlude, ty); + + /* Write the translation to a string. */ + return express_as_string(prelude, postlude, head); +} + + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/dwflpp.h b/dwflpp.h new file mode 100644 index 00000000..042b37a9 --- /dev/null +++ b/dwflpp.h @@ -0,0 +1,368 @@ +// C++ interface to dwfl +// Copyright (C) 2005-2009 Red Hat Inc. +// Copyright (C) 2005-2007 Intel Corporation. +// Copyright (C) 2008 James.Bottomley@HansenPartnership.com +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. + +#ifndef DWFLPP_H +#define DWFLPP_H + +#include "config.h" +#include "dwarf_wrappers.h" +#include "elaborate.h" +#include "session.h" + +#include <cstring> +#include <iostream> +#include <map> +#include <set> +#include <string> +#include <vector> + +extern "C" { +#include <elfutils/libdwfl.h> +} + + +struct func_info; +struct inline_instance_info; +struct symbol_table; +struct base_query; +struct dwarf_query; + +enum line_t { ABSOLUTE, RELATIVE, RANGE, WILDCARD }; +enum info_status { info_unknown, info_present, info_absent }; + +#ifdef HAVE_TR1_UNORDERED_MAP +#include <tr1/unordered_map> +template<class T> struct stap_map { + typedef std::tr1::unordered_map<std::string, T> type; +}; +#else +#include <ext/hash_map> +template<class T> struct stap_map { + typedef __gnu_cxx::hash_map<std::string, T, stap_map> type; + size_t operator() (const std::string& s) const + { __gnu_cxx::hash<const char*> h; return h(s.c_str()); } +}; +#endif +typedef stap_map<Dwarf_Die>::type cu_function_cache_t; // function -> die +typedef stap_map<cu_function_cache_t*>::type mod_cu_function_cache_t; // module:cu -> function -> die + +typedef std::vector<func_info> func_info_map_t; +typedef std::vector<inline_instance_info> inline_instance_map_t; + + +/* XXX FIXME functions that dwflpp needs from tapsets.cxx */ +func_info_map_t *get_filtered_functions(dwarf_query *q); +inline_instance_map_t *get_filtered_inlines(dwarf_query *q); +void add_label_name(dwarf_query *q, const char *name); + + +struct +module_info +{ + Dwfl_Module* mod; + const char* name; + std::string elf_path; + Dwarf_Addr addr; + Dwarf_Addr bias; + symbol_table *sym_table; + info_status dwarf_status; // module has dwarf info? + info_status symtab_status; // symbol table cached? + + void get_symtab(dwarf_query *q); + + module_info(const char *name) : + mod(NULL), + name(name), + addr(0), + bias(0), + sym_table(NULL), + dwarf_status(info_unknown), + symtab_status(info_unknown) + {} + + ~module_info(); +}; + + +struct +module_cache +{ + std::map<std::string, module_info*> cache; + bool paths_collected; + bool dwarf_collected; + + module_cache() : paths_collected(false), dwarf_collected(false) {} +}; + + +struct func_info +{ + func_info() + : decl_file(NULL), decl_line(-1), addr(0), prologue_end(0), weak(false) + { + std::memset(&die, 0, sizeof(die)); + } + std::string name; + char const * decl_file; + int decl_line; + Dwarf_Die die; + Dwarf_Addr addr; + Dwarf_Addr entrypc; + Dwarf_Addr prologue_end; + bool weak; + + // Comparison functor for list of functions sorted by address. The + // two versions that take a Dwarf_Addr let us use the STL algorithms + // upper_bound, equal_range et al., but we don't know whether the + // searched-for value will be passed as the first or the second + // argument. + struct Compare + { + bool operator() (const func_info* f1, const func_info* f2) const + { + return f1->addr < f2->addr; + } + // For doing lookups by address. + bool operator() (Dwarf_Addr addr, const func_info* f2) const + { + return addr < f2->addr; + } + bool operator() (const func_info* f1, Dwarf_Addr addr) const + { + return f1->addr < addr; + } + }; +}; + + +struct inline_instance_info +{ + inline_instance_info() + : decl_file(NULL), decl_line(-1) + { + std::memset(&die, 0, sizeof(die)); + } + std::string name; + char const * decl_file; + int decl_line; + Dwarf_Addr entrypc; + Dwarf_Die die; +}; + + +struct dwflpp +{ + systemtap_session & sess; + + // These are "current" values we focus on. + Dwfl_Module * module; + Dwarf_Addr module_bias; + module_info * mod_info; + + // These describe the current module's PC address range + Dwarf_Addr module_start; + Dwarf_Addr module_end; + + Dwarf_Die * cu; + + std::string module_name; + std::string cu_name; + std::string function_name; + + dwflpp(systemtap_session & session, const std::string& user_module=""); + ~dwflpp(); + + void get_module_dwarf(bool required = false, bool report = true); + + void focus_on_module(Dwfl_Module * m, module_info * mi); + void focus_on_cu(Dwarf_Die * c); + void focus_on_function(Dwarf_Die * f); + + Dwarf_Die *query_cu_containing_address(Dwarf_Addr a); + + bool module_name_matches(std::string pattern); + bool name_has_wildcard(std::string pattern); + bool module_name_final_match(std::string pattern); + + bool function_name_matches_pattern(std::string name, std::string pattern); + bool function_name_matches(std::string pattern); + bool function_name_final_match(std::string pattern); + + void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, + const char *, Dwarf_Addr, + void *), + base_query *data); + + void iterate_over_cus (int (*callback)(Dwarf_Die * die, void * arg), + void * data); + + bool func_is_inline(); + + void iterate_over_inline_instances (int (* callback)(Dwarf_Die * die, void * arg), + void * data); + + Dwarf_Die *declaration_resolve(const char *name); + + mod_cu_function_cache_t cu_function_cache; + + int iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), + base_query * q, const std::string& function, + bool has_statement_num=false); + + void iterate_over_srcfile_lines (char const * srcfile, + int lines[2], + bool need_single_match, + enum line_t line_type, + void (* callback) (const dwarf_line_t& line, + void * arg), + void *data); + + void iterate_over_labels (Dwarf_Die *begin_die, + const char *sym, + const char *symfunction, + void *data, + void (* callback)(const std::string &, + const char *, + int, + Dwarf_Die *, + Dwarf_Addr, + dwarf_query *)); + + void collect_srcfiles_matching (std::string const & pattern, + std::set<char const *> & filtered_srcfiles); + + void resolve_prologue_endings (func_info_map_t & funcs); + + bool function_entrypc (Dwarf_Addr * addr); + bool die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr); + + void function_die (Dwarf_Die *d); + void function_file (char const ** c); + void function_line (int *linep); + + bool die_has_pc (Dwarf_Die & die, Dwarf_Addr pc); + + std::string literal_stmt_for_local (Dwarf_Die *scope_die, + Dwarf_Addr pc, + std::string const & local, + const target_symbol *e, + bool lvalue, + exp_type & ty); + + + std::string literal_stmt_for_return (Dwarf_Die *scope_die, + Dwarf_Addr pc, + const target_symbol *e, + bool lvalue, + exp_type & ty); + + std::string literal_stmt_for_pointer (Dwarf_Die *type_die, + const target_symbol *e, + bool lvalue, + exp_type & ty); + +private: + Dwfl * dwfl; + + // These are "current" values we focus on. + Dwarf * module_dwarf; + Dwarf_Die * function; + + std::string const default_name(char const * in, char const *); + + void setup_kernel(bool debuginfo_needed = true); + void setup_user(const std::string& module_name, bool debuginfo_needed = true); + + typedef std::map<Dwarf*, std::vector<Dwarf_Die>*> module_cu_cache_t; + module_cu_cache_t module_cu_cache; + + typedef std::map<std::string, std::vector<Dwarf_Die>*> cu_inl_function_cache_t; + cu_inl_function_cache_t cu_inl_function_cache; + static int cu_inl_function_caching_callback (Dwarf_Die* func, void *arg); + + /* The global alias cache is used to resolve any DIE found in a + * module that is stubbed out with DW_AT_declaration with a defining + * DIE found in a different module. The current assumption is that + * this only applies to structures and unions, which have a global + * namespace (it deliberately only traverses program scope), so this + * cache is indexed by name. If other declaration lookups were + * added to it, it would have to be indexed by name and tag + */ + mod_cu_function_cache_t global_alias_cache; + static int global_alias_caching_callback(Dwarf_Die *die, void *arg); + int iterate_over_globals (int (* callback)(Dwarf_Die *, void *), + void * data); + + static int cu_function_caching_callback (Dwarf_Die* func, void *arg); + + bool has_single_line_record (dwarf_query * q, char const * srcfile, int lineno); + + static void loc2c_error (void *, const char *fmt, ...); + + // This function generates code used for addressing computations of + // target variables. + void emit_address (struct obstack *pool, Dwarf_Addr address); + static void loc2c_emit_address (void *arg, struct obstack *pool, + Dwarf_Addr address); + + void print_locals(Dwarf_Die *die, std::ostream &o); + void print_members(Dwarf_Die *vardie, std::ostream &o); + + Dwarf_Attribute *find_variable_and_frame_base (Dwarf_Die *scope_die, + Dwarf_Addr pc, + std::string const & local, + const target_symbol *e, + Dwarf_Die *vardie, + Dwarf_Attribute *fb_attr_mem); + + struct location *translate_location(struct obstack *pool, + Dwarf_Attribute *attr, + Dwarf_Addr pc, + Dwarf_Attribute *fb_attr, + struct location **tail, + const target_symbol *e); + + bool find_struct_member(const std::string& member, + Dwarf_Die *parentdie, + const target_symbol *e, + Dwarf_Die *memberdie, + std::vector<Dwarf_Attribute>& locs); + + Dwarf_Die *translate_components(struct obstack *pool, + struct location **tail, + Dwarf_Addr pc, + const target_symbol *e, + Dwarf_Die *vardie, + Dwarf_Die *die_mem, + Dwarf_Attribute *attr_mem); + + Dwarf_Die *resolve_unqualified_inner_typedie (Dwarf_Die *typedie_mem, + Dwarf_Attribute *attr_mem, + const target_symbol *e); + + void translate_final_fetch_or_store (struct obstack *pool, + struct location **tail, + Dwarf_Addr module_bias, + Dwarf_Die *die, + Dwarf_Attribute *attr_mem, + bool lvalue, + const target_symbol *e, + std::string &, + std::string &, + exp_type & ty); + + std::string express_as_string (std::string prelude, + std::string postlude, + struct location *head); +}; + +#endif // DWFLPP_H + +/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx index a82a8bb6..38f8078d 100644 --- a/grapher/GraphWidget.cxx +++ b/grapher/GraphWidget.cxx @@ -281,8 +281,8 @@ namespace systemtap Glib::RefPtr<Gdk::Window> win = get_window(); if(!win) return true; - double x; - double y; + double x = 0.0; + double y = 0.0; // XXX Hint if (event->is_hint) { diff --git a/grapher/Makefile.in b/grapher/Makefile.in index 2373b6f4..fc260d60 100644 --- a/grapher/Makefile.in +++ b/grapher/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -52,7 +52,7 @@ am__DEPENDENCIES_1 = @BUILD_GRAPHER_TRUE@grapher_DEPENDENCIES = $(am__DEPENDENCIES_1) grapher_LINK = $(CXXLD) $(grapher_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -177,6 +177,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_GRAPHER_TRUE@grapher_CXXFLAGS = $(GRAPHER_CFLAGS) @@ -190,8 +191,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -313,8 +314,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -326,8 +327,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -337,13 +338,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index f89b736a..5899549c 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -19,8 +19,9 @@ #define STAP_PROBE_ADDR "\t.long " #endif +/* An allocated section .probes that holds the probe names and addrs. */ #define STAP_PROBE_DATA_(probe) \ - __asm__ volatile (".section .probes\n" \ + __asm__ volatile (".section .probes, \"a\"\n" \ "\t.align 8\n" \ "1:\n\t.asciz " #probe "\n" \ "\t.align 4\n" \ @@ -480,6 +480,7 @@ main (int argc, char * const argv []) while (true) { int long_opt; + char * num_endptr; #define LONG_OPT_KELF 1 #define LONG_OPT_KMAP 2 #define LONG_OPT_IGNORE_VMLINUX 3 @@ -531,8 +532,8 @@ main (int argc, char * const argv []) cerr << "Listing (-l) mode implies pass 2." << endl; usage (s, 1); } - s.last_pass = atoi (optarg); - if (s.last_pass < 1 || s.last_pass > 5) + s.last_pass = (int)strtoul(optarg, &num_endptr, 10); + if (*num_endptr != '\0' || s.last_pass < 1 || s.last_pass > 5) { cerr << "Invalid pass number (should be 1-5)." << endl; usage (s, 1); @@ -639,8 +640,8 @@ main (int argc, char * const argv []) break; case 's': - s.buffer_size = atoi (optarg); - if (s.buffer_size < 1 || s.buffer_size > 4095) + s.buffer_size = (int) strtoul (optarg, &num_endptr, 10); + if (*num_endptr != '\0' || s.buffer_size < 1 || s.buffer_size > 4095) { cerr << "Invalid buffer size (should be 1-4095)." << endl; usage (s, 1); @@ -652,7 +653,12 @@ main (int argc, char * const argv []) break; case 'x': - s.target_pid = atoi(optarg); + s.target_pid = (int) strtoul(optarg, &num_endptr, 10); + if (*num_endptr != '\0') + { + cerr << "Invalid target process ID number." << endl; + usage (s, 1); + } break; case 'D': diff --git a/man/stapprobes.nfs.3stap.in b/man/stapprobes.nfs.3stap.in index 579af533..14404b96 100644 --- a/man/stapprobes.nfs.3stap.in +++ b/man/stapprobes.nfs.3stap.in @@ -551,7 +551,7 @@ Fires when a previous async read operation failed .TP .B nfs.aop.readpages -Fies when in readahead way,read several pages once +Fires when in readahead way, read several pages once .B Arguments: @@ -577,7 +577,7 @@ Fies when in readahead way,read several pages once .TP .B nfs.aop.readpages.return -Fies whenever a nfs read pages operation is done +Fires whenever a nfs read pages operation is done .B Arguments: @@ -588,7 +588,7 @@ Fies whenever a nfs read pages operation is done .TP .B nfs.aop.set_page_dirty -Fies whenever set page dirty on nfs client side +Fires whenever set page dirty on nfs client side .B Arguments: @@ -602,7 +602,7 @@ Fies whenever set page dirty on nfs client side .TP .B nfs.aop.writepage -Fies whenever writing an mapped page to the server from nfs client side +Fires whenever writing an mapped page to the server from nfs client side .B Arguments: @@ -644,7 +644,7 @@ Fies whenever writing an mapped page to the server from nfs client side .TP .B nfs.aop.writepages -Fies whenever writing several dirty pages to the server from nfs client sides +Fires whenever writing several dirty pages to the server from nfs client sides .B Arguments: @@ -674,7 +674,7 @@ Fies whenever writing several dirty pages to the server from nfs client sides .TP .B nfs.aop.prepare_write -Fies whenever prepare a page for writting on nfs client sides +Fires whenever prepare a page for writing on nfs client sides .B Arguments: @@ -703,7 +703,7 @@ Fies whenever prepare a page for writting on nfs client sides .TP .B nfs.aop.commit_write -Fies often after prepare write operation +Fires often after prepare write operation .B Arguments: @@ -771,7 +771,7 @@ Fies often after prepare write operation nfs version .I filename - the name of file which client opens/searchs on server + the name of file which client opens/searches on server .I name_len the length of file name @@ -851,7 +851,7 @@ Fires when client synchronously writes file to server .TP .B nfs.proc.write.return -Fires when synchronously writting file from server is done +Fires when synchronously writing file from server is done .B Arguments: @@ -862,7 +862,7 @@ Fires when synchronously writting file from server is done .TP .B nfs.proc.commit -Fires when client writes the buffered data to disk,the buffered +Fires when client writes the buffered data to disk, the buffered data is asynchronously written by client before(not exist in NFSV2) .B Arguments: @@ -902,7 +902,7 @@ Fires when committing operation is done .B nfs.proc.read_setup Fires when client asynchronously reads file from server, -this function is used to setup a read rpc task,not do +this function is used to setup a read rpc task, not do a real read operation. .B Arguments: @@ -947,7 +947,7 @@ Fires when a read reply is received or some read error occur number of bytes read .I timestamp - time stamp ,which is used for lease renewal (only + time stamp, which is used for lease renewal (only in nfs.proc4.read_done) .P @@ -955,7 +955,7 @@ Fires when a read reply is received or some read error occur .B nfs.proc.write_setup Fires when client asynchronously write data to server, -this function is used to setup a write rpc task,not do +this function is used to setup a write rpc task, not do a write read operation. .B Arguments: @@ -976,7 +976,7 @@ a write read operation. the file offset .I how - used to set args.stable,The possible value could be: + used to set args.stable, The possible value could be: NFS_UNSTABLE, NFS_DATA_SYNC, NFS_FILE_SYNC @@ -1008,13 +1008,13 @@ Fires when a write reply is received or some write error occur result of last async write operation .I valid - fattr\->valid ,indicates which fields are valid + fattr\->valid, indicates which fields are valid .I count number of bytes written .I timestamp - time stamp ,which is used for lease renewal (only + time stamp, which is used for lease renewal (only in nfs.proc4.read_done) .P @@ -1022,7 +1022,7 @@ Fires when a write reply is received or some write error occur .B nfs.proc.commit_setup Fires when client asynchronously do a commit operation, -this function is used to setup a commit rpc task,not do +this function is used to setup a commit rpc task, not do a commit read operation. .B Arguments: @@ -1068,13 +1068,13 @@ Fires when a commit reply is received or some commit error occur result of last async write operation .I valid - fattr\->valid ,indicates which fields are valid + fattr\->valid, indicates which fields are valid .I count number of bytes written .I timestamp - time stamp ,which is used for lease renewal (only + time stamp, which is used for lease renewal (only in nfs.proc4.read_done) .P diff --git a/man/stapprobes.nfsd.3stap.in b/man/stapprobes.nfsd.3stap.in index 239d3b94..ea2ac2df 100644 --- a/man/stapprobes.nfsd.3stap.in +++ b/man/stapprobes.nfsd.3stap.in @@ -29,7 +29,7 @@ It contains the following probe points: .TP .B nfsd.proc.lookup -Fires whenever client opens/searchs file on server +Fires whenever client opens/searches file on server .B Arguments: @@ -78,7 +78,7 @@ Fires whenever client reads file on server the offset of file .I vec - struct kvec ,includes buf address in kernel address + struct kvec, includes buf address in kernel address and the length of each buffer .I vlen @@ -111,7 +111,7 @@ Fires whenever client writes data to file on server the offset of file .I vec - struct kvec ,includes buf address in kernel address + struct kvec, includes buf address in kernel address and the length of each buffer .I vlen @@ -294,7 +294,7 @@ Fires whenever server reads file the offset of file .I vec - struct kvec ,includes buf address in kernel address + struct kvec, includes buf address in kernel address and the length of each buffer .I vlen @@ -321,7 +321,7 @@ Fires whenever server writes file the offset of file .I vec - struct kvec ,includes buf address in kernel address + struct kvec, includes buf address in kernel address and the length of each buffer .I vlen @@ -348,7 +348,7 @@ Fires when server commits all pending writes to stable storage .TP .B nfsd.lookup -Fires whenever client opens/searchs file on server +Fires whenever client opens/searches file on server .B Arguments: @@ -394,7 +394,7 @@ Fires whenever client opens/searchs file on server .B nfsd.createv3 Fires when client creates a regular file or set file attributes -on server side,only called by nfsd3_proc_create and nfsd4_open +on server side, only called by nfsd3_proc_create and nfsd4_open (op_claim_type is NFS4_OPEN_CLAIM_NULL) .B Arguments: @@ -415,14 +415,14 @@ on server side,only called by nfsd3_proc_create and nfsd4_open file access mode .I createmode - create mode .The possible values could be: + create mode. The possible values could be: NFS3_CREATE_EXCLUSIVE,NFS3_CREATE_UNCHECKED,NFS3_CREATE_GUARDED .I truncp - trunp arguments, indicates if the file shouldbe truncate + trunp arguments, indicates if the file should be truncated .I verfier - file attributes (atime,mtime,mode).It's used to reset file + file attributes (atime,mtime,mode). It's used to reset file attributes for CREATE_EXCLUSIVE .P @@ -485,7 +485,7 @@ Fires whenever server closes file .TP .B nfsd.dispatch -Fires whenever server receives NFS operation from client +Fires whenever server receives NFS operation from client .B Arguments: diff --git a/man/stapprobes.rpc.3stap.in b/man/stapprobes.rpc.3stap.in index 6061b206..02b37a8b 100644 --- a/man/stapprobes.rpc.3stap.in +++ b/man/stapprobes.rpc.3stap.in @@ -375,7 +375,7 @@ Fires when an RPC client is to be processed The procedure number in the request .I rq_prot - The IP protocol of the reqeust + The IP protocol of the request .P .TP @@ -403,7 +403,7 @@ Fires when an RPC client is to be authorised The procedure number in the request .I rq_prot - The IP protocol of the reqeust + The IP protocol of the request .P .TP @@ -450,7 +450,7 @@ Fires when want to return reply to client The procedure number in the request .I rq_prot - The IP protocol of the reqeust + The IP protocol of the request .P .TP @@ -478,7 +478,7 @@ Fires when a request is to be dropped The procedure number in the request .I rq_prot - The IP protocol of the reqeust + The IP protocol of the request .P .TP diff --git a/man/stapprobes.signal.3stap.in b/man/stapprobes.signal.3stap.in index 9b7ccd5f..cdaa51b9 100644 --- a/man/stapprobes.signal.3stap.in +++ b/man/stapprobes.signal.3stap.in @@ -74,7 +74,7 @@ Fires when return from sending a signal .RS .RS -- return 0 if the signal is sucessfully sent to a process, +- return 0 if the signal is successfully sent to a process, which means the following: <1> the signal is ignored by receiving process @@ -90,7 +90,7 @@ by user using something other than kill() Return values for "send_group_sigqueue" .RS -- return 0 if the signal is either sucessfully added into the +- return 0 if the signal is either successfully added into the sigqueue of receiving process or a SI_TIMER entry is already queued so just increment the overrun count @@ -100,7 +100,7 @@ queued so just increment the overrun count Return values for "send_sigqueue" .RS -- return 0 if the signal is either sucessfully added into the +- return 0 if the signal is either successfully added into the sigqueue of receiving process or a SI_TIMER entry is already queued so just increment the overrun count @@ -186,8 +186,8 @@ Fires when wake up the process for new active signals indicate whether to wake up a task in STOPPED or TRACED state .I state_mask - a string representation indicate the mask of task states -that can be woken. Possible values are + a string representation indicate the mask of task states +that can be woken. Possible values are (TASK_INTERRUPTIBLE|TASK_STOPPED|TASK_TRACED) and TASK_INTERRUPTIBLE. diff --git a/man/stapprobes.socket.3stap.in b/man/stapprobes.socket.3stap.in index 6124e7b7..fa6f1c0a 100644 --- a/man/stapprobes.socket.3stap.in +++ b/man/stapprobes.socket.3stap.in @@ -52,7 +52,7 @@ The message sender. to convert to a string. Common values include: - 0 - IP (Internet Procotol, local interprocess communications) + 0 - IP (Internet Protocol, local interprocess communications) 6 - TCP (Transmission Control Protocol) 17 - UDP (User Datagram Protocol) 132 - SCTP (Stream Control Transmission Protocol) diff --git a/runtime/itrace.c b/runtime/itrace.c index 68f85301..3014f9e5 100644 --- a/runtime/itrace.c +++ b/runtime/itrace.c @@ -20,6 +20,11 @@ #include <linux/utrace.h> #include "ptrace_compatibility.h" +/* PR10171: To avoid ia64 lockups, disable itrace on ia64. */ +#if defined(__ia64__) +#error "Unsupported itrace architecture" +#endif + /* PR9974: Adapt to struct renaming. */ #ifdef UTRACE_API_VERSION #define utrace_attached_engine utrace_engine @@ -182,8 +187,14 @@ static u32 usr_itrace_report_signal(u32 action, if (info->si_signo != SIGTRAP || !ui) return UTRACE_RESUME; +#if defined(UTRACE_ORIG_VERSION) && defined(CONFIG_PPC) + /* Because of a ppc utrace bug, we need to stop the task here. + usr_itrace_report_quiesce() will continue stepping the task. */ + return_flags = UTRACE_SIGNAL_IGN | UTRACE_STOP | UTRACE_ACTION_NEWSTATE; +#else /* normal case: continue stepping */ return_flags = ui->step_flag | UTRACE_SIGNAL_IGN; +#endif #ifdef CONFIG_PPC if (ui->ppc_atomic_ss.step_over_atomic) { remove_atomic_ss_breakpoint(tsk, &ui->ppc_atomic_ss.end_bpt); diff --git a/runtime/map.c b/runtime/map.c index 190ba91b..74467f30 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -719,7 +719,7 @@ static MAP _stp_pmap_agg (PMAP pmap) { int i, hash; MAP m, agg; - struct map_node *ptr, *aptr; + struct map_node *ptr, *aptr = NULL; struct hlist_head *head, *ahead; struct hlist_node *e, *f; diff --git a/runtime/unwind.c b/runtime/unwind.c index aacd56f1..f03534bd 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -520,7 +520,7 @@ static u32 *_stp_search_unwind_hdr(unsigned long pc, #ifdef DEBUG_UNWIND static const char *_stp_enc_hi_name[] = { - "", + "DW_EH_PE", "DW_EH_PE_pcrel", "DW_EH_PE_textrel", "DW_EH_PE_datarel", @@ -528,15 +528,15 @@ static const char *_stp_enc_hi_name[] = { "DW_EH_PE_aligned" }; static const char *_stp_enc_lo_name[] = { - "DW_EH_PE_absptr", - "DW_EH_PE_uleb128", - "DW_EH_PE_udata2", - "DW_EH_PE_udata4", - "DW_EH_PE_udata8", - "DW_EH_PE_sleb128", - "DW_EH_PE_sdata2", - "DW_EH_PE_sdata4", - "DW_EH_PE_sdata8" + "_absptr", + "_uleb128", + "_udata2", + "_udata4", + "_udata8", + "_sleb128", + "_sdata2", + "_sdata4", + "_sdata8" }; static char *_stp_eh_enc_name(signed type) { @@ -555,8 +555,7 @@ static char *_stp_eh_enc_name(signed type) buf[0] = 0; if (type & DW_EH_PE_indirect) strlcpy(buf, "DW_EH_PE_indirect|", sizeof(buf)); - if (hi) - strlcat(buf, _stp_enc_hi_name[hi], sizeof(buf)); + strlcat(buf, _stp_enc_hi_name[hi], sizeof(buf)); if (type & DW_EH_PE_signed) low += 4; @@ -610,7 +609,7 @@ static int unwind(struct unwind_frame_info *frame, struct task_struct *tsk) startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); startLoc = adjustStartLoc(startLoc, m, s); - dbug_unwind(2, "startLoc=%lx, ptrType=%s", startLoc, _stp_eh_enc_name(ptrType)); + dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); if (!(ptrType & DW_EH_PE_indirect)) ptrType &= DW_EH_PE_FORM | DW_EH_PE_signed; endLoc = startLoc + read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); @@ -640,7 +639,7 @@ static int unwind(struct unwind_frame_info *frame, struct task_struct *tsk) ptr = (const u8 *)(fde + 2); startLoc = read_pointer(&ptr, (const u8 *)(fde + 1) + *fde, ptrType); startLoc = adjustStartLoc(startLoc, m, s); - dbug_unwind(2, "startLoc=%lx, ptrType=%s", startLoc, _stp_eh_enc_name(ptrType)); + dbug_unwind(2, "startLoc=%lx, ptrType=%s\n", startLoc, _stp_eh_enc_name(ptrType)); if (!startLoc) continue; if (!(ptrType & DW_EH_PE_indirect)) diff --git a/stap-server.8.in b/stap-server.8.in index 2ec00c24..0480b6d5 100644 --- a/stap-server.8.in +++ b/stap-server.8.in @@ -93,7 +93,7 @@ certificate database, making that server a trusted server for clients using that .PP The .I stap\-client -program is analagous to the +program is analogous to the .I stap front end except that it attempts to find a compatible systemtap server on the local network and then attempts to use that server for actions related to @@ -125,13 +125,13 @@ accepts the following: .TP .B \-\-server=\fIHOSTNAME\fR|\fIIP_ADDRESS\fR[\fB:\fIPORT\fR] -This option intructs +This option instructs .I stap\-client to use the named server instead of looking for one automatically. The server may be specified using a valid host name or ip address. If no port is specified, then .I stap\-client -searches for the server among the servers advertizing their presence on the -local network and uses the port which is being advertized. This is useful for +searches for the server among the servers advertising their presence on the +local network and uses the port which is being advertised. This is useful for connecting to a specific server on the local network. If a port is specified, then .I stap\-client @@ -181,7 +181,7 @@ server\[aq]s certificate database. .B DIRNAME This optional argument is the name of the directory containing the client\-side certificate database to which the certificate is to be added. If not specified, the -default, for non\-root users,is +default, for non\-root users, is .I $HOME/.systemtap/ssl/server\fP. For root users (EUID=0), the default is .I $sysconfdir/systemtap/ssl/server\fP. @@ -456,7 +456,7 @@ proceed in a sorted order, by ascending or descending index or value. Using the optional .BR limit keyword limits the number of loop iterations to EXP times. EXP is -evaluted once at the beginning of the loop. +evaluated once at the beginning of the loop. .TP .BR foreach " ([VAR1, VAR2, ...] " in " ARRAY [ "limit " EXP ]) STMT" Same as above, used when the array is indexed with a tuple of keys. diff --git a/stapprobes.3stap.in b/stapprobes.3stap.in index b3066611..795a9a92 100644 --- a/stapprobes.3stap.in +++ b/stapprobes.3stap.in @@ -37,7 +37,7 @@ that it is optional, and that no error should result if it fails to resolve. Optionalness passes down through all levels of alias/wildcard expansion. Alternately, a probe point may be followed by a "!" character, to indicate that it is both optional and -sufficient. (Think vaguely of the prolog cut operator.) If it does +sufficient. (Think vaguely of the Prolog cut operator.) If it does resolve, then no further probe points in the same comma-separated list will be resolved. Therefore, the "!" sufficiency mark only makes sense in a list of probe point alternatives. @@ -115,7 +115,7 @@ probe point is similar to the .IR end probe, except that each such probe handler run when the session ends after errors have occurred. In such cases, "end" probes are skipped, -but each "error" prober is still attempted. This kind of probe can be +but each "error" probe is still attempted. This kind of probe can be used to clean up or emit a "final gasp". It may also be numerically parametrized to set a sequence. @@ -606,7 +606,7 @@ The marker name string, which may contain the usual wildcard characters, is matched against the names given to the marker macros when the kernel and/or module was compiled. Optionally, you can specify .BR format("format") . -Specifying the marker format string allows differentation between two +Specifying the marker format string allows differentiation between two markers with the same name but different marker format strings. The handler associated with a marker-based probe may read the @@ -618,7 +618,7 @@ and string parameters are passed in a type-safe manner. The marker format string associated with a marker is available in .BR $format . -And also the marker name string is avalable in +And also the marker name string is available in .BR $name . .SS TRACEPOINTS @@ -669,10 +669,10 @@ Performance monitor hardware points begin with a The next part of the names the event being counted .BR counter("event") . The event names are processor implementation specific with the -execption of the generic +exception of the generic .BR cycles " and " instructions events, which are available on all processors. This sets up a counter -on the processor to count the number of events occuring on the +on the processor to count the number of events occurring on the processor. For more details on the performance monitoring events available on a specific processor use the command perfmon2 command: diff --git a/staprun.8.in b/staprun.8.in index b9993288..5fe2e7fa 100644 --- a/staprun.8.in +++ b/staprun.8.in @@ -52,7 +52,7 @@ The '_stp_target' variable will be set to PID. .TP .B \-o FILE Send output to FILE. If the module uses bulk mode, the output will -be in percpu files FILE_x(FILE_cpux in backgroud and bulk mode) +be in percpu files FILE_x(FILE_cpux in background and bulk mode) where 'x' is the cpu number. This supports strftime(3) formats for FILE. .TP diff --git a/systemtap.spec b/systemtap.spec index 23cf5bc8..cca7c810 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -30,7 +30,7 @@ Requires: kernel-devel Requires: gcc make # Suggest: kernel-debuginfo Requires: systemtap-runtime = %{version}-%{release} -BuildRequires: nss-devel +BuildRequires: nss-devel nss-tools pkgconfig %if %{with_bundled_elfutils} Source1: elfutils-%{elfutils_version}.tar.gz diff --git a/tapset-been.cxx b/tapset-been.cxx index e3bb5aee..3f693837 100644 --- a/tapset-been.cxx +++ b/tapset-been.cxx @@ -21,10 +21,10 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_BEGIN("begin"); -static string TOK_END("end"); -static string TOK_ERROR("error"); -static string TOK_NEVER("never"); +static const string TOK_BEGIN("begin"); +static const string TOK_END("end"); +static const string TOK_ERROR("error"); +static const string TOK_NEVER("never"); // ------------------------------------------------------------------------ diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx index 38304a98..ebfa57ac 100644 --- a/tapset-itrace.cxx +++ b/tapset-itrace.cxx @@ -23,9 +23,9 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_PROCESS("process"); -static string TOK_INSN("insn"); -static string TOK_BLOCK("block"); +static const string TOK_PROCESS("process"); +static const string TOK_INSN("insn"); +static const string TOK_BLOCK("block"); // ------------------------------------------------------------------------ diff --git a/tapset-mark.cxx b/tapset-mark.cxx index 1f0ef2ce..7544d7bb 100644 --- a/tapset-mark.cxx +++ b/tapset-mark.cxx @@ -27,9 +27,9 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_KERNEL("kernel"); -static string TOK_MARK("mark"); -static string TOK_FORMAT("format"); +static const string TOK_KERNEL("kernel"); +static const string TOK_MARK("mark"); +static const string TOK_FORMAT("format"); // ------------------------------------------------------------------------ diff --git a/tapset-procfs.cxx b/tapset-procfs.cxx index 3568c3d3..63a59afb 100644 --- a/tapset-procfs.cxx +++ b/tapset-procfs.cxx @@ -22,9 +22,9 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_PROCFS("procfs"); -static string TOK_READ("read"); -static string TOK_WRITE("write"); +static const string TOK_PROCFS("procfs"); +static const string TOK_READ("read"); +static const string TOK_WRITE("write"); // ------------------------------------------------------------------------ diff --git a/tapset-timers.cxx b/tapset-timers.cxx index d32a22a6..1dc0acac 100644 --- a/tapset-timers.cxx +++ b/tapset-timers.cxx @@ -22,7 +22,7 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_TIMER("timer"); +static const string TOK_TIMER("timer"); // ------------------------------------------------------------------------ diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx index 41a6f24f..64f546e6 100644 --- a/tapset-utrace.cxx +++ b/tapset-utrace.cxx @@ -23,12 +23,12 @@ using namespace std; using namespace __gnu_cxx; -static string TOK_PROCESS("process"); -static string TOK_BEGIN("begin"); -static string TOK_END("end"); -static string TOK_THREAD("thread"); -static string TOK_SYSCALL("syscall"); -static string TOK_RETURN("return"); +static const string TOK_PROCESS("process"); +static const string TOK_BEGIN("begin"); +static const string TOK_END("end"); +static const string TOK_THREAD("thread"); +static const string TOK_SYSCALL("syscall"); +static const string TOK_RETURN("return"); // ------------------------------------------------------------------------ diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp index 009b0532..9cb7a3df 100644 --- a/tapset/aux_syscalls.stp +++ b/tapset/aux_syscalls.stp @@ -60,10 +60,10 @@ function _struct_timezone_u:string(uaddr:long) %} %{ - // Needed for the following four functions - // _struct_utimbuf_actime, _struct_utimbuf_modtime, - // _struct_compat_utimbuf_actime, _struct_compat_utimbuf_modtime - #include <linux/utime.h> +// Needed for the following four functions +// _struct_utimbuf_actime, _struct_utimbuf_modtime, +// _struct_compat_utimbuf_actime, _struct_compat_utimbuf_modtime +#include <linux/utime.h> %} // Returns the value of the actime field of a utimbuf in user space diff --git a/tapset/nd_syscalls.stp b/tapset/nd_syscalls.stp index a0e5286b..32c3640e 100644 --- a/tapset/nd_syscalls.stp +++ b/tapset/nd_syscalls.stp @@ -12,9 +12,6 @@ * nd_syscalls.stp is a copy of syscalls.stp, modified to refer to * function arguments by number rather than name, so that this tapset * can be used even when the probed kernel lacks debugging information. - * - * So far, the names-to-numbers conversion covers only syscall.a* - * through syscall.c*, plus a few others. */ @@ -37,7 +34,8 @@ # accept _____________________________________________________ # long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, # int __user *upeer_addrlen) -probe nd_syscall.accept = kernel.function("sys_accept") ? { +probe nd_syscall.accept = kprobe.function("sys_accept") ? +{ name = "accept" // sockfd = $fd // addr_uaddr = $upeer_sockaddr @@ -49,14 +47,16 @@ probe nd_syscall.accept = kernel.function("sys_accept") ? { addrlen_uaddr = pointer_arg(3) argstr = sprintf("%d, %p, %p", sockfd, addr_uaddr, addrlen_uaddr) } -probe nd_syscall.accept.return = kernel.function("sys_accept").return ? { +probe nd_syscall.accept.return = kprobe.function("sys_accept").return ? +{ name = "accept" retstr = returnstr(1) } # access _____________________________________________________ # long sys_access(const char __user * filename, int mode) -probe nd_syscall.access = kernel.function("sys_access") { +probe nd_syscall.access = kprobe.function("sys_access") +{ name = "access" // pathname = user_string($filename) // mode = $mode @@ -68,22 +68,25 @@ probe nd_syscall.access = kernel.function("sys_access") { mode_str = _access_mode_str(mode) argstr = sprintf("%s, %s", user_string_quoted(pointer_arg(1)), mode_str) } -probe nd_syscall.access.return = kernel.function("sys_access").return { +probe nd_syscall.access.return = kprobe.function("sys_access").return +{ name = "access" retstr = returnstr(1) } # acct _______________________________________________________ # long sys_acct(const char __user *name) -probe nd_syscall.acct = kernel.function("sys_acct") ? { +probe nd_syscall.acct = kprobe.function("sys_acct") ? +{ name = "acct" - // filename = user_string($name) + // filename = user_string($name) // argstr = user_string_quoted($name) asmlinkage() filename = user_string(pointer_arg(1)) argstr = user_string_quoted(pointer_arg(1)) } -probe nd_syscall.acct.return = kernel.function("sys_acct").return ? { +probe nd_syscall.acct.return = kprobe.function("sys_acct").return ? +{ name = "acct" retstr = returnstr(1) } @@ -95,7 +98,8 @@ probe nd_syscall.acct.return = kernel.function("sys_acct").return ? { # size_t plen, # key_serial_t ringid) # -probe nd_syscall.add_key = kernel.function("sys_add_key") ? { +probe nd_syscall.add_key = kprobe.function("sys_add_key") ? +{ name = "add_key" // type_uaddr = $_type // description_auddr = $_description @@ -105,7 +109,7 @@ probe nd_syscall.add_key = kernel.function("sys_add_key") ? { // argstr = sprintf("%s, %s, %s, %d, %d", // user_string_quoted($_type), // user_string_quoted($_description), - // text_strn(user_string($_payload),syscall_string_trunc,1), + // text_strn(user_string($_payload), syscall_string_trunc, 1), // $plen, $ringid) asmlinkage() type_uaddr = pointer_arg(1) @@ -116,49 +120,54 @@ probe nd_syscall.add_key = kernel.function("sys_add_key") ? { argstr = sprintf("%s, %s, %s, %d, %d", user_string_quoted(type_uaddr), user_string_quoted(description_uaddr), - text_strn(user_string(payload_uaddr),syscall_string_trunc,1), + text_strn(user_string(payload_uaddr), syscall_string_trunc, 1), plen, ringid) } -probe nd_syscall.add_key.return = kernel.function("sys_add_key").return ? { +probe nd_syscall.add_key.return = kprobe.function("sys_add_key").return ? +{ name = "add_key" retstr = returnstr(1) } # adjtimex ___________________________________________________ # long sys_adjtimex(struct timex __user *txc_p) -probe nd_syscall.adjtimex = kernel.function("sys_adjtimex") { +probe nd_syscall.adjtimex = kprobe.function("sys_adjtimex") +{ name = "adjtimex" /* - * buf_offset = __uget_timex_m($txc_p,1) - * buf_freq = __uget_timex_m($txc_p,2) - * buf_maxerror = __uget_timex_m($txc_p,3) - * buf_esterror = __uget_timex_m($txc_p,4) - * buf_status = __uget_timex_m($txc_p,5) - * buf_constant = __uget_timex_m($txc_p,6) - * buf_precision = __uget_timex_m($txc_p,7) - * buf_tolerance = __uget_timex_m($txc_p,8) - * buf_time_tv_sec = __uget_timex_m($txc_p,9) - * buf_time_tv_usec = __uget_timex_m($txc_p,10) - * buf_tick = __uget_timex_m($txc_p,11) + * buf_offset = __uget_timex_m($txc_p, 1) + * buf_freq = __uget_timex_m($txc_p, 2) + * buf_maxerror = __uget_timex_m($txc_p, 3) + * buf_esterror = __uget_timex_m($txc_p, 4) + * buf_status = __uget_timex_m($txc_p, 5) + * buf_constant = __uget_timex_m($txc_p, 6) + * buf_precision = __uget_timex_m($txc_p, 7) + * buf_tolerance = __uget_timex_m($txc_p, 8) + * buf_time_tv_sec = __uget_timex_m($txc_p, 9) + * buf_time_tv_usec = __uget_timex_m($txc_p, 10) + * buf_tick = __uget_timex_m($txc_p, 11) */ // argstr = sprintf("%p", $txc_p) asmlinkage() argstr = sprintf("%p", pointer_arg(1)) } -probe nd_syscall.adjtimex.return = kernel.function("sys_adjtimex").return { +probe nd_syscall.adjtimex.return = kprobe.function("sys_adjtimex").return +{ name = "adjtimex" // retstr = _adjtimex_return_str($return) retstr = _adjtimex_return_str(returnval()) } # long compat_sys_adjtimex(struct compat_timex __user *utp) -probe nd_syscall.compat_adjtimex = kernel.function("compat_sys_adjtimex") ? { +probe nd_syscall.compat_adjtimex = kprobe.function("compat_sys_adjtimex") ? +{ name = "compat_adjtimex" // argstr = sprintf("%p", $utp) asmlinkage() argstr = sprintf("%p", pointer_arg(1)) } -probe nd_syscall.compat_adjtimex.return = kernel.function("compat_sys_adjtimex").return ? { +probe nd_syscall.compat_adjtimex.return = kprobe.function("compat_sys_adjtimex").return ? +{ name = "compat_adjtimex" retstr = returnstr(1) } @@ -167,9 +176,8 @@ probe nd_syscall.compat_adjtimex.return = kernel.function("compat_sys_adjtimex") # unsigned long sys_alarm (unsigned int seconds) # long sys32_alarm(unsigned int seconds) # -probe nd_syscall.alarm = - kernel.function("sys_alarm") ?, - kernel.function("sys32_alarm") ? +probe nd_syscall.alarm = kprobe.function("sys_alarm") ?, + kprobe.function("sys32_alarm") ? { name = "alarm" // seconds = $seconds @@ -178,62 +186,64 @@ probe nd_syscall.alarm = seconds = uint_arg(1) argstr = sprint(seconds) } -probe nd_syscall.alarm.return = - kernel.function("sys_alarm").return ?, - kernel.function("sys32_alarm").return ? +probe nd_syscall.alarm.return = kprobe.function("sys_alarm").return ?, + kprobe.function("sys32_alarm").return ? { name = "alarm" retstr = returnstr(1) } # bdflush ____________________________________________________ -# long sys_bdflush(int func,long data) -probe nd_syscall.bdflush = kernel.function("sys_bdflush") ? { +# long sys_bdflush(int func, long data) +probe nd_syscall.bdflush = kprobe.function("sys_bdflush") ? +{ name = "bdflush" // func = $func // data = $data - // if (($func>=2)&&($func%2==0)) - // data_str = sprintf("%p", $data) - // else - // data_str = sprintf("%d", $data) + // if (($func>=2)&&($func%2==0)) + // data_str = sprintf("%p", $data) + // else + // data_str = sprintf("%d", $data) asmlinkage() func = int_arg(1) data = long_arg(2) - if ((func>=2)&&(func%2==0)) - data_str = sprintf("%p", data) - else - data_str = sprintf("%d", data) - argstr = sprintf("%d, %s",func, data_str) + if ((func>=2)&&(func%2==0)) + data_str = sprintf("%p", data) + else + data_str = sprintf("%d", data) + argstr = sprintf("%d, %s", func, data_str) } -probe nd_syscall.bdflush.return = kernel.function("sys_bdflush").return ? { +probe nd_syscall.bdflush.return = kprobe.function("sys_bdflush").return ? +{ name = "bdflush" retstr = returnstr(1) } # bind _______________________________________________________ # long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) -probe nd_syscall.bind = kernel.function("sys_bind") ? { +probe nd_syscall.bind = kprobe.function("sys_bind") ? +{ name = "bind" // sockfd = $fd // my_addr_uaddr = $umyaddr // addrlen = $addrlen - // argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($umyaddr,$addrlen),$addrlen) + // argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($umyaddr, $addrlen), $addrlen) asmlinkage() sockfd = int_arg(1) my_addr_uaddr = pointer_arg(2) addrlen = int_arg(3) - argstr = sprintf("%d, %s, %d", sockfd, _struct_sockaddr_u(my_addr_uaddr,addrlen),addrlen) + argstr = sprintf("%d, %s, %d", sockfd, _struct_sockaddr_u(my_addr_uaddr, addrlen), addrlen) } -probe nd_syscall.bind.return = kernel.function("sys_bind").return ? { +probe nd_syscall.bind.return = kprobe.function("sys_bind").return ? +{ name = "bind" retstr = returnstr(1) } # brk ________________________________________________________ # unsigned long sys_brk(unsigned long brk) -probe nd_syscall.brk = - kernel.function("sys_brk"), - kernel.function("ia64_brk") ? +probe nd_syscall.brk = kprobe.function("sys_brk"), + kprobe.function("ia64_brk") ? { name = "brk" // brk = $brk @@ -241,9 +251,8 @@ probe nd_syscall.brk = brk = ulong_arg(1) argstr = sprintf("%p", brk) } -probe nd_syscall.brk.return = - kernel.function("sys_brk").return, - kernel.function("ia64_brk").return ? +probe nd_syscall.brk.return = kprobe.function("sys_brk").return, + kprobe.function("ia64_brk").return ? { name = "brk" retstr = returnstr(1) @@ -262,7 +271,8 @@ probe nd_syscall.brk.return = * functions to export. */ # long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) -probe nd_syscall.capget = kernel.function("sys_capget") { +probe nd_syscall.capget = kprobe.function("sys_capget") +{ name = "capget" // header_uaddr = $header // data_uaddr = $dataptr @@ -272,7 +282,8 @@ probe nd_syscall.capget = kernel.function("sys_capget") { data_uaddr = pointer_arg(2) argstr = sprintf("%p, %p", header_uaddr, data_uaddr) } -probe nd_syscall.capget.return = kernel.function("sys_capget").return { +probe nd_syscall.capget.return = kprobe.function("sys_capget").return +{ name = "capget" retstr = returnstr(1) } @@ -289,7 +300,8 @@ probe nd_syscall.capget.return = kernel.function("sys_capget").return { * functions to export. */ # long sys_capset(cap_user_header_t header, const cap_user_data_t data) -probe nd_syscall.capset = kernel.function("sys_capset") { +probe nd_syscall.capset = kprobe.function("sys_capset") +{ name = "capset" // header_uaddr = $header // data_uaddr = $data @@ -299,14 +311,16 @@ probe nd_syscall.capset = kernel.function("sys_capset") { data_uaddr = pointer_arg(2) argstr = sprintf("%p, %p", header_uaddr, data_uaddr) } -probe nd_syscall.capset.return = kernel.function("sys_capset").return { +probe nd_syscall.capset.return = kprobe.function("sys_capset").return +{ name = "capset" retstr = returnstr(1) } # chdir ______________________________________________________ # long sys_chdir(const char __user * filename) -probe nd_syscall.chdir = kernel.function("sys_chdir") { +probe nd_syscall.chdir = kprobe.function("sys_chdir") +{ name = "chdir" // path = user_string($filename) // argstr = user_string_quoted($filename) @@ -314,14 +328,16 @@ probe nd_syscall.chdir = kernel.function("sys_chdir") { path = user_string(pointer_arg(1)) argstr = user_string_quoted(pointer_arg(1)) } -probe nd_syscall.chdir.return = kernel.function("sys_chdir").return { +probe nd_syscall.chdir.return = kprobe.function("sys_chdir").return +{ name = "chdir" retstr = returnstr(1) } # chmod ______________________________________________________ # long sys_chmod(const char __user * filename, mode_t mode) -probe nd_syscall.chmod = kernel.function("sys_chmod") { +probe nd_syscall.chmod = kprobe.function("sys_chmod") +{ name = "chmod" // path = user_string($filename) // mode = $mode @@ -331,26 +347,29 @@ probe nd_syscall.chmod = kernel.function("sys_chmod") { mode = uint_arg(2) argstr = sprintf("%s, %#o", user_string_quoted(pointer_arg(1)), mode) } -probe nd_syscall.chmod.return = kernel.function("sys_chmod").return { +probe nd_syscall.chmod.return = kprobe.function("sys_chmod").return +{ name = "chmod" retstr = returnstr(1) } # chown ______________________________________________________ # long sys_chown(const char __user * filename, uid_t user, gid_t group) -probe nd_syscall.chown = kernel.function("sys_chown") { +probe nd_syscall.chown = kprobe.function("sys_chown") +{ name = "chown" // path = user_string($filename) // owner = __int32($user) // group = __int32($group) - // argstr = sprintf("%s, %d, %d",user_string_quoted($filename), owner, group) + // argstr = sprintf("%s, %d, %d", user_string_quoted($filename), owner, group) asmlinkage() path = user_string(pointer_arg(1)) owner = __int32(uint_arg(2)) group = __int32(uint_arg(3)) - argstr = sprintf("%s, %d, %d",user_string_quoted(pointer_arg(1)), owner, group) + argstr = sprintf("%s, %d, %d", user_string_quoted(pointer_arg(1)), owner, group) } -probe nd_syscall.chown.return = kernel.function("sys_chown").return { +probe nd_syscall.chown.return = kprobe.function("sys_chown").return +{ name = "chown" retstr = returnstr(1) } @@ -358,7 +377,8 @@ probe nd_syscall.chown.return = kernel.function("sys_chown").return { # long sys_chown16(const char __user * filename, old_uid_t user, # old_gid_t group) # -probe nd_syscall.chown16 = kernel.function("sys_chown16") ? { +probe nd_syscall.chown16 = kprobe.function("sys_chown16") ? +{ name = "chown16" // path = user_string($filename) // owner = __short($user) @@ -370,14 +390,16 @@ probe nd_syscall.chown16 = kernel.function("sys_chown16") ? { group = __short(uint_arg(3)) argstr = sprintf("%s, %d, %d", user_string_quoted(pointer_arg(1)), owner, group) } -probe nd_syscall.chown16.return = kernel.function("sys_chown16").return ? { +probe nd_syscall.chown16.return = kprobe.function("sys_chown16").return ? +{ name = "chown16" retstr = returnstr(1) } # chroot _____________________________________________________ # long sys_chroot(const char __user * filename) -probe nd_syscall.chroot = kernel.function("sys_chroot") { +probe nd_syscall.chroot = kprobe.function("sys_chroot") +{ name = "chroot" // path = user_string($filename) // argstr = user_string_quoted($filename) @@ -385,7 +407,8 @@ probe nd_syscall.chroot = kernel.function("sys_chroot") { path = user_string(pointer_arg(1)) argstr = user_string_quoted(pointer_arg(1)) } -probe nd_syscall.chroot.return = kernel.function("sys_chroot").return { +probe nd_syscall.chroot.return = kprobe.function("sys_chroot").return +{ name = "chroot" retstr = returnstr(1) } @@ -394,9 +417,8 @@ probe nd_syscall.chroot.return = kernel.function("sys_chroot").return { # long sys_clock_getres(clockid_t which_clock, struct timespec __user *tp) # long compat_clock_getres(clockid_t which_clock, struct compat_timespec __user *tp) # -probe nd_syscall.clock_getres = - kernel.function("sys_clock_getres"), - kernel.function("compat_clock_getres") ? +probe nd_syscall.clock_getres = kprobe.function("sys_clock_getres"), + kprobe.function("compat_clock_getres") ? { name = "clock_getres" // clk_id = $which_clock @@ -409,9 +431,8 @@ probe nd_syscall.clock_getres = res_uaddr = pointer_arg(2) argstr = sprintf("%s, %p", clk_id_str, res_uaddr) } -probe nd_syscall.clock_getres.return = - kernel.function("sys_clock_getres").return, - kernel.function("compat_clock_getres").return ? +probe nd_syscall.clock_getres.return = kprobe.function("sys_clock_getres").return, + kprobe.function("compat_clock_getres").return ? { name = "clock_getres" retstr = returnstr(1) @@ -420,8 +441,7 @@ probe nd_syscall.clock_getres.return = # clock_gettime ______________________________________________ # long sys_clock_gettime(clockid_t which_clock, struct timespec __user *tp) # -probe nd_syscall.clock_gettime = - kernel.function("sys_clock_gettime") +probe nd_syscall.clock_gettime = kprobe.function("sys_clock_gettime") { name = "clock_gettime" // clk_id = $which_clock @@ -432,7 +452,7 @@ probe nd_syscall.clock_gettime = clk_id_str = _get_wc_str(clk_id) argstr = sprintf("%s, %p", clk_id_str, pointer_arg(2)) } -probe nd_syscall.clock_gettime.return = kernel.function("sys_clock_gettime").return +probe nd_syscall.clock_gettime.return = kprobe.function("sys_clock_gettime").return { name = "clock_gettime" retstr = returnstr(1) @@ -444,14 +464,15 @@ probe nd_syscall.clock_gettime.return = kernel.function("sys_clock_gettime").ret # const struct timespec __user *rqtp, # struct timespec __user *rmtp) # -probe nd_syscall.clock_nanosleep = kernel.function("sys_clock_nanosleep") { +probe nd_syscall.clock_nanosleep = kprobe.function("sys_clock_nanosleep") +{ name = "clock_nanosleep" // if ($flags == 1) // flag_str = "TIMER_ABSTIME" // else // flag_str = sprintf("0x%x", $flags) // argstr = sprintf("%s, %s, %s, %p", _get_wc_str($which_clock), flag_str, - // _struct_timespec_u($rqtp,1), $rmtp) + // _struct_timespec_u($rqtp, 1), $rmtp) asmlinkage() flags = int_arg(2) if (flags == 1) @@ -459,9 +480,10 @@ probe nd_syscall.clock_nanosleep = kernel.function("sys_clock_nanosleep") { else flag_str = sprintf("0x%x", flags) argstr = sprintf("%s, %s, %s, %p", _get_wc_str(int_arg(1)), flag_str, - _struct_timespec_u(pointer_arg(3),1), pointer_arg(4)) + _struct_timespec_u(pointer_arg(3), 1), pointer_arg(4)) } -probe nd_syscall.clock_nanosleep.return = kernel.function("sys_clock_nanosleep").return { +probe nd_syscall.clock_nanosleep.return = kprobe.function("sys_clock_nanosleep").return +{ name = "clock_nanosleep" retstr = returnstr(1) } @@ -471,9 +493,8 @@ probe nd_syscall.clock_nanosleep.return = kernel.function("sys_clock_nanosleep") # struct compat_timespec __user *rqtp, # struct compat_timespec __user *rmtp) # -probe nd_syscall.compat_clock_nanosleep = - kernel.function("compat_clock_nanosleep") ?, - kernel.function("compat_sys_clock_nanosleep") ? +probe nd_syscall.compat_clock_nanosleep = kprobe.function("compat_clock_nanosleep") ?, + kprobe.function("compat_sys_clock_nanosleep") ? { name = "compat_clock_nanosleep" // if ($flags == 1) @@ -481,7 +502,7 @@ probe nd_syscall.compat_clock_nanosleep = // else // flag_str = sprintf("0x%x", $flags) // argstr = sprintf("%s, %s, %s, %p", _get_wc_str($which_clock), flag_str, - // _struct_compat_timespec_u($rqtp,1), $rmtp) + // _struct_compat_timespec_u($rqtp, 1), $rmtp) asmlinkage() flags = int_arg(2) if (flags == 1) @@ -489,12 +510,11 @@ probe nd_syscall.compat_clock_nanosleep = else flag_str = sprintf("0x%x", flags) argstr = sprintf("%s, %s, %s, %p", _get_wc_str(int_arg(1)), flag_str, - _struct_compat_timespec_u(pointer_arg(3),1), + _struct_compat_timespec_u(pointer_arg(3), 1), pointer_arg(4)) } -probe nd_syscall.compat_clock_nanosleep.return = - kernel.function("compat_clock_nanosleep").return ?, - kernel.function("compat_sys_clock_nanosleep").return ? +probe nd_syscall.compat_clock_nanosleep.return = kprobe.function("compat_clock_nanosleep").return ?, + kprobe.function("compat_sys_clock_nanosleep").return ? { name = "compat_clock_nanosleep" retstr = returnstr(1) @@ -504,68 +524,75 @@ probe nd_syscall.compat_clock_nanosleep.return = # long sys_clock_settime(clockid_t which_clock, # const struct timespec __user *tp) # -probe nd_syscall.clock_settime = kernel.function("sys_clock_settime") { +probe nd_syscall.clock_settime = kprobe.function("sys_clock_settime") +{ name = "clock_settime" // clk_id = $which_clock // clk_id_str = _get_wc_str($which_clock) // tp_uaddr = $tp - // argstr = sprintf("%s, %s", clk_id_str, _struct_timespec_u($tp,1)) + // argstr = sprintf("%s, %s", clk_id_str, _struct_timespec_u($tp, 1)) asmlinkage() clk_id = int_arg(1) clk_id_str = _get_wc_str(clk_id) tp_uaddr = pointer_arg(2) - argstr = sprintf("%s, %s", clk_id_str, _struct_timespec_u(tp_uaddr,1)) + argstr = sprintf("%s, %s", clk_id_str, _struct_timespec_u(tp_uaddr, 1)) } -probe nd_syscall.clock_settime.return = kernel.function("sys_clock_settime").return { +probe nd_syscall.clock_settime.return = kprobe.function("sys_clock_settime").return +{ name = "clock_settime" retstr = returnstr(1) } # close ______________________________________________________ # long sys_close(unsigned int fd) -probe nd_syscall.close = kernel.function("sys_close") { +probe nd_syscall.close = kprobe.function("sys_close") +{ name = "close" // fd = $fd asmlinkage() fd = int_arg(1) argstr = sprint(fd) } -probe nd_syscall.close.return = kernel.function("sys_close").return { +probe nd_syscall.close.return = kprobe.function("sys_close").return +{ name = "close" retstr = returnstr(1) } # connect ____________________________________________________ # long sys_connect(int fd, struct sockaddr __user *uservaddr, int addrlen) -probe nd_syscall.connect = kernel.function("sys_connect") ? { +probe nd_syscall.connect = kprobe.function("sys_connect") ? +{ name = "connect" // sockfd = $fd // serv_addr_uaddr = $uservaddr // addrlen = $addrlen - // argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($uservaddr,$addrlen),$addrlen) + // argstr = sprintf("%d, %s, %d", $fd, _struct_sockaddr_u($uservaddr, $addrlen), $addrlen) asmlinkage() sockfd = int_arg(1) serv_addr_uaddr = pointer_arg(2) addrlen = int_arg(3) - argstr = sprintf("%d, %s, %d", sockfd, _struct_sockaddr_u(serv_addr_uaddr,addrlen),addrlen) + argstr = sprintf("%d, %s, %d", sockfd, _struct_sockaddr_u(serv_addr_uaddr, addrlen), addrlen) } -probe nd_syscall.connect.return = kernel.function("sys_connect").return ? { +probe nd_syscall.connect.return = kprobe.function("sys_connect").return ? +{ name = "connect" retstr = returnstr(1) } # creat # long sys_creat(const char __user * pathname, int mode) -probe nd_syscall.creat = kernel.function("sys_creat") ? +probe nd_syscall.creat = kprobe.function("sys_creat") ? { name = "creat" // mode = $mode // pathname = user_string($pathname) // argstr = sprintf("%s, %#o", user_string_quoted($pathname), $mode) + asmlinkage() mode = int_arg(2) pathname = user_string(pointer_arg(1)) argstr = sprintf("%s, %#o", user_string_quoted(pointer_arg(1)), mode) } -probe nd_syscall.creat.return = kernel.function("sys_creat").return ? +probe nd_syscall.creat.return = kprobe.function("sys_creat").return ? { name = "creat" retstr = returnstr(1) @@ -573,20 +600,27 @@ probe nd_syscall.creat.return = kernel.function("sys_creat").return ? # delete_module ______________________________________________ # long sys_delete_module(const char __user *name_user, unsigned int flags) -probe nd_syscall.delete_module = kernel.function("sys_delete_module") ? { +probe nd_syscall.delete_module = kprobe.function("sys_delete_module") ? +{ name = "delete_module" - name_user = user_string($name_user) - flags = $flags - argstr = sprintf("%s, %s", user_string_quoted($name_user), _module_flags_str($flags)) + // name_user = user_string($name_user) + // flags = $flags + // argstr = sprintf("%s, %s", user_string_quoted($name_user), _module_flags_str($flags)) + asmlinkage() + name_user = user_string(pointer_arg(1)) + flags = uint_arg(2) + argstr = sprintf("%s, %s", user_string_quoted(pointer_arg(1)), _module_flags_str(uint_arg(2))) } -probe nd_syscall.delete_module.return = kernel.function("sys_delete_module").return ? { +probe nd_syscall.delete_module.return = kprobe.function("sys_delete_module").return ? +{ name = "delete_module" retstr = returnstr(1) } # dup ________________________________________________________ # long sys_dup(unsigned int fildes) -probe nd_syscall.dup = kernel.function("sys_dup") { +probe nd_syscall.dup = kprobe.function("sys_dup") +{ name = "dup" // oldfd = $fildes // argstr = sprint($fildes) @@ -594,32 +628,44 @@ probe nd_syscall.dup = kernel.function("sys_dup") { old_fd = int_arg(1) argstr = sprint(old_fd) } -probe nd_syscall.dup.return = kernel.function("sys_dup").return { +probe nd_syscall.dup.return = kprobe.function("sys_dup").return +{ name = "dup" retstr = returnstr(1) } # dup2 _______________________________________________________ # long sys_dup2(unsigned int oldfd, unsigned int newfd) -probe nd_syscall.dup2 = kernel.function("sys_dup2") { +probe nd_syscall.dup2 = kprobe.function("sys_dup2") +{ name = "dup2" - oldfd = $oldfd - newfd = $newfd - argstr = sprintf("%d, %d", $oldfd, $newfd) + // oldfd = $oldfd + // newfd = $newfd + // argstr = sprintf("%d, %d", $oldfd, $newfd) + asmlinkage() + oldfd = int_arg(1) + newfd = int_arg(2) + argstr = sprintf("%d, %d", oldfd, newfd) } -probe nd_syscall.dup2.return = kernel.function("sys_dup2").return { +probe nd_syscall.dup2.return = kprobe.function("sys_dup2").return +{ name = "dup2" retstr = returnstr(1) } # epoll_create _______________________________________________ # long sys_epoll_create(int size) -probe nd_syscall.epoll_create = kernel.function("sys_epoll_create") ? { +probe nd_syscall.epoll_create = kprobe.function("sys_epoll_create") ? +{ name = "epoll_create" - size = $size - argstr = sprint($size) + // size = $size + // argstr = sprint($size) + asmlinkage() + size = int_arg(1) + argstr = sprint(size) } -probe nd_syscall.epoll_create.return = kernel.function("sys_epoll_create").return ? { +probe nd_syscall.epoll_create.return = kprobe.function("sys_epoll_create").return ? +{ name = "epoll_create" retstr = returnstr(1) } @@ -630,21 +676,26 @@ probe nd_syscall.epoll_create.return = kernel.function("sys_epoll_create").retur # long compat_sys_epoll_ctl(int epfd, int op, int fd, # struct compat_epoll_event __user *event) # -probe nd_syscall.epoll_ctl = - kernel.function("sys_epoll_ctl") ?, - kernel.function("compat_sys_epoll_ctl") ? +probe nd_syscall.epoll_ctl = kprobe.function("sys_epoll_ctl") ?, + kprobe.function("compat_sys_epoll_ctl") ? { name = "epoll_ctl" - epfd = $epfd - op = $op - op_str = _opoll_op_str($op) - fd = $fd - event_uaddr = $event - argstr = sprintf("%d, %s, %d, %p", $epfd, _opoll_op_str($op), $fd, $event) + // epfd = $epfd + // eop = $op + // eop_str = _opoll_op_str($op) + // efd = $fd + // eevent_uaddr = $event + // eargstr = sprintf("%d, %s, %d, %p", $epfd, _opoll_op_str($op), $fd, $event) + asmlinkage() + epfd = int_arg(1) + op = int_arg(2) + op_str = _opoll_op_str(op) + fd = int_arg(3) + event_uaddr = pointer_arg(4) + argstr = sprintf("%d, %s, %d, %p", epfd, op_str, fd, event_uaddr) } -probe nd_syscall.epoll_ctl.return = - kernel.function("sys_epoll_ctl").return ?, - kernel.function("compat_sys_epoll_ctl").return ? +probe nd_syscall.epoll_ctl.return = kprobe.function("sys_epoll_ctl").return ?, + kprobe.function("compat_sys_epoll_ctl").return ? { name = "epoll_ctl" retstr = returnstr(1) @@ -661,17 +712,17 @@ probe nd_syscall.epoll_ctl.return = # const compat_sigset_t __user *sigmask, # compat_size_t sigsetsize) # -probe nd_syscall.epoll_pwait = - kernel.function("sys_epoll_pwait") ?, - kernel.function("compat_sys_epoll_pwait") ? +probe nd_syscall.epoll_pwait = kprobe.function("sys_epoll_pwait") ?, + kprobe.function("compat_sys_epoll_pwait") ? { name = "epoll_pwait" + asmlinkage() argstr = sprintf("%d, %p, %d, %d, %p, %d", - $epfd, $events, $maxevents, $timeout, $sigmask, $sigsetsize) +// $epfd, $events, $maxevents, $timeout, $sigmask, $sigsetsize) + int_arg(1), pointer_arg(2), int_arg(3), int_arg(4), pointer_arg(5), ulong_arg(6)) } -probe nd_syscall.epoll_pwait.return = - kernel.function("sys_epoll_pwait").return ?, - kernel.function("compat_sys_epoll_pwait").return ? +probe nd_syscall.epoll_pwait.return = kprobe.function("sys_epoll_pwait").return ?, + kprobe.function("compat_sys_epoll_pwait").return ? { name = "epoll_pwait" retstr = returnstr(1) @@ -685,20 +736,24 @@ probe nd_syscall.epoll_pwait.return = # struct compat_epoll_event __user *events, # int maxevents, int timeout) # -probe nd_syscall.epoll_wait = - kernel.function("sys_epoll_wait") ?, - kernel.function("compat_sys_epoll_wait") ? +probe nd_syscall.epoll_wait = kprobe.function("sys_epoll_wait") ?, + kprobe.function("compat_sys_epoll_wait") ? { name = "epoll_wait" - epfd = $epfd - events_uaddr = $events - maxevents = $maxevents - timeout = $timeout - argstr = sprintf("%d, %p, %d, %d", $epfd, $events, $maxevents, $timeout) + // epfd = $epfd + // events_uaddr = $events + // maxevents = $maxevents + // timeout = $timeout + // argstr = sprintf("%d, %p, %d, %d", $epfd, $events, $maxevents, $timeout) + asmlinkage() + epfd = int_arg(1) + events_uaddr = pointer_arg(2) + maxevents = int_arg(3) + timeout = int_arg(4) + argstr = sprintf("%d, %p, %d, %d", epfd, events_uaddr, maxevents, timeout) } -probe nd_syscall.epoll_wait.return = - kernel.function("sys_epoll_wait").return ?, - kernel.function("compat_sys_epoll_wait").return ? +probe nd_syscall.epoll_wait.return = kprobe.function("sys_epoll_wait").return ?, + kprobe.function("compat_sys_epoll_wait").return ? { name = "epoll_wait" retstr = returnstr(1) @@ -707,11 +762,15 @@ probe nd_syscall.epoll_wait.return = # eventfd _____________________________________________________ # long sys_eventfd(unsigned int count) # -probe nd_syscall.eventfd = kernel.function("sys_eventfd") ? { +probe nd_syscall.eventfd = kprobe.function("sys_eventfd") ? +{ name = "eventfd" - argstr = sprint($count) + // argstr = sprint($count) + asmlinkage() + argstr = sprint(uint_arg(1)) } -probe nd_syscall.eventfd.return = kernel.function("sys_eventfd").return ? { +probe nd_syscall.eventfd.return = kprobe.function("sys_eventfd").return ? +{ name = "eventfd" retstr = returnstr(1) } @@ -723,18 +782,21 @@ probe nd_syscall.eventfd.return = kernel.function("sys_eventfd").return ? { # char __user *__user *argv, # char __user *__user *envp, # struct pt_regs * regs) -probe nd_syscall.execve = kernel.function("do_execve") { +probe nd_syscall.execve = kprobe.function("do_execve") +{ name = "execve" // filename = kernel_string($filename) // args = __get_argv($argv, 0) // argstr = sprintf("%s %s", filename, __get_argv($argv, 1)) + asmlinkage() filename = kernel_string(pointer_arg(1)) args = __get_argv(pointer_arg(2), 0) argstr = sprintf("%s %s", filename, __get_argv(pointer_arg(2), 1)) } # v2.6.15-rc2 or earlier has problems with sys_execve return probes # another reason to probe on do_execve -probe nd_syscall.execve.return = kernel.function("do_execve").return { +probe nd_syscall.execve.return = kprobe.function("do_execve").return +{ name = "execve" retstr = returnstr(1) } @@ -742,33 +804,47 @@ probe nd_syscall.execve.return = kernel.function("do_execve").return { # compat_uptr_t __user *argv, # compat_uptr_t __user *envp, # struct pt_regs * regs) -probe nd_syscall.compat_execve = kernel.function("compat_do_execve") ? { +probe nd_syscall.compat_execve = kprobe.function("compat_do_execve") ? +{ name = "compat_execve" - filename = kernel_string($filename) - args = __get_compat_argv($argv, 0) - argstr = sprintf("%s %s", filename, __get_compat_argv($argv, 1)) + // filename = kernel_string($filename) + // args = __get_compat_argv($argv, 0) + // argstr = sprintf("%s %s", filename, __get_compat_argv($argv, 1)) + asmlinkage() + filename = kernel_string(pointer_arg(1)) + args = __get_compat_argv(pointer_arg(2), 0) + argstr = sprintf("%s %s", filename, __get_compat_argv(pointer_arg(2), 1)) } -probe nd_syscall.compat_execve.return = kernel.function("compat_do_execve").return ? { +probe nd_syscall.compat_execve.return = kprobe.function("compat_do_execve").return ? +{ name = "compat_execve" retstr = returnstr(1) } # exit _______________________________________________________ # long sys_exit(int error_code) -probe nd_syscall.exit = kernel.function("do_exit") { +probe nd_syscall.exit = kprobe.function("do_exit") +{ name = "exit" - status = $code - argstr = sprint($code) + // status = $code + // argstr = sprint($code) + asmlinkage() + status = int_arg(1) + argstr = sprint(status) } probe nd_syscall.exit.return = end {} # exit_group _________________________________________________ # void sys_exit_group(int error_code) # -probe nd_syscall.exit_group = kernel.function("sys_exit_group") { +probe nd_syscall.exit_group = kprobe.function("sys_exit_group") +{ name = "exit_group" - status = $error_code - argstr = sprint($error_code) + // status = $error_code + // argstr = sprint($error_code) + asmlinkage() + status = int_arg(1) + argstr = sprint(status) } probe nd_syscall.exit_group.return = end {} @@ -777,15 +853,23 @@ probe nd_syscall.exit_group.return = end {} # fadvise64 __________________________________________________ # long sys_fadvise64(int fd, loff_t offset, size_t len, int advice) # -probe nd_syscall.fadvise64 = kernel.function("sys_fadvise64") ? { +probe nd_syscall.fadvise64 = kprobe.function("sys_fadvise64") ? +{ name = "fadvise64" - fs = $fd - offset = $offset - len = $len - advice = $advice - argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) + // fd = $fd + // offset = $offset + // len = $len + // advice = $advice + // argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) + asmlinkage() + fd = int_arg(1) + offset = longlong_arg(2) + len = ulong_arg(3) + advice = int_arg(4) + argstr = sprintf("%d, %d, %d, %s", fd, offset, len, _fadvice_advice_str(advice)) } -probe nd_syscall.fadvise64.return = kernel.function("sys_fadvise64").return ? { +probe nd_syscall.fadvise64.return = kprobe.function("sys_fadvise64").return ? +{ name = "fadvise64" retstr = returnstr(1) } @@ -793,15 +877,23 @@ probe nd_syscall.fadvise64.return = kernel.function("sys_fadvise64").return ? { # fadvise64_64 _______________________________________________ # long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) # -probe nd_syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { +probe nd_syscall.fadvise64_64 = kprobe.function("sys_fadvise64_64") +{ name = "fadvise64_64" - fs = $fd - offset = $offset - len = $len - advice = $advice - argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) + // fd = $fd + // offset = $offset + // len = $len + // advice = $advice + // argstr = sprintf("%d, %d, %d, %s", $fd, $offset, $len, _fadvice_advice_str($advice)) + asmlinkage() + fd = int_arg(1) + offset = longlong_arg(2) + len = ulong_arg(3) + advice = int_arg(4) + argstr = sprintf("%d, %d, %d, %s", fd, offset, len, _fadvice_advice_str(advice)) } -probe nd_syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return { +probe nd_syscall.fadvise64_64.return = kprobe.function("sys_fadvise64_64").return +{ name = "fadvise64_64" retstr = returnstr(1) } @@ -811,15 +903,17 @@ probe nd_syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").retu # fadvise64 __________________________________________________ # long sys_fadvise64(int fd, loff_t offset, size_t len, int advice) # -probe nd_syscall.fadvise64 = kernel.function("sys_fadvise64") { +probe nd_syscall.fadvise64 = kprobe.function("sys_fadvise64") +{ name = "fadvise64" - fs = 0 + fd = 0 offset = 0 len = 0 advice = 0 argstr = "" } -probe nd_syscall.fadvise64.return = kernel.function("sys_fadvise64").return { +probe nd_syscall.fadvise64.return = kprobe.function("sys_fadvise64").return +{ name = "fadvise64" retstr = returnstr(1) } @@ -827,15 +921,17 @@ probe nd_syscall.fadvise64.return = kernel.function("sys_fadvise64").return { # fadvise64_64 _______________________________________________ # long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) # -probe nd_syscall.fadvise64_64 = kernel.function("sys_fadvise64_64") { +probe nd_syscall.fadvise64_64 = kprobe.function("sys_fadvise64_64") +{ name = "fadvise64_64" - fs = 0 + fd = 0 offset = 0 len = 0 advice = 0 argstr = "" } -probe nd_syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").return { +probe nd_syscall.fadvise64_64.return = kprobe.function("sys_fadvise64_64").return +{ name = "fadvise64_64" retstr = returnstr(1) } @@ -843,53 +939,77 @@ probe nd_syscall.fadvise64_64.return = kernel.function("sys_fadvise64_64").retu # fchdir _____________________________________________________ # long sys_fchdir(unsigned int fd) -probe nd_syscall.fchdir = kernel.function("sys_fchdir") { +probe nd_syscall.fchdir = kprobe.function("sys_fchdir") +{ name = "fchdir" - fd = $fd - argstr = sprint($fd) + // fd = $fd + // argstr = sprint($fd) + asmlinkage() + fd = int_arg(1) + argstr = sprint(fd) } -probe nd_syscall.fchdir.return = kernel.function("sys_fchdir").return { +probe nd_syscall.fchdir.return = kprobe.function("sys_fchdir").return +{ name = "fchdir" retstr = returnstr(1) } # fchmod _____________________________________________________ # long sys_fchmod(unsigned int fd, mode_t mode) -probe nd_syscall.fchmod = kernel.function("sys_fchmod") { +probe nd_syscall.fchmod = kprobe.function("sys_fchmod") +{ name = "fchmod" - fildes = $fd - mode = $mode - argstr = sprintf("%d, %#o", $fd, $mode) + // fildes = $fd + // mode = $mode + asmlinkage() + fildes = int_arg(1) + mode = uint_arg(2) # SAFE? + argstr = sprintf("%d, %#o", fildes, mode) } -probe nd_syscall.fchmod.return = kernel.function("sys_fchmod").return { +probe nd_syscall.fchmod.return = kprobe.function("sys_fchmod").return +{ name = "fchmod" retstr = returnstr(1) } # fchown _____________________________________________________ # long sys_fchown(unsigned int fd, uid_t user, gid_t group) -probe nd_syscall.fchown = kernel.function("sys_fchown") { +probe nd_syscall.fchown = kprobe.function("sys_fchown") +{ name = "fchown" - fd = $fd - owner = __int32($user) - group = __int32($group) - argstr = sprintf("%d, %d, %d", $fd, owner, group) + // fd = $fd + // owner = __int32($user) + // group = __int32($group) + // argstr = sprintf("%d, %d, %d", $fd, owner, group) + asmlinkage() + fd = int_arg(1) + owner = __int32(uint_arg(2)) + group = __int32(uint_arg(3)) + argstr = sprintf("%d, %d, %d", fd, owner, group) } -probe nd_syscall.fchown.return = kernel.function("sys_fchown").return { +probe nd_syscall.fchown.return = kprobe.function("sys_fchown").return +{ name = "fchown" retstr = returnstr(1) } # fchown16 ___________________________________________________ # long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) -probe nd_syscall.fchown16 = kernel.function("sys_fchown16") ? { +probe nd_syscall.fchown16 = kprobe.function("sys_fchown16") ? +{ name = "fchown16" - fd = $fd - owner = __short($user) - group = __short($group) - argstr = sprintf("%d, %d, %d", $fd, owner, group) + // fd = $fd + // owner = __short($user) + // group = __short($group) + // argstr = sprintf("%d, %d, %d", $fd, owner, group) + asmlinkage() + fd = int_arg(1) + owner = __short(uint_arg(2)) + group = __short(uint_arg(3)) + argstr = sprintf("%d, %d, %d", fd, owner, group) } -probe nd_syscall.fchown16.return = kernel.function("sys_fchown16").return ? { +probe nd_syscall.fchown16.return = kprobe.function("sys_fchown16").return ? +{ name = "fchown16" retstr = returnstr(1) } @@ -900,24 +1020,28 @@ probe nd_syscall.fchown16.return = kernel.function("sys_fchown16").return ? { # long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) # long compat_sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) # -probe nd_syscall.fcntl = - kernel.function("sys_fcntl") ?, - kernel.function("sys_fcntl64") ?, - kernel.function("compat_sys_fcntl") ?, - kernel.function("compat_sys_fcntl64") ? +probe nd_syscall.fcntl = kprobe.function("sys_fcntl") ?, + kprobe.function("sys_fcntl64") ?, + kprobe.function("compat_sys_fcntl") ?, + kprobe.function("compat_sys_fcntl64") ? { name = "fcntl" - fd = $fd - cmd = $cmd - cmd_str = _fcntl_cmd_str($cmd) - arg = $arg - argstr = sprintf("%d, %s, %p", $fd, _fcntl_cmd_str($cmd), $arg) -} -probe nd_syscall.fcntl.return = - kernel.function("sys_fcntl").return ?, - kernel.function("sys_fcntl64").return ?, - kernel.function("compat_sys_fcntl").return ?, - kernel.function("compat_sys_fcntl64").return ? + // fd = $fd + // cmd = $cmd + // cmd_str = _fcntl_cmd_str($cmd) + // arg = $arg + // argstr = sprintf("%d, %s, %p", $fd, _fcntl_cmd_str($cmd), $arg) + asmlinkage() + fd = int_arg(1) + cmd = int_arg(2) + cmd_str = _fcntl_cmd_str(cmd) + arg = long_arg(3) + argstr = sprintf("%d, %s, %p", fd, cmd_str, arg) +} +probe nd_syscall.fcntl.return = kprobe.function("sys_fcntl").return ?, + kprobe.function("sys_fcntl64").return ?, + kprobe.function("compat_sys_fcntl").return ?, + kprobe.function("compat_sys_fcntl64").return ? { name = "fcntl" retstr = returnstr(1) @@ -925,12 +1049,16 @@ probe nd_syscall.fcntl.return = # fdatasync __________________________________________________ # long sys_fdatasync(unsigned int fd) -probe nd_syscall.fdatasync = kernel.function("sys_fdatasync") { +probe nd_syscall.fdatasync = kprobe.function("sys_fdatasync") +{ name = "fdatasync" - fd = $fd + // fd = $fd + asmlinkage() + fd = int_arg(1) argstr = sprint(fd) } -probe nd_syscall.fdatasync.return = kernel.function("sys_fdatasync").return { +probe nd_syscall.fdatasync.return = kprobe.function("sys_fdatasync").return +{ name = "fdatasync" retstr = returnstr(1) } @@ -938,42 +1066,61 @@ probe nd_syscall.fdatasync.return = kernel.function("sys_fdatasync").return { # fgetxattr __________________________________________________ # ssize_t sys_fgetxattr(int fd, char __user *name, # void __user *value, size_t size) -probe nd_syscall.fgetxattr = kernel.function("sys_fgetxattr") { +probe nd_syscall.fgetxattr = kprobe.function("sys_fgetxattr") +{ name = "fgetxattr" - filedes = $fd -#FIXME - name2 = user_string($name) - value_uaddr = $value - size = $size - argstr = sprintf("%d, %s, %p, %d", filedes, user_string_quoted($name), value_uaddr, size) -} -probe nd_syscall.fgetxattr.return = kernel.function("sys_fgetxattr").return { + // filedes = $fd + // name2 = user_string($name) + // value_uaddr = $value + // size = $size + // argstr = sprintf("%d, %s, %p, %d", $fd, user_string_quoted($name), value_uaddr, size) + asmlinkage() + filedes = int_arg(1) + # FIXME + name2 = user_string(pointer_arg(2)) + value_uaddr = pointer_arg(3) + size = ulong_arg(4) + argstr = sprintf("%d, %s, %p, %d", filedes, user_string_quoted(pointer_arg(2)), value_uaddr, size) +} +probe nd_syscall.fgetxattr.return = kprobe.function("sys_fgetxattr").return +{ name = "fgetxattr" retstr = returnstr(1) } # flistxattr _________________________________________________ # ssize_t sys_flistxattr(int fd, char __user *list, size_t size) -probe nd_syscall.flistxattr = kernel.function("sys_flistxattr") { +probe nd_syscall.flistxattr = kprobe.function("sys_flistxattr") +{ name = "flistxattr" - filedes = $fd - list_uaddr = $list - size = $size + // filedes = $fd + // list_uaddr = $list + // size = $size + asmlinkage() + filedes = int_arg(1) + list_uaddr = pointer_arg(2) + size = ulong_arg(3) argstr = sprintf("%d, %p, %d", filedes, list_uaddr, size) } -probe nd_syscall.flistxattr.return = kernel.function("sys_flistxattr").return { +probe nd_syscall.flistxattr.return = kprobe.function("sys_flistxattr").return +{ name = "flistxattr" retstr = returnstr(1) } # flock ______________________________________________________ # long sys_flock(unsigned int fd, unsigned int cmd) -probe nd_syscall.flock = kernel.function("sys_flock") { +probe nd_syscall.flock = kprobe.function("sys_flock") +{ name = "flock" - fd = $fd - operation = $cmd + // fd = $fd + // operation = $cmd + asmlinkage() + fd = int_arg(1) + operation = int_arg(2) argstr = sprintf("%d, %s", fd, _flock_cmd_str(operation)) } -probe nd_syscall.flock.return = kernel.function("sys_flock").return { +probe nd_syscall.flock.return = kprobe.function("sys_flock").return +{ name = "flock" retstr = returnstr(1) } @@ -1016,13 +1163,15 @@ CATCH_DEREF_FAULT(); # unsigned long stack_size, # int __user *parent_tidptr, # int __user *child_tidptr) -probe nd_syscall.fork = kernel.function("do_fork") { +probe nd_syscall.fork = kprobe.function("do_fork") +{ // clone_flags = $clone_flags // stack_start = $stack_start // regs = $regs // stack_size = $stack_size // parent_tid_uaddr = $parent_tidptr // child_tid_uaddr = $child_tidptr + asmlinkage() clone_flags = ulong_arg(1) stack_start = ulong_arg(2) regs = pointer_arg(3) @@ -1042,19 +1191,27 @@ probe nd_syscall.fork = kernel.function("do_fork") { argstr = __fork_flags(clone_flags) } } -probe nd_syscall.fork.return = kernel.function("do_fork").return { +probe nd_syscall.fork.return = kprobe.function("do_fork").return +{ name = "fork" retstr = returnstr(1) } # fremovexattr _______________________________________________ # long sys_fremovexattr(int fd, char __user *name) -probe nd_syscall.fremovexattr = kernel.function("sys_fremovexattr") { +probe nd_syscall.fremovexattr = kprobe.function("sys_fremovexattr") +{ name = "fremovexattr" - filedes = $fd - name_uaddr = $name - argstr = sprintf("FIXME PLEASE") + // filedes = $fd + // name2 = user_string($name) + // argstr = sprintf("%d, %s", $fd, user_string_quoted($name)) + asmlinkage() + filedes = int_arg(1) + # FIXME + name2 = user_string(pointer_arg(2)) + argstr = sprintf("%d, %s", filedes, user_string_quoted(pointer_arg(2))) } -probe nd_syscall.fremovexattr.return = kernel.function("sys_fremovexattr").return { +probe nd_syscall.fremovexattr.return = kprobe.function("sys_fremovexattr").return +{ name = "fremovexattr" retstr = returnstr(1) } @@ -1068,17 +1225,26 @@ probe nd_syscall.fremovexattr.return = kernel.function("sys_fremovexattr").retur * size_t size, * int flags) */ -probe nd_syscall.fsetxattr = kernel.function("sys_fsetxattr") { +probe nd_syscall.fsetxattr = kprobe.function("sys_fsetxattr") +{ name = "fsetxattr" - filedes = $fd -# FIXME - name2 = user_string($name) - value_uaddr = $value - size = $size - flags = $flags - argstr = sprintf("%d, %s, %p, %d, %p", filedes, user_string_quoted($name), value_uaddr, size, flags) -} -probe nd_syscall.fsetxattr.return = kernel.function("sys_fsetxattr").return { + // filedes = $fd + // name2 = user_string($name) + // value_uaddr = $value + // size = $size + // flags = $flags + // argstr = sprintf("%d, %s, %p, %d, %p", filedes, user_string_quoted($name), value_uaddr, size, flags) + asmlinkage() + filedes = int_arg(1) + # FIXME + name2 = user_string(pointer_arg(2)) + value_uaddr = pointer_arg(3) + size = ulong_arg(4) + flags = int_arg(5) + argstr = sprintf("%d, %s, %p, %d, %p", filedes, user_string_quoted(pointer_arg(2)), value_uaddr, size, flags) +} +probe nd_syscall.fsetxattr.return = kprobe.function("sys_fsetxattr").return +{ name = "fsetxattr" retstr = returnstr(1) } @@ -1092,26 +1258,28 @@ probe nd_syscall.fsetxattr.return = kernel.function("sys_fsetxattr").return { # struct oldabi_stat64 __user * statbuf) # long compat_sys_newfstat(unsigned int fd, struct compat_stat __user * statbuf) # -probe nd_syscall.fstat = - kernel.function("sys_fstat") ?, - kernel.function("sys_fstat64") ?, - kernel.function("sys32_fstat64") ?, - kernel.function("sys_newfstat") ?, - kernel.function("sys_oabi_fstat64") ?, - kernel.function("compat_sys_newfstat") ? +probe nd_syscall.fstat = kprobe.function("sys_fstat") ?, + kprobe.function("sys_fstat64") ?, + kprobe.function("sys32_fstat64") ?, + kprobe.function("sys_newfstat") ?, + kprobe.function("sys_oabi_fstat64") ?, + kprobe.function("compat_sys_newfstat") ? { name = "fstat" - filedes = $fd - buf_uaddr = $statbuf - argstr = sprintf("%d, %p", $fd, $statbuf) -} -probe nd_syscall.fstat.return = - kernel.function("sys_fstat").return ?, - kernel.function("sys_fstat64").return ?, - kernel.function("sys32_fstat64").return ?, - kernel.function("sys_newfstat").return ?, - kernel.function("sys_oabi_fstat64").return ?, - kernel.function("compat_sys_newfstat").return ? + // filedes = $fd + // buf_uaddr = $statbuf + // argstr = sprintf("%d, %p", $fd, $statbuf) + asmlinkage() + filedes = int_arg(1) + buf_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", filedes, buf_uaddr) +} +probe nd_syscall.fstat.return = kprobe.function("sys_fstat").return ?, + kprobe.function("sys_fstat64").return ?, + kprobe.function("sys32_fstat64").return ?, + kprobe.function("sys_newfstat").return ?, + kprobe.function("sys_oabi_fstat64").return ?, + kprobe.function("compat_sys_newfstat").return ? { name = "fstat" retstr = returnstr(1) @@ -1122,23 +1290,26 @@ probe nd_syscall.fstat.return = # long sys_newfstatat(int dfd, char __user *filename, struct stat __user *statbuf, int flag) # long sys_fstatat64(int dfd, char __user *filename, struct stat64 __user *statbuf, int flag) # long compat_sys_newfstatat(unsigned int dfd, char __user *filename, struct compat_stat __user *statbuf, int flag) -probe nd_syscall.fstatat = - kernel.function("sys_fstatat64") ?, - kernel.function("sys_newfstatat") ?, - kernel.function("compat_sys_newfstatat") ?, - kernel.function("sys32_fstatat64") ? +probe nd_syscall.fstatat = kprobe.function("sys_fstatat64") ?, + kprobe.function("sys_newfstatat") ?, + kprobe.function("compat_sys_newfstatat") ?, + kprobe.function("sys32_fstatat64") ? { name = "fstatat" - dirfd = $dfd - path = user_string($filename) - buf_uaddr = $statbuf - argstr = sprintf("%s, %s, %p, %s", _dfd_str($dfd), user_string_quoted($filename), $statbuf, _at_flag_str($flag)) + // dirfd = $dfd + // path = user_string($filename) + // buf_uaddr = $statbuf + // argstr = sprintf("%s, %s, %p, %s", _dfd_str($dfd), user_string_quoted($filename), $statbuf, _at_flag_str($flag)) + asmlinkage() + dirfd = int_arg(1) + path = user_string(pointer_arg(2)) + buf_uaddr = pointer_arg(3) + argstr = sprintf("%s, %s, %p, %s", _dfd_str(dirfd), user_string_quoted(pointer_arg(2)), buf_uaddr, _at_flag_str(int_arg(4))) } -probe nd_syscall.fstatat.return = - kernel.function("sys_fstatat64").return ?, - kernel.function("sys_newfstatat").return ?, - kernel.function("compat_sys_newfstatat").return ?, - kernel.function("sys32_fstatat64").return ? +probe nd_syscall.fstatat.return = kprobe.function("sys_fstatat64").return ?, + kprobe.function("sys_newfstatat").return ?, + kprobe.function("compat_sys_newfstatat").return ?, + kprobe.function("sys32_fstatat64").return ? { name = "fstatat" retstr = returnstr(1) @@ -1148,18 +1319,20 @@ probe nd_syscall.fstatat.return = # long sys_fstatfs(unsigned int fd, struct statfs __user * buf) # long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user *buf) # -probe nd_syscall.fstatfs = - kernel.function("sys_fstatfs"), - kernel.function("compat_sys_fstatfs") ? +probe nd_syscall.fstatfs = kprobe.function("sys_fstatfs"), + kprobe.function("compat_sys_fstatfs") ? { name = "fstatfs" - fd = $fd - buf_uaddr = $buf - argstr = sprintf("%d, %p", $fd, $buf) + // fd = $fd + // buf_uaddr = $buf + // argstr = sprintf("%d, %p", $fd, $buf) + asmlinkage() + fd = int_arg(1) + buf_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", fd, buf_uaddr) } -probe nd_syscall.fstatfs.return = - kernel.function("sys_fstatfs").return, - kernel.function("compat_sys_fstatfs").return ? +probe nd_syscall.fstatfs.return = kprobe.function("sys_fstatfs").return, + kprobe.function("compat_sys_fstatfs").return ? { name = "fstatfs" retstr = returnstr(1) @@ -1169,19 +1342,22 @@ probe nd_syscall.fstatfs.return = # long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user *buf) # long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user *buf) # -probe nd_syscall.fstatfs64 = - kernel.function("sys_fstatfs64") ?, - kernel.function("compat_sys_fstatfs64") ? +probe nd_syscall.fstatfs64 = kprobe.function("sys_fstatfs64") ?, + kprobe.function("compat_sys_fstatfs64") ? { name = "fstatfs" - fd = $fd - sz = $sz - buf_uaddr = $buf - argstr = sprintf("%d, %d, %p", $fd, $sz, $buf) + // fd = $fd + // sz = $sz + // buf_uaddr = $buf + // argstr = sprintf("%d, %d, %p", $fd, $sz, $buf) + asmlinkage() + fd = int_arg(1) + sz = ulong_arg(2) + buf_uaddr = pointer_arg(3) + argstr = sprintf("%d, %d, %p", fd, sz, buf_uaddr) } -probe nd_syscall.fstatfs64.return = - kernel.function("sys_fstatfs64").return ?, - kernel.function("compat_sys_fstatfs64").return ? +probe nd_syscall.fstatfs64.return = kprobe.function("sys_fstatfs64").return ?, + kprobe.function("compat_sys_fstatfs64").return ? { name = "fstatfs" retstr = returnstr(1) @@ -1189,37 +1365,51 @@ probe nd_syscall.fstatfs64.return = # fsync ______________________________________________________ # long sys_fsync(unsigned int fd) -probe nd_syscall.fsync = kernel.function("sys_fsync") { +probe nd_syscall.fsync = kprobe.function("sys_fsync") +{ name = "fsync" - fd = $fd + // fd = $fd + asmlinkage() + fd = int_arg(1) argstr = sprint(fd) } -probe nd_syscall.fsync.return = kernel.function("sys_fsync").return { +probe nd_syscall.fsync.return = kprobe.function("sys_fsync").return +{ name = "fsync" retstr = returnstr(1) } # ftruncate __________________________________________________ # long sys_ftruncate(unsigned int fd, unsigned long length) -probe nd_syscall.ftruncate = kernel.function("sys_ftruncate") { +probe nd_syscall.ftruncate = kprobe.function("sys_ftruncate") +{ name = "ftruncate" - fd = $fd - length = $length + // fd = $fd + // length = $length + asmlinkage() + fd = int_arg(1) + length = ulong_arg(2) argstr = sprintf("%d, %d", fd, length) } -probe nd_syscall.ftruncate.return = kernel.function("sys_ftruncate").return { +probe nd_syscall.ftruncate.return = kprobe.function("sys_ftruncate").return +{ name = "ftruncate" retstr = returnstr(1) } # ftruncate64 ________________________________________________ # long sys_ftruncate64(unsigned int fd, loff_t length) -probe nd_syscall.ftruncate64 = kernel.function("sys_ftruncate64") ? { +probe nd_syscall.ftruncate64 = kprobe.function("sys_ftruncate64") ? +{ name = "ftruncate" - fd = $fd - length = $length + // fd = $fd + // length = $length + asmlinkage() + fd = int_arg(1) + length = longlong_arg(2) argstr = sprintf("%d, %d", fd, length) } -probe nd_syscall.ftruncate64.return = kernel.function("sys_ftruncate64").return ? { +probe nd_syscall.ftruncate64.return = kprobe.function("sys_ftruncate64").return ? +{ name = "ftruncate" retstr = returnstr(1) } @@ -1235,7 +1425,8 @@ probe nd_syscall.ftruncate64.return = kernel.function("sys_ftruncate64").return # struct compat_timespec __user *utime, u32 __user *uaddr2, # u32 val3) # -probe nd_syscall.futex = kernel.function("sys_futex") ? { +probe nd_syscall.futex = kprobe.function("sys_futex") ? +{ name = "futex" // futex_uaddr = $uaddr // op = $op @@ -1245,7 +1436,7 @@ probe nd_syscall.futex = kernel.function("sys_futex") ? { // val3 = $val3 // if (op == 0) // argstr = sprintf("%p, %s, %d, %s", $uaddr, _futex_op_str($op), - // $val, _struct_timespec_u($utime,1)) + // $val, _struct_timespec_u($utime, 1)) // else // argstr = sprintf("%p, %s, %d", $uaddr, _futex_op_str($op), // $val) @@ -1259,16 +1450,18 @@ probe nd_syscall.futex = kernel.function("sys_futex") ? { if (op == 0) argstr = sprintf("%p, %s, %d, %s", futex_uaddr, _futex_op_str(op), val, - _struct_timespec_u(utime_uaddr,1)) + _struct_timespec_u(utime_uaddr, 1)) else argstr = sprintf("%p, %s, %d", futex_uaddr, _futex_op_str(op), val) } -probe nd_syscall.futex.return = kernel.function("sys_futex").return ? { +probe nd_syscall.futex.return = kprobe.function("sys_futex").return ? +{ name = "futex" retstr = returnstr(1) } -probe nd_syscall.compat_futex = kernel.function("compat_sys_futex") ? { +probe nd_syscall.compat_futex = kprobe.function("compat_sys_futex") ? +{ name = "futex" // futex_uaddr = $uaddr // op = $op @@ -1278,7 +1471,7 @@ probe nd_syscall.compat_futex = kernel.function("compat_sys_futex") ? { // val3 = $val3 // if (op == 0) // argstr = sprintf("%p, %s, %d, %s", $uaddr, _futex_op_str($op), - // $val, _struct_compat_timespec_u($utime,1)) + // $val, _struct_compat_timespec_u($utime, 1)) // else // argstr = sprintf("%p, %s, %d", $uaddr, _futex_op_str($op), // $val) @@ -1292,12 +1485,13 @@ probe nd_syscall.compat_futex = kernel.function("compat_sys_futex") ? { if (op == 0) argstr = sprintf("%p, %s, %d, %s", futex_uaddr, _futex_op_str(op), val, - _struct_compat_timespec_u(utime_uaddr,1)) + _struct_compat_timespec_u(utime_uaddr, 1)) else argstr = sprintf("%p, %s, %d", futex_uaddr, _futex_op_str(op), val) } -probe nd_syscall.compat_futex.return = kernel.function("compat_sys_futex").return ? { +probe nd_syscall.compat_futex.return = kprobe.function("compat_sys_futex").return ? +{ name = "futex" retstr = returnstr(1) } @@ -1308,69 +1502,95 @@ probe nd_syscall.compat_futex.return = kernel.function("compat_sys_futex").retur # long compat_sys_futimesat(unsigned int dfd, char __user *filename, struct compat_timeval __user *t) # -probe nd_syscall.futimesat = kernel.function("sys_futimesat") ? { +probe nd_syscall.futimesat = kprobe.function("sys_futimesat") ? +{ name = "futimesat" - dirfd = $dfd - filename_uaddr = $filename - filename = user_string($filename) - tvp_uaddr = $utimes - argstr = sprintf("%s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), - _struct_timeval_u($utimes, 2)) -} -probe nd_syscall.compat_futimesat = kernel.function("compat_sys_futimesat") ? { + // dirfd = $dfd + // filename_uaddr = $filename + // filename = user_string($filename) + // tvp_uaddr = $utimes + // argstr = sprintf("%s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), + // _struct_timeval_u($utimes, 2)) + asmlinkage() + dirfd = int_arg(1) + filename_uaddr = pointer_arg(2) + filename = user_string(filename_uaddr) + tvp_uaddr = pointer_arg(3) + argstr = sprintf("%s, %s, %s", _dfd_str(dirfd), user_string_quoted(filename_uaddr), + _struct_timeval_u(tvp_uaddr, 2)) +} +probe nd_syscall.compat_futimesat = kprobe.function("compat_sys_futimesat") ? +{ name = "futimesat" - dirfd = $dfd - filename_uaddr = $filename - filename = user_string($filename) - tvp_uaddr = $t - argstr = sprintf("%s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), - _struct_compat_timeval_u($t, 2)) -} -probe nd_syscall.futimesat.return = kernel.function("sys_futimesat").return ? { + // dirfd = $dfd + // filename_uaddr = $filename + // filename = user_string($filename) + // tvp_uaddr = $utimes + // argstr = sprintf("%s, %s, %s", _dfd_str($dfd), user_string_quoted($filename), + // _struct_timeval_u($utimes, 2)) + asmlinkage() + dirfd = uint_arg(1) + filename_uaddr = pointer_arg(2) + filename = user_string(pointer_arg(2)) + tvp_uaddr = pointer_arg(3) + argstr = sprintf("%s, %s, %s", _dfd_str(uint_arg(1)), user_string_quoted(pointer_arg(2)), + _struct_compat_timeval_u(pointer_arg(3), 2)) +} +probe nd_syscall.futimesat.return = kprobe.function("sys_futimesat").return ? +{ name = "futimesat" retstr = returnstr(1) } -probe nd_syscall.compat_futimesat.return = kernel.function("compat_sys_futimesat").return ? { +probe nd_syscall.compat_futimesat.return = kprobe.function("compat_sys_futimesat").return ? +{ name = "futimesat" retstr = returnstr(1) } # getcwd _____________________________________________________ # long sys_getcwd(char __user *buf, unsigned long size) -probe nd_syscall.getcwd = kernel.function("sys_getcwd") { +probe nd_syscall.getcwd = kprobe.function("sys_getcwd") +{ name = "getcwd" - buf_uaddr = $buf - size = $size + // buf_uaddr = $buf + // size = $size + asmlinkage() + buf_uaddr = pointer_arg(1) + size = ulong_arg(2) argstr = sprintf("%p, %d", buf_uaddr, size) } -probe nd_syscall.getcwd.return = kernel.function("sys_getcwd").return { +probe nd_syscall.getcwd.return = kprobe.function("sys_getcwd").return +{ name = "getcwd" retstr = returnstr(1) } # getdents ___________________________________________________ # long sys_getdents(unsigned int fd, struct linux_dirent __user * dirent, unsigned int count) -# long compat_sys_getdents(unsigned int fd,struct compat_linux_dirent __user *dirent, unsigned int count) +# long compat_sys_getdents(unsigned int fd, struct compat_linux_dirent __user *dirent, unsigned int count) # long sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count) # long compat_sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count) # -probe nd_syscall.getdents = - kernel.function("sys_getdents") ?, - kernel.function("sys_getdents64") ?, - kernel.function("compat_sys_getdents") ?, - kernel.function("compat_sys_getdents64") ? +probe nd_syscall.getdents = kprobe.function("sys_getdents") ?, + kprobe.function("sys_getdents64") ?, + kprobe.function("compat_sys_getdents") ?, + kprobe.function("compat_sys_getdents64") ? { name = "getdents" - fd = $fd - dirp_uaddr = $dirent - count = $count - argstr = sprintf("%d, %p, %d", $fd, $dirent, $count) + // fd = $fd + // dirp_uaddr = $dirent + // count = $count + // argstr = sprintf("%d, %p, %d", $fd, $dirent, $count) + asmlinkage() + fd = int_arg(1) + dirp_uaddr = pointer_arg(2) + count = uint_arg(3) + argstr = sprintf("%d, %p, %d", fd, dirp_uaddr, count) } -probe nd_syscall.getdents.return = - kernel.function("sys_getdents").return ?, - kernel.function("sys_getdents64").return ?, - kernel.function("compat_sys_getdents").return ?, - kernel.function("compat_sys_getdents64").return ? +probe nd_syscall.getdents.return = kprobe.function("sys_getdents").return ?, + kprobe.function("sys_getdents64").return ?, + kprobe.function("compat_sys_getdents").return ?, + kprobe.function("compat_sys_getdents64").return ? { name = "getdents" retstr = returnstr(1) @@ -1381,18 +1601,16 @@ probe nd_syscall.getdents.return = # long sys_getegid16(void) # long sys32_getegid16(void) # -probe nd_syscall.getegid = - kernel.function("sys_getegid16") ?, - kernel.function("sys32_getegid16") ?, - kernel.function("sys_getegid") +probe nd_syscall.getegid = kprobe.function("sys_getegid16") ?, + kprobe.function("sys32_getegid16") ?, + kprobe.function("sys_getegid") { name = "getegid" argstr = "" } -probe nd_syscall.getegid.return = - kernel.function("sys_getegid16").return ?, - kernel.function("sys32_getegid16").return ?, - kernel.function("sys_getegid").return +probe nd_syscall.getegid.return = kprobe.function("sys_getegid16").return ?, + kprobe.function("sys32_getegid16").return ?, + kprobe.function("sys_getegid").return { name = "getegid" retstr = returnstr(1) @@ -1402,18 +1620,16 @@ probe nd_syscall.getegid.return = # long sys_geteuid(void) # long sys32_geteuid16(void) # -probe nd_syscall.geteuid = - kernel.function("sys_geteuid16") ?, - kernel.function("sys32_geteuid16") ?, - kernel.function("sys_geteuid") +probe nd_syscall.geteuid = kprobe.function("sys_geteuid16") ?, + kprobe.function("sys32_geteuid16") ?, + kprobe.function("sys_geteuid") { name = "geteuid" argstr = "" } -probe nd_syscall.geteuid.return = - kernel.function("sys_geteuid16").return ?, - kernel.function("sys32_geteuid16").return ?, - kernel.function("sys_geteuid").return +probe nd_syscall.geteuid.return = kprobe.function("sys_geteuid16").return ?, + kprobe.function("sys32_geteuid16").return ?, + kprobe.function("sys_geteuid").return { name = "geteuid" retstr = returnstr(1) @@ -1423,18 +1639,16 @@ probe nd_syscall.geteuid.return = # long sys_getgid(void) # long sys32_getgid16(void) # -probe nd_syscall.getgid = - kernel.function("sys_getgid16") ?, - kernel.function("sys32_getgid16") ?, - kernel.function("sys_getgid") +probe nd_syscall.getgid = kprobe.function("sys_getgid16") ?, + kprobe.function("sys32_getgid16") ?, + kprobe.function("sys_getgid") { name = "getgid" argstr = "" } -probe nd_syscall.getgid.return = - kernel.function("sys_getgid16").return ?, - kernel.function("sys32_getgid16").return ?, - kernel.function("sys_getgid").return +probe nd_syscall.getgid.return = kprobe.function("sys_getgid16").return ?, + kprobe.function("sys32_getgid16").return ?, + kprobe.function("sys_getgid").return { name = "getgid" retstr = returnstr(1) @@ -1445,20 +1659,22 @@ probe nd_syscall.getgid.return = # long sys_getgroups16(int gidsetsize, old_gid_t __user *grouplist) # long sys32_getgroups16(int gidsetsize, u16 __user *grouplist) # -probe nd_syscall.getgroups = - kernel.function("sys_getgroups") ?, - kernel.function("sys_getgroups16") ?, - kernel.function("sys32_getgroups16") ? +probe nd_syscall.getgroups = kprobe.function("sys_getgroups") ?, + kprobe.function("sys_getgroups16") ?, + kprobe.function("sys32_getgroups16") ? { name = "getgroups" - size = $gidsetsize - list_uaddr = $grouplist - argstr = sprintf("%d, %p", $gidsetsize, $grouplist) + // size = $gidsetsize + // list_uaddr = $grouplist + // argstr = sprintf("%d, %p", $gidsetsize, $grouplist) + asmlinkage() + size = int_arg(1) + list_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", size, list_uaddr) } -probe nd_syscall.getgroups.return = - kernel.function("sys_getgroups").return ?, - kernel.function("sys_getgroups16").return ?, - kernel.function("sys32_getgroups16").return ? +probe nd_syscall.getgroups.return = kprobe.function("sys_getgroups").return ?, + kprobe.function("sys_getgroups16").return ?, + kprobe.function("sys32_getgroups16").return ? { name = "getgroups" retstr = returnstr(1) @@ -1466,13 +1682,18 @@ probe nd_syscall.getgroups.return = # gethostname ________________________________________________ # long sys_gethostname(char __user *name, int len) -probe nd_syscall.gethostname = kernel.function("sys_gethostname") ? { +probe nd_syscall.gethostname = kprobe.function("sys_gethostname") ? +{ name = "gethostname" - name_uaddr = $name - len = $len + // name_uaddr = $name + // len = $len + asmlinkage() + name_uaddr = pointer_arg(1) + len = int_arg(2) argstr = sprintf ("%p, %d", name_uaddr, len) } -probe nd_syscall.gethostname.return = kernel.function("sys_gethostname").return ? { +probe nd_syscall.gethostname.return = kprobe.function("sys_gethostname").return ? +{ name = "gethostname" retstr = returnstr(1) } @@ -1480,24 +1701,36 @@ probe nd_syscall.gethostname.return = kernel.function("sys_gethostname").return # getitimer __________________________________________________ # sys_getitimer(int which, struct itimerval __user *value) # -probe nd_syscall.getitimer = kernel.function("sys_getitimer") { +probe nd_syscall.getitimer = kprobe.function("sys_getitimer") +{ name = "getitimer" - which = $which - value_uaddr = $value - argstr = sprintf("%s, %p", _itimer_which_str($which), $value) + // which = $which + // value_uaddr = $value + // argstr = sprintf("%s, %p", _itimer_which_str($which), $value) + asmlinkage() + which = int_arg(1) + value_uaddr = pointer_arg(2) + argstr = sprintf("%s, %p", _itimer_which_str(which), value_uaddr ) } -probe nd_syscall.getitimer.return = kernel.function("sys_getitimer").return { +probe nd_syscall.getitimer.return = kprobe.function("sys_getitimer").return +{ name = "getitimer" retstr = returnstr(1) } # long compat_sys_getitimer(int which, struct compat_itimerval __user *it -probe nd_syscall.compat_getitimer = kernel.function("compat_sys_getitimer") ? { +probe nd_syscall.compat_getitimer = kprobe.function("compat_sys_getitimer") ? +{ name = "getitimer" - which = $which - value_uaddr = $it - argstr = sprintf("%s, %p", _itimer_which_str($which), $it) + // which = $which + // value_uaddr = $it + // argstr = sprintf("%s, %p", _itimer_which_str($which), $it) + asmlinkage() + which = int_arg(1) + value_uaddr = pointer_arg(2) + argstr = sprintf("%s, %p", _itimer_which_str(which), value_uaddr) } -probe nd_syscall.compat_getitimer.return = kernel.function("compat_sys_getitimer").return ? { +probe nd_syscall.compat_getitimer.return = kprobe.function("compat_sys_getitimer").return ? +{ name = "getitimer" retstr = returnstr(1) } @@ -1513,22 +1746,28 @@ probe nd_syscall.compat_getitimer.return = kernel.function("compat_sys_getitimer # compat_ulong_t maxnode, # compat_ulong_t addr, compat_ulong_t flags) # -probe nd_syscall.get_mempolicy = - kernel.function("sys_get_mempolicy") ?, - kernel.function("compat_sys_get_mempolicy") ? +probe nd_syscall.get_mempolicy = kprobe.function("sys_get_mempolicy") ?, + kprobe.function("compat_sys_get_mempolicy") ? { name = "get_mempolicy" - policy_uaddr = $policy - nmask_uaddr = $nmask - maxnode = $maxnode - addr = $addr - flags = $flags - argstr = sprintf("%p, %p, %d, %p, 0x%x", $policy, - $nmask, $maxnode, $addr, $flags) -} -probe nd_syscall.get_mempolicy.return = - kernel.function("sys_get_mempolicy").return ?, - kernel.function("compat_sys_get_mempolicy").return ? + // policy_uaddr = $policy + // nmask_uaddr = $nmask + // maxnode = $maxnode + // addr = $addr + // flags = $flags + // argstr = sprintf("%p, %p, %d, %p, 0x%x", $policy, + // $nmask, $maxnode, $addr, $flags) + asmlinkage() + policy_uaddr = pointer_arg(1) + nmask_uaddr = pointer_arg(2) + maxnode = ulong_arg(3) + addr = ulong_arg(4) + flags = ulong_arg(5) + argstr = sprintf("%p, %p, %d, %p, 0x%x", policy_uaddr, + nmask_uaddr, maxnode, addr, flags) +} +probe nd_syscall.get_mempolicy.return = kprobe.function("sys_get_mempolicy").return ?, + kprobe.function("compat_sys_get_mempolicy").return ? { name = "get_mempolicy" retstr = returnstr(1) @@ -1537,72 +1776,95 @@ probe nd_syscall.get_mempolicy.return = # getpeername ________________________________________________ # long sys_getpeername(int fd, struct sockaddr __user *usockaddr, int __user *usockaddr_len) # -probe nd_syscall.getpeername = kernel.function("sys_getpeername") ? { +probe nd_syscall.getpeername = kprobe.function("sys_getpeername") ? +{ name = "getpeername" - s = $fd - name_uaddr = $usockaddr - namelen_uaddr = $usockaddr_len - argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) + // s = $fd + // name_uaddr = $usockaddr + // namelen_uaddr = $usockaddr_len + // argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) + asmlinkage() + s = int_arg(1) + name_uaddr = pointer_arg(2) + namelen_uaddr = pointer_arg(3) + argstr = sprintf("%d, %p, %p", s, name_uaddr, namelen_uaddr) } -probe nd_syscall.getpeername.return = kernel.function("sys_getpeername").return ? { +probe nd_syscall.getpeername.return = kprobe.function("sys_getpeername").return ? +{ name = "getpeername" retstr = returnstr(1) } # getpgid ____________________________________________________ # long sys_getpgid(pid_t pid) -probe nd_syscall.getpgid = kernel.function("sys_getpgid") { +probe nd_syscall.getpgid = kprobe.function("sys_getpgid") +{ name = "getpgid" - pid = $pid - argstr = sprintf("%d", $pid) + // pid = $pid + // argstr = sprintf("%d", $pid) + asmlinkage() + pid = int_arg(1) + argstr = sprintf("%d", pid) } -probe nd_syscall.getpgid.return = kernel.function("sys_getpgid").return { +probe nd_syscall.getpgid.return = kprobe.function("sys_getpgid").return +{ name = "getpgid" retstr = returnstr(1) } # getpgrp ____________________________________________________ # long sys_getpgrp(void) -probe nd_syscall.getpgrp = kernel.function("sys_getpgrp") ? { +probe nd_syscall.getpgrp = kprobe.function("sys_getpgrp") ? +{ name = "getpgrp" argstr = "" } -probe nd_syscall.getpgrp.return = kernel.function("sys_getpgrp").return ? { +probe nd_syscall.getpgrp.return = kprobe.function("sys_getpgrp").return ? +{ name = "getpgrp" retstr = returnstr(1) } # getpid _____________________________________________________ # long sys_getpid(void) -probe nd_syscall.getpid = kernel.function("sys_getpid") { +probe nd_syscall.getpid = kprobe.function("sys_getpid") +{ name = "getpid" argstr = "" } -probe nd_syscall.getpid.return = kernel.function("sys_getpid").return { +probe nd_syscall.getpid.return = kprobe.function("sys_getpid").return +{ name = "getpid" retstr = returnstr(1) } # getppid ____________________________________________________ # long sys_getppid(void) -probe nd_syscall.getppid = kernel.function("sys_getppid") { +probe nd_syscall.getppid = kprobe.function("sys_getppid") +{ name = "getppid" argstr = "" } -probe nd_syscall.getppid.return = kernel.function("sys_getppid").return { +probe nd_syscall.getppid.return = kprobe.function("sys_getppid").return +{ name = "getppid" retstr = returnstr(1) } # getpriority ________________________________________________ # long sys_getpriority(int which, int who) -probe nd_syscall.getpriority = kernel.function("sys_getpriority") { +probe nd_syscall.getpriority = kprobe.function("sys_getpriority") +{ name = "getpriority" - which = $which - who = $who + // which = $which + // who = $who + asmlinkage() + which = int_arg(1) + who = int_arg(2) argstr = sprintf("%s, %d", _priority_which_str(which), who) } -probe nd_syscall.getpriority.return = kernel.function("sys_getpriority").return { +probe nd_syscall.getpriority.return = kprobe.function("sys_getpriority").return +{ name = "getpriority" retstr = returnstr(1) } @@ -1614,19 +1876,22 @@ probe nd_syscall.getpriority.return = kernel.function("sys_getpriority").return # long sys_getresgid16(old_uid_t __user *rgid, # old_uid_t __user *egid, # old_uid_t __user *sgid) -probe nd_syscall.getresgid = - kernel.function("sys_getresgid16") ?, - kernel.function("sys_getresgid") +probe nd_syscall.getresgid = kprobe.function("sys_getresgid16") ?, + kprobe.function("sys_getresgid") { name = "getresgid" - rgid_uaddr = $rgid - egid_uaddr = $egid - sgid_uaddr = $sgid - argstr = sprintf("%p, %p, %p", $rgid, $egid, $sgid) + // rgid_uaddr = $rgid + // egid_uaddr = $egid + // sgid_uaddr = $sgid + // argstr = sprintf("%p, %p, %p", $rgid, $egid, $sgid) + asmlinkage() + rgid_uaddr = pointer_arg(1) + egid_uaddr = pointer_arg(2) + sgid_uaddr = pointer_arg(3) + argstr = sprintf("%p, %p, %p", rgid_uaddr, egid_uaddr, sgid_uaddr) } -probe nd_syscall.getresgid.return = - kernel.function("sys_getresgid16").return ?, - kernel.function("sys_getresgid").return +probe nd_syscall.getresgid.return = kprobe.function("sys_getresgid16").return ?, + kprobe.function("sys_getresgid").return { name = "getresgid" retstr = returnstr(1) @@ -1636,19 +1901,22 @@ probe nd_syscall.getresgid.return = # long sys_getresuid(uid_t __user *ruid, # uid_t __user *euid, # uid_t __user *suid) -probe nd_syscall.getresuid = - kernel.function("sys_getresuid16") ?, - kernel.function("sys_getresuid") +probe nd_syscall.getresuid = kprobe.function("sys_getresuid16") ?, + kprobe.function("sys_getresuid") { name = "getresuid" - ruid_uaddr = $ruid - euid_uaddr = $euid - suid_uaddr = $suid - argstr = sprintf("%p, %p, %p", $ruid, $euid, $suid) + // ruid_uaddr = $ruid + // euid_uaddr = $euid + // suid_uaddr = $suid + // argstr = sprintf("%p, %p, %p", $ruid, $euid, $suid) + asmlinkage() + ruid_uaddr = pointer_arg(1) + euid_uaddr = pointer_arg(2) + suid_uaddr = pointer_arg(3) + argstr = sprintf("%p, %p, %p", ruid_uaddr, euid_uaddr, suid_uaddr) } -probe nd_syscall.getresuid.return = - kernel.function("sys_getresuid16").return ?, - kernel.function("sys_getresuid").return +probe nd_syscall.getresuid.return = kprobe.function("sys_getresuid16").return ?, + kprobe.function("sys_getresuid").return { name = "getresuid" retstr = returnstr(1) @@ -1658,18 +1926,22 @@ probe nd_syscall.getresuid.return = # long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim) # long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim) # long compat_sys_getrlimit (unsigned int resource, struct compat_rlimit __user *rlim) -probe nd_syscall.getrlimit = kernel.function("sys_getrlimit"), - kernel.function("sys_old_getrlimit") ?, - kernel.function("compat_sys_getrlimit") ? +probe nd_syscall.getrlimit = kprobe.function("sys_getrlimit"), + kprobe.function("sys_old_getrlimit") ?, + kprobe.function("compat_sys_getrlimit") ? { name = "getrlimit" - resource = $resource - rlim_uaddr = $rlim - argstr = sprintf("%s, %p", _rlimit_resource_str($resource), $rlim) + // resource = $resource + // rlim_uaddr = $rlim + // argstr = sprintf("%s, %p", _rlimit_resource_str($resource), $rlim) + asmlinkage() + resource = uint_arg(1) + rlim_uaddr = pointer_arg(2) + argstr = sprintf("%s, %p", _rlimit_resource_str(resource), rlim_uaddr) } -probe nd_syscall.getrlimit.return = kernel.function("sys_getrlimit").return, - kernel.function("sys_old_getrlimit").return ?, - kernel.function("compat_sys_getrlimit").return ? +probe nd_syscall.getrlimit.return = kprobe.function("sys_getrlimit").return, + kprobe.function("sys_old_getrlimit").return ?, + kprobe.function("compat_sys_getrlimit").return ? { name = "getrlimit" retstr = returnstr(1) @@ -1677,7 +1949,8 @@ probe nd_syscall.getrlimit.return = kernel.function("sys_getrlimit").return, # getrusage __________________________________________________ # long sys_getrusage(int who, struct rusage __user *ru) -probe nd_syscall.getrusage = kernel.function("sys_getrusage") { +probe nd_syscall.getrusage = kprobe.function("sys_getrusage") +{ name = "getrusage" // who = $who // if($who==-2) @@ -1704,19 +1977,24 @@ probe nd_syscall.getrusage = kernel.function("sys_getrusage") { usage_uaddr = pointer_arg(2) argstr = sprintf("%s, %p", who_str, usage_uaddr) } -probe nd_syscall.getrusage.return = kernel.function("sys_getrusage").return { +probe nd_syscall.getrusage.return = kprobe.function("sys_getrusage").return +{ name = "getrusage" retstr = returnstr(1) } # getsid _____________________________________________________ # long sys_getsid(pid_t pid) -probe nd_syscall.getsid = kernel.function("sys_getsid") { +probe nd_syscall.getsid = kprobe.function("sys_getsid") +{ name = "getsid" - pid = $pid + // pid = $pid + asmlinkage() + pid = int_arg(1) argstr = sprint(pid) } -probe nd_syscall.getsid.return = kernel.function("sys_getsid").return { +probe nd_syscall.getsid.return = kprobe.function("sys_getsid").return +{ name = "getsid" retstr = returnstr(1) } @@ -1725,14 +2003,21 @@ probe nd_syscall.getsid.return = kernel.function("sys_getsid").return { # long sys_getsockname(int fd, # struct sockaddr __user *usockaddr, # int __user *usockaddr_len) -probe nd_syscall.getsockname = kernel.function("sys_getsockname") ? { +probe nd_syscall.getsockname = kprobe.function("sys_getsockname") ? +{ name = "getsockname" - s = $fd - name_uaddr = $usockaddr - namelen_uaddr = $usockaddr_len - argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) + // s = $fd + // name_uaddr = $usockaddr + // namelen_uaddr = $usockaddr_len + // argstr = sprintf("%d, %p, %p", $fd, $usockaddr, $usockaddr_len) + asmlinkage() + s = int_arg(1) + name_uaddr = pointer_arg(2) + namelen_uaddr = pointer_arg(3) + argstr = sprintf("%d, %p, %p", s, name_uaddr, namelen_uaddr) } -probe nd_syscall.getsockname.return = kernel.function("sys_getsockname").return ? { +probe nd_syscall.getsockname.return = kprobe.function("sys_getsockname").return ? +{ name = "getsockname" retstr = returnstr(1) } @@ -1744,24 +2029,32 @@ probe nd_syscall.getsockname.return = kernel.function("sys_getsockname").return # char __user *optval, # int __user *optlen) # -probe nd_syscall.getsockopt = - kernel.function("sys_getsockopt") ?, - kernel.function("compat_sys_getsockopt") ? +probe nd_syscall.getsockopt = kprobe.function("sys_getsockopt") ?, + kprobe.function("compat_sys_getsockopt") ? { name = "getsockopt" - fd = $fd - level = $level - level_str = _sockopt_level_str($level) - optname = $optname - optname_str = _sockopt_optname_str($optname) - optval_uaddr = $optval - optlen_uaddr = $optlen - argstr = sprintf("%d, %s, %s, %p, %p", $fd, _sockopt_level_str($level), - _sockopt_optname_str($optname), $optval, $optlen) -} -probe nd_syscall.getsockopt.return = - kernel.function("sys_getsockopt").return ?, - kernel.function("compat_sys_getsockopt").return ? + // fd = $fd + // level = $level + // level_str = _sockopt_level_str($level) + // optname = $optname + // optname_str = _sockopt_optname_str($optname) + // optval_uaddr = $optval + // optlen_uaddr = $optlen + // argstr = sprintf("%d, %s, %s, %p, %p", $fd, _sockopt_level_str($level), + // _sockopt_optname_str($optname), $optval, $optlen) + asmlinkage() + fd = int_arg(1) + level = int_arg(2) + level_str = _sockopt_level_str(level) + optname = int_arg(3) + optname_str = _sockopt_optname_str(optname) + optval_uaddr = pointer_arg(4) + optlen_uaddr = pointer_arg(5) + argstr = sprintf("%d, %s, %s, %p, %p", fd, _sockopt_level_str(level), + _sockopt_optname_str(optname), optval_uaddr, optlen_uaddr) +} +probe nd_syscall.getsockopt.return = kprobe.function("sys_getsockopt").return ?, + kprobe.function("compat_sys_getsockopt").return ? { name = "getsockopt" retstr = returnstr(1) @@ -1769,11 +2062,13 @@ probe nd_syscall.getsockopt.return = # gettid _____________________________________________________ # long sys_gettid(void) -probe nd_syscall.gettid = kernel.function("sys_gettid") { +probe nd_syscall.gettid = kprobe.function("sys_gettid") +{ name = "gettid" argstr = "" } -probe nd_syscall.gettid.return = kernel.function("sys_gettid").return { +probe nd_syscall.gettid.return = kprobe.function("sys_gettid").return +{ name = "gettid" retstr = returnstr(1) } @@ -1785,21 +2080,23 @@ probe nd_syscall.gettid.return = kernel.function("sys_gettid").return { # struct timezone __user *tz) # long compat_sys_gettimeofday(struct compat_timeval __user *tv, # struct timezone __user *tz) -probe nd_syscall.gettimeofday = - kernel.function("sys_gettimeofday"), - kernel.function("sys32_gettimeofday") ?, - kernel.function("compat_sys_gettimeofday") ? +probe nd_syscall.gettimeofday = kprobe.function("sys_gettimeofday"), + kprobe.function("sys32_gettimeofday") ?, + kprobe.function("compat_sys_gettimeofday") ? { name = "gettimeofday" - tv_uaddr = $tv - tz_uaddr = $tz - argstr = sprintf("%p, %p", $tv, $tz) + // tv_uaddr = $tv + // tz_uaddr = $tz + // argstr = sprintf("%p, %p", $tv, $tz) + asmlinkage() + tv_uaddr = pointer_arg(1) + tz_uaddr = pointer_arg(2) + argstr = sprintf("%p, %p", tv_uaddr, tz_uaddr) } -probe nd_syscall.gettimeofday.return = - kernel.function("sys_gettimeofday").return, - kernel.function("sys32_gettimeofday").return ?, - kernel.function("compat_sys_gettimeofday").return ? +probe nd_syscall.gettimeofday.return = kprobe.function("sys_gettimeofday").return, + kprobe.function("sys32_gettimeofday").return ?, + kprobe.function("compat_sys_gettimeofday").return ? { name = "gettimeofday" retstr = returnstr(1) @@ -1810,18 +2107,16 @@ probe nd_syscall.gettimeofday.return = # long sys_getuid16(void) # long sys32_getuid16(void) # -probe nd_syscall.getuid = - kernel.function("sys_getuid16") ?, - kernel.function("sys32_getuid16") ?, - kernel.function("sys_getuid") +probe nd_syscall.getuid = kprobe.function("sys_getuid16") ?, + kprobe.function("sys32_getuid16") ?, + kprobe.function("sys_getuid") { name = "getuid" argstr = "" } -probe nd_syscall.getuid.return = - kernel.function("sys_getuid16").return ?, - kernel.function("sys32_getuid16").return ?, - kernel.function("sys_getuid").return +probe nd_syscall.getuid.return = kprobe.function("sys_getuid16").return ?, + kprobe.function("sys32_getuid16").return ?, + kprobe.function("sys_getuid").return { name = "getuid" retstr = returnstr(1) @@ -1830,19 +2125,38 @@ probe nd_syscall.getuid.return = # getxattr ___________________________________________________ # ssize_t sys_getxattr(char __user *path, char __user *name, # void __user *value, size_t size) -probe nd_syscall.getxattr = kernel.function("sys_getxattr") { +probe nd_syscall.getxattr = kprobe.function("sys_getxattr") +{ name = "getxattr" - path = user_string($path) + // %( kernel_v >= "2.6.27" %? + // path = user_string($pathname) + // %: + // path = user_string($path) + // %) + // name2 = user_string($name) + // value_uaddr = $value + // size = $size + // argstr = sprintf("%s, %s, %p, %d", + // %( kernel_v >= "2.6.27" %? + // user_string_quoted($pathname), + // %: + // user_string_quoted($path), + // %) + // user_string_quoted($name), + // value_uaddr, size) + asmlinkage() + path = pointer_arg(1) # FIXME - name2 = user_string($name) - value_uaddr = $value - size = $size + name2 = user_string(pointer_arg(2)) + value_uaddr = pointer_arg(3) + size = ulong_arg(4) argstr = sprintf("%s, %s, %p, %d", - user_string_quoted($path), - user_string_quoted($name), + user_string_quoted(path), + user_string_quoted(pointer_arg(2)), value_uaddr, size) } -probe nd_syscall.getxattr.return = kernel.function("sys_getxattr").return { +probe nd_syscall.getxattr.return = kprobe.function("sys_getxattr").return +{ name = "getxattr" retstr = returnstr(1) } @@ -1852,14 +2166,21 @@ probe nd_syscall.getxattr.return = kernel.function("sys_getxattr").return { # unsigned long len, # const char __user *uargs) # -probe nd_syscall.init_module = kernel.function("sys_init_module") ? { +probe nd_syscall.init_module = kprobe.function("sys_init_module") ? +{ name = "init_module" - umod_uaddr = $umod - len = $len - uargs = user_string($uargs) - argstr = sprintf("%p, %d, %s", $umod, $len, user_string_quoted($uargs)) + // umod_uaddr = $umod + // len = $len + // uargs = user_string($uargs) + // argstr = sprintf("%p, %d, %s", $umod, $len, user_string_quoted($uargs)) + asmlinkage() + umod_uaddr = pointer_arg(1) + len = ulong_arg(2) + uargs = user_string(pointer_arg(3)) + argstr = sprintf("%p, %d, %s", umod_uaddr, len, user_string_quoted(pointer_arg(4))) } -probe nd_syscall.init_module.return = kernel.function("sys_init_module").return ? { +probe nd_syscall.init_module.return = kprobe.function("sys_init_module").return ? +{ name = "init_module" retstr = returnstr(1) } @@ -1868,15 +2189,29 @@ probe nd_syscall.init_module.return = kernel.function("sys_init_module").return # # long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) # -probe nd_syscall.inotify_add_watch = kernel.function("sys_inotify_add_watch") ? { +probe nd_syscall.inotify_add_watch = kprobe.function("sys_inotify_add_watch") ? +{ name = "inotify_add_watch" - fd = $fd - path_uaddr = $path - path = user_string($path) - mask = $mask - argstr = sprintf("%d, %s, %d", $fd, user_string_quoted($path), $mask) + // fd = $fd + // mask = $mask + // %( kernel_v >= "2.6.27" %? + // path_uaddr = $pathname + // path = user_string($pathname) + // argstr = sprintf("%d, %s, %d", $fd, user_string_quoted($pathname), $mask) + // %: + // path_uaddr = $path + // path = user_string($path) + // argstr = sprintf("%d, %s, %d", $fd, user_string_quoted($path), $mask) + // %) + asmlinkage() + fd = int_arg(1) + path_uaddr = pointer_arg(2) + path = user_string(path_uaddr) + mask = uint_arg(3) + argstr = sprintf("%d, %s, %d", fd, user_string_quoted(path_uaddr), mask) } -probe nd_syscall.inotify_add_watch.return = kernel.function("sys_inotify_add_watch").return ? { +probe nd_syscall.inotify_add_watch.return = kprobe.function("sys_inotify_add_watch").return ? +{ name = "inotify_add_watch" retstr = returnstr(1) } @@ -1885,11 +2220,13 @@ probe nd_syscall.inotify_add_watch.return = kernel.function("sys_inotify_add_wat # # long sys_inotify_init(void) # -probe nd_syscall.inotify_init = kernel.function("sys_inotify_init") ? { +probe nd_syscall.inotify_init = kprobe.function("sys_inotify_init") ? +{ name = "inotify_init" argstr = "" } -probe nd_syscall.inotify_init.return = kernel.function("sys_inotify_init").return ? { +probe nd_syscall.inotify_init.return = kprobe.function("sys_inotify_init").return ? +{ name = "inotify_init" retstr = returnstr(1) } @@ -1898,13 +2235,19 @@ probe nd_syscall.inotify_init.return = kernel.function("sys_inotify_init").retur # # long sys_inotify_rm_watch(int fd, u32 wd) # -probe nd_syscall.inotify_rm_watch = kernel.function("sys_inotify_rm_watch") ? { +probe nd_syscall.inotify_rm_watch = kprobe.function("sys_inotify_rm_watch") ? +{ name = "inotify_rm_watch" - fd = $fd - wd = $wd - argstr = sprintf("%d, %d", $fd, $wd) + // fd = $fd + // wd = $wd + // argstr = sprintf("%d, %d", $fd, $wd) + asmlinkage() + fd = int_arg(1) + wd = uint_arg(2) + argstr = sprintf("%d, %d", fd, wd) } -probe nd_syscall.inotify_rm_watch.return = kernel.function("sys_inotify_rm_watch").return ? { +probe nd_syscall.inotify_rm_watch.return = kprobe.function("sys_inotify_rm_watch").return ? +{ name = "inotify_rm_watch" retstr = returnstr(1) } @@ -1913,14 +2256,20 @@ probe nd_syscall.inotify_rm_watch.return = kernel.function("sys_inotify_rm_watch # long sys_io_cancel(aio_context_t ctx_id, # struct iocb __user *iocb, # struct io_event __user *result) -probe nd_syscall.io_cancel = kernel.function("sys_io_cancel") { +probe nd_syscall.io_cancel = kprobe.function("sys_io_cancel") +{ name = "io_cancel" - ctx_id = $ctx_id - iocb_uaddr = $iocb - result_uaddr = $result + // ctx_id = $ctx_id + // iocb_uaddr = $iocb + // result_uaddr = $result + asmlinkage() + ctx_id = ulong_arg(1) + iocb_uaddr = pointer_arg(2) + result_uaddr = pointer_arg(3) argstr = sprintf("%d, %p, %p", ctx_id, iocb_uaddr, result_uaddr) } -probe nd_syscall.io_cancel.return = kernel.function("sys_io_cancel").return { +probe nd_syscall.io_cancel.return = kprobe.function("sys_io_cancel").return +{ name = "io_cancel" retstr = returnstr(1) } @@ -1929,19 +2278,22 @@ probe nd_syscall.io_cancel.return = kernel.function("sys_io_cancel").return { # long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) # long compat_sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) # -probe nd_syscall.ioctl = - kernel.function("sys_ioctl") ?, - kernel.function("compat_sys_ioctl") ? +probe nd_syscall.ioctl = kprobe.function("sys_ioctl") ?, + kprobe.function("compat_sys_ioctl") ? { name = "ioctl" - fd = $fd - request = $cmd - argp = $arg - argstr = sprintf("%d, %d, %p", $fd, $cmd, $arg) + // fd = $fd + // request = $cmd + // argp = $arg + // argstr = sprintf("%d, %d, %p", $fd, $cmd, $arg) + asmlinkage() + fd = int_arg(1) + request = int_arg(2) + argp = ulong_arg(3) + argstr = sprintf("%d, %d, %p", fd, request, argp) } -probe nd_syscall.ioctl.return = - kernel.function("sys_ioctl").return ?, - kernel.function("compat_sys_ioctl").return ? +probe nd_syscall.ioctl.return = kprobe.function("sys_ioctl").return ?, + kprobe.function("compat_sys_ioctl").return ? { name = "ioctl" retstr = returnstr(1) @@ -1949,12 +2301,16 @@ probe nd_syscall.ioctl.return = # io_destroy _________________________________________________ # long sys_io_destroy(aio_context_t ctx) -probe nd_syscall.io_destroy = kernel.function("sys_io_destroy") { +probe nd_syscall.io_destroy = kprobe.function("sys_io_destroy") +{ name = "io_destroy" - ctx = $ctx + // ctx = $ctx + asmlinkage() + ctx = ulong_arg(1) argstr = sprintf("%d", ctx) } -probe nd_syscall.io_destroy.return = kernel.function("sys_io_destroy").return { +probe nd_syscall.io_destroy.return = kprobe.function("sys_io_destroy").return +{ name = "io_destroy" retstr = returnstr(1) } @@ -1971,23 +2327,30 @@ probe nd_syscall.io_destroy.return = kernel.function("sys_io_destroy").return { # struct io_event __user *events, # struct compat_timespec __user *timeout) # -probe nd_syscall.io_getevents = - kernel.function("sys_io_getevents") ?, - kernel.function("compat_sys_io_getevents") ? +probe nd_syscall.io_getevents = kprobe.function("sys_io_getevents") ?, + kprobe.function("compat_sys_io_getevents") ? { name = "io_getevents" - ctx_id = $ctx_id - min_nr = $min_nr - nr = $nr - events_uaddr = $events - timeout_uaddr = $timeout - timestr = _struct_timespec_u($timeout,1) - argstr = sprintf("%d, %d, %d, %p, %p, %s", $ctx_id, $min_nr, - $nr, $events, $timeout, timestr) -} -probe nd_syscall.io_getevents.return = - kernel.function("sys_io_getevents").return ?, - kernel.function("compat_sys_io_getevents").return ? + // ctx_id = $ctx_id + // min_nr = $min_nr + // nr = $nr + // events_uaddr = $events + // timeout_uaddr = $timeout + // timestr = _struct_timespec_u($timeout, 1) + // argstr = sprintf("%d, %d, %d, %p, %p, %s", $ctx_id, $min_nr, + // $nr, $events, $timeout, timestr) + asmlinkage() + ctx_id = ulong_arg(1) + min_nr = long_arg(2) + nr = long_arg(3) + events_uaddr = pointer_arg(4) + timeout_uaddr = pointer_arg(5) + timestr = _struct_timespec_u(timeout_uaddr, 1) + argstr = sprintf("%d, %d, %d, %p, %p, %s", ctx_id, min_nr, + nr, events_uaddr, timeout_uaddr, timestr) +} +probe nd_syscall.io_getevents.return = kprobe.function("sys_io_getevents").return ?, + kprobe.function("compat_sys_io_getevents").return ? { name = "io_getevents" retstr = returnstr(1) @@ -1996,14 +2359,21 @@ probe nd_syscall.io_getevents.return = # ioperm _____________________________________________________ # long sys_ioperm(unsigned long from, unsigned long num, int turn_on) # -probe nd_syscall.ioperm = kernel.function("sys_ioperm") ? { +probe nd_syscall.ioperm = kprobe.function("sys_ioperm") ? +{ name = "ioperm" - from = $from - num = $num - turn_on = $turn_on - argstr = sprintf("%d, %d, %d", $from, $num, $turn_on) + // from = $from + // num = $num + // turn_on = $turn_on + // argstr = sprintf("%d, %d, %d", $from, $num, $turn_on) + asmlinkage() + from = ulong_arg(1) + num = ulong_arg(2) + turn_on = int_arg(3) + argstr = sprintf("%d, %d, %d", from, num, turn_on) } -probe nd_syscall.ioperm.return = kernel.function("sys_ioperm").return ? { +probe nd_syscall.ioperm.return = kprobe.function("sys_ioperm").return ? +{ name = "ioperm" retstr = returnstr(1) } @@ -2011,27 +2381,39 @@ probe nd_syscall.ioperm.return = kernel.function("sys_ioperm").return ? { # io_setup ___________________________________________________ # long sys_io_setup(unsigned nr_events, aio_context_t __user *ctxp) # -probe nd_syscall.io_setup = kernel.function("sys_io_setup") { +probe nd_syscall.io_setup = kprobe.function("sys_io_setup") +{ name = "io_setup" - maxevents = $nr_events - ctxp_uaddr = $ctxp - argstr = sprintf("%d, %p", $nr_events, $ctxp) + // maxevents = $nr_events + // ctxp_uaddr = $ctxp + // argstr = sprintf("%d, %p", $nr_events, $ctxp) + asmlinkage() + maxevents = uint_arg(1) + ctxp_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", maxevents, ctxp_uaddr) } -probe nd_syscall.io_setup.return = kernel.function("sys_io_setup").return { +probe nd_syscall.io_setup.return = kprobe.function("sys_io_setup").return +{ name = "io_setup" retstr = returnstr(1) } # long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p) # -probe nd_syscall.compat_io_setup = kernel.function("compat_sys_io_setup") ? { +probe nd_syscall.compat_io_setup = kprobe.function("compat_sys_io_setup") ? +{ name = "io_setup" - maxevents = $nr_reqs - ctxp_uaddr = $ctx32p - argstr = sprintf("%d, %p", $nr_reqs, $ctx32p) + // maxevents = $nr_reqs + // ctxp_uaddr = $ctx32p + // argstr = sprintf("%d, %p", $nr_reqs, $ctx32p) + asmlinkage() + maxevents = uint_arg(1) + ctxp_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", maxevents, ctxp_uaddr) } -probe nd_syscall.compat_io_setup.return = kernel.function("compat_sys_io_setup").return ? { +probe nd_syscall.compat_io_setup.return = kprobe.function("compat_sys_io_setup").return ? +{ name = "io_setup" retstr = returnstr(1) } @@ -2039,27 +2421,41 @@ probe nd_syscall.compat_io_setup.return = kernel.function("compat_sys_io_setup") # io_submit __________________________________________________ # long sys_io_submit(aio_context_t ctx_id, long nr, struct iocb __user * __user *iocbpp) # -probe nd_syscall.io_submit = kernel.function("sys_io_submit") { +probe nd_syscall.io_submit = kprobe.function("sys_io_submit") +{ name = "io_submit" - ctx_id = $ctx_id - nr = $nr - iocbpp_uaddr = $iocbpp - argstr = sprintf("%d, %d, %p", $ctx_id, $nr, $iocbpp) + // ctx_id = $ctx_id + // nr = $nr + // iocbpp_uaddr = $iocbpp + // argstr = sprintf("%d, %d, %p", $ctx_id, $nr, $iocbpp) + asmlinkage() + ctx_id = ulong_arg(1) + nr = long_arg(2) + iocbpp_uaddr = pointer_arg(3) + argstr = sprintf("%d, %d, %p", ctx_id, nr, iocbpp_uaddr) } -probe nd_syscall.io_submit.return = kernel.function("sys_io_submit").return { +probe nd_syscall.io_submit.return = kprobe.function("sys_io_submit").return +{ name = "io_submit" retstr = returnstr(1) } # long compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb) # -probe nd_syscall.compat_io_submit = kernel.function("compat_sys_io_submit") ? { +probe nd_syscall.compat_io_submit = kprobe.function("compat_sys_io_submit") ? +{ name = "io_submit" - ctx_id = $ctx_id - nr = $nr - iocbpp_uaddr = $iocb - argstr = sprintf("%d, %d, %p", $ctx_id, $nr, $iocb) + // ctx_id = $ctx_id + // nr = $nr + // iocbpp_uaddr = $iocb + // argstr = sprintf("%d, %d, %p", $ctx_id, $nr, $iocb) + asmlinkage() + ctx_id = ulong_arg(1) + nr = int_arg(2) + iocbpp_uaddr = pointer_arg(3) + argstr = sprintf("%d, %d, %p", ctx_id, nr, iocbpp_uaddr) } -probe nd_syscall.compat_io_submit.return = kernel.function("compat_sys_io_submit").return ? { +probe nd_syscall.compat_io_submit.return = kprobe.function("compat_sys_io_submit").return ? +{ name = "io_submit" retstr = returnstr(1) } @@ -2067,13 +2463,19 @@ probe nd_syscall.compat_io_submit.return = kernel.function("compat_sys_io_submit # ioprio_get _________________________________________________ # long sys_ioprio_get(int which, int who) # -probe nd_syscall.ioprio_get = kernel.function("sys_ioprio_get") ? { +probe nd_syscall.ioprio_get = kprobe.function("sys_ioprio_get") ? +{ name = "ioprio_get" - which = $which - who = $who - argstr = sprintf("%d, %d", $which, $who) + // which = $which + // who = $who + // argstr = sprintf("%d, %d", $which, $who) + asmlinkage() + which = int_arg(1) + who = int_arg(2) + argstr = sprintf("%d, %d", which, who) } -probe nd_syscall.ioprio_get.return = kernel.function("sys_ioprio_get").return ? { +probe nd_syscall.ioprio_get.return = kprobe.function("sys_ioprio_get").return ? +{ name = "ioprio_get" retstr = returnstr(1) } @@ -2081,14 +2483,21 @@ probe nd_syscall.ioprio_get.return = kernel.function("sys_ioprio_get").return ? # ioprio_set _________________________________________________ # long sys_ioprio_set(int which, int who, int ioprio) # -probe nd_syscall.ioprio_set = kernel.function("sys_ioprio_set") ? { +probe nd_syscall.ioprio_set = kprobe.function("sys_ioprio_set") ? +{ name = "ioprio_set" - which = $which - who = $who - ioprio = $ioprio - argstr = sprintf("%d, %d, %d", $which, $who, $ioprio) + // which = $which + // who = $who + // ioprio = $ioprio + // argstr = sprintf("%d, %d, %d", $which, $who, $ioprio) + asmlinkage() + which = int_arg(1) + who = int_arg(2) + ioprio = int_arg(3) + argstr = sprintf("%d, %d, %d", which, who, ioprio) } -probe nd_syscall.ioprio_set.return = kernel.function("sys_ioprio_set").return ? { +probe nd_syscall.ioprio_set.return = kprobe.function("sys_ioprio_set").return ? +{ name = "ioprio_set" retstr = returnstr(1) } @@ -2103,20 +2512,24 @@ probe nd_syscall.ioprio_set.return = kernel.function("sys_ioprio_set").return ? # struct compat_kexec_segment __user *segments, # unsigned long flags) # -probe nd_syscall.kexec_load = - kernel.function("sys_kexec_load") ?, - kernel.function("compat_sys_kexec_load") ? +probe nd_syscall.kexec_load = kprobe.function("sys_kexec_load") ?, + kprobe.function("compat_sys_kexec_load") ? { name = "kexec_load" - entry = $entry - nr_segments = $nr_segments - segments_uaddr = $segments - flags = $flags - argstr = sprintf("%p, %d, %p, %d", $entry, $nr_segments, $segments, $flags) + // entry = $entry + // nr_segments = $nr_segments + // segments_uaddr = $segments + // flags = $flags + // argstr = sprintf("%p, %d, %p, %d", $entry, $nr_segments, $segments, $flags) + asmlinkage() + entry = ulong_arg(1) + nr_segments = ulong_arg(2) + segments_uaddr = pointer_arg(3) + flags = ulong_arg(4) + argstr = sprintf("%p, %d, %p, %d", entry, nr_segments, segments_uaddr, flags) } -probe nd_syscall.kexec_load.return = - kernel.function("sys_kexec_load").return ?, - kernel.function("compat_sys_kexec_load").return ? +probe nd_syscall.kexec_load.return = kprobe.function("sys_kexec_load").return ?, + kprobe.function("compat_sys_kexec_load").return ? { name = "kexec_load" retstr = returnstr(1) @@ -2130,17 +2543,17 @@ probe nd_syscall.kexec_load.return = # unsigned long arg5) # long compat_sys_keyctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5) # -probe nd_syscall.keyctl = - kernel.function("sys_keyctl") ?, - kernel.function("compat_sys_keyctl") ? +probe nd_syscall.keyctl = kprobe.function("sys_keyctl") ?, + kprobe.function("compat_sys_keyctl") ? { name = "keyctl" - argstr = sprintf("%d, ...", $option) + // argstr = sprintf("%d, ...", $option) + asmlinkage() + argstr = sprintf("%d, ...", uint_arg(1)) } -probe nd_syscall.keyctl.return = - kernel.function("sys_keyctl").return ?, - kernel.function("compat_sys_keyctl").return ? +probe nd_syscall.keyctl.return = kprobe.function("sys_keyctl").return ?, + kprobe.function("compat_sys_keyctl").return ? { name = "keyctl" retstr = returnstr(1) @@ -2148,13 +2561,19 @@ probe nd_syscall.keyctl.return = # kill _______________________________________________________ # long sys_kill(int pid, int sig) -probe nd_syscall.kill = kernel.function("sys_kill") { +probe nd_syscall.kill = kprobe.function("sys_kill") +{ name = "kill" - pid = $pid - sig = $sig - argstr = sprintf("%d, %s", $pid, _signal_name($sig)) + // pid = $pid + // sig = $sig + // argstr = sprintf("%d, %s", $pid, _signal_name($sig)) + asmlinkage() + pid = int_arg(1) + sig = int_arg(2) + argstr = sprintf("%d, %s", pid, _signal_name(sig)) } -probe nd_syscall.kill.return = kernel.function("sys_kill").return { +probe nd_syscall.kill.return = kprobe.function("sys_kill").return +{ name = "kill" retstr = returnstr(1) } @@ -2162,14 +2581,21 @@ probe nd_syscall.kill.return = kernel.function("sys_kill").return { # lchown _____________________________________________________ # long sys_lchown(const char __user * filename, uid_t user, gid_t group) # -probe nd_syscall.lchown = kernel.function("sys_lchown") { +probe nd_syscall.lchown = kprobe.function("sys_lchown") +{ name = "lchown" - path = user_string($filename) - owner = __int32($user) - group = __int32($group) - argstr = sprintf("%s, %d, %d",user_string_quoted($filename), owner, group) + // path = user_string($filename) + // owner = __int32($user) + // group = __int32($group) + // argstr = sprintf("%s, %d, %d", user_string_quoted($filename), owner, group) + asmlinkage() + path = user_string(pointer_arg(1)) + owner = __int32(uint_arg(2)) + group = __int32(uint_arg(3)) + argstr = sprintf("%s, %d, %d", user_string_quoted(pointer_arg(1)), owner, group) } -probe nd_syscall.lchown.return = kernel.function("sys_lchown").return { +probe nd_syscall.lchown.return = kprobe.function("sys_lchown").return +{ name = "lchown" retstr = returnstr(1) } @@ -2178,14 +2604,21 @@ probe nd_syscall.lchown.return = kernel.function("sys_lchown").return { # long sys_lchown16(const char __user * filename, old_uid_t user, # old_gid_t group) # -probe nd_syscall.lchown16 = kernel.function("sys_lchown16") ? { +probe nd_syscall.lchown16 = kprobe.function("sys_lchown16") ? +{ name = "lchown16" - path = user_string($filename) - owner = __short($user) - group = __short($group) - argstr = sprintf("%s, %d, %d", user_string_quoted($filename), owner, group) + // path = user_string($filename) + // owner = __short($user) + // group = __short($group) + // argstr = sprintf("%s, %d, %d", user_string_quoted($filename), owner, group) + asmlinkage() + path = user_string(pointer_arg(1)) + owner = __short(uint_arg(2)) + group = __short(uint_arg(3)) + argstr = sprintf("%s, %d, %d", user_string_quoted(pointer_arg(1)), owner, group) } -probe nd_syscall.lchown16.return = kernel.function("sys_lchown16").return ? { +probe nd_syscall.lchown16.return = kprobe.function("sys_lchown16").return ? +{ name = "lchown16" retstr = returnstr(1) } @@ -2195,47 +2628,81 @@ probe nd_syscall.lchown16.return = kernel.function("sys_lchown16").return ? { # void __user *value, # size_t size) # -probe nd_syscall.lgetxattr = kernel.function("sys_lgetxattr") { +probe nd_syscall.lgetxattr = kprobe.function("sys_lgetxattr") +{ name = "lgetxattr" - path = user_string($path) + // %( kernel_v >= "2.6.27" %? + // path = user_string($pathname) + // %: + // path = user_string($path) + // %) + // # FIXME + // name2 = user_string($name) + // value_uaddr = $value + // size = $size + // argstr = sprintf("%s, %s, %p, %d", + // %( kernel_v >= "2.6.27" %? + // user_string_quoted($pathname), + // %: + // user_string_quoted($path), + // %) + // user_string_quoted($name), + // value_uaddr, size) + asmlinkage() + path = user_string(pointer_arg(1)) # FIXME - name2 = user_string($name) - value_uaddr = $value - size = $size + name2 = user_string(pointer_arg(2)) + value_uaddr = pointer_arg(3) + size = ulong_arg(4) argstr = sprintf("%s, %s, %p, %d", - user_string_quoted($path), - user_string_quoted($name), + user_string_quoted(pointer_arg(1)), + user_string_quoted(pointer_arg(2)), value_uaddr, size) } -probe nd_syscall.lgetxattr.return = kernel.function("sys_lgetxattr").return { +probe nd_syscall.lgetxattr.return = kprobe.function("sys_lgetxattr").return +{ name = "lgetxattr" retstr = returnstr(1) } # link _______________________________________________________ # long sys_link(const char __user * oldname, # const char __user * newname) -probe nd_syscall.link = kernel.function("sys_link") { +probe nd_syscall.link = kprobe.function("sys_link") +{ name = "link" - oldpath = user_string($oldname) - newpath = user_string($newname) + // oldpath = user_string($oldname) + // newpath = user_string($newname) + // argstr = sprintf("%s, %s", + // user_string_quoted($oldname), + // user_string_quoted($newname)) + asmlinkage() + oldpath = user_string(pointer_arg(1)) + newpath = user_string(pointer_arg(2)) argstr = sprintf("%s, %s", - user_string_quoted($oldname), - user_string_quoted($newname)) + user_string_quoted(pointer_arg(1)), + user_string_quoted(pointer_arg(2))) } -probe nd_syscall.link.return = kernel.function("sys_link").return { +probe nd_syscall.link.return = kprobe.function("sys_link").return +{ name = "link" retstr = returnstr(1) } # listen _____________________________________________________ # long sys_listen(int fd, int backlog) -probe nd_syscall.listen = kernel.function("sys_listen") ? { +probe nd_syscall.listen = kprobe.function("sys_listen") ? +{ name = "listen" - sockfd = $fd - backlog = $backlog - argstr = sprintf("%d, %d", $fd, $backlog) + // sockfd = $fd + // backlog = $backlog + // argstr = sprintf("%d, %d", $fd, $backlog) + asmlinkage() + sockfd = int_arg(1) + backlog = int_arg(2) + argstr = sprintf("%d, %d", sockfd, backlog) } -probe nd_syscall.listen.return = kernel.function("sys_listen").return ? { +probe nd_syscall.listen.return = kprobe.function("sys_listen").return ? +{ name = "listen" retstr = returnstr(1) } @@ -2243,15 +2710,29 @@ probe nd_syscall.listen.return = kernel.function("sys_listen").return ? { # listxattr __________________________________________________ # ssize_t sys_listxattr(char __user *path, char __user *list, size_t size) # -probe nd_syscall.listxattr = kernel.function("sys_listxattr") { +probe nd_syscall.listxattr = kprobe.function("sys_listxattr") +{ name = "listxattr" - path_uaddr = $path - path = user_string($path) - list_uaddr = $list - size = $size - argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) + // list_uaddr = $list + // size = $size + // %( kernel_v >= "2.6.27" %? + // path_uaddr = $pathname + // path = user_string($pathname) + // argstr = sprintf("%s, %p, %d", user_string_quoted($pathname), $list, $size) + // %: + // path_uaddr = $path + // path = user_string($path) + // argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) + // %) + asmlinkage() + path_uaddr = pointer_arg(1) + path = user_string(path_uaddr) + list_uaddr = pointer_arg(2) + size = ulong_arg(3) + argstr = sprintf("%s, %p, %d", user_string_quoted(path_uaddr), list_uaddr, size) } -probe nd_syscall.listxattr.return = kernel.function("sys_listxattr").return { +probe nd_syscall.listxattr.return = kprobe.function("sys_listxattr").return +{ name = "listxattr" retstr = returnstr(1) } @@ -2259,15 +2740,29 @@ probe nd_syscall.listxattr.return = kernel.function("sys_listxattr").return { # llistxattr _________________________________________________ # ssize_t sys_llistxattr(char __user *path, char __user *list, size_t size) # -probe nd_syscall.llistxattr = kernel.function("sys_llistxattr") { +probe nd_syscall.llistxattr = kprobe.function("sys_llistxattr") +{ name = "llistxattr" - path_uaddr = $path - path = user_string($path) - list_uaddr = $list - size = $size - argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) + // list_uaddr = $list + // size = $size + // %( kernel_v >= "2.6.27" %? + // path_uaddr = $pathname + // path = user_string($pathname) + // argstr = sprintf("%s, %p, %d", user_string_quoted($pathname), $list, $size) + // %: + // path_uaddr = $path + // path = user_string($path) + // argstr = sprintf("%s, %p, %d", user_string_quoted($path), $list, $size) + // %) + asmlinkage() + path_uaddr = pointer_arg(1) + path = user_string(path_uaddr) + list_uaddr = pointer_arg(2) + size = ulong_arg(3) + argstr = sprintf("%s, %p, %d", user_string_quoted(path_uaddr), list_uaddr, size) } -probe nd_syscall.llistxattr.return = kernel.function("sys_llistxattr").return { +probe nd_syscall.llistxattr.return = kprobe.function("sys_llistxattr").return +{ name = "llistxattr" retstr = returnstr(1) } @@ -2278,18 +2773,29 @@ probe nd_syscall.llistxattr.return = kernel.function("sys_llistxattr").return { # unsigned long offset_low, # loff_t __user * result, # unsigned int origin) -probe nd_syscall.llseek = kernel.function("sys_llseek") ? { +probe nd_syscall.llseek = kprobe.function("sys_llseek") ? +{ name = "llseek" - fd = $fd - offset_high = $offset_high - offset_low = $offset_low - result_uaddr = $result - whence = $origin - whence_str = _seek_whence_str($origin) - argstr = sprintf("%d, 0x%x, 0x%x, %p, %s", $fd, $offset_high, - $offset_low, $result, whence_str) -} -probe nd_syscall.llseek.return = kernel.function("sys_llseek").return ? { + // fd = $fd + // offset_high = $offset_high + // offset_low = $offset_low + // result_uaddr = $result + // whence = $origin + // whence_str = _seek_whence_str($origin) + // argstr = sprintf("%d, 0x%x, 0x%x, %p, %s", $fd, $offset_high, + // $offset_low, $result, whence_str) + asmlinkage() + fd = int_arg(1) + offset_high = ulong_arg(2) + offset_low = ulong_arg(3) + result_uaddr = pointer_arg(4) + whence = uint_arg(5) + whence_str = _seek_whence_str(whence) + argstr = sprintf("%d, 0x%x, 0x%x, %p, %s", fd, offset_high, + offset_low, result_uaddr, whence_str) +} +probe nd_syscall.llseek.return = kprobe.function("sys_llseek").return ? +{ name = "llseek" retstr = returnstr(1) } @@ -2297,14 +2803,21 @@ probe nd_syscall.llseek.return = kernel.function("sys_llseek").return ? { # lookup_dcookie _____________________________________________ # long sys_lookup_dcookie(u64 cookie64, char __user * buf, size_t len) # -probe nd_syscall.lookup_dcookie = kernel.function("sys_lookup_dcookie") ? { +probe nd_syscall.lookup_dcookie = kprobe.function("sys_lookup_dcookie") ? +{ name = "lookup_dcookie" - cookie = $cookie64 - buffer_uaddr = $buf - len = $len - argstr = sprintf("%d, %p, %d", $cookie64, $buf, $len) + // cookie = $cookie64 + // buffer_uaddr = $buf + // len = $len + // argstr = sprintf("%d, %p, %d", $cookie64, $buf, $len) + asmlinkage() + cookie = ulonglong_arg(1) + buffer_uaddr = pointer_arg(2) + len = ulong_arg(3) + argstr = sprintf("%d, %p, %d", cookie, buffer_uaddr, len) } -probe nd_syscall.lookup_dcookie.return = kernel.function("sys_lookup_dcookie").return ? { +probe nd_syscall.lookup_dcookie.return = kprobe.function("sys_lookup_dcookie").return ? +{ name = "lookup_dcookie" retstr = returnstr(1) } @@ -2312,31 +2825,53 @@ probe nd_syscall.lookup_dcookie.return = kernel.function("sys_lookup_dcookie").r # lremovexattr _______________________________________________ # long sys_lremovexattr(char __user *path, char __user *name) # -probe nd_syscall.lremovexattr = kernel.function("sys_lremovexattr") { +probe nd_syscall.lremovexattr = kprobe.function("sys_lremovexattr") +{ name = "lremovexattr" - path_uaddr = $path - path = user_string($path) - name_uaddr = $name - name2 = user_string($name) - argstr = sprintf("%s, %s", user_string_quoted($path), user_string_quoted($name)) + // name_uaddr = $name + // name2 = user_string($name) + // %( kernel_v >= "2.6.27" %? + // path_uaddr = $pathname + // path = user_string($pathname) + // argstr = sprintf("%s, %s", user_string_quoted($pathname), user_string_quoted($name)) + // %: + // path_uaddr = $path + // path = user_string($path) + // argstr = sprintf("%s, %s", user_string_quoted($path), user_string_quoted($name)) + // %) + asmlinkage() + path_uaddr = pointer_arg(1) + path = user_string(path_uaddr) + name_uaddr = pointer_arg(2) + name2 = user_string(name_uaddr) + argstr = sprintf("%s, %s", user_string_quoted(path_uaddr), user_string_quoted(name_uaddr)) } -probe nd_syscall.lremovexattr.return = kernel.function("sys_lremovexattr").return { +probe nd_syscall.lremovexattr.return = kprobe.function("sys_lremovexattr").return +{ name = "lremovexattr" retstr = returnstr(1) } # lseek ______________________________________________________ # off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) -probe nd_syscall.lseek = kernel.function("sys_lseek") { - name = "lseek" - fildes = $fd -# offset = __int32($offset) - offset = $offset - whence = $origin - whence_str = _seek_whence_str($origin) - argstr = sprintf("%d, %d, %s", $fd, offset, whence_str) -} -probe nd_syscall.lseek.return = kernel.function("sys_lseek").return { +probe nd_syscall.lseek = kprobe.function("sys_lseek") +{ + // name = "lseek" + // fildes = $fd + // # offset = __int32($offset) + // offset = $offset + // whence = $origin + // whence_str = _seek_whence_str($origin) + // argstr = sprintf("%d, %d, %s", $fd, offset, whence_str) + asmlinkage() + fildes = int_arg(1) + offset = long_arg(2) + whence = uint_arg(3) + whence_str = _seek_whence_str(whence) + argstr = sprintf("%d, %d, %s", fildes, offset, whence_str) +} +probe nd_syscall.lseek.return = kprobe.function("sys_lseek").return +{ name = "lseek" retstr = returnstr(1) } @@ -2348,21 +2883,44 @@ probe nd_syscall.lseek.return = kernel.function("sys_lseek").return { # size_t size, # int flags) # -probe nd_syscall.lsetxattr = kernel.function("sys_lsetxattr") { +probe nd_syscall.lsetxattr = kprobe.function("sys_lsetxattr") +{ name = "lsetxattr" - path_uaddr = $path - path = user_string($path) - name_uaddr = $name - name_str = user_string($name) - value_uaddr = $value - size = $size - flags = $flags + // %( kernel_v >= "2.6.27" %? + // path_uaddr = $pathname + // path = user_string($pathname) + // %: + // path_uaddr = $path + // path = user_string($path) + // %) + // name_uaddr = $name + // name_str = user_string($name) + // value_uaddr = $value + // size = $size + // flags = $flags + // argstr = sprintf("%s, %s, %p, %d, %d", + // %( kernel_v >= "2.6.27" %? + // user_string_quoted($pathname), + // %: + // user_string_quoted($path), + // %) + // user_string_quoted($name), + // value_uaddr, $size, $flags) + asmlinkage() + path_uaddr = pointer_arg(1) + path = user_string(path_uaddr) + name_uaddr = pointer_arg(2) + name_str = user_string(name_uaddr) + value_uaddr = pointer_arg(3) + size = ulong_arg(4) + flags = int_arg(5) argstr = sprintf("%s, %s, %p, %d, %d", - user_string_quoted($path), - user_string_quoted($name), - value_uaddr, $size, $flags) + user_string_quoted(path_uaddr), + user_string_quoted(name_uaddr), + value_uaddr, size, flags) } -probe nd_syscall.lsetxattr.return = kernel.function("sys_lsetxattr").return { +probe nd_syscall.lsetxattr.return = kprobe.function("sys_lsetxattr").return +{ name = "lsetxattr" retstr = returnstr(1) } @@ -2376,26 +2934,28 @@ probe nd_syscall.lsetxattr.return = kernel.function("sys_lsetxattr").return { # long sys_oabi_lstat64(char __user * filename, # struct oldabi_stat64 __user * statbuf) # -probe nd_syscall.lstat = - kernel.function("sys_lstat") ?, - kernel.function("sys_newlstat") ?, - kernel.function("compat_sys_newlstat") ?, - kernel.function("sys32_lstat64") ?, - kernel.function("sys_lstat64") ?, - kernel.function("sys_oabi_lstat64") ? +probe nd_syscall.lstat = kprobe.function("sys_lstat") ?, + kprobe.function("sys_newlstat") ?, + kprobe.function("compat_sys_newlstat") ?, + kprobe.function("sys32_lstat64") ?, + kprobe.function("sys_lstat64") ?, + kprobe.function("sys_oabi_lstat64") ? { name = "lstat" - path = user_string($filename) - buf_uaddr = $statbuf - argstr = sprintf("%s, %p", user_string_quoted($filename), $statbuf) -} -probe nd_syscall.lstat.return = - kernel.function("sys_lstat").return ?, - kernel.function("sys_newlstat").return ?, - kernel.function("compat_sys_newlstat").return ?, - kernel.function("sys32_lstat64").return ?, - kernel.function("sys_lstat64").return ?, - kernel.function("sys_oabi_lstat64").return ? + // path = user_string($filename) + // buf_uaddr = $statbuf + // argstr = sprintf("%s, %p", user_string_quoted($filename), $statbuf) + asmlinkage() + path = user_string(pointer_arg(1)) + buf_uaddr = pointer_arg(2) + argstr = sprintf("%s, %p", user_string_quoted(pointer_arg(1)), buf_uaddr) +} +probe nd_syscall.lstat.return = kprobe.function("sys_lstat").return ?, + kprobe.function("sys_newlstat").return ?, + kprobe.function("compat_sys_newlstat").return ?, + kprobe.function("sys32_lstat64").return ?, + kprobe.function("sys_lstat64").return ?, + kprobe.function("sys_oabi_lstat64").return ? { name = "lstat" retstr = returnstr(1) @@ -2404,15 +2964,23 @@ probe nd_syscall.lstat.return = # madvise ____________________________________________________ # long sys_madvise(unsigned long start, size_t len_in, int behavior) # -probe nd_syscall.madvise = kernel.function("sys_madvise") ? { +probe nd_syscall.madvise = kprobe.function("sys_madvise") ? +{ name = "madvise" - start = $start - length = $len_in - advice = $behavior - advice_str = _madvice_advice_str($behavior) - argstr = sprintf("%p, %d, %s", $start, $len_in, _madvice_advice_str($behavior)) + // start = $start + // length = $len_in + // advice = $behavior + // advice_str = _madvice_advice_str($behavior) + // argstr = sprintf("%p, %d, %s", $start, $len_in, _madvice_advice_str($behavior)) + asmlinkage() + start = ulong_arg(1) + length = ulong_arg(2) + advice = int_arg(3) + advice_str = _madvice_advice_str(advice) + argstr = sprintf("%p, %d, %s", start, length, _madvice_advice_str(advice)) } -probe nd_syscall.madvise.return = kernel.function("sys_madvise").return ? { +probe nd_syscall.madvise.return = kprobe.function("sys_madvise").return ? +{ name = "madvise" retstr = returnstr(1) } @@ -2432,23 +3000,30 @@ probe nd_syscall.madvise.return = kernel.function("sys_madvise").return ? { # compat_ulong_t maxnode, # compat_ulong_t flags) # -probe nd_syscall.mbind = - kernel.function("sys_mbind") ?, - kernel.function("compat_sys_mbind") ? +probe nd_syscall.mbind = kprobe.function("sys_mbind") ?, + kprobe.function("compat_sys_mbind") ? { name = "mbind" - start = $start - len = $len - mode = $mode - nmask_uaddr = $nmask - maxnode = $maxnode - flags = $flags - argstr = sprintf("%d, %d, %d, %p, %d, 0x%x", $start, $len, $mode, - $nmask, $maxnode, $flags) -} -probe nd_syscall.mbind.return = - kernel.function("sys_mbind").return ?, - kernel.function("compat_sys_mbind").return ? + // start = $start + // len = $len + // mode = $mode + // nmask_uaddr = $nmask + // maxnode = $maxnode + // flags = $flags + // argstr = sprintf("%d, %d, %d, %p, %d, 0x%x", $start, $len, $mode, + // $nmask, $maxnode, $flags) + asmlinkage() + start = ulong_arg(1) + len = long_arg(2) + mode = ulong_arg(3) + nmask_uaddr = pointer_arg(4) + maxnode = ulong_arg(5) + flags = uint_arg(6) + argstr = sprintf("%d, %d, %d, %p, %d, 0x%x", start, len, mode, + nmask_uaddr, maxnode, flags) +} +probe nd_syscall.mbind.return = kprobe.function("sys_mbind").return ?, + kprobe.function("compat_sys_mbind").return ? { name = "mbind" retstr = returnstr(1) @@ -2458,11 +3033,15 @@ probe nd_syscall.mbind.return = # long sys_migrate_pages(pid_t pid, unsigned long maxnode, # const unsigned long __user *old_nodes, # const unsigned long __user *new_nodes) -probe nd_syscall.migrate_pages = kernel.function("sys_migrate_pages") ? { +probe nd_syscall.migrate_pages = kprobe.function("sys_migrate_pages") ? +{ name = "migrate_pages" - argstr = sprintf("%d, %d, %p, %p", $pid, $maxnode, $old_nodes, $new_nodes) + // argstr = sprintf("%d, %d, %p, %p", $pid, $maxnode, $old_nodes, $new_nodes) + asmlinkage() + argstr = sprintf("%d, %d, %p, %p", int_arg(1), ulong_arg(2), pointer_arg(3), pointer_arg(4)) } -probe nd_syscall.migrate_pages.return = kernel.function("sys_migrate_pages").return ? { +probe nd_syscall.migrate_pages.return = kprobe.function("sys_migrate_pages").return ? +{ name = "migrate_pages" retstr = returnstr(1) } @@ -2470,28 +3049,42 @@ probe nd_syscall.migrate_pages.return = kernel.function("sys_migrate_pages").ret # mincore ____________________________________________________ # long sys_mincore(unsigned long start, size_t len, unsigned char __user * vec) # -probe nd_syscall.mincore = kernel.function("sys_mincore") ? { +probe nd_syscall.mincore = kprobe.function("sys_mincore") ? +{ name = "mincore" - start = $start - length = $len - vec_uaddr = $vec - argstr = sprintf("%p, %d, %p", $start, $len, $vec) + // start = $start + // length = $len + // vec_uaddr = $vec + // argstr = sprintf("%p, %d, %p", $start, $len, $vec) + asmlinkage() + start = ulong_arg(1) + length = ulong_arg(2) + vec_uaddr = pointer_arg(3) + argstr = sprintf("%p, %d, %p", start, length, vec_uaddr) } -probe nd_syscall.mincore.return = kernel.function("sys_mincore").return ? { +probe nd_syscall.mincore.return = kprobe.function("sys_mincore").return ? +{ name = "mincore" retstr = returnstr(1) } # mkdir ______________________________________________________ # long sys_mkdir(const char __user * pathname, int mode) -probe nd_syscall.mkdir = kernel.function("sys_mkdir") { +probe nd_syscall.mkdir = kprobe.function("sys_mkdir") +{ name = "mkdir" - pathname_uaddr = $pathname - pathname = user_string($pathname) - mode = $mode - argstr = sprintf("%s, %#o", user_string_quoted($pathname), $mode) + // pathname_uaddr = $pathname + // pathname = user_string($pathname) + // mode = $mode + // argstr = sprintf("%s, %#o", user_string_quoted($pathname), $mode) + asmlinkage() + pathname_uaddr = pointer_arg(1) + pathname = user_string(pathname_uaddr) + mode = int_arg(2) + argstr = sprintf("%s, %#o", user_string_quoted(pathname_uaddr), mode) } -probe nd_syscall.mkdir.return = kernel.function("sys_mkdir").return { +probe nd_syscall.mkdir.return = kprobe.function("sys_mkdir").return +{ name = "mkdir" retstr = returnstr(1) } @@ -2499,29 +3092,43 @@ probe nd_syscall.mkdir.return = kernel.function("sys_mkdir").return { # mkdirat ____________________________________________________ # new function with 2.6.16 # long sys_mkdirat(int dfd, const char __user *pathname, int mode) -probe nd_syscall.mkdirat = kernel.function("sys_mkdirat") ? { +probe nd_syscall.mkdirat = kprobe.function("sys_mkdirat") ? +{ name = "mkdirat" - dirfd = $dfd - pathname = user_string($pathname) - mode = $mode - argstr = sprintf("%d, %s, %#o", $dfd, user_string_quoted($pathname), $mode) + // dirfd = $dfd + // pathname = user_string($pathname) + // mode = $mode + // argstr = sprintf("%d, %s, %#o", $dfd, user_string_quoted($pathname), $mode) + asmlinkage() + dirfd = int_arg(1) + pathname = user_string(pointer_arg(2)) + mode = int_arg(3) + argstr = sprintf("%d, %s, %#o", dirfd, user_string_quoted(pointer_arg(2)), mode) } -probe nd_syscall.mkdirat.return = kernel.function("sys_mkdirat").return ? { +probe nd_syscall.mkdirat.return = kprobe.function("sys_mkdirat").return ? +{ name = "mkdirat" retstr = returnstr(1) } # mknod # long sys_mknod(const char __user * filename, int mode, unsigned dev) -probe nd_syscall.mknod = kernel.function("sys_mknod") { +probe nd_syscall.mknod = kprobe.function("sys_mknod") +{ name = "mknod" - pathname = user_string($filename) - mode = $mode - dev = $dev - argstr = sprintf("%s, %s, %p", user_string_quoted($filename), _mknod_mode_str($mode), dev) + // pathname = user_string($filename) + // mode = $mode + // dev = $dev + // argstr = sprintf("%s, %s, %p", user_string_quoted($filename), _mknod_mode_str($mode), dev) + asmlinkage() + pathname = user_string(pointer_arg(1)) + mode = int_arg(2) + dev = uint_arg(3) + argstr = sprintf("%s, %s, %p", user_string_quoted(pointer_arg(1)), _mknod_mode_str(mode), dev) } -probe nd_syscall.mknod.return = kernel.function("sys_mknod").return { +probe nd_syscall.mknod.return = kprobe.function("sys_mknod").return +{ name = "mknod" retstr = returnstr(1) } @@ -2530,13 +3137,19 @@ probe nd_syscall.mknod.return = kernel.function("sys_mknod").return { # # long sys_mlock(unsigned long start, size_t len) # -probe nd_syscall.mlock = kernel.function("sys_mlock") ? { +probe nd_syscall.mlock = kprobe.function("sys_mlock") ? +{ name = "mlock" - addr = $start - len = $len - argstr = sprintf("%p, %d", $start, $len) + // addr = $start + // len = $len + // argstr = sprintf("%p, %d", $start, $len) + asmlinkage() + addr = ulong_arg(1) + len = ulong_arg(2) + argstr = sprintf("%p, %d", addr, len) } -probe nd_syscall.mlock.return = kernel.function("sys_mlock").return ? { +probe nd_syscall.mlock.return = kprobe.function("sys_mlock").return ? +{ name = "mlock" retstr = returnstr(1) } @@ -2544,12 +3157,17 @@ probe nd_syscall.mlock.return = kernel.function("sys_mlock").return ? { # # long sys_mlockall(int flags) # -probe nd_syscall.mlockall = kernel.function("sys_mlockall") ? { +probe nd_syscall.mlockall = kprobe.function("sys_mlockall") ? +{ name = "mlockall" - flags = $flags - argstr = _mlockall_flags_str($flags) + // flags = $flags + // argstr = _mlockall_flags_str($flags) + asmlinkage() + flags = int_arg(1) + argstr = _mlockall_flags_str(flags) } -probe nd_syscall.mlockall.return = kernel.function("sys_mlockall").return ? { +probe nd_syscall.mlockall.return = kprobe.function("sys_mlockall").return ? +{ name = "mlockall" retstr = returnstr(1) } @@ -2557,14 +3175,21 @@ probe nd_syscall.mlockall.return = kernel.function("sys_mlockall").return ? { # modify_ldt _________________________________________________ # int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) # -probe nd_syscall.modify_ldt = kernel.function("sys_modify_ldt") ? { +probe nd_syscall.modify_ldt = kprobe.function("sys_modify_ldt") ? +{ name = "modify_ldt" - func = $func - ptr_uaddr = $ptr - bytecount = $bytecount - argstr = sprintf("%d, %p, %d", $func, $ptr, $bytecount) + // func = $func + // ptr_uaddr = $ptr + // bytecount = $bytecount + // argstr = sprintf("%d, %p, %d", $func, $ptr, $bytecount) + asmlinkage() + func = int_arg(1) + ptr_uaddr = pointer_arg(2) + bytecount = ulong_arg(3) + argstr = sprintf("%d, %p, %d", func, ptr_uaddr, bytecount) } -probe nd_syscall.modify_ldt.return = kernel.function("sys_modify_ldt").return ? { +probe nd_syscall.modify_ldt.return = kprobe.function("sys_modify_ldt").return ? +{ name = "modify_ldt" retstr = returnstr(1) } @@ -2582,16 +3207,16 @@ probe nd_syscall.modify_ldt.return = kernel.function("sys_modify_ldt").return ? # int __user *status, # int flags) # -probe nd_syscall.move_pages = - kernel.function("sys_move_pages") ?, - kernel.function("compat_sys_move_pages") ? +probe nd_syscall.move_pages = kprobe.function("sys_move_pages") ?, + kprobe.function("compat_sys_move_pages") ? { name = "move_pages" - argstr = sprintf("%d, %d, %p, %p, 0x%x", $pid, $nr_pages, $nodes, $status, $flags) + // argstr = sprintf("%d, %d, %p, %p, 0x%x", $pid, $nr_pages, $nodes, $status, $flags) + asmlinkage() + argstr = sprintf("%d, %d, %p, %p, 0x%x", int_arg(1), ulong_arg(2), pointer_arg(4), pointer_arg(5), int_arg(6)) } -probe nd_syscall.move_pages.return = - kernel.function("sys_move_pages").return ?, - kernel.function("compat_sys_move_pages").return ? +probe nd_syscall.move_pages.return = kprobe.function("sys_move_pages").return ?, + kprobe.function("compat_sys_move_pages").return ? { name = "move_pages" retstr = returnstr(1) @@ -2608,26 +3233,36 @@ probe nd_syscall.move_pages.return = # char __user * type, # unsigned long flags, # void __user * data) -probe nd_syscall.mount = - kernel.function("sys_mount"), - kernel.function("compat_sys_mount") ? +probe nd_syscall.mount = kprobe.function("sys_mount"), + kprobe.function("compat_sys_mount") ? { name = "mount" - source = user_string($dev_name) - target = user_string($dir_name) - filesystemtype = user_string($type) - mountflags = $flags - mountflags_str = _mountflags_str($flags) - data = text_strn(user_string($data),syscall_string_trunc,1) + // source = user_string($dev_name) + // target = user_string($dir_name) + // filesystemtype = user_string($type) + // mountflags = $flags + // mountflags_str = _mountflags_str($flags) + // data = text_strn(user_string($data), syscall_string_trunc, 1) + // argstr = sprintf("%s, %s, %s, %s, %s", + // user_string_quoted($dev_name), + // user_string_quoted($dir_name), + // user_string_quoted($type), + // mountflags_str, data) + asmlinkage() + source = user_string(pointer_arg(1)) + target = user_string(pointer_arg(2)) + filesystemtype = user_string(pointer_arg(3)) + mountflags = ulong_arg(4) + mountflags_str = _mountflags_str(mountflags) + data = text_strn(user_string(pointer_arg(5)), syscall_string_trunc, 1) argstr = sprintf("%s, %s, %s, %s, %s", - user_string_quoted($dev_name), - user_string_quoted($dir_name), - user_string_quoted($type), + user_string_quoted(pointer_arg(1)), + user_string_quoted(pointer_arg(2)), + user_string_quoted(pointer_arg(3)), mountflags_str, data) } -probe nd_syscall.mount.return = - kernel.function("sys_mount").return, - kernel.function("compat_sys_mount").return ? +probe nd_syscall.mount.return = kprobe.function("sys_mount").return, + kprobe.function("compat_sys_mount").return ? { name = "mount" retstr = returnstr(1) @@ -2636,15 +3271,23 @@ probe nd_syscall.mount.return = # mprotect ___________________________________________________ # long sys_mprotect(unsigned long start, size_t len, unsigned long prot) # -probe nd_syscall.mprotect = kernel.function("sys_mprotect") ? { +probe nd_syscall.mprotect = kprobe.function("sys_mprotect") ? +{ name = "mprotect" - addr = $start - len = $len - prot = $prot - prot_str = _mprotect_prot_str($prot) - argstr = sprintf("%p, %d, %s", $start, $len, _mprotect_prot_str($prot)) + // addr = $start + // len = $len + // prot = $prot + // prot_str = _mprotect_prot_str($prot) + // argstr = sprintf("%p, %d, %s", $start, $len, _mprotect_prot_str($prot)) + asmlinkage() + addr = ulong_arg(1) + len = ulong_arg(2) + prot = ulong_arg(3) + prot_str = _mprotect_prot_str(prot) + argstr = sprintf("%p, %d, %s", addr, len, _mprotect_prot_str(prot)) } -probe nd_syscall.mprotect.return = kernel.function("sys_mprotect").return ? { +probe nd_syscall.mprotect.return = kprobe.function("sys_mprotect").return ? +{ name = "mprotect" retstr = returnstr(1) } @@ -2657,19 +3300,22 @@ probe nd_syscall.mprotect.return = kernel.function("sys_mprotect").return ? { # const struct compat_mq_attr __user *u_mqstat, # struct compat_mq_attr __user *u_omqstat) # -probe nd_syscall.mq_getsetattr = - kernel.function("sys_mq_getsetattr") ?, - kernel.function("compat_sys_mq_getsetattr") ? +probe nd_syscall.mq_getsetattr = kprobe.function("sys_mq_getsetattr") ?, + kprobe.function("compat_sys_mq_getsetattr") ? { name = "mq_getsetattr" - mqdes = $mqdes - u_mqstat_uaddr = $u_mqstat - u_omqstat_uaddr = $u_omqstat - argstr = sprintf("%d, %p, %p", $mqdes, $u_mqstat, $u_omqstat) + // mqdes = $mqdes + // u_mqstat_uaddr = $u_mqstat + // u_omqstat_uaddr = $u_omqstat + // argstr = sprintf("%d, %p, %p", $mqdes, $u_mqstat, $u_omqstat) + asmlinkage() + mqdes = int_arg(1) + u_mqstat_uaddr = pointer_arg(2) + u_omqstat_uaddr = pointer_arg(3) + argstr = sprintf("%d, %p, %p", mqdes, u_mqstat_uaddr, u_omqstat_uaddr) } -probe nd_syscall.mq_getsetattr.return = - kernel.function("sys_mq_getsetattr").return ?, - kernel.function("compat_sys_mq_getsetattr").return ? +probe nd_syscall.mq_getsetattr.return = kprobe.function("sys_mq_getsetattr").return ?, + kprobe.function("compat_sys_mq_getsetattr").return ? { name = "mq_getsetattr" retstr = returnstr(1) @@ -2679,18 +3325,20 @@ probe nd_syscall.mq_getsetattr.return = # long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) # long compat_sys_mq_notify(mqd_t mqdes, const struct compat_sigevent __user *u_notification) # -probe nd_syscall.mq_notify = - kernel.function("sys_mq_notify") ?, - kernel.function("compat_sys_mq_notify") ? +probe nd_syscall.mq_notify = kprobe.function("sys_mq_notify") ?, + kprobe.function("compat_sys_mq_notify") ? { name = "mq_notify" - mqdes = $mqdes - notification_uaddr = $u_notification - argstr = sprintf("%d, %p", $mqdes, $u_notification) + // mqdes = $mqdes + // notification_uaddr = $u_notification + // argstr = sprintf("%d, %p", $mqdes, $u_notification) + asmlinkage() + mqdes = int_arg(1) + notification_uaddr = pointer_arg(2) + argstr = sprintf("%d, %p", mqdes, notification_uaddr) } -probe nd_syscall.mq_notify.return = - kernel.function("sys_mq_notify").return ?, - kernel.function("compat_sys_mq_notify").return ? +probe nd_syscall.mq_notify.return = kprobe.function("sys_mq_notify").return ?, + kprobe.function("compat_sys_mq_notify").return ? { name = "mq_notify" retstr = returnstr(1) @@ -2705,9 +3353,8 @@ probe nd_syscall.mq_notify.return = # int oflag, compat_mode_t mode, # struct compat_mq_attr __user *u_attr) # -probe nd_syscall.mq_open = - kernel.function("sys_mq_open") ?, - kernel.function("compat_sys_mq_open") ? +probe nd_syscall.mq_open = kprobe.function("sys_mq_open") ?, + kprobe.function("compat_sys_mq_open") ? { name = "mq_open" // name_uaddr = $u_name @@ -2733,9 +3380,8 @@ probe nd_syscall.mq_open = else argstr = sprintf("%s, %s", user_string_quoted(name_uaddr), _sys_open_flag_str(oflag)) } -probe nd_syscall.mq_open.return = - kernel.function("sys_mq_open").return ?, - kernel.function("compat_sys_mq_open").return ? +probe nd_syscall.mq_open.return = kprobe.function("sys_mq_open").return ?, + kprobe.function("compat_sys_mq_open").return ? { name = "mq_open" retstr = returnstr(1) @@ -2752,22 +3398,28 @@ probe nd_syscall.mq_open.return = # size_t msg_len, unsigned int __user *u_msg_prio, # const struct compat_timespec __user *u_abs_timeout) # -probe nd_syscall.mq_timedreceive = - kernel.function("sys_mq_timedreceive") ?, - kernel.function("compat_sys_mq_timedreceive") ? +probe nd_syscall.mq_timedreceive = kprobe.function("sys_mq_timedreceive") ?, + kprobe.function("compat_sys_mq_timedreceive") ? { name = "mq_timedreceive" - mqdes = $mqdes - msg_ptr_uaddr = $u_msg_ptr - msg_len = $msg_len - msg_prio_uaddr = $u_msg_prio - abs_timout_uaddr = $u_abs_timeout - argstr = sprintf("%d, %p, %d, %p, %p", $mqdes, $u_msg_ptr, $msg_len, - $u_msg_prio, $u_abs_timeout) -} -probe nd_syscall.mq_timedreceive.return = - kernel.function("sys_mq_timedreceive").return ?, - kernel.function("compat_sys_mq_timedreceive").return ? + // mqdes = $mqdes + // msg_ptr_uaddr = $u_msg_ptr + // msg_len = $msg_len + // msg_prio_uaddr = $u_msg_prio + // abs_timout_uaddr = $u_abs_timeout + // argstr = sprintf("%d, %p, %d, %p, %p", $mqdes, $u_msg_ptr, $msg_len, + // $u_msg_prio, $u_abs_timeout) + asmlinkage() + mqdes = int_arg(1) + msg_ptr_uaddr = pointer_arg(2) + msg_len = ulong_arg(3) + msg_prio_uaddr = pointer_arg(4) + abs_timeout_uaddr = pointer_arg(5) + argstr = sprintf("%d, %p, %d, %p, %p", mqdes, msg_ptr_uaddr, msg_len, + msg_prio_uaddr, abs_timeout_uaddr) +} +probe nd_syscall.mq_timedreceive.return = kprobe.function("sys_mq_timedreceive").return ?, + kprobe.function("compat_sys_mq_timedreceive").return ? { name = "mq_timedreceive" retstr = returnstr(1) @@ -2784,22 +3436,28 @@ probe nd_syscall.mq_timedreceive.return = # size_t msg_len, unsigned int msg_prio, # const struct compat_timespec __user *u_abs_timeout) # -probe nd_syscall.mq_timedsend = - kernel.function("sys_mq_timedsend") ?, - kernel.function("compat_sys_mq_timedsend") ? +probe nd_syscall.mq_timedsend = kprobe.function("sys_mq_timedsend") ?, + kprobe.function("compat_sys_mq_timedsend") ? { name = "mq_timedsend" - mqdes = $mqdes - msg_ptr_uaddr = $u_msg_ptr - msg_len = $msg_len - msg_prio = $msg_prio - abs_timeout_uaddr = $u_abs_timeout - argstr = sprintf("%d, %p, %d, %d, %p", $mqdes, $u_msg_ptr, $msg_len, - $msg_prio, $u_abs_timeout) -} -probe nd_syscall.mq_timedsend.return = - kernel.function("sys_mq_timedsend").return ?, - kernel.function("compat_sys_mq_timedsend").return ? + // mqdes = $mqdes + // msg_ptr_uaddr = $u_msg_ptr + // msg_len = $msg_len + // msg_prio = $msg_prio + // abs_timeout_uaddr = $u_abs_timeout + // argstr = sprintf("%d, %p, %d, %d, %p", $mqdes, $u_msg_ptr, $msg_len, + // $msg_prio, $u_abs_timeout) + asmlinkage() + mqdes = int_arg(1) + msg_ptr_uaddr = pointer_arg(2) + msg_len = ulong_arg(3) + msg_prio = uint_arg(4) + abs_timeout_uaddr = pointer_arg(5) + argstr = sprintf("%d, %p, %d, %d, %p", mqdes, msg_ptr_uaddr, msg_len, + msg_prio, abs_timeout_uaddr) +} +probe nd_syscall.mq_timedsend.return = kprobe.function("sys_mq_timedsend").return ?, + kprobe.function("compat_sys_mq_timedsend").return ? { name = "mq_timedsend" retstr = returnstr(1) @@ -2808,13 +3466,19 @@ probe nd_syscall.mq_timedsend.return = # mq_unlink __________________________________________________ # long sys_mq_unlink(const char __user *u_name) # -probe nd_syscall.mq_unlink = kernel.function("sys_mq_unlink") ? { +probe nd_syscall.mq_unlink = kprobe.function("sys_mq_unlink") ? +{ name = "mq_unlink" - u_name_uaddr = $u_name - u_name = user_string($u_name) - argstr = user_string_quoted($u_name) + // u_name_uaddr = $u_name + // u_name = user_string($u_name) + // argstr = user_string_quoted($u_name) + asmlinkage() + u_name_uaddr = pointer_arg(1) + u_name = user_string(u_name_uaddr) + argstr = user_string_quoted(u_name_uaddr) } -probe nd_syscall.mq_unlink.return = kernel.function("sys_mq_unlink").return ? { +probe nd_syscall.mq_unlink.return = kprobe.function("sys_mq_unlink").return ? +{ name = "mq_unlink" retstr = returnstr(1) } @@ -2826,22 +3490,28 @@ probe nd_syscall.mq_unlink.return = kernel.function("sys_mq_unlink").return ? { # unsigned long flags, # unsigned long new_addr) # -probe nd_syscall.mremap = - kernel.function("sys_mremap") ?, - kernel.function("ia64_mremap") ? +probe nd_syscall.mremap = kprobe.function("sys_mremap") ?, + kprobe.function("ia64_mremap") ? { name = "mremap" - old_address = $addr - old_size = $old_len - new_size = $new_len - flags = $flags - new_address = $new_addr - argstr = sprintf("%p, %d, %d, %s, %p", $addr, $old_len, $new_len, - _mremap_flags($flags), $new_addr) -} -probe nd_syscall.mremap.return = - kernel.function("sys_mremap").return ?, - kernel.function("ia64_mremap").return ? + // old_address = $addr + // old_size = $old_len + // new_size = $new_len + // flags = $flags + // new_address = $new_addr + // argstr = sprintf("%p, %d, %d, %s, %p", $addr, $old_len, $new_len, + // _mremap_flags($flags), $new_addr) + asmlinkage() + old_address = ulong_arg(1) + old_size = ulong_arg(2) + new_size = ulong_arg(3) + flags = ulong_arg(4) + new_address = ulong_arg(5) + argstr = sprintf("%p, %d, %d, %s, %p", old_address, old_size, new_size, + _mremap_flags(flags), new_address) +} +probe nd_syscall.mremap.return = kprobe.function("sys_mremap").return ?, + kprobe.function("ia64_mremap").return ? { name = "mremap" retstr = returnstr(2) @@ -2850,14 +3520,21 @@ probe nd_syscall.mremap.return = # msgctl _____________________________________________________ # long sys_msgctl (int msqid, int cmd, struct msqid_ds __user *buf) # -probe nd_syscall.msgctl = kernel.function("sys_msgctl") ? { +probe nd_syscall.msgctl = kprobe.function("sys_msgctl") ? +{ name = "msgctl" - msqid = $msqid - cmd = $cmd - buf_uaddr = $buf - argstr = sprintf("%d, %d, %p", $msqid, $cmd, $buf) + // msqid = $msqid + // cmd = $cmd + // buf_uaddr = $buf + // argstr = sprintf("%d, %d, %p", $msqid, $cmd, $buf) + asmlinkage() + msqid = int_arg(1) + cmd = int_arg(2) + buf_uaddr = pointer_arg(3) + argstr = sprintf("%d, %d, %p", msqid, cmd, buf_uaddr) } -probe nd_syscall.msgctl.return = kernel.function("sys_msgctl").return ? { +probe nd_syscall.msgctl.return = kprobe.function("sys_msgctl").return ? +{ name = "msgctl" retstr = returnstr(1) } @@ -2865,11 +3542,15 @@ probe nd_syscall.msgctl.return = kernel.function("sys_msgctl").return ? { # # long compat_sys_msgctl(int first, int second, void __user *uptr) # -probe nd_syscall.compat_sys_msgctl = kernel.function("compat_sys_msgctl") ? { +probe nd_syscall.compat_sys_msgctl = kprobe.function("compat_sys_msgctl") ? +{ name = "compat_sys_msgctl" - argstr = sprintf("%d, %d, %p", $first, $second, $uptr) + // argstr = sprintf("%d, %d, %p", $first, $second, $uptr) + asmlinkage() + argstr = sprintf("%d, %d, %p", int_arg(1), int_arg(2), pointer_arg(3)) } -probe nd_syscall.compat_sys_msgctl.return = kernel.function("compat_sys_msgctl").return ? { +probe nd_syscall.compat_sys_msgctl.return = kprobe.function("compat_sys_msgctl").return ? +{ name = "compat_sys_msgctl" retstr = returnstr(1) } @@ -2877,14 +3558,21 @@ probe nd_syscall.compat_sys_msgctl.return = kernel.function("compat_sys_msgctl") # msgget _____________________________________________________ # long sys_msgget (key_t key, int msgflg) # -probe nd_syscall.msgget = kernel.function("sys_msgget") ? { +probe nd_syscall.msgget = kprobe.function("sys_msgget") ? +{ name = "msgget" - key = $key - msgflg = $msgflg - msgflg_str = _sys_open_flag_str($msgflg) - argstr = sprintf("%d, %s", $key, _sys_open_flag_str($msgflg)) + // key = $key + // msgflg = $msgflg + // msgflg_str = _sys_open_flag_str($msgflg) + // argstr = sprintf("%d, %s", $key, _sys_open_flag_str($msgflg)) + asmlinkage() + key = int_arg(1) + msgflg = int_arg(2) + msgflg_str = _sys_open_flag_str(msgflg) + argstr = sprintf("%d, %s", key, _sys_open_flag_str(msgflg)) } -probe nd_syscall.msgget.return = kernel.function("sys_msgget").return ? { +probe nd_syscall.msgget.return = kprobe.function("sys_msgget").return ? +{ name = "msgget" retstr = returnstr(1) } @@ -2896,16 +3584,25 @@ probe nd_syscall.msgget.return = kernel.function("sys_msgget").return ? { # long msgtyp, # int msgflg) # -probe nd_syscall.msgrcv = kernel.function("sys_msgrcv") ? { +probe nd_syscall.msgrcv = kprobe.function("sys_msgrcv") ? +{ name = "msgrcv" - msqid = $msqid - msgp_uaddr = $msgp - msgsz = $msgsz - msgtyp = $msgtyp - msgflg = $msgflg - argstr = sprintf("%d, %p, %d, %d, %d", $msqid, $msgp, $msgsz, $msgtyp, $msgflg) -} -probe nd_syscall.msgrcv.return = kernel.function("sys_msgrcv").return ? { + // msqid = $msqid + // msgp_uaddr = $msgp + // msgsz = $msgsz + // msgtyp = $msgtyp + // msgflg = $msgflg + // argstr = sprintf("%d, %p, %d, %d, %d", $msqid, $msgp, $msgsz, $msgtyp, $msgflg) + asmlinkage() + msqid = int_arg(1) + msgp_uaddr = pointer_arg(2) + msgsz = ulong_arg(3) + msgtyp = long_arg(4) + msgflg = int_arg(5) + argstr = sprintf("%d, %p, %d, %d, %d", msqid, msgp_uaddr, msgsz, msgtyp, msgflg) +} +probe nd_syscall.msgrcv.return = kprobe.function("sys_msgrcv").return ? +{ name = "msgrcv" retstr = returnstr(1) } @@ -2914,11 +3611,15 @@ probe nd_syscall.msgrcv.return = kernel.function("sys_msgrcv").return ? { # long compat_sys_msgrcv(int first, int second, int msgtyp, int third, # int version, void __user *uptr) # -probe nd_syscall.compat_sys_msgrcv = kernel.function("compat_sys_msgrcv") ? { +probe nd_syscall.compat_sys_msgrcv = kprobe.function("compat_sys_msgrcv") ? +{ name = "compat_sys_msgrcv" - argstr = sprintf("%d, %d, %d, %p", $first, $second, $third, $uptr) + // argstr = sprintf("%d, %d, %d, %p", $first, $second, $third, $uptr) + asmlinkage() + argstr = sprintf("%d, %d, %d, %p", int_arg(1), int_arg(2), int_arg(3), pointer_arg(5)) } -probe nd_syscall.compat_sys_msgrcv.return = kernel.function("compat_sys_msgrcv").return ? { +probe nd_syscall.compat_sys_msgrcv.return = kprobe.function("compat_sys_msgrcv").return ? +{ name = "compat_sys_msgrcv" retstr = returnstr(1) } @@ -2929,15 +3630,23 @@ probe nd_syscall.compat_sys_msgrcv.return = kernel.function("compat_sys_msgrcv") # size_t msgsz, # int msgflg) # -probe nd_syscall.msgsnd = kernel.function("sys_msgsnd") ? { +probe nd_syscall.msgsnd = kprobe.function("sys_msgsnd") ? +{ name = "msgsnd" - msqid = $msqid - msgp_uaddr = $msgp - msgsz = $msgsz - msgflg = $msgflg - argstr = sprintf("%d, %p, %d, %d", $msqid, $msgp, $msgsz, $msgflg) + // msqid = $msqid + // msgp_uaddr = $msgp + // msgsz = $msgsz + // msgflg = $msgflg + // argstr = sprintf("%d, %p, %d, %d", $msqid, $msgp, $msgsz, $msgflg) + asmlinkage() + msqid = int_arg(1) + msgp_uaddr = pointer_arg(2) + msgsz = ulong_arg(3) + msgflg = int_arg(4) + argstr = sprintf("%d, %p, %d, %d", msqid, msgp_uaddr, msgsz, msgflg) } -probe nd_syscall.msgsnd.return = kernel.function("sys_msgsnd").return ? { +probe nd_syscall.msgsnd.return = kprobe.function("sys_msgsnd").return ? +{ name = "msgsnd" retstr = returnstr(1) } @@ -2945,62 +3654,84 @@ probe nd_syscall.msgsnd.return = kernel.function("sys_msgsnd").return ? { # # long compat_sys_msgsnd(int first, int second, int third, void __user *uptr) # -probe nd_syscall.compat_sys_msgsnd = kernel.function("compat_sys_msgsnd") ? { +probe nd_syscall.compat_sys_msgsnd = kprobe.function("compat_sys_msgsnd") ? +{ name = "compat_sys_msgsnd" - argstr = sprintf("%d, %d, %d, %p", $first, $second, $third, $uptr) + // argstr = sprintf("%d, %d, %d, %p", $first, $second, $third, $uptr) + asmlinkage() + argstr = sprintf("%d, %d, %d, %p", int_arg(1), int_arg(2), int_arg(3), pointer_arg(4)) } -probe nd_syscall.compat_sys_msgsnd.return = kernel.function("compat_sys_msgsnd").return ? { +probe nd_syscall.compat_sys_msgsnd.return = kprobe.function("compat_sys_msgsnd").return ? +{ name = "compat_sys_msgsnd" retstr = returnstr(1) } # msync ______________________________________________________ # long sys_msync(unsigned long start, size_t len, int flags) -probe nd_syscall.msync = kernel.function("sys_msync") ? { +probe nd_syscall.msync = kprobe.function("sys_msync") ? +{ name = "msync" - start = $start - length = $len - flags = $flags - argstr = sprintf("%p, %d, %s",start, length, _msync_flag_str(flags)) + // start = $start + // length = $len + // flags = $flags + asmlinkage() + start = ulong_arg(1) + length = ulong_arg(2) + flags = int_arg(3) + argstr = sprintf("%p, %d, %s", start, length, _msync_flag_str(flags)) } -probe nd_syscall.msync.return = kernel.function("sys_msync").return ? { +probe nd_syscall.msync.return = kprobe.function("sys_msync").return ? +{ name = "msync" retstr = returnstr(1) } # munlock ____________________________________________________ # long sys_munlock(unsigned long start, size_t len) -probe nd_syscall.munlock = kernel.function("sys_munlock") ? { +probe nd_syscall.munlock = kprobe.function("sys_munlock") ? +{ name = "munlock" - addr = $start - len = $len + // addr = $start + // len = $len + asmlinkage() + addr = ulong_arg(1) + len = ulong_arg(2) argstr = sprintf("%p, %d", addr, len) } -probe nd_syscall.munlock.return = kernel.function("sys_munlock").return ? { +probe nd_syscall.munlock.return = kprobe.function("sys_munlock").return ? +{ name = "munlock" retstr = returnstr(1) } # munlockall _________________________________________________ # long sys_munlockall(void) -probe nd_syscall.munlockall = kernel.function("sys_munlockall") ? { +probe nd_syscall.munlockall = kprobe.function("sys_munlockall") ? +{ name = "munlockall" argstr = "" } -probe nd_syscall.munlockall.return = kernel.function("sys_munlockall").return ? { +probe nd_syscall.munlockall.return = kprobe.function("sys_munlockall").return ? +{ name = "munlockall" retstr = returnstr(1) } # munmap _____________________________________________________ # long sys_munmap(unsigned long addr, size_t len) -probe nd_syscall.munmap = kernel.function("sys_munmap") { +probe nd_syscall.munmap = kprobe.function("sys_munmap") +{ name = "munmap" - start = $addr - length = $len + // start = $addr + // length = $len + asmlinkage() + start = ulong_arg(1) + length = ulong_arg(2) argstr = sprintf("%p, %d", start, length) } -probe nd_syscall.munmap.return = kernel.function("sys_munmap").return { +probe nd_syscall.munmap.return = kprobe.function("sys_munmap").return +{ name = "munmap" retstr = returnstr(1) } diff --git a/tapset/syscalls.stp b/tapset/syscalls.stp index a215dc12..0eaf84c8 100644 --- a/tapset/syscalls.stp +++ b/tapset/syscalls.stp @@ -2976,7 +2976,7 @@ probe syscall.mq_timedreceive = msg_ptr_uaddr = $u_msg_ptr msg_len = $msg_len msg_prio_uaddr = $u_msg_prio - abs_timout_uaddr = $u_abs_timeout + abs_timeout_uaddr = $u_abs_timeout argstr = sprintf("%d, %p, %d, %p, %p", $mqdes, $u_msg_ptr, $msg_len, $u_msg_prio, $u_abs_timeout) } diff --git a/tapsets.cxx b/tapsets.cxx index ec9ce3b7..b7bbe26e 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -20,17 +20,13 @@ #include "dwarf_wrappers.h" #include "auto_free.h" #include "hash.h" +#include "dwflpp.h" #include <cstdlib> #include <algorithm> #include <deque> #include <iostream> #include <map> -#ifdef HAVE_TR1_UNORDERED_MAP -#include <tr1/unordered_map> -#else -#include <ext/hash_map> -#endif #include <set> #include <sstream> #include <stdexcept> @@ -250,19 +246,21 @@ common_probe_entryfn_epilogue (translator_output* o, // Dwarf derived probes. "We apologize for the inconvience." // ------------------------------------------------------------------------ -static string TOK_KERNEL("kernel"); -static string TOK_MODULE("module"); -static string TOK_FUNCTION("function"); -static string TOK_INLINE("inline"); -static string TOK_CALL("call"); -static string TOK_RETURN("return"); -static string TOK_MAXACTIVE("maxactive"); -static string TOK_STATEMENT("statement"); -static string TOK_ABSOLUTE("absolute"); -static string TOK_PROCESS("process"); -static string TOK_MARK("mark"); -static string TOK_TRACE("trace"); -static string TOK_LABEL("label"); +static const string TOK_KERNEL("kernel"); +static const string TOK_MODULE("module"); +static const string TOK_FUNCTION("function"); +static const string TOK_INLINE("inline"); +static const string TOK_CALL("call"); +static const string TOK_RETURN("return"); +static const string TOK_MAXACTIVE("maxactive"); +static const string TOK_STATEMENT("statement"); +static const string TOK_ABSOLUTE("absolute"); +static const string TOK_PROCESS("process"); +static const string TOK_MARK("mark"); +static const string TOK_TRACE("trace"); +static const string TOK_LABEL("label"); + +static int query_cu (Dwarf_Die * cudie, void * arg); // Can we handle this query with just symbol-table info? enum dbinfo_reqt @@ -273,67 +271,6 @@ enum dbinfo_reqt dbr_need_dwarf }; -enum info_status -{ - info_unknown, - info_present, - info_absent -}; - -struct -func_info -{ - func_info() - : decl_file(NULL), decl_line(-1), addr(0), prologue_end(0), weak(false) - { - memset(&die, 0, sizeof(die)); - } - string name; - char const * decl_file; - int decl_line; - Dwarf_Die die; - Dwarf_Addr addr; - Dwarf_Addr entrypc; - Dwarf_Addr prologue_end; - bool weak; - // Comparison functor for list of functions sorted by address. The - // two versions that take a Dwarf_Addr let us use the STL algorithms - // upper_bound, equal_range et al., but we don't know whether the - // searched-for value will be passed as the first or the second - // argument. - struct Compare - { - bool operator() (const func_info* f1, const func_info* f2) const - { - return f1->addr < f2->addr; - } - // For doing lookups by address. - bool operator() (Dwarf_Addr addr, const func_info* f2) const - { - return addr < f2->addr; - } - bool operator() (const func_info* f1, Dwarf_Addr addr) const - { - return f1->addr < addr; - } - }; -}; - -struct -inline_instance_info -{ - inline_instance_info() - : decl_file(NULL), decl_line(-1) - { - memset(&die, 0, sizeof(die)); - } - string name; - char const * decl_file; - int decl_line; - Dwarf_Addr entrypc; - Dwarf_Die die; -}; - struct base_query; // forward decls struct dwarf_query; @@ -342,57 +279,6 @@ struct symbol_table; struct -module_info -{ - Dwfl_Module* mod; - const char* name; - string elf_path; - Dwarf_Addr addr; - Dwarf_Addr bias; - symbol_table *sym_table; - info_status dwarf_status; // module has dwarf info? - info_status symtab_status; // symbol table cached? - - void get_symtab(dwarf_query *q); - - module_info(const char *name) : - mod(NULL), - name(name), - addr(0), - bias(0), - sym_table(NULL), - dwarf_status(info_unknown), - symtab_status(info_unknown) - {} - - ~module_info(); -}; - -struct -module_cache -{ - map<string, module_info*> cache; - bool paths_collected; - bool dwarf_collected; - - module_cache() : paths_collected(false), dwarf_collected(false) {} -}; -typedef struct module_cache module_cache_t; - -#ifdef HAVE_TR1_UNORDERED_MAP -typedef tr1::unordered_map<string,Dwarf_Die> cu_function_cache_t; -typedef tr1::unordered_map<string,cu_function_cache_t*> mod_cu_function_cache_t; // module:cu -> function -> die -#else -struct stringhash { - // __gnu_cxx:: is needed because our own hash.h has an ambiguous hash<> decl too. - size_t operator() (const string& s) const { __gnu_cxx::hash<const char*> h; return h(s.c_str()); } -}; - -typedef hash_map<string,Dwarf_Die,stringhash> cu_function_cache_t; -typedef hash_map<string,cu_function_cache_t*,stringhash> mod_cu_function_cache_t; // module:cu -> function -> die -#endif - -struct symbol_table { module_info *mod_info; // associated module @@ -430,25 +316,6 @@ static bool null_die(Dwarf_Die *die) return (!die || !memcmp(die, &null, sizeof(null))); } -static int -query_cu (Dwarf_Die * cudie, void * arg); - - -// Helper for dealing with selected portions of libdwfl in a more readable -// fashion, and with specific cleanup / checking / logging options. - -static const char * -dwarf_diename_integrate (Dwarf_Die *die) -{ - Dwarf_Attribute attr_mem; - return dwarf_formstring (dwarf_attr_integrate (die, DW_AT_name, &attr_mem)); -} - -enum line_t { ABSOLUTE, RELATIVE, RANGE, WILDCARD }; - -typedef vector<inline_instance_info> inline_instance_map_t; -typedef vector<func_info> func_info_map_t; - // PR 9941 introduces the need for a predicate @@ -458,1834 +325,6 @@ int dwfl_report_offline_predicate (const char* modname, const char* filename) return 1; } -struct dwflpp -{ - systemtap_session & sess; - Dwfl * dwfl; - - // These are "current" values we focus on. - Dwfl_Module * module; - Dwarf * module_dwarf; - Dwarf_Addr module_bias; - module_info * mod_info; - - // These describe the current module's PC address range - Dwarf_Addr module_start; - Dwarf_Addr module_end; - - Dwarf_Die * cu; - Dwarf_Die * function; - - string module_name; - string cu_name; - string function_name; - - string const default_name(char const * in, - char const *) - { - if (in) - return in; - return string(""); - } - - - void get_module_dwarf(bool required = false, bool report = true) - { - module_dwarf = dwfl_module_getdwarf(module, &module_bias); - mod_info->dwarf_status = (module_dwarf ? info_present : info_absent); - if (!module_dwarf && report) - { - string msg = "cannot find "; - if (module_name == "") - msg += "kernel"; - else - msg += string("module ") + module_name; - msg += " debuginfo"; - - int i = dwfl_errno(); - if (i) - msg += string(": ") + dwfl_errmsg (i); - - if (required) - throw semantic_error (msg); - else - cerr << "WARNING: " << msg << "\n"; - } - } - - void focus_on_module(Dwfl_Module * m, module_info * mi) - { - module = m; - mod_info = mi; - if (m) - { - module_name = default_name(dwfl_module_info(module, NULL, - &module_start, &module_end, - NULL, NULL, - NULL, NULL), - "module"); - } - else - { - assert(mi && mi->name && mi->name == TOK_KERNEL); - module_name = mi->name; - module_start = 0; - module_end = 0; - module_bias = mi->bias; - } - - // Reset existing pointers and names - - module_dwarf = NULL; - - cu_name.clear(); - cu = NULL; - - function_name.clear(); - function = NULL; - } - - - void focus_on_cu(Dwarf_Die * c) - { - assert(c); - assert(module); - - cu = c; - cu_name = default_name(dwarf_diename(c), "CU"); - - // Reset existing pointers and names - function_name.clear(); - function = NULL; - } - - - void focus_on_function(Dwarf_Die * f) - { - assert(f); - assert(module); - assert(cu); - - function = f; - function_name = default_name(dwarf_diename(function), - "function"); - } - - - void focus_on_module_containing_global_address(Dwarf_Addr a) - { - assert(dwfl); - cu = NULL; - Dwfl_Module* mod = dwfl_addrmodule(dwfl, a); - if (mod) // address could be wildly out of range - focus_on_module(mod, NULL); - } - - - void query_cu_containing_global_address(Dwarf_Addr a, void *arg) - { - Dwarf_Addr bias; - assert(dwfl); - get_module_dwarf(); - Dwarf_Die* cudie = dwfl_module_addrdie(module, a, &bias); - if (cudie) // address could be wildly out of range - query_cu (cudie, arg); - assert(bias == module_bias); - } - - - void query_cu_containing_module_address(Dwarf_Addr a, void *arg) - { - query_cu_containing_global_address(module_address_to_global(a), arg); - } - - - Dwarf_Addr module_address_to_global(Dwarf_Addr a) - { - assert(dwfl); - assert(module); - get_module_dwarf(); - if (module_name == TOK_KERNEL || dwfl_module_relocations (module) <= 0) - return a; - return a + module_start; - } - - - Dwarf_Addr global_address_to_module(Dwarf_Addr a) - { - assert(module); - get_module_dwarf(); - return a - module_bias; - } - - - bool module_name_matches(string pattern) - { - bool t = (fnmatch(pattern.c_str(), module_name.c_str(), 0) == 0); - if (t && sess.verbose>3) - clog << "pattern '" << pattern << "' " - << "matches " - << "module '" << module_name << "'" << "\n"; - return t; - } - bool name_has_wildcard(string pattern) - { - return (pattern.find('*') != string::npos || - pattern.find('?') != string::npos || - pattern.find('[') != string::npos); - } - bool module_name_final_match(string pattern) - { - // Assume module_name_matches(). Can there be any more matches? - // Not unless the pattern is a wildcard, since module names are - // presumed unique. - return !name_has_wildcard(pattern); - } - - - bool function_name_matches_pattern(string name, string pattern) - { - bool t = (fnmatch(pattern.c_str(), name.c_str(), 0) == 0); - if (t && sess.verbose>3) - clog << "pattern '" << pattern << "' " - << "matches " - << "function '" << name << "'" << "\n"; - return t; - } - bool function_name_matches(string pattern) - { - assert(function); - return function_name_matches_pattern(function_name, pattern); - } - bool function_name_final_match(string pattern) - { - return module_name_final_match (pattern); - } - - - bool cu_name_matches(string pattern) - { - assert(cu); - - // PR 5049: implicit * in front of given path pattern. - // NB: fnmatch() is used without FNM_PATHNAME. - string prefixed_pattern = string("*/") + pattern; - - bool t = (fnmatch(pattern.c_str(), cu_name.c_str(), 0) == 0 || - fnmatch(prefixed_pattern.c_str(), cu_name.c_str(), 0) == 0); - if (t && sess.verbose>3) - clog << "pattern '" << prefixed_pattern << "' " - << "matches " - << "CU '" << cu_name << "'" << "\n"; - return t; - } - - dwflpp(systemtap_session & session) - : - sess(session), - dwfl(NULL), - module(NULL), - module_dwarf(NULL), - module_bias(0), - mod_info(NULL), - module_start(0), - module_end(0), - cu(NULL), - function(NULL) - { - } - - - // XXX: See also translate.cxx:emit_symbol_data - - void setup_kernel(bool debuginfo_needed = true) - { - if (! sess.module_cache) - sess.module_cache = new module_cache (); - - static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; - static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); - static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr ); - - static const Dwfl_Callbacks kernel_callbacks = - { - dwfl_linux_kernel_find_elf, - dwfl_standard_find_debuginfo, - dwfl_offline_section_address, - (char **) & debuginfo_path - }; - - dwfl = dwfl_begin (&kernel_callbacks); - if (!dwfl) - throw semantic_error ("cannot open dwfl"); - dwfl_report_begin (dwfl); - - // We have a problem with -r REVISION vs -r BUILDDIR here. If - // we're running against a fedora/rhel style kernel-debuginfo - // tree, s.kernel_build_tree is not the place where the unstripped - // vmlinux will be installed. Rather, it's over yonder at - // /usr/lib/debug/lib/modules/$REVISION/. It seems that there is - // no way to set the dwfl_callback.debuginfo_path and always - // passs the plain kernel_release here. So instead we have to - // hard-code this magic here. - string elfutils_kernel_path; - if (sess.kernel_build_tree == string("/lib/modules/" + sess.kernel_release + "/build")) - elfutils_kernel_path = sess.kernel_release; - else - elfutils_kernel_path = sess.kernel_build_tree; - - int rc = dwfl_linux_kernel_report_offline (dwfl, - elfutils_kernel_path.c_str(), - &dwfl_report_offline_predicate); - - if (debuginfo_needed) - dwfl_assert (string("missing ") + sess.architecture + - string(" kernel/module debuginfo under '") + - sess.kernel_build_tree + string("'"), - rc); - - // XXX: it would be nice if we could do a single - // ..._report_offline call for an entire systemtap script, so - // that a selection predicate would filter out modules outside - // the union of all the requested wildcards. But we build - // derived_probes one-by-one and we don't have lookahead. - // PR 3498. - - // XXX: a special case: if we have only kernel.* probe points, - // we shouldn't waste time looking for module debug-info (and - // vice versa). - - // NB: the result of an _offline call is the assignment of - // virtualized addresses to relocatable objects such as - // modules. These have to be converted to real addresses at - // run time. See the dwarf_derived_probe ctor and its caller. - - dwfl_assert ("dwfl_report_end", dwfl_report_end(dwfl, NULL, NULL)); - } - - void setup_user(string module_name, bool debuginfo_needed = true) - { - if (! sess.module_cache) - sess.module_cache = new module_cache (); - - static const char *debuginfo_path_arr = "+:.debug:/usr/lib/debug:build"; - static const char *debuginfo_env_arr = getenv("SYSTEMTAP_DEBUGINFO_PATH"); - // NB: kernel_build_tree doesn't enter into this, as it's for - // kernel-side modules only. - static const char *debuginfo_path = (debuginfo_env_arr ?: debuginfo_path_arr); - - static const Dwfl_Callbacks user_callbacks = - { - NULL, /* dwfl_linux_kernel_find_elf, */ - dwfl_standard_find_debuginfo, - dwfl_offline_section_address, - (char **) & debuginfo_path - }; - - dwfl = dwfl_begin (&user_callbacks); - if (!dwfl) - throw semantic_error ("cannot open dwfl"); - dwfl_report_begin (dwfl); - - // XXX: should support buildid-based naming - - Dwfl_Module *mod = dwfl_report_offline (dwfl, - module_name.c_str(), - module_name.c_str(), - -1); - // XXX: save mod! - - if (debuginfo_needed) - dwfl_assert (string("missing process ") + - module_name + - string(" ") + - sess.architecture + - string(" debuginfo"), - mod); - - if (!module) - module = mod; - - // NB: the result of an _offline call is the assignment of - // virtualized addresses to relocatable objects such as - // modules. These have to be converted to real addresses at - // run time. See the dwarf_derived_probe ctor and its caller. - - dwfl_assert ("dwfl_report_end", dwfl_report_end(dwfl, NULL, NULL)); - } - - - - // ----------------------------------------------------------------- - - void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, - const char *, Dwarf_Addr, - void *), - base_query *data) - { - ptrdiff_t off = 0; - do - { - if (pending_interrupts) return; - off = dwfl_getmodules (dwfl, callback, data, off); - } - while (off > 0); - // Don't complain if we exited dwfl_getmodules early. - // This could be a $target variable error that will be - // reported soon anyway. - // dwfl_assert("dwfl_getmodules", off == 0); - - // PR6864 XXX: For dwarfless case (if .../vmlinux is missing), then the - // "kernel" module is not reported in the loop above. However, we - // may be able to make do with symbol table data. - } - - - // Defined after dwarf_query - void query_modules(base_query *q); - - - // ----------------------------------------------------------------- - - typedef map<Dwarf*, vector<Dwarf_Die>*> module_cu_cache_t; - module_cu_cache_t module_cu_cache; - - void iterate_over_cus (int (*callback)(Dwarf_Die * die, void * arg), - void * data) - { - get_module_dwarf(false); - Dwarf *dw = module_dwarf; - if (!dw) return; - - vector<Dwarf_Die>* v = module_cu_cache[dw]; - if (v == 0) - { - v = new vector<Dwarf_Die>; - module_cu_cache[dw] = v; - - Dwarf_Off off = 0; - size_t cuhl; - Dwarf_Off noff; - while (dwarf_nextcu (dw, off, &noff, &cuhl, NULL, NULL, NULL) == 0) - { - if (pending_interrupts) return; - Dwarf_Die die_mem; - Dwarf_Die *die; - die = dwarf_offdie (dw, off + cuhl, &die_mem); - v->push_back (*die); /* copy */ - off = noff; - } - } - - for (unsigned i = 0; i < v->size(); i++) - { - if (pending_interrupts) return; - Dwarf_Die die = v->at(i); - int rc = (*callback)(& die, data); - if (rc != DWARF_CB_OK) break; - } - } - - - // ----------------------------------------------------------------- - - bool func_is_inline() - { - assert (function); - return dwarf_func_inline (function) != 0; - } - - - typedef map<string, vector<Dwarf_Die>*> cu_inl_function_cache_t; - cu_inl_function_cache_t cu_inl_function_cache; - - static int cu_inl_function_caching_callback (Dwarf_Die* func, void *arg) - { - vector<Dwarf_Die>* v = static_cast<vector<Dwarf_Die>*>(arg); - v->push_back (* func); - return DWARF_CB_OK; - } - - void iterate_over_inline_instances (int (* callback)(Dwarf_Die * die, void * arg), - void * data) - { - assert (function); - assert (func_is_inline ()); - - string key = module_name + ":" + cu_name + ":" + function_name; - vector<Dwarf_Die>* v = cu_inl_function_cache[key]; - if (v == 0) - { - v = new vector<Dwarf_Die>; - cu_inl_function_cache[key] = v; - dwarf_func_inline_instances (function, cu_inl_function_caching_callback, v); - } - - for (unsigned i=0; i<v->size(); i++) - { - if (pending_interrupts) return; - Dwarf_Die die = v->at(i); - int rc = (*callback)(& die, data); - if (rc != DWARF_CB_OK) break; - } - } - - - // ----------------------------------------------------------------- - - /* The global alias cache is used to resolve any DIE found in a - * module that is stubbed out with DW_AT_declaration with a defining - * DIE found in a different module. The current assumption is that - * this only applies to structures and unions, which have a global - * namespace (it deliberately only traverses program scope), so this - * cache is indexed by name. If other declaration lookups were - * added to it, it would have to be indexed by name and tag - */ - mod_cu_function_cache_t global_alias_cache; - static int global_alias_caching_callback(Dwarf_Die *die, void *arg) - { - cu_function_cache_t *cache = static_cast<cu_function_cache_t*>(arg); - const char *name = dwarf_diename(die); - - if (!name) - return DWARF_CB_OK; - - string structure_name = name; - - if (!dwarf_hasattr(die, DW_AT_declaration) && - cache->find(structure_name) == cache->end()) - (*cache)[structure_name] = *die; - - return DWARF_CB_OK; - } - - Dwarf_Die *declaration_resolve(const char *name) - { - if (!name) - return NULL; - - string key = module_name + ":" + cu_name; - cu_function_cache_t *v = global_alias_cache[key]; - if (v == 0) // need to build the cache, just once per encountered module/cu - { - v = new cu_function_cache_t; - global_alias_cache[key] = v; - iterate_over_globals(global_alias_caching_callback, v); - if (sess.verbose > 4) - clog << "global alias cache " << key << " size " << v->size() << endl; - } - - // XXX: it may be desirable to search other modules' declarations - // too, in case a module/shared-library processes a - // forward-declared pointer type only, where the actual definition - // may only be in vmlinux or the application. - - // XXX: it is probably desirable to search other CU's declarations - // in the same module. - - if (v->find(name) == v->end()) - return NULL; - - return & ((*v)[name]); - } - - mod_cu_function_cache_t cu_function_cache; - - static int cu_function_caching_callback (Dwarf_Die* func, void *arg) - { - cu_function_cache_t* v = static_cast<cu_function_cache_t*>(arg); - const char *name = dwarf_diename(func); - if (!name) - return DWARF_CB_OK; - - string function_name = name; - (*v)[function_name] = * func; - return DWARF_CB_OK; - } - - int iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), - base_query * q, const string& function, - bool has_statement_num=false); - int iterate_over_globals (int (* callback)(Dwarf_Die *, void *), - void * data); - - bool has_single_line_record (dwarf_query * q, char const * srcfile, int lineno); - - void iterate_over_srcfile_lines (char const * srcfile, - int lines[2], - bool need_single_match, - enum line_t line_type, - void (* callback) (const dwarf_line_t& line, - void * arg), - void *data) - { - Dwarf_Line **srcsp = NULL; - size_t nsrcs = 0; - dwarf_query * q = static_cast<dwarf_query *>(data); - int lineno = lines[0]; - auto_free_ref<Dwarf_Line**> free_srcsp(srcsp); - - get_module_dwarf(); - - if (line_type == RELATIVE) - { - Dwarf_Addr addr; - Dwarf_Line *line; - int line_number; - - dwarf_assert ("dwarf_entrypc", dwarf_entrypc (this->function, &addr)); - line = dwarf_getsrc_die (this->cu, addr); - dwarf_assert ("dwarf_getsrc_die", line == NULL); - dwarf_assert ("dwarf_lineno", dwarf_lineno (line, &line_number)); - lineno += line_number; - } - else if (line_type == WILDCARD) - function_line (&lineno); - - for (int l = lineno; ; l = l + 1) - { - set<int> lines_probed; - pair<set<int>::iterator,bool> line_probed; - dwarf_assert ("dwarf_getsrc_file", - dwarf_getsrc_file (module_dwarf, - srcfile, l, 0, - &srcsp, &nsrcs)); - if (line_type == WILDCARD || line_type == RANGE) - { - Dwarf_Addr line_addr; - dwarf_lineno (srcsp [0], &lineno); - line_probed = lines_probed.insert(lineno); - if (lineno != l || line_probed.second == false || nsrcs > 1) - continue; - dwarf_lineaddr (srcsp [0], &line_addr); - if (dwarf_haspc (function, line_addr) != 1) - break; - } - - // NB: Formerly, we used to filter, because: - - // dwarf_getsrc_file gets one *near hits* for line numbers, not - // exact matches. For example, an existing file but a nonexistent - // line number will be rounded up to the next definition in that - // file. This may be similar to the GDB breakpoint algorithm, but - // we don't want to be so fuzzy in systemtap land. So we filter. - - // But we now see the error of our ways, and skip this filtering. - - // XXX: the code also fails to match e.g. inline function - // definitions when the srcfile is a header file rather than the - // CU name. - - size_t remaining_nsrcs = nsrcs; - - if (need_single_match && remaining_nsrcs > 1) - { - // We wanted a single line record (a unique address for the - // line) and we got a bunch of line records. We're going to - // skip this probe (throw an exception) but before we throw - // we're going to look around a bit to see if there's a low or - // high line number nearby which *doesn't* have this problem, - // so we can give the user some advice. - - int lo_try = -1; - int hi_try = -1; - for (size_t i = 1; i < 6; ++i) - { - if (lo_try == -1 && has_single_line_record(q, srcfile, lineno - i)) - lo_try = lineno - i; - - if (hi_try == -1 && has_single_line_record(q, srcfile, lineno + i)) - hi_try = lineno + i; - } - - stringstream advice; - advice << "multiple addresses for " << srcfile << ":" << lineno; - if (lo_try > 0 || hi_try > 0) - { - advice << " (try "; - if (lo_try > 0) - advice << srcfile << ":" << lo_try; - if (lo_try > 0 && hi_try > 0) - advice << " or "; - if (hi_try > 0) - advice << srcfile << ":" << hi_try; - advice << ")"; - } - throw semantic_error (advice.str()); - } - - for (size_t i = 0; i < nsrcs; ++i) - { - if (pending_interrupts) return; - if (srcsp [i]) // skip over mismatched lines - callback (dwarf_line_t(srcsp[i]), data); - } - - if (line_type == ABSOLUTE || line_type == RELATIVE) - break; - else if (line_type == RANGE && l == lines[1]) - break; - } - } - - void - iterate_over_labels (Dwarf_Die *begin_die, - void *data, - void (* callback)(const string &, - const char *, - int, - Dwarf_Die *, - Dwarf_Addr, - dwarf_query *)); - - void collect_srcfiles_matching (string const & pattern, - set<char const *> & filtered_srcfiles) - { - assert (module); - assert (cu); - - size_t nfiles; - Dwarf_Files *srcfiles; - - // PR 5049: implicit * in front of given path pattern. - // NB: fnmatch() is used without FNM_PATHNAME. - string prefixed_pattern = string("*/") + pattern; - - dwarf_assert ("dwarf_getsrcfiles", - dwarf_getsrcfiles (cu, &srcfiles, &nfiles)); - { - for (size_t i = 0; i < nfiles; ++i) - { - char const * fname = dwarf_filesrc (srcfiles, i, NULL, NULL); - if (fnmatch (pattern.c_str(), fname, 0) == 0 || - fnmatch (prefixed_pattern.c_str(), fname, 0) == 0) - { - filtered_srcfiles.insert (fname); - if (sess.verbose>2) - clog << "selected source file '" << fname << "'\n"; - } - } - } - } - - void resolve_prologue_endings (func_info_map_t & funcs) - { - // This heuristic attempts to pick the first address that has a - // source line distinct from the function declaration's. In a - // perfect world, this would be the first statement *past* the - // prologue. - - assert(module); - assert(cu); - - size_t nlines = 0; - Dwarf_Lines *lines = NULL; - - /* trouble cases: - malloc do_symlink in init/initramfs.c tail-recursive/tiny then no-prologue - sys_get?id in kernel/timer.c no-prologue - sys_exit_group tail-recursive - {do_,}sys_open extra-long-prologue (gcc 3.4) - cpu_to_logical_apicid NULL-decl_file - */ - - // Fetch all srcline records, sorted by address. - dwarf_assert ("dwarf_getsrclines", - dwarf_getsrclines(cu, &lines, &nlines)); - // XXX: free lines[] later, but how? - - for(func_info_map_t::iterator it = funcs.begin(); it != funcs.end(); it++) - { -#if 0 /* someday */ - Dwarf_Addr* bkpts = 0; - int n = dwarf_entry_breakpoints (& it->die, & bkpts); - // ... - free (bkpts); -#endif - - Dwarf_Addr entrypc = it->entrypc; - Dwarf_Addr highpc; // NB: highpc is exclusive: [entrypc,highpc) - dwfl_assert ("dwarf_highpc", dwarf_highpc (& it->die, - & highpc)); - - if (it->decl_file == 0) it->decl_file = ""; - - unsigned entrypc_srcline_idx = 0; - dwarf_line_t entrypc_srcline; - // open-code binary search for exact match - { - unsigned l = 0, h = nlines; - while (l < h) - { - entrypc_srcline_idx = (l + h) / 2; - const dwarf_line_t lr(dwarf_onesrcline(lines, - entrypc_srcline_idx)); - Dwarf_Addr addr = lr.addr(); - if (addr == entrypc) { entrypc_srcline = lr; break; } - else if (l + 1 == h) { break; } // ran off bottom of tree - else if (addr < entrypc) { l = entrypc_srcline_idx; } - else { h = entrypc_srcline_idx; } - } - } - if (!entrypc_srcline) - { - if (sess.verbose > 2) - clog << "missing entrypc dwarf line record for function '" - << it->name << "'\n"; - // This is probably an inlined function. We'll end up using - // its lowpc as a probe address. - continue; - } - - if (sess.verbose>2) - clog << "prologue searching function '" << it->name << "'" - << " 0x" << hex << entrypc << "-0x" << highpc << dec - << "@" << it->decl_file << ":" << it->decl_line - << "\n"; - - // Now we go searching for the first line record that has a - // file/line different from the one in the declaration. - // Normally, this will be the next one. BUT: - // - // We may have to skip a few because some old compilers plop - // in dummy line records for longer prologues. If we go too - // far (addr >= highpc), we take the previous one. Or, it may - // be the first one, if the function had no prologue, and thus - // the entrypc maps to a statement in the body rather than the - // declaration. - - unsigned postprologue_srcline_idx = entrypc_srcline_idx; - bool ranoff_end = false; - while (postprologue_srcline_idx < nlines) - { - dwarf_line_t lr(dwarf_onesrcline(lines, postprologue_srcline_idx)); - Dwarf_Addr postprologue_addr = lr.addr(); - const char* postprologue_file = lr.linesrc(); - int postprologue_lineno = lr.lineno(); - - if (sess.verbose>2) - clog << "checking line record 0x" << hex << postprologue_addr << dec - << "@" << postprologue_file << ":" << postprologue_lineno << "\n"; - - if (postprologue_addr >= highpc) - { - ranoff_end = true; - postprologue_srcline_idx --; - continue; - } - if (ranoff_end || - (strcmp (postprologue_file, it->decl_file) || // We have a winner! - (postprologue_lineno != it->decl_line))) - { - it->prologue_end = postprologue_addr; - - if (sess.verbose>2) - { - clog << "prologue found function '" << it->name << "'"; - // Add a little classification datum - if (postprologue_srcline_idx == entrypc_srcline_idx) clog << " (naked)"; - if (ranoff_end) clog << " (tail-call?)"; - clog << " = 0x" << hex << postprologue_addr << dec << "\n"; - } - - break; - } - - // Let's try the next srcline. - postprologue_srcline_idx ++; - } // loop over srclines - - // if (strlen(it->decl_file) == 0) it->decl_file = NULL; - - } // loop over functions - - // XXX: how to free lines? - } - - - bool function_entrypc (Dwarf_Addr * addr) - { - assert (function); - return (dwarf_entrypc (function, addr) == 0); - // XXX: see also _lowpc ? - } - - - bool die_entrypc (Dwarf_Die * die, Dwarf_Addr * addr) - { - int rc = 0; - string lookup_method; - - * addr = 0; - - lookup_method = "dwarf_entrypc"; - rc = dwarf_entrypc (die, addr); - - if (rc) - { - lookup_method = "dwarf_lowpc"; - rc = dwarf_lowpc (die, addr); - } - - if (rc) - { - lookup_method = "dwarf_ranges"; - - Dwarf_Addr base; - Dwarf_Addr begin; - Dwarf_Addr end; - ptrdiff_t offset = dwarf_ranges (die, 0, &base, &begin, &end); - if (offset < 0) rc = -1; - else if (offset > 0) - { - * addr = begin; - rc = 0; - - // Now we need to check that there are no more ranges - // associated with this function, which could conceivably - // happen if a function is inlined, then pieces of it are - // split amongst different conditional branches. It's not - // obvious which of them to favour. As a heuristic, we - // pick the beginning of the first range, and ignore the - // others (but with a warning). - - unsigned extra = 0; - while ((offset = dwarf_ranges (die, offset, &base, &begin, &end)) > 0) - extra ++; - if (extra) - lookup_method += ", ignored " + lex_cast<string>(extra) + " more"; - } - } - - if (sess.verbose > 2) - clog << "entry-pc lookup (" << lookup_method << ") = 0x" << hex << *addr << dec - << " (rc " << rc << ")" - << endl; - return (rc == 0); - } - - void function_die (Dwarf_Die *d) - { - assert (function); - *d = *function; - } - - void function_file (char const ** c) - { - assert (function); - assert (c); - *c = dwarf_decl_file (function); - } - - void function_line (int *linep) - { - assert (function); - dwarf_decl_line (function, linep); - } - - bool die_has_pc (Dwarf_Die & die, Dwarf_Addr pc) - { - int res = dwarf_haspc (&die, pc); - // dwarf_ranges will return -1 if a function die has no DW_AT_ranges - // if (res == -1) - // dwarf_assert ("dwarf_haspc", res); - return res == 1; - } - - - static void loc2c_error (void *, const char *fmt, ...) - { - const char *msg = "?"; - char *tmp = NULL; - int rc; - va_list ap; - va_start (ap, fmt); - rc = vasprintf (& tmp, fmt, ap); - if (rc < 0) - msg = "?"; - else - msg = tmp; - va_end (ap); - throw semantic_error (msg); - } - - // This function generates code used for addressing computations of - // target variables. - void emit_address (struct obstack *pool, Dwarf_Addr address) - { - #if 0 - // The easy but incorrect way is to just print a hard-wired - // constant. - obstack_printf (pool, "%#" PRIx64 "UL", address); - #endif - - // Turn this address into a section-relative offset if it should be one. - // We emit a comment approximating the variable+offset expression that - // relocatable module probing code will need to have. - Dwfl_Module *mod = dwfl_addrmodule (dwfl, address); - dwfl_assert ("dwfl_addrmodule", mod); - const char *modname = dwfl_module_info (mod, NULL, NULL, NULL, - NULL, NULL, NULL, NULL); - int n = dwfl_module_relocations (mod); - dwfl_assert ("dwfl_module_relocations", n >= 0); - Dwarf_Addr reloc_address = address; - int i = dwfl_module_relocate_address (mod, &reloc_address); - dwfl_assert ("dwfl_module_relocate_address", i >= 0); - dwfl_assert ("dwfl_module_info", modname); - const char *secname = dwfl_module_relocation_info (mod, i, NULL); - - if (sess.verbose > 2) - { - clog << "emit dwarf addr 0x" << hex << address << dec - << " => module " << modname - << " section " << (secname ?: "null") - << " relocaddr 0x" << hex << reloc_address << dec - << endl; - } - - if (n > 0 && !(n == 1 && secname == NULL)) - { - dwfl_assert ("dwfl_module_relocation_info", secname); - if (n > 1 || secname[0] != '\0') - { - // This gives us the module name, and section name within the - // module, for a kernel module (or other ET_REL module object). - obstack_printf (pool, "({ static unsigned long addr = 0; "); - obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", - modname, secname, reloc_address); - obstack_printf (pool, "addr; })"); - } - else if (n == 1 && module_name == TOK_KERNEL && secname[0] == '\0') - { - // elfutils' way of telling us that this is a relocatable kernel address, which we - // need to treat the same way here as dwarf_query::add_probe_point does: _stext. - address -= sess.sym_stext; - secname = "_stext"; - obstack_printf (pool, "({ static unsigned long addr = 0; "); - obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", - modname, secname, address); // PR10000 NB: not reloc_address - obstack_printf (pool, "addr; })"); - } - else - { - throw semantic_error ("cannot relocate user-space dso (?) address"); -#if 0 - // This would happen for a Dwfl_Module that's a user-level DSO. - obstack_printf (pool, " /* %s+%#" PRIx64 " */", - modname, address); -#endif - } - } - else - obstack_printf (pool, "%#" PRIx64 "UL", address); // assume as constant - } - - static void loc2c_emit_address (void *arg, struct obstack *pool, - Dwarf_Addr address) - { - dwflpp *dwfl = (dwflpp *) arg; - dwfl->emit_address (pool, address); - } - - void print_locals(Dwarf_Die *die, ostream &o) - { - // Try to get the first child of die. - Dwarf_Die child; - if (dwarf_child (die, &child) == 0) - { - do - { - const char *name; - // Output each sibling's name (that is a variable or - // parameter) to 'o'. - switch (dwarf_tag (&child)) - { - case DW_TAG_variable: - case DW_TAG_formal_parameter: - name = dwarf_diename (&child); - if (name) - o << " " << name; - break; - default: - break; - } - } - while (dwarf_siblingof (&child, &child) == 0); - } - } - - Dwarf_Attribute * - find_variable_and_frame_base (Dwarf_Die *scope_die, - Dwarf_Addr pc, - string const & local, - const target_symbol *e, - Dwarf_Die *vardie, - Dwarf_Attribute *fb_attr_mem) - { - Dwarf_Die *scopes; - int nscopes = 0; - Dwarf_Attribute *fb_attr = NULL; - - assert (cu); - - nscopes = dwarf_getscopes (cu, pc, &scopes); - int sidx; - // if pc and scope_die are disjoint then we need dwarf_getscopes_die - for (sidx = 0; sidx < nscopes; sidx++) - if (scopes[sidx].addr == scope_die->addr) - break; - if (sidx == nscopes) - nscopes = dwarf_getscopes_die (scope_die, &scopes); - - if (nscopes <= 0) - { - throw semantic_error ("unable to find any scopes containing " - + lex_cast_hex<string>(pc) - + ((scope_die == NULL) ? "" - : (string (" in ") - + (dwarf_diename(scope_die) ?: "<unknown>") - + "(" + (dwarf_diename(cu) ?: "<unknown>") - + ")")) - + " while searching for local '" + local + "'", - e->tok); - } - - int declaring_scope = dwarf_getscopevar (scopes, nscopes, - local.c_str(), - 0, NULL, 0, 0, - vardie); - if (declaring_scope < 0) - { - stringstream alternatives; - print_locals (scopes, alternatives); - throw semantic_error ("unable to find local '" + local + "'" - + " near pc " + lex_cast_hex<string>(pc) - + ((scope_die == NULL) ? "" - : (string (" in ") - + (dwarf_diename(scope_die) ?: "<unknown>") - + "(" + (dwarf_diename(cu) ?: "<unknown>") - + ")")) - + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")), - e->tok); - } - - for (int inner = 0; inner < nscopes; ++inner) - { - switch (dwarf_tag (&scopes[inner])) - { - default: - continue; - case DW_TAG_subprogram: - case DW_TAG_entry_point: - case DW_TAG_inlined_subroutine: /* XXX */ - if (inner >= declaring_scope) - fb_attr = dwarf_attr_integrate (&scopes[inner], - DW_AT_frame_base, - fb_attr_mem); - break; - } - } - return fb_attr; - } - - - struct location * - translate_location(struct obstack *pool, - Dwarf_Attribute *attr, Dwarf_Addr pc, - Dwarf_Attribute *fb_attr, - struct location **tail, - const target_symbol *e) - { - Dwarf_Op *expr; - size_t len; - - /* PR9768: formerly, we added pc+module_bias here. However, that bias value - is not present in the pc value by the time we get it, so adding it would - result in false negatives of variable reachibility. In other instances - further below, the c_translate_FOO functions, the module_bias value used - to be passed in, but instead should now be zero for the same reason. */ - - switch (dwarf_getlocation_addr (attr, pc /*+ module_bias*/, &expr, &len, 1)) - { - case 1: /* Should always happen. */ - if (len > 0) - break; - /* Fall through. */ - - case 0: /* Shouldn't happen. */ - throw semantic_error ("not accessible at this address", e->tok); - - default: /* Shouldn't happen. */ - case -1: - throw semantic_error (string ("dwarf_getlocation_addr failed") + - string (dwarf_errmsg (-1)), - e->tok); - } - - return c_translate_location (pool, &loc2c_error, this, - &loc2c_emit_address, - 1, 0 /* PR9768 */, - pc, expr, len, tail, fb_attr); - } - - void - print_members(Dwarf_Die *vardie, ostream &o) - { - const int typetag = dwarf_tag (vardie); - - if (typetag != DW_TAG_structure_type && typetag != DW_TAG_union_type) - { - o << " Error: " - << (dwarf_diename_integrate (vardie) ?: "<anonymous>") - << " isn't a struct/union"; - return; - } - - // Try to get the first child of vardie. - Dwarf_Die die_mem; - Dwarf_Die *die = &die_mem; - switch (dwarf_child (vardie, die)) - { - case 1: // No children. - o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") - << (dwarf_diename_integrate (die) ?: "<anonymous>") - << " is empty"; - break; - - case -1: // Error. - default: // Shouldn't happen. - o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") - << (dwarf_diename_integrate (die) ?: "<anonymous>") - << ": " << dwarf_errmsg (-1); - break; - - case 0: // Success. - break; - } - - // Output each sibling's name to 'o'. - while (dwarf_tag (die) == DW_TAG_member) - { - const char *member = dwarf_diename_integrate (die) ; - - if ( member != NULL ) - o << " " << member; - else - { - Dwarf_Die temp_die = *die; - Dwarf_Attribute temp_attr ; - - if (!dwarf_attr_integrate (&temp_die, DW_AT_type, &temp_attr)) - { - clog << "\n Error in obtaining type attribute for " - << (dwarf_diename(&temp_die)?:"<anonymous>"); - return; - } - - if (!dwarf_formref_die (&temp_attr, &temp_die)) - { - clog << "\n Error in decoding type attribute for " - << (dwarf_diename(&temp_die)?:"<anonymous>"); - return; - } - - print_members(&temp_die,o); - } - - if (dwarf_siblingof (die, &die_mem) != 0) - break; - } - } - - bool - find_struct_member(const string& member, - Dwarf_Die *parentdie, - const target_symbol *e, - Dwarf_Die *memberdie, - vector<Dwarf_Attribute>& locs) - { - Dwarf_Attribute attr; - Dwarf_Die die = *parentdie; - - switch (dwarf_child (&die, &die)) - { - case 0: /* First child found. */ - break; - case 1: /* No children. */ - return false; - case -1: /* Error. */ - default: /* Shouldn't happen */ - throw semantic_error (string (dwarf_tag(&die) == DW_TAG_union_type ? "union" : "struct") - + string (dwarf_diename_integrate (&die) ?: "<anonymous>") - + string (dwarf_errmsg (-1)), - e->tok); - } - - do - { - if (dwarf_tag(&die) != DW_TAG_member) - continue; - - const char *name = dwarf_diename_integrate(&die); - if (name == NULL) - { - // need to recurse for anonymous structs/unions - Dwarf_Die subdie; - - if (!dwarf_attr_integrate (&die, DW_AT_type, &attr) || - !dwarf_formref_die (&attr, &subdie)) - continue; - - if (find_struct_member(member, &subdie, e, memberdie, locs)) - goto success; - } - else if (name == member) - { - *memberdie = die; - goto success; - } - } - while (dwarf_siblingof (&die, &die) == 0); - - return false; - -success: - /* As we unwind the recursion, we need to build the chain of - * locations that got to the final answer. */ - if (dwarf_attr_integrate (&die, DW_AT_data_member_location, &attr)) - locs.insert(locs.begin(), attr); - - /* Union members don't usually have a location, - * but just use the containing union's location. */ - else if (dwarf_tag(parentdie) != DW_TAG_union_type) - throw semantic_error ("no location for field '" + member - + "': " + string(dwarf_errmsg (-1)), - e->tok); - - return true; - } - - Dwarf_Die * - translate_components(struct obstack *pool, - struct location **tail, - Dwarf_Addr pc, - const target_symbol *e, - Dwarf_Die *vardie, - Dwarf_Die *die_mem, - Dwarf_Attribute *attr_mem) - { - Dwarf_Die *die = NULL; - - unsigned i = 0; - - if (vardie) - *die_mem = *vardie; - - if (e->components.empty()) - return die_mem; - - while (i < e->components.size()) - { - /* XXX: This would be desirable, but we don't get the target_symbol token, - and printing that gives us the file:line number too early anyway. */ -#if 0 - // Emit a marker to note which field is being access-attempted, to give - // better error messages if deref() fails. - string piece = string(...target_symbol token...) + string ("#") + stringify(components[i].second); - obstack_printf (pool, "c->last_stmt = %s;", lex_cast_qstring(piece).c_str()); -#endif - - die = die ? dwarf_formref_die (attr_mem, die_mem) : die_mem; - const int typetag = dwarf_tag (die); - switch (typetag) - { - case DW_TAG_typedef: - case DW_TAG_const_type: - case DW_TAG_volatile_type: - /* Just iterate on the referent type. */ - break; - - case DW_TAG_pointer_type: - if (e->components[i].first == target_symbol::comp_literal_array_index) - throw semantic_error ("cannot index pointer", e->tok); - // XXX: of course, we should support this the same way C does, - // by explicit pointer arithmetic etc. PR4166. - - c_translate_pointer (pool, 1, 0 /* PR9768*/, die, tail); - break; - - case DW_TAG_array_type: - if (e->components[i].first == target_symbol::comp_literal_array_index) - { - c_translate_array (pool, 1, 0 /* PR9768 */, die, tail, - NULL, lex_cast<Dwarf_Word>(e->components[i].second)); - ++i; - } - else - throw semantic_error("bad field '" - + e->components[i].second - + "' for array type", - e->tok); - break; - - case DW_TAG_structure_type: - case DW_TAG_union_type: - if (dwarf_hasattr(die, DW_AT_declaration)) - { - Dwarf_Die *tmpdie = dwflpp::declaration_resolve(dwarf_diename(die)); - if (tmpdie == NULL) - throw semantic_error ("unresolved struct " - + string (dwarf_diename_integrate (die) ?: "<anonymous>"), - e->tok); - *die_mem = *tmpdie; - } - - { - vector<Dwarf_Attribute> locs; - if (!find_struct_member(e->components[i].second, die, e, die, locs)) - { - string alternatives; - stringstream members; - print_members(die, members); - if (members.str().size() != 0) - alternatives = " (alternatives:" + members.str(); - throw semantic_error("unable to find member '" + - e->components[i].second + "' for struct " - + string(dwarf_diename_integrate(die) ?: "<unknown>") - + alternatives, - e->tok); - } - - for (unsigned j = 0; j < locs.size(); ++j) - translate_location (pool, &locs[j], pc, NULL, tail, e); - } - - ++i; - break; - - case DW_TAG_enumeration_type: - throw semantic_error ("field '" - + e->components[i].second - + "' vs. enum type " - + string(dwarf_diename_integrate (die) ?: "<anonymous type>"), - e->tok); - break; - case DW_TAG_base_type: - throw semantic_error ("field '" - + e->components[i].second - + "' vs. base type " - + string(dwarf_diename_integrate (die) ?: "<anonymous type>"), - e->tok); - break; - case -1: - throw semantic_error ("cannot find type: " + string(dwarf_errmsg (-1)), - e->tok); - break; - - default: - throw semantic_error (string(dwarf_diename_integrate (die) ?: "<anonymous type>") - + ": unexpected type tag " - + lex_cast<string>(dwarf_tag (die)), - e->tok); - break; - } - - /* Now iterate on the type in DIE's attribute. */ - if (dwarf_attr_integrate (die, DW_AT_type, attr_mem) == NULL) - throw semantic_error ("cannot get type of field: " + string(dwarf_errmsg (-1)), e->tok); - } - return die; - } - - - Dwarf_Die * - resolve_unqualified_inner_typedie (Dwarf_Die *typedie_mem, - Dwarf_Attribute *attr_mem, - const target_symbol *e) - { - Dwarf_Die *typedie; - int typetag = 0; - while (1) - { - typedie = dwarf_formref_die (attr_mem, typedie_mem); - if (typedie == NULL) - throw semantic_error ("cannot get type: " + string(dwarf_errmsg (-1)), e->tok); - typetag = dwarf_tag (typedie); - if (typetag != DW_TAG_typedef && - typetag != DW_TAG_const_type && - typetag != DW_TAG_volatile_type) - break; - if (dwarf_attr_integrate (typedie, DW_AT_type, attr_mem) == NULL) - throw semantic_error ("cannot get type of pointee: " + string(dwarf_errmsg (-1)), e->tok); - } - return typedie; - } - - - void - translate_final_fetch_or_store (struct obstack *pool, - struct location **tail, - Dwarf_Addr module_bias, - Dwarf_Die *die, - Dwarf_Attribute *attr_mem, - bool lvalue, - const target_symbol *e, - string &, - string &, - exp_type & ty) - { - /* First boil away any qualifiers associated with the type DIE of - the final location to be accessed. */ - - Dwarf_Die typedie_mem; - Dwarf_Die *typedie; - int typetag; - char const *dname; - string diestr; - - typedie = resolve_unqualified_inner_typedie (&typedie_mem, attr_mem, e); - typetag = dwarf_tag (typedie); - - /* Then switch behavior depending on the type of fetch/store we - want, and the type and pointer-ness of the final location. */ - - switch (typetag) - { - default: - dname = dwarf_diename(die); - diestr = (dname != NULL) ? dname : "<unknown>"; - throw semantic_error ("unsupported type tag " - + lex_cast<string>(typetag) - + " for " + diestr, e->tok); - break; - - case DW_TAG_structure_type: - case DW_TAG_union_type: - dname = dwarf_diename(die); - diestr = (dname != NULL) ? dname : "<unknown>"; - throw semantic_error ("struct/union '" + diestr - + "' is being accessed instead of a member of the struct/union", e->tok); - break; - - case DW_TAG_enumeration_type: - case DW_TAG_base_type: - - // Reject types we can't handle in systemtap - { - dname = dwarf_diename(die); - diestr = (dname != NULL) ? dname : "<unknown>"; - - Dwarf_Attribute encoding_attr; - Dwarf_Word encoding = (Dwarf_Word) -1; - dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding, &encoding_attr), - & encoding); - if (encoding < 0) - { - // clog << "bad type1 " << encoding << " diestr" << endl; - throw semantic_error ("unsupported type (mystery encoding " + lex_cast<string>(encoding) + ")" + - " for " + diestr, e->tok); - } - - if (encoding == DW_ATE_float - || encoding == DW_ATE_complex_float - /* XXX || many others? */) - { - // clog << "bad type " << encoding << " diestr" << endl; - throw semantic_error ("unsupported type (encoding " + lex_cast<string>(encoding) + ")" + - " for " + diestr, e->tok); - } - } - - ty = pe_long; - if (lvalue) - c_translate_store (pool, 1, 0 /* PR9768 */, die, typedie, tail, - "THIS->value"); - else - c_translate_fetch (pool, 1, 0 /* PR9768 */, die, typedie, tail, - "THIS->__retvalue"); - break; - - case DW_TAG_array_type: - case DW_TAG_pointer_type: - - { - Dwarf_Die pointee_typedie_mem; - Dwarf_Die *pointee_typedie; - Dwarf_Word pointee_encoding; - Dwarf_Word pointee_byte_size = 0; - - pointee_typedie = resolve_unqualified_inner_typedie (&pointee_typedie_mem, attr_mem, e); - - if (dwarf_attr_integrate (pointee_typedie, DW_AT_byte_size, attr_mem)) - dwarf_formudata (attr_mem, &pointee_byte_size); - - dwarf_formudata (dwarf_attr_integrate (pointee_typedie, DW_AT_encoding, attr_mem), - &pointee_encoding); - - if (lvalue) - { - ty = pe_long; - if (typetag == DW_TAG_array_type) - throw semantic_error ("cannot write to array address", e->tok); - assert (typetag == DW_TAG_pointer_type); - c_translate_pointer_store (pool, 1, 0 /* PR9768 */, typedie, tail, - "THIS->value"); - } - else - { - // We have the pointer: cast it to an integral type via &(*(...)) - - // NB: per bug #1187, at one point char*-like types were - // automagically converted here to systemtap string values. - // For several reasons, this was taken back out, leaving - // pointer-to-string "conversion" (copying) to tapset functions. - - ty = pe_long; - if (typetag == DW_TAG_array_type) - c_translate_array (pool, 1, 0 /* PR9768 */, typedie, tail, NULL, 0); - else - c_translate_pointer (pool, 1, 0 /* PR9768 */, typedie, tail); - c_translate_addressof (pool, 1, 0 /* PR9768 */, NULL, pointee_typedie, tail, - "THIS->__retvalue"); - } - } - break; - } - } - - string - express_as_string (string prelude, - string postlude, - struct location *head) - { - size_t bufsz = 1024; - char *buf = static_cast<char*>(malloc(bufsz)); - assert(buf); - - FILE *memstream = open_memstream (&buf, &bufsz); - assert(memstream); - - fprintf(memstream, "{\n"); - fprintf(memstream, "%s", prelude.c_str()); - bool deref = c_emit_location (memstream, head, 1); - fprintf(memstream, "%s", postlude.c_str()); - fprintf(memstream, " goto out;\n"); - - // dummy use of deref_fault label, to disable warning if deref() not used - fprintf(memstream, "if (0) goto deref_fault;\n"); - - // XXX: deref flag not reliable; emit fault label unconditionally - (void) deref; - fprintf(memstream, - "deref_fault:\n" - " goto out;\n"); - fprintf(memstream, "}\n"); - - fclose (memstream); - string result(buf); - free (buf); - return result; - } - - string - literal_stmt_for_local (Dwarf_Die *scope_die, - Dwarf_Addr pc, - string const & local, - const target_symbol *e, - bool lvalue, - exp_type & ty) - { - Dwarf_Die vardie; - Dwarf_Attribute fb_attr_mem, *fb_attr = NULL; - - fb_attr = find_variable_and_frame_base (scope_die, pc, local, e, - &vardie, &fb_attr_mem); - - if (sess.verbose>2) - clog << "finding location for local '" << local - << "' near address 0x" << hex << pc - << ", module bias 0x" << module_bias << dec - << "\n"; - - Dwarf_Attribute attr_mem; - if (dwarf_attr_integrate (&vardie, DW_AT_location, &attr_mem) == NULL) - { - throw semantic_error("failed to retrieve location " - "attribute for local '" + local - + "' (dieoffset: " - + lex_cast_hex<string>(dwarf_dieoffset (&vardie)) - + ")", - e->tok); - } - -#define obstack_chunk_alloc malloc -#define obstack_chunk_free free - - struct obstack pool; - obstack_init (&pool); - struct location *tail = NULL; - - /* Given $foo->bar->baz[NN], translate the location of foo. */ - - struct location *head = translate_location (&pool, - &attr_mem, pc, fb_attr, &tail, - e); - - if (dwarf_attr_integrate (&vardie, DW_AT_type, &attr_mem) == NULL) - throw semantic_error("failed to retrieve type " - "attribute for local '" + local + "'", - e->tok); - - /* Translate the ->bar->baz[NN] parts. */ - - Dwarf_Die die_mem, *die = dwarf_formref_die (&attr_mem, &die_mem); - die = translate_components (&pool, &tail, pc, e, - die, &die_mem, &attr_mem); - - /* Translate the assignment part, either - x = $foo->bar->baz[NN] - or - $foo->bar->baz[NN] = x - */ - - string prelude, postlude; - translate_final_fetch_or_store (&pool, &tail, module_bias, - die, &attr_mem, lvalue, e, - prelude, postlude, ty); - - /* Write the translation to a string. */ - return express_as_string(prelude, postlude, head); - } - - - string - literal_stmt_for_return (Dwarf_Die *scope_die, - Dwarf_Addr pc, - const target_symbol *e, - bool lvalue, - exp_type & ty) - { - if (sess.verbose>2) - clog << "literal_stmt_for_return: finding return value for " - << (dwarf_diename(scope_die) ?: "<unknown>") - << "(" - << (dwarf_diename(cu) ?: "<unknown>") - << ")\n"; - - struct obstack pool; - obstack_init (&pool); - struct location *tail = NULL; - - /* Given $return->bar->baz[NN], translate the location of return. */ - const Dwarf_Op *locops; - int nlocops = dwfl_module_return_value_location (module, scope_die, - &locops); - if (nlocops < 0) - { - throw semantic_error("failed to retrieve return value location" - " for " - + string(dwarf_diename(scope_die) ?: "<unknown>") - + "(" + string(dwarf_diename(cu) ?: "<unknown>") - + ")", - e->tok); - } - // the function has no return value (e.g. "void" in C) - else if (nlocops == 0) - { - throw semantic_error("function " - + string(dwarf_diename(scope_die) ?: "<unknown>") - + "(" + string(dwarf_diename(cu) ?: "<unknown>") - + ") has no return value", - e->tok); - } - - struct location *head = c_translate_location (&pool, &loc2c_error, this, - &loc2c_emit_address, - 1, 0 /* PR9768 */, - pc, locops, nlocops, - &tail, NULL); - - /* Translate the ->bar->baz[NN] parts. */ - - Dwarf_Attribute attr_mem; - if (dwarf_attr_integrate (scope_die, DW_AT_type, &attr_mem) == NULL) - throw semantic_error("failed to retrieve return value type attribute for " - + string(dwarf_diename(scope_die) ?: "<unknown>") - + "(" + string(dwarf_diename(cu) ?: "<unknown>") - + ")", - e->tok); - - Dwarf_Die die_mem, *die = dwarf_formref_die (&attr_mem, &die_mem); - die = translate_components (&pool, &tail, pc, e, - die, &die_mem, &attr_mem); - - /* Translate the assignment part, either - x = $return->bar->baz[NN] - or - $return->bar->baz[NN] = x - */ - - string prelude, postlude; - translate_final_fetch_or_store (&pool, &tail, module_bias, - die, &attr_mem, lvalue, e, - prelude, postlude, ty); - - /* Write the translation to a string. */ - return express_as_string(prelude, postlude, head); - } - - - string - literal_stmt_for_pointer (Dwarf_Die *type_die, - const target_symbol *e, - bool lvalue, - exp_type & ty) - { - if (sess.verbose>2) - clog << "literal_stmt_for_pointer: finding value for " - << (dwarf_diename(type_die) ?: "<unknown>") - << "(" - << (dwarf_diename(cu) ?: "<unknown>") - << ")\n"; - - struct obstack pool; - obstack_init (&pool); - struct location *head = c_translate_argument (&pool, &loc2c_error, this, - &loc2c_emit_address, - 1, "THIS->pointer"); - struct location *tail = head; - - /* Translate the ->bar->baz[NN] parts. */ - - Dwarf_Attribute attr_mem; - Dwarf_Die die_mem, *die = NULL; - die = translate_components (&pool, &tail, 0, e, - type_die, &die_mem, &attr_mem); - - /* Translate the assignment part, either - x = (THIS->pointer)->bar->baz[NN] - or - (THIS->pointer)->bar->baz[NN] = x - */ - - string prelude, postlude; - translate_final_fetch_or_store (&pool, &tail, module_bias, - die, &attr_mem, lvalue, e, - prelude, postlude, ty); - - /* Write the translation to a string. */ - return express_as_string(prelude, postlude, head); - } - - - ~dwflpp() - { - if (dwfl) - dwfl_end(dwfl); - } -}; - - enum function_spec_type @@ -2578,270 +617,25 @@ struct dwarf_query : public base_query }; -// This little test routine represents an unfortunate breakdown in -// abstraction between dwflpp (putatively, a layer right on top of -// elfutils), and dwarf_query (interpreting a systemtap probe point). -// It arises because we sometimes try to fix up slightly-off -// .statement() probes (something we find out in fairly low-level). -// -// An alternative would be to put some more intelligence into query_cu(), -// and have it print additional suggestions after finding that -// q->dw.iterate_over_srcfile_lines resulted in no new finished_results. - -bool -dwflpp::has_single_line_record (dwarf_query * q, char const * srcfile, int lineno) -{ - if (lineno < 0) - return false; - - Dwarf_Line **srcsp = NULL; - size_t nsrcs = 0; - - dwarf_assert ("dwarf_getsrc_file", - dwarf_getsrc_file (module_dwarf, - srcfile, lineno, 0, - &srcsp, &nsrcs)); - - if (nsrcs != 1) - { - if (sess.verbose>4) - clog << "alternative line " << lineno << " rejected: nsrcs=" << nsrcs << endl; - return false; - } - - // We also try to filter out lines that leave the selected - // functions (if any). - - dwarf_line_t line(srcsp[0]); - Dwarf_Addr addr = line.addr(); - - for (func_info_map_t::iterator i = q->filtered_functions.begin(); - i != q->filtered_functions.end(); ++i) - { - if (q->dw.die_has_pc (i->die, addr)) - { - if (q->sess.verbose>4) - clog << "alternative line " << lineno << " accepted: fn=" << i->name << endl; - return true; - } - } - - for (inline_instance_map_t::iterator i = q->filtered_inlines.begin(); - i != q->filtered_inlines.end(); ++i) - { - if (q->dw.die_has_pc (i->die, addr)) - { - if (sess.verbose>4) - clog << "alternative line " << lineno << " accepted: ifn=" << i->name << endl; - return true; - } - } - - if (sess.verbose>4) - clog << "alternative line " << lineno << " rejected: leaves selected fns" << endl; - return false; - } - -/* This basically only goes one level down from the compile unit so it - * only picks up top level stuff (i.e. nothing in a lower scope) */ -int -dwflpp::iterate_over_globals (int (* callback)(Dwarf_Die *, void *), - void * data) -{ - int rc = DWARF_CB_OK; - Dwarf_Die die; - - assert (module); - assert (cu); - assert (dwarf_tag(cu) == DW_TAG_compile_unit); - - if (dwarf_child(cu, &die) != 0) - return rc; - - do - /* We're only currently looking for named types, - * although other types of declarations exist */ - switch (dwarf_tag(&die)) - { - case DW_TAG_base_type: - case DW_TAG_enumeration_type: - case DW_TAG_structure_type: - case DW_TAG_typedef: - case DW_TAG_union_type: - rc = (*callback)(&die, data); - break; - } - while (rc == DWARF_CB_OK && dwarf_siblingof(&die, &die) == 0); - - return rc; -} - -int -dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, base_query * q), - base_query * q, const string& function, - bool has_statement_num) -{ - int rc = DWARF_CB_OK; - assert (module); - assert (cu); - - string key = module_name + ":" + cu_name; - cu_function_cache_t *v = cu_function_cache[key]; - if (v == 0) - { - v = new cu_function_cache_t; - cu_function_cache[key] = v; - dwarf_getfuncs (cu, cu_function_caching_callback, v, 0); - if (q->sess.verbose > 4) - clog << "function cache " << key << " size " << v->size() << endl; - } - - string subkey = function; - if (v->find(subkey) != v->end()) - { - Dwarf_Die die = v->find(subkey)->second; - if (q->sess.verbose > 4) - clog << "function cache " << key << " hit " << subkey << endl; - return (*callback)(& die, q); - } - else if (name_has_wildcard (subkey)) - { - for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++) - { - if (pending_interrupts) return DWARF_CB_ABORT; - string func_name = it->first; - Dwarf_Die die = it->second; - if (function_name_matches_pattern (func_name, subkey)) - { - if (q->sess.verbose > 4) - clog << "function cache " << key << " match " << func_name << " vs " << subkey << endl; - - rc = (*callback)(& die, q); - if (rc != DWARF_CB_OK) break; - } - } - } - else if (has_statement_num) // searching all for kernel.statement - { - for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++) - { - Dwarf_Die die = it->second; - rc = (*callback)(& die, q); - if (rc != DWARF_CB_OK) break; - } - } - else // not a wildcard and no match in this CU - { - // do nothing - } - return rc; -} - - -void -dwflpp::iterate_over_labels (Dwarf_Die *begin_die, - void *data, - void (* callback)(const string &, - const char *, - int, - Dwarf_Die *, - Dwarf_Addr, - dwarf_query *)) -{ - dwarf_query * q __attribute__ ((unused)) = static_cast<dwarf_query *>(data) ; - - get_module_dwarf(); - - const char * sym = q->label_val.c_str(); - Dwarf_Die die; - int res = dwarf_child (begin_die, &die); - if (res != 0) - return; // die without children, bail out. - - static string function_name = dwarf_diename (begin_die); - do - { - Dwarf_Attribute attr_mem; - Dwarf_Attribute *attr = dwarf_attr (&die, DW_AT_name, &attr_mem); - int tag = dwarf_tag(&die); - const char *name = dwarf_formstring (attr); - if (name == 0) - continue; - switch (tag) - { - case DW_TAG_label: - break; - case DW_TAG_subprogram: - if (!dwarf_hasattr(&die, DW_AT_declaration)) - function_name = name; - else - continue; - default: - if (dwarf_haschildren (&die)) - iterate_over_labels (&die, q, callback); - continue; - } - - if (strcmp(function_name.c_str(), q->function.c_str()) == 0 - || (name_has_wildcard(q->function) - && function_name_matches_pattern (function_name, q->function))) - { - } - else - continue; - if (strcmp(name, sym) == 0 - || (name_has_wildcard(sym) - && function_name_matches_pattern (name, sym))) - { - const char *file = dwarf_decl_file (&die); - // Get the line number for this label - Dwarf_Attribute attr; - dwarf_attr (&die,DW_AT_decl_line, &attr); - Dwarf_Sword dline; - dwarf_formsdata (&attr, &dline); - Dwarf_Addr stmt_addr; - if (dwarf_lowpc (&die, &stmt_addr) != 0) - { - // There is no lowpc so figure out the address - // Get the real die for this cu - Dwarf_Die cudie; - dwarf_diecu (q->dw.cu, &cudie, NULL, NULL); - size_t nlines = 0; - // Get the line for this label - Dwarf_Line **aline; - dwarf_getsrc_file (module_dwarf, file, (int)dline, 0, &aline, &nlines); - // Get the address - for (size_t i = 0; i < nlines; i++) - { - dwarf_lineaddr (*aline, &stmt_addr); - if ((dwarf_haspc (&die, stmt_addr))) - break; - } - } - - Dwarf_Die *scopes; - int nscopes = 0; - nscopes = dwarf_getscopes_die (&die, &scopes); - if (nscopes > 1) - { - callback(function_name.c_str(), file, - (int)dline, &scopes[1], stmt_addr, q); - if (sess.listing_mode) - q->results.back()->locations[0]->components.push_back - (new probe_point::component(TOK_LABEL, new literal_string (name))); - } - } - } - while (dwarf_siblingof (&die, &die) == 0); -} - - struct dwarf_builder: public derived_probe_builder { dwflpp *kern_dw; map <string,dwflpp*> user_dw; dwarf_builder(): kern_dw(0) {} + dwflpp *get_kern_dw(systemtap_session& sess) + { + if (!kern_dw) + kern_dw = new dwflpp(sess); + return kern_dw; + } + + dwflpp *get_user_dw(systemtap_session& sess, const string& module) + { + if (user_dw.find(module) == user_dw.end()) + user_dw[module] = new dwflpp(sess, module); + return user_dw[module]; + } /* NB: not virtual, so can be called from dtor too: */ void dwarf_build_no_more (bool verbose) @@ -2920,6 +714,30 @@ dwarf_query::dwarf_query(systemtap_session & sess, } +func_info_map_t * +get_filtered_functions(dwarf_query *q) +{ + return &q->filtered_functions; +} + + +inline_instance_map_t * +get_filtered_inlines(dwarf_query *q) +{ + return &q->filtered_inlines; +} + + +void +add_label_name(dwarf_query *q, const char *name) +{ + // this is a kludge to let the listing mode show labels to the user + if (q->sess.listing_mode) + q->results.back()->locations[0]->components.push_back + (new probe_point::component(TOK_LABEL, new literal_string (name))); +} + + void dwarf_query::query_module_dwarf() { @@ -2938,7 +756,9 @@ dwarf_query::query_module_dwarf() // NB: we don't need to add the module base address or bias // value here (for reasons that may be coincidental). - dw.query_cu_containing_module_address(addr, this); + Dwarf_Die* cudie = dw.query_cu_containing_address(addr); + if (cudie) // address could be wildly out of range + query_cu(cudie, this); } else { @@ -3649,7 +1469,8 @@ query_srcfile_label (const dwarf_line_t& line, void * arg) for (func_info_map_t::iterator i = q->filtered_functions.begin(); i != q->filtered_functions.end(); ++i) if (q->dw.die_has_pc (i->die, addr)) - q->dw.iterate_over_labels (&i->die, q, query_statement); + q->dw.iterate_over_labels (&i->die, q->label_val.c_str(), q->function.c_str(), + q, query_statement); } static void @@ -3899,7 +1720,8 @@ query_cu (Dwarf_Die * cudie, void * arg) if (q->has_label) { if (q->line[0] == 0) // No line number specified - q->dw.iterate_over_labels (q->dw.cu, q, query_statement); + q->dw.iterate_over_labels (q->dw.cu, q->label_val.c_str(), q->function.c_str(), + q, query_statement); else for (set<char const *>::const_iterator i = q->filtered_srcfiles.begin(); i != q->filtered_srcfiles.end(); ++i) @@ -4173,12 +1995,6 @@ query_module (Dwfl_Module *mod, } } -void -dwflpp::query_modules(base_query *q) -{ - iterate_over_modules(&query_module, q); -} - struct dwarf_var_expanding_visitor: public var_expanding_visitor { @@ -4927,54 +2743,27 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e) // NB: This uses '/' to distinguish between kernel modules and userspace, // which means that userspace modules won't get any PATH searching. dwflpp* dw; - if (module.find('/') == string::npos) - { - // kernel or kernel module target - if (! db.kern_dw) - { - dw = new dwflpp(s); - try - { - dw->setup_kernel(true); - } - catch (const semantic_error& er) - { - /* ignore and go to the next module */ - delete dw; - continue; - } - db.kern_dw = dw; - } - else - dw = db.kern_dw; - } - else - { - module = find_executable (module); // canonicalize it - - // user-space target; we use one dwflpp instance per module name - // (= program or shared library) - if (db.user_dw.find(module) == db.user_dw.end()) - { - dw = new dwflpp(s); - try - { - dw->setup_user(module); - } - catch (const semantic_error& er) - { - /* ignore and go to the next module */ - delete dw; - continue; - } - db.user_dw[module] = dw; - } - else - dw = db.user_dw[module]; - } + try + { + if (module.find('/') == string::npos) + { + // kernel or kernel module target + dw = db.get_kern_dw(s); + } + else + { + module = find_executable (module); // canonicalize it + dw = db.get_user_dw(s, module); + } + } + catch (const semantic_error& er) + { + /* ignore and go to the next module */ + continue; + } dwarf_cast_query q (*dw, module, *e, lvalue, type, code); - dw->query_modules(&q); + dw->iterate_over_modules(&query_module, &q); } if (code.empty()) @@ -5597,13 +3386,7 @@ dwarf_builder::build(systemtap_session & sess, || get_param (parameters, TOK_MODULE, module_name)) { // kernel or kernel module target - if (! kern_dw) - { - kern_dw = new dwflpp(sess); - // XXX: PR 3498, PR 6864 - kern_dw->setup_kernel(true); - } - dw = kern_dw; + dw = get_kern_dw(sess); } else if (get_param (parameters, TOK_PROCESS, module_name)) { @@ -5611,15 +3394,7 @@ dwarf_builder::build(systemtap_session & sess, // user-space target; we use one dwflpp instance per module name // (= program or shared library) - if (user_dw.find(module_name) == user_dw.end()) - { - dw = new dwflpp(sess); - // XXX: PR 3498 - dw->setup_user(module_name); - user_dw[module_name] = dw; - } - else - dw = user_dw[module_name]; + dw = get_user_dw(sess, module_name); } if (sess.verbose > 3) @@ -5647,12 +3422,12 @@ dwarf_builder::build(systemtap_session & sess, Elf_Scn *probe_scn = NULL; dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx)); + GElf_Shdr shdr_mem; GElf_Shdr *shdr = NULL; // Is there a .probes section? while ((probe_scn = elf_nextscn (elf, probe_scn))) { - GElf_Shdr shdr_mem; shdr = gelf_getshdr (probe_scn, &shdr_mem); assert (shdr != NULL); @@ -5663,6 +3438,22 @@ dwarf_builder::build(systemtap_session & sess, } } + // Older versions put .probes section in the debuginfo dwarf file, + // so check if it actually exists, if not take the main elf file + if (probe_type == probes_and_dwarf && shdr->sh_type == SHT_NOBITS) + { + elf = dwfl_module_getelf (dw->module, &bias); + dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx)); + probe_scn = NULL; + while ((probe_scn = elf_nextscn (elf, probe_scn))) + { + shdr = gelf_getshdr (probe_scn, &shdr_mem); + if (strcmp (elf_strptr (elf, shstrndx, shdr->sh_name), + ".probes") == 0) + break; + } + } + // We got our .probes section, extract data. if (probe_type == probes_and_dwarf) { @@ -5731,7 +3522,7 @@ dwarf_builder::build(systemtap_session & sess, dwarf_query q(sess, base, location, *dw, parameters, finished_results); q.has_mark = true; - dw->query_modules(&q); + dw->iterate_over_modules(&query_module, &q); if (sess.listing_mode) { finished_results.back()->locations[0]->components[1]->functor = TOK_MARK; @@ -5788,7 +3579,7 @@ dwarf_builder::build(systemtap_session & sess, return; } - dw->query_modules(&q); + dw->iterate_over_modules(&query_module, &q); } symbol_table::~symbol_table() @@ -6675,7 +4466,7 @@ uprobe_derived_probe_group::emit_module_exit (systemtap_session& s) // Kprobe derived probes // ------------------------------------------------------------------------ -static string TOK_KPROBE("kprobe"); +static const string TOK_KPROBE("kprobe"); struct kprobe_derived_probe: public derived_probe { @@ -7393,7 +5184,7 @@ tracepoint_var_expanding_visitor::visit_target_symbol_context (target_symbol* e) expression *texp = require (tsym); // NB: throws nothing ... assert (!tsym->saved_conversion_error); // ... but this is how we know it happened. - pf->raw_components += "=%#x"; + pf->raw_components += args[i].isptr ? "=%p" : "=%#x"; pf->args.push_back(texp); } @@ -7891,8 +5682,7 @@ tracepoint_builder::init_dw(systemtap_session& s) if (s.verbose > 2) clog << "Pass 2: using cached " << s.tracequery_path << endl; - dw = new dwflpp(s); - dw->setup_user(s.tracequery_path); + dw = new dwflpp(s, s.tracequery_path); close(fd); return true; } @@ -7917,8 +5707,7 @@ tracepoint_builder::init_dw(systemtap_session& s) << s.tracequery_path << "\"): " << strerror(errno) << endl; } - dw = new dwflpp(s); - dw->setup_user(tracequery_ko); + dw = new dwflpp(s, tracequery_ko); return true; } @@ -7936,7 +5725,7 @@ tracepoint_builder::build(systemtap_session& s, assert(get_param (parameters, TOK_TRACE, tracepoint)); tracepoint_query q(*dw, tracepoint, base, location, finished_results); - dw->query_modules(&q); + dw->iterate_over_modules(&query_module, &q); } diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index c0f0b19c..737849dc 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -114,6 +114,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dejagnu no-dist diff --git a/testsuite/aclocal.m4 b/testsuite/aclocal.m4 index 5aee677e..a249a8e6 100644 --- a/testsuite/aclocal.m4 +++ b/testsuite/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- +# generated automatically by aclocal 1.10.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,12 +11,15 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, +[m4_warning([this file was generated for autoconf 2.63. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -31,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], +m4_if([$1], [1.10.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -45,10 +48,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) +[AM_AUTOMAKE_VERSION([1.10.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -141,13 +146,13 @@ fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 Free Software Foundation, Inc. +# 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -252,16 +257,17 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -391,13 +397,13 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -414,7 +420,7 @@ AC_DEFUN([_AM_SET_OPTION], # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -510,7 +516,7 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) diff --git a/testsuite/configure b/testsuite/configure index cc73571a..ecee48d8 100755 --- a/testsuite/configure +++ b/testsuite/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for systemtap 0.9.7. +# Generated by GNU Autoconf 2.63 for systemtap 0.9.7. # # Report bugs to <systemtap@sources.redhat.com>. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -65,8 +93,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -89,7 +115,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -102,17 +128,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -160,7 +179,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -242,7 +261,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -263,7 +282,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -343,10 +362,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -415,9 +434,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -453,7 +473,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -481,7 +501,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -494,19 +513,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -531,10 +553,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -578,72 +600,78 @@ PACKAGE_VERSION='0.9.7' PACKAGE_STRING='systemtap 0.9.7' PACKAGE_BUGREPORT='systemtap@sources.redhat.com' -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -MAINTAINER_MODE_TRUE -MAINTAINER_MODE_FALSE -MAINT -dejazilla +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +dejazilla +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dejazilla +' ac_precious_vars='build_alias host_alias target_alias' @@ -652,6 +680,8 @@ target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -750,13 +780,21 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -769,13 +807,21 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -966,22 +1012,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1001,7 +1063,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1010,16 +1072,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1028,22 +1090,38 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1058,7 +1136,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1074,10 +1152,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 + { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1085,12 +1163,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1117,12 +1195,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1171,9 +1249,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1183,25 +1261,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/systemtap] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1220,6 +1298,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful @@ -1238,15 +1317,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1282,7 +1363,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1292,10 +1373,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF systemtap configure 0.9.7 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1306,7 +1387,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by systemtap $as_me 0.9.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1342,7 +1423,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1377,7 +1458,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1429,11 +1510,12 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1463,9 +1545,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1480,9 +1562,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1498,8 +1580,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1541,21 +1623,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1565,16 +1650,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1588,29 +1673,38 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1620,10 +1714,12 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1677,8 +1773,8 @@ for ac_dir in .. "$srcdir"/..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. \"$srcdir\"/.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in .. \"$srcdir\"/.." >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. \"$srcdir\"/.." >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in .. \"$srcdir\"/.." >&2;} { (exit 1); exit 1; }; } fi @@ -1706,11 +1802,12 @@ am__api_version='1.10' # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1739,17 +1836,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -1762,8 +1871,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1773,8 +1882,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -1797,9 +1906,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -1810,26 +1919,23 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! +$as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1840,15 +1946,15 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -1883,8 +1989,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -1896,10 +2002,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -1912,7 +2018,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -1923,22 +2029,23 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -1955,12 +2062,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1979,8 +2086,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi @@ -2035,10 +2142,10 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -2051,7 +2158,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2062,11 +2169,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2075,10 +2182,10 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -2091,7 +2198,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2102,11 +2209,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2114,12 +2221,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2143,8 +2246,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval @@ -2152,8 +2255,8 @@ else USE_MAINTAINER_MODE=no fi - { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -2177,8 +2280,8 @@ case "$enable_dejazilla" in *) dejazilla="$enable_dejazilla" ;; esac if test -n "$dejazilla"; then - { echo "$as_me:$LINENO: A \"make *check\" will email results to $dejazilla" >&5 -echo "$as_me: A \"make *check\" will email results to $dejazilla" >&6;} + { $as_echo "$as_me:$LINENO: A \"make *check\" will email results to $dejazilla" >&5 +$as_echo "$as_me: A \"make *check\" will email results to $dejazilla" >&6;} fi @@ -2211,11 +2314,12 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -2248,12 +2352,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -2270,6 +2374,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -2299,7 +2409,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -2311,19 +2421,20 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -2336,7 +2447,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -2346,7 +2457,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -2368,17 +2479,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -2394,8 +2533,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -2418,7 +2555,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -2431,17 +2568,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -2463,7 +2593,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -2514,7 +2644,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -2542,7 +2672,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -2555,19 +2684,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -2592,10 +2724,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -2618,7 +2750,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by systemtap $as_me 0.9.7, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -2631,26 +2763,33 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files @@ -2658,13 +2797,13 @@ $config_files Report bugs to <bug-autoconf@gnu.org>." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ systemtap config.status 0.9.7 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -2672,11 +2811,12 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -2698,21 +2838,24 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -2731,30 +2874,32 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -2762,8 +2907,8 @@ do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -2802,130 +2947,144 @@ $debug || (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr='
' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim -MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim -MAINT!$MAINT$ac_delim -dejazilla!$dejazilla$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS <conf$$subs.sed -rm -f conf$$subs.sed -cat >>$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -2941,19 +3100,21 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES +eval set X " :F $CONFIG_FILES " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -2982,26 +3143,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -3011,7 +3184,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -3037,7 +3210,7 @@ echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -3046,7 +3219,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -3067,17 +3240,17 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3122,12 +3295,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -3136,13 +3310,14 @@ case `sed -n '/datarootdir/ { /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -3156,15 +3331,16 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -3175,21 +3351,28 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; @@ -3204,6 +3387,11 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -3225,4 +3413,8 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi diff --git a/testsuite/parseko/cmdline17.stp b/testsuite/parseko/cmdline17.stp new file mode 100755 index 00000000..a9baf2d4 --- /dev/null +++ b/testsuite/parseko/cmdline17.stp @@ -0,0 +1,8 @@ +#!/bin/sh + +# options '-D' and '-L' are mutually exclusive +# +#-D Run in background. This requires '-o' option. +#-L Load module and start probes, then detach. + +staprun -L -D fake_module diff --git a/testsuite/parseko/cmdline18.stp b/testsuite/parseko/cmdline18.stp new file mode 100755 index 00000000..bbdfbcc5 --- /dev/null +++ b/testsuite/parseko/cmdline18.stp @@ -0,0 +1,10 @@ +#!/bin/sh + +# options '-D' and '-d' are mutually exclusive +# +#-D Run in background. This requires '-o' option. +#-d Delete a module. Only detached or unused modules +# the user has permission to access will be deleted. Use "*" +# (quoted) to delete all unused modules. + +staprun -d -D fake_module diff --git a/testsuite/parseko/cmdline19.stp b/testsuite/parseko/cmdline19.stp new file mode 100755 index 00000000..fbcef351 --- /dev/null +++ b/testsuite/parseko/cmdline19.stp @@ -0,0 +1,10 @@ +#!/bin/sh + +# options '-D' and '-c cmd' are mutually exclusive +# +#-D Run in background. This requires '-o' option. +#-c cmd Command 'cmd' will be run and staprun will +# exit when it does. The '_stp_target' variable +# will contain the pid for the command. + +staprun -c /bin/ls -D fake_module diff --git a/testsuite/parseko/cmdline20.stp b/testsuite/parseko/cmdline20.stp new file mode 100755 index 00000000..625cf20d --- /dev/null +++ b/testsuite/parseko/cmdline20.stp @@ -0,0 +1,9 @@ +#!/bin/sh + +# You have to specify ouput FILE with '-D' option +# +#-D Run in background. This requires '-o' option. +#-o FILE Send output to FILE. This supports strftime(3) +# formats for FILE. + +staprun -D fake_module diff --git a/testsuite/parseko/cmdline21.stp b/testsuite/parseko/cmdline21.stp new file mode 100755 index 00000000..d7496c8c --- /dev/null +++ b/testsuite/parseko/cmdline21.stp @@ -0,0 +1,15 @@ +#!/bin/sh + +# You have to specify ouput FILE with '-S' option +# +#-S size[,N] Switches output file to next file when the size +# of file reaches the specified size. The value +# should be an integer greater than 1 which is +# assumed to be the maximum file size in MB. +# When the number of output files reaches N, it +# switches to the first output file. You can omit +# the second argument. +#-o FILE Send output to FILE. This supports strftime(3) +# formats for FILE. + +staprun -S 1,1 fake_module diff --git a/testsuite/systemtap.base/alternatives.exp b/testsuite/systemtap.base/alternatives.exp index 6cbc1e10..f5dc4513 100644 --- a/testsuite/systemtap.base/alternatives.exp +++ b/testsuite/systemtap.base/alternatives.exp @@ -26,10 +26,11 @@ proc stap_run_alternatives {args} { verbose -log "starting $args" eval spawn $args expect { + -timeout 60 -re {semantic error: .+ \(alternatives: [a-zA-Z_]} {incr alternatives_found; exp_continue} -re {[^\r]*\r} { verbose -log $expect_out(0,string); exp_continue } - eof { } - timeout { } + eof { verbose -log "EOF" } + timeout { verbose -log "TIMEOUT" } } set results [wait] verbose -log "wait results: $results" diff --git a/testsuite/systemtap.base/flightrec3.exp b/testsuite/systemtap.base/flightrec3.exp new file mode 100644 index 00000000..5b9d8253 --- /dev/null +++ b/testsuite/systemtap.base/flightrec3.exp @@ -0,0 +1,79 @@ +set test "flightrec3" +if {![installtest_p]} { untested $test; return } + +# cleanup +system "rm -f flightlog.out*" + +set pid 0 +# check -S option with bulk(percpu file) mode +spawn stap -F -o flightlog.out -S 1,3 -b $srcdir/$subdir/$test.stp +expect { + -timeout 240 + -re {([0-9]+)\r\n} { + pass "$test (-S option with bulk mode)" + set pid $expect_out(1,string) + exp_continue} + timeout { fail "$test (timeout)"} + eof { } +} +wait +if {$pid == 0} { + fail "$test (no pid)" + return -1 +} + +exec sleep 4 +array set cpus {} +set scnt 0 +# wait for log files +exec kill -STOP $pid +exec sleep 1 +eval spawn stat -c \"%n %s\" [glob flightlog.out_cpu*] +expect { + -timeout 100 + -re {flightlog.out_cpu([0-9]+).[0-9]+ ([0-9]+)\r\n} { + set cpuid $expect_out(1,string) + set size $expect_out(2,string) + if {[array get cpus $cpuid] == ""} {set cpus($cpuid) 0} + incr cpus($cpuid); + if {$size <= 1048576 } {incr scnt} + exp_continue} + timeout { fail "$test (logfile timeout)"} +} +wait +exec kill -CONT $pid +exec sleep 3 +exec kill -STOP $pid +eval spawn stat -c \"%n %s\" [glob flightlog.out_cpu*] +expect { + -timeout 100 + -re {flightlog.out_cpu([0-9]+).[0-9]+ ([0-9]+)\r\n} { + set cpuid $expect_out(1,string) + set size $expect_out(2,string) + if {[array get cpus $cpuid] == ""} {set cpus($cpuid) 0} + incr cpus($cpuid); + if {$size <= 1048576 } {incr scnt} + exp_continue} + timeout { fail "$test (logfile timeout)"} +} +wait +exec kill -CONT $pid +# check logfile number +set cnt 0 +foreach e [array names cpus] { + if {$cpus($e) != 6} { + fail "$test (log file numbers cpu:$e, cnt:$cpus($e)))" + } + set cnt [expr $cnt + $cpus($e)] +} +# check logfile size +if {$scnt == $cnt} { + pass "$test (log file size limitation with bulk mode)" +} else { + fail "$test (log file size ($scnt != $cnt))" +} +exec kill -TERM $pid +# wait for exiting... +exec sleep 1 +system "rm -f flightlog.out*" + diff --git a/testsuite/systemtap.base/flightrec3.stp b/testsuite/systemtap.base/flightrec3.stp new file mode 100644 index 00000000..d660793f --- /dev/null +++ b/testsuite/systemtap.base/flightrec3.stp @@ -0,0 +1,5 @@ +probe kernel.function("update_process_times") +{ + for (j = 0; j < 100; j++) + printf("1234567890\n") +} diff --git a/testsuite/systemtap.base/itrace.exp b/testsuite/systemtap.base/itrace.exp index 5da0dfaf..ddd1b07b 100644 --- a/testsuite/systemtap.base/itrace.exp +++ b/testsuite/systemtap.base/itrace.exp @@ -1,53 +1,55 @@ # itrace test - # Initialize variables set exepath "[pwd]/ls_[pid]" -set itrace1_script { +# Why check for 1000 instructions executed? We can't know the actual +# number to look for, so we just look for a reasonable number that +# should work for all platforms. + +set itrace_single1_script { global instrs = 0 probe begin { printf("systemtap starting probe\n") } probe process("%s").insn { instrs += 1 - if (instrs == 5) - exit() } - - - probe end { printf("systemtap ending probe\n") - printf("itraced = %%d\n", instrs) + probe end { + printf("systemtap ending probe\n") + if (instrs > 1000) { + printf("instrs > 1000 (%%d)\n", instrs) + } + else { + printf("instrs <= 1000 (%%d)\n", instrs) + } } } -set itrace1_script_output "itraced = 5\r\n" +set itrace_single1_script_output "instrs > 1000 \\(\[0-9\]\[0-9\]*\\)\r\n" -set itrace2_script { +set itrace_single2_script { global instrs = 0, itrace_on = 0, start_timer = 0 probe begin { start_timer = 1; printf("systemtap starting probe\n") } probe process("%s").insn if (itrace_on) { instrs += 1 if (instrs == 5) - exit() + exit() } - - probe timer.ms(1) if (start_timer) { itrace_on = 1 } - probe timer.ms(10) if (start_timer) { itrace_on = 0 } probe end { printf("systemtap ending probe\n") - printf("itraced = %%d\n", instrs) + printf("itraced = %%d\n", instrs) } } -set itrace2_script_output "itraced = 5\r\n" +set itrace_single2_script_output "itraced = 5\r\n" -set itrace3_script { +set itrace_block1_script { global branches = 0 probe begin { @@ -59,14 +61,80 @@ set itrace3_script { if (branches == 5) exit() } - - probe end { printf("systemtap ending probe\n") printf("itraced block mode = %%d\n", branches) } } -set itrace3_script_output "itraced block mode = 5\r\n" +set itrace_block1_script_output "itraced block mode = 5\r\n" + +set itrace_block2_script { + global instrs = 0, itrace_on = 0, start_timer = 0 + probe begin { start_timer = 1; printf("systemtap starting probe\n") } + probe process("%s").insn.block if (itrace_on) + { + instrs += 1 + if (instrs == 5) + exit() + } + probe timer.ms(1) if (start_timer) + { + itrace_on = 1 + } + probe timer.ms(10) if (start_timer) + { + itrace_on = 0 + } + probe end { printf("systemtap ending probe\n") + printf("itraced = %%d\n", instrs) + } +} +set itrace_block2_script_output "itraced = 5\r\n" + +set itrace_single_step_script { + %{ + #include "ptrace_compatibility.h" + %} + + function has_single_step() %{ + THIS->__retvalue = arch_has_single_step(); /* pure */ + %} + + probe begin { + printf("has_single_step: %d\n", has_single_step()) + exit() + } +} +set itrace_block_step_script { + %{ + #include "ptrace_compatibility.h" + %} + + function has_block_step() %{ + THIS->__retvalue = arch_has_block_step(); /* pure */ + %} + + probe begin { + printf("has_block_step: %d\n", has_block_step()) + exit() + } +} + +proc stap_check_feature { test_name script feature } { + set rc -1 + verbose -log "stap -g -e \"$script\"" + spawn stap -g -e "$script" + expect { + -timeout 60 + -re "^$feature: 0" { set rc 0; pass $test_name } + -re "^$feature: 1" { set rc 1; pass $test_name } + eof { fail "$test_name (eof)" } + timeout { fail "$test_name (timeout)" } + } + catch {close} + catch {wait} + return $rc +} # Set up our own copy of /bin/ls, to make testing for a particular # executable easy. We can't use 'ln' here, since we might be creating @@ -90,37 +158,80 @@ proc run_ls_5_sec {} { return 0; } +# figure out if this system supports single stepping (if we've got +# utrace and we're doing install testing) +set TEST_NAME "itrace single step check" +set single_step_p 0 +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested $TEST_NAME +} else { + set single_step_p [stap_check_feature $TEST_NAME \ + $itrace_single_step_script "has_single_step"] +} + +# figure out if this system supports block stepping (if we've got +# utrace and we're doing install testing) +set TEST_NAME "itrace block step check" +set block_step_p 0 +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested $TEST_NAME +} else { + set block_step_p [stap_check_feature $TEST_NAME \ + $itrace_block_step_script "has_block_step"] +} -set TEST_NAME "itrace1" +# Run the single step tests +set TEST_NAME "itrace_single1" if {![utrace_p]} { untested "$TEST_NAME : no kernel utrace support found" } elseif {![installtest_p]} { untested $TEST_NAME +} elseif {$single_step_p != 1} { + xfail "$TEST_NAME : no kernel single step support" } else { - set script [format $itrace1_script $exepath] - stap_run $TEST_NAME run_ls_5_sec $itrace1_script_output -e $script + set script [format $itrace_single1_script $exepath] + stap_run $TEST_NAME run_ls_5_sec $itrace_single1_script_output -e $script } +set TEST_NAME "itrace_single2" +if {![utrace_p]} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested $TEST_NAME +} elseif {$single_step_p != 1} { + xfail "$TEST_NAME : no kernel single step support" +} else { + set script [format $itrace_single2_script $exepath] + stap_run $TEST_NAME run_ls_5_sec $itrace_single2_script_output -e $script +} -set TEST_NAME "itrace2" +# Run the block step tests +set TEST_NAME "itrace_block1" if {![utrace_p]} { untested "$TEST_NAME : no kernel utrace support found" } elseif {![installtest_p]} { untested $TEST_NAME +} elseif {$block_step_p != 1} { + xfail "$TEST_NAME : no kernel block step support" } else { - set script [format $itrace2_script $exepath] - stap_run $TEST_NAME run_ls_5_sec $itrace2_script_output -e $script + set script [format $itrace_block1_script $exepath] + stap_run $TEST_NAME run_ls_5_sec $itrace_block1_script_output -e $script } -set TEST_NAME "itrace3" +set TEST_NAME "itrace_block2" if {![utrace_p]} { untested "$TEST_NAME : no kernel utrace support found" } elseif {![installtest_p]} { untested $TEST_NAME +} elseif {$block_step_p != 1} { + xfail "$TEST_NAME : no kernel block step support" } else { - send_log "ATTENTION: if arch_has_block_step is not defined for this arch, this testcase will fail\n" - set script [format $itrace3_script $exepath] - stap_run $TEST_NAME run_ls_5_sec $itrace3_script_output -e $script + set script [format $itrace_block2_script $exepath] + stap_run $TEST_NAME run_ls_5_sec $itrace_block2_script_output -e $script } # Cleanup diff --git a/testsuite/systemtap.base/skipped.exp b/testsuite/systemtap.base/skipped.exp index 8c491037..f3048c8a 100644 --- a/testsuite/systemtap.base/skipped.exp +++ b/testsuite/systemtap.base/skipped.exp @@ -2,8 +2,8 @@ set test "skip tracking" if {! [installtest_p]} { untested $test; return } -set cpus [exec sh -c "grep ^processor /proc/cpuinfo | wc -l"] -if {$cpus < 2} { unsupported $test; return } +set nr_cpus [exec sh -c "grep ^processor /proc/cpuinfo | wc -l"] +if {$nr_cpus < 2} { unsupported $test; return } set ok 0 spawn stap -e "probe timer.s(5) {exit()} probe timer.profile,syscall.* {f++} global f" -DMAXTRYLOCK=0 -tu @@ -18,4 +18,4 @@ expect { catch {close} catch {wait} -if {$ok >= 3} { pass "$test ($cpus $ok)" } else { fail "$test ($cpus $ok)" } +if {$ok >= 3} { pass "$test ($nr_cpus $ok)" } else { fail "$test ($nr_cpus $ok)" } |