diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-09-12 14:48:46 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-09-12 14:48:46 +0000 |
commit | 62531eff7138b73da2a6d2b382959964d67d4269 (patch) | |
tree | 176edf1a30027217d6fcff6f9f1c049d990d75cf /gnu/usr.bin/binutils/gprof | |
parent | 9ba342053c015a9be4f7f1ad1efdf21220329946 (diff) |
Import binutils-2.10
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
Diffstat (limited to 'gnu/usr.bin/binutils/gprof')
-rw-r--r-- | gnu/usr.bin/binutils/gprof/Makefile.am | 181 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/aclocal.m4 | 914 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/bbconv.pl | 36 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/corefile.c | 766 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/corefile.h | 21 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/gconfig.in | 132 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/po/Make-in | 251 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/po/POTFILES.in | 37 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/po/gprof.pot | 477 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gprof/stamp-h.in | 1 |
10 files changed, 2816 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gprof/Makefile.am b/gnu/usr.bin/binutils/gprof/Makefile.am new file mode 100644 index 00000000000..6321bdb2b7f --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/Makefile.am @@ -0,0 +1,181 @@ +## Process this file with automake to generate Makefile.in + +AUTOMAKE_OPTIONS = cygnus + +SUFFIXES = .m + +SUBDIRS = po + +BASEDIR = $(srcdir)/.. +BFDDIR = $(BASEDIR)/bfd +INCDIR = $(BASEDIR)/include + +MKDEP = gcc -MM + +INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(prefix)/share/locale\"" + +bin_PROGRAMS = gprof + +## Convenience var listing pure sources. +sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \ + cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \ + search_list.c symtab.c sym_ids.c utils.c \ + i386.c alpha.c vax.c tahoe.c sparc.c +gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c +gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS) +gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS) + +noinst_HEADERS = \ + basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \ + corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \ + search_list.h source.h sym_ids.h symtab.h utils.h + +EXTRA_DIST = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c bbconv.pl + +BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c + +diststuff: $(BUILT_SOURCES) info + +.m.c: + awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ + FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ + FILE=$*.m $(srcdir)/$*.m + +POTFILES = $(sources) $(noinst_HEADERS) +po/POTFILES.in: @MAINT@ Makefile + for file in $(POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/POTFILES.in + +info_TEXINFOS = gprof.texi +man_MANS = gprof.1 + +# Targets to rebuild dependencies in this Makefile. +# Have to get rid of DEP1 here so that "$?" later includes all sources. +DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h + rm -f DEP1 + $(MAKE) MKDEP="$(MKDEP)" DEP1 + sed -f dep.sed < DEP1 > $@ + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + +DEP1: $(gprof_SOURCES) + echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 + echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2 + $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2 + mv -f DEP2 $@ + +dep.sed: dep-in.sed config.status + objdir=`pwd`; \ + sed <$(srcdir)/dep-in.sed >dep.sed \ + -e 's!@INCDIR@!$(INCDIR)!' \ + -e 's!@BFDDIR@!$(BFDDIR)!' \ + -e 's!@SRCDIR@!$(srcdir)!' \ + -e "s!@OBJDIR@!$${objdir}!" + +dep: DEP + sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile + cat DEP >> tmp-Makefile + $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile + +dep-in: DEP + sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in + cat DEP >> tmp-Makefile.in + $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in + +dep-am: DEP + sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am + cat DEP >> tmp-Makefile.am + $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am + +.PHONY: dep dep-in dep-am + +CLEANFILES = dep.sed DEP DEP1 DEP2 + +# DO NOT DELETE THIS LINE -- mkdep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. +basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \ + $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + gconfig.h $(INCDIR)/bin-bugs.h source.h search_list.h \ + symtab.h ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \ + $(INCDIR)/libiberty.h sym_ids.h +call_graph.o: call_graph.c cg_arcs.h gprof.h $(BFDDIR)/sysdep.h \ + ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \ + corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h +cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + gconfig.h $(INCDIR)/bin-bugs.h call_graph.h symtab.h \ + ../bfd/bfd.h source.h search_list.h cg_arcs.h cg_dfn.h \ + cg_print.h utils.h sym_ids.h +cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ + source.h search_list.h cg_dfn.h utils.h +cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + symtab.h ../bfd/bfd.h source.h search_list.h cg_print.h \ + hist.h utils.h +corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + gconfig.h $(INCDIR)/bin-bugs.h corefile.h ../bfd/bfd.h \ + symtab.h source.h search_list.h +gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(BFDDIR)/sysdep.h \ + ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \ + corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \ + hertz.h hist.h $(INCDIR)/libiberty.h +gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ + $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + basic_blocks.h source.h search_list.h symtab.h ../bfd/bfd.h \ + call_graph.h cg_arcs.h cg_print.h corefile.h gmon_io.h \ + gmon.h hertz.h hist.h sym_ids.h +hertz.o: hertz.c hertz.h gprof.h $(BFDDIR)/sysdep.h \ + ../bfd/config.h $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h +hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ + gconfig.h $(INCDIR)/bin-bugs.h corefile.h ../bfd/bfd.h \ + gmon_io.h gmon.h gmon_out.h hist.h symtab.h source.h \ + search_list.h sym_ids.h utils.h +source.o: source.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/libiberty.h search_list.h source.h +search_list.o: search_list.c $(INCDIR)/libiberty.h \ + $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + search_list.h +symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h +sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ + cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + symtab.h ../bfd/bfd.h source.h search_list.h sym_ids.h +utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h +i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h hist.h +alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h hist.h +vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h hist.h +tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h hist.h +sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ + $(INCDIR)/fopen-same.h gconfig.h $(INCDIR)/bin-bugs.h \ + cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \ + corefile.h hist.h +flat_bl.o: flat_bl.c +bsd_callg_bl.o: bsd_callg_bl.c +fsf_callg_bl.o: fsf_callg_bl.c +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/gnu/usr.bin/binutils/gprof/aclocal.m4 b/gnu/usr.bin/binutils/gprof/aclocal.m4 new file mode 100644 index 00000000000..c8a994ccab4 --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/aclocal.m4 @@ -0,0 +1,914 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Do all the work for Automake. 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. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # 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". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + + +# serial 40 AC_PROG_LIBTOOL +AC_DEFUN(AC_PROG_LIBTOOL, +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl + +# Save cache, so that ltconfig can load it +AC_CACHE_SAVE + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ +DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +|| AC_MSG_ERROR([libtool configure failed]) + +# Reload cache, that may have been modified by ltconfig +AC_CACHE_LOAD + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Redirect the config.log output again, so that the ltconfig log is not +# clobbered by the next message. +exec 5>>./config.log +]) + +AC_DEFUN(AC_LIBTOOL_SETUP, +[AC_PREREQ(2.13)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_RANLIB])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_NM])dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +dnl + +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + +# Check for any special flags to pass to ltconfig. +libtool_flags="--cache-file=$cache_file" +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" +ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], +[libtool_flags="$libtool_flags --enable-dlopen"]) +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[libtool_flags="$libtool_flags --enable-win32-dll"]) +AC_ARG_ENABLE(libtool-lock, + [ --disable-libtool-lock avoid locking (might break parallel builds)]) +test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" +test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$lt_target" in +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; + +ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +]) +esac +]) + +# AC_LIBTOOL_DLOPEN - enable checks for dlopen support +AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) + +# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's +AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) + +# AC_ENABLE_SHARED - implement the --enable-shared flag +# Usage: AC_ENABLE_SHARED[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_SHARED, [dnl +define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(shared, +changequote(<<, >>)dnl +<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl +]) + +# AC_DISABLE_SHARED - set the default shared flag to --disable-shared +AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no)]) + +# AC_ENABLE_STATIC - implement the --enable-static flag +# Usage: AC_ENABLE_STATIC[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_STATIC, [dnl +define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(static, +changequote(<<, >>)dnl +<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_static=AC_ENABLE_STATIC_DEFAULT)dnl +]) + +# AC_DISABLE_STATIC - set the default static flag to --disable-static +AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no)]) + + +# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag +# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] +# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to +# `yes'. +AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl +define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(fast-install, +changequote(<<, >>)dnl +<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_fast_install=yes ;; +no) enable_fast_install=no ;; +*) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl +]) + +# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install +AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no)]) + +# AC_PROG_LD - find the path to the GNU or non-GNU linker +AC_DEFUN(AC_PROG_LD, +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. +changequote(,)dnl + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' +changequote([,])dnl + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(ac_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$ac_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_PROG_LD_GNU +]) + +AC_DEFUN(AC_PROG_LD_GNU, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi]) +]) + +# AC_PROG_NM - find the path to a BSD-compatible name lister +AC_DEFUN(AC_PROG_NM, +[AC_MSG_CHECKING([for BSD-compatible nm]) +AC_CACHE_VAL(ac_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi]) +NM="$ac_cv_path_NM" +AC_MSG_RESULT([$NM]) +]) + +# AC_CHECK_LIBM - check for math library +AC_DEFUN(AC_CHECK_LIBM, +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case "$lt_target" in +*-*-beos* | *-*-cygwin*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, main, LIBM="-lm") + ;; +esac +]) + +# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl convenience library, adds --enable-ltdl-convenience to +# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor +# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed +# to be `${top_builddir}/libltdl'. Make sure you start DIR with +# '${top_builddir}/' (note the single quotes!) if your package is not +# flat, and, if you're not using automake, define top_builddir as +# appropriate in the Makefiles. +AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case "$enable_ltdl_convenience" in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la + INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) +]) + +# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for +# the libltdl installable library, and adds --enable-ltdl-install to +# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor +# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed +# to be `${top_builddir}/libltdl'. Make sure you start DIR with +# '${top_builddir}/' (note the single quotes!) if your package is not +# flat, and, if you're not using automake, define top_builddir as +# appropriate in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, main, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la + INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + INCLTDL= + fi +]) + +dnl old names +AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl +AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl +AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl +AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl +AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl +AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl +AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl + +dnl This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL])dnl + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<<am_indx=1 +for am_file in <<$1>>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# This file is derived from `gettext.m4'. The difference is that the +# included macros assume Cygnus-style source and build trees. + +# Macro to add for using GNU gettext. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 3 + +AC_DEFUN(CY_WITH_NLS, + [AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + USE_INCLUDED_LIBINTL=no + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, + [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], + gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) + + if test "$gt_cv_func_gettext_libc" != "yes"; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CACHE_CHECK([for gettext in libintl], + gt_cv_func_gettext_libintl, + [AC_TRY_LINK([], [return (int) gettext ("")], + gt_cv_func_gettext_libintl=yes, + gt_cv_func_gettext_libintl=no)])]) + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT, 1, + [Define as 1 if you have gettext and don't want to use GNU gettext.]) + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + ]) + + dnl In the standard gettext, we would now check for catgets. + dnl However, we never want to use catgets for our releases. + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_SUBST(MSGFMT) + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/../intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=libintl.h + nls_cv_header_libgt=libgettext.h + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext programs is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=libintl.h + nls_cv_header_libgt=libgettext.h + fi + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN(CY_GNU_GETTEXT, + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h values.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +__argz_count __argz_stringify __argz_next]) + + if test "${ac_cv_func_stpcpy+set}" != "set"; then + AC_CHECK_FUNCS(stpcpy) + fi + if test "${ac_cv_func_stpcpy}" = "yes"; then + AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) + fi + + AM_LC_MESSAGES + CY_WITH_NLS + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl The reference to <locale.h> in the installed <libintl.h> file + dnl must be resolved because we cannot expect the users of this + dnl to define HAVE_LOCALE_H. + if test $ac_cv_header_locale_h = yes; then + INCLUDE_LOCALE_H="#include <locale.h>" + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header <locale.h>. Take care yourself. */" + fi + AC_SUBST(INCLUDE_LOCALE_H) + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + if test -f $srcdir/po2tbl.sed.in; then + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed + fi + dnl po2tbl.sed is always needed. + sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ + $srcdir/po2tbl.sed.in > po2tbl.sed + fi + + dnl In the intl/Makefile.in we have a special dependency which makes + dnl only sense for gettext. We comment this out for non-gettext + dnl packages. + if test "$PACKAGE" = "gettext"; then + GT_NO="#NO#" + GT_YES= + else + GT_NO= + GT_YES="#YES#" + fi + AC_SUBST(GT_NO) + AC_SUBST(GT_YES) + + MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" + AC_SUBST(MKINSTALLDIRS) + + dnl *** For now the libtool support in intl/Makefile is not for real. + l= + AC_SUBST(l) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. But only do this if the po directory + dnl exists in srcdir. + if test -d $srcdir/po; then + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + fi + ]) + +# Search path for a program which passes the given test. +# Ulrich Drepper <drepper@cygnus.com>, 1996. +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AM_PATH_PROG_WITH_TEST, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# Check whether LC_MESSAGES is available in <locale.h>. +# Ulrich Drepper <drepper@cygnus.com>, 1995. +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# serial 1 + +AC_DEFUN(AM_LC_MESSAGES, + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your locale.h file contains LC_MESSAGES.]) + fi + fi]) + +# Add --enable-maintainer-mode option to configure. +# From Jim Meyering + +# serial 1 + +AC_DEFUN(AM_MAINTAINER_MODE, +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT($USE_MAINTAINER_MODE) + AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +# Define a conditional. + +AC_DEFUN(AM_CONDITIONAL, +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + diff --git a/gnu/usr.bin/binutils/gprof/bbconv.pl b/gnu/usr.bin/binutils/gprof/bbconv.pl new file mode 100644 index 00000000000..7312f5162fe --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/bbconv.pl @@ -0,0 +1,36 @@ +#! /usr/bin/perl + +# This script converts a "bb.out" file into a format +# suitable for processing by gprof + +# Write a new-style gmon header + +print pack("A4Ix12", "gmon", 1); + + +# The input file format contains header lines and data lines. +# Header lines contain a count of how many data lines follow before +# the next header line. $blockcount is set to the count that +# appears in each header line, then decremented at each data line. +# $blockcount should always be zero at the start of a header line, +# and should never be zero at the start of a data line. + +$blockcount=0; + +while (<>) { + if (/^File .*, ([0-9]+) basic blocks/) { + print STDERR "Miscount: line $.\n" if ($blockcount != 0); + $blockcount = $1; + + print pack("cI", 2, $blockcount); + } + if (/Block.*executed([ 0-9]+) time.* address= 0x([0-9a-fA-F]*)/) { + print STDERR "Miscount: line $.\n" if ($blockcount == 0); + $blockcount-- if ($blockcount > 0); + + $count = $1; + $addr = hex $2; + + print pack("II",$addr,$count); + } +} diff --git a/gnu/usr.bin/binutils/gprof/corefile.c b/gnu/usr.bin/binutils/gprof/corefile.c new file mode 100644 index 00000000000..790fc286208 --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/corefile.c @@ -0,0 +1,766 @@ +#include "libiberty.h" +#include "gprof.h" +#include "corefile.h" +#include "symtab.h" + +bfd *core_bfd; +int core_num_syms; +asymbol **core_syms; +asection *core_text_sect; +PTR core_text_space; + +int min_insn_size; +int offset_to_code; + +/* For mapping symbols to specific .o files during file ordering. */ +struct function_map { + char *function_name; + char *file_name; +}; + +struct function_map *symbol_map; +unsigned int symbol_map_count; + +extern void i386_find_call PARAMS ((Sym *, bfd_vma, bfd_vma)); +extern void alpha_find_call PARAMS ((Sym *, bfd_vma, bfd_vma)); +extern void vax_find_call PARAMS ((Sym *, bfd_vma, bfd_vma)); +extern void tahoe_find_call PARAMS ((Sym *, bfd_vma, bfd_vma)); +extern void sparc_find_call PARAMS ((Sym *, bfd_vma, bfd_vma)); + +static void +DEFUN (read_function_mappings, (filename), const char *filename) +{ + FILE *file = fopen (filename, "r"); + char dummy[1024]; + int count = 0; + + if (!file) + { + fprintf (stderr, _("%s: could not open %s.\n"), whoami, filename); + done (1); + } + + /* First parse the mapping file so we know how big we need to + make our tables. We also do some sanity checks at this + time. */ + while (!feof (file)) + { + int matches; + + matches = fscanf (file, "%[^\n:]", dummy); + if (!matches) + { + fprintf (stderr, _("%s: unable to parse mapping file %s.\n"), + whoami, filename); + done (1); + } + + /* Just skip messages about files with no symbols. */ + if (!strncmp (dummy, "No symbols in ", 14)) + { + fscanf (file, "\n"); + continue; + } + + /* Don't care what else is on this line at this point. */ + fscanf (file, "%[^\n]\n", dummy); + count++; + } + + /* Now we know how big we need to make our table. */ + symbol_map = ((struct function_map *) + xmalloc (count * sizeof (struct function_map))); + + /* Rewind the input file so we can read it again. */ + rewind (file); + + /* Read each entry and put it into the table. */ + count = 0; + while (!feof (file)) + { + int matches; + char *tmp; + + matches = fscanf (file, "%[^\n:]", dummy); + if (!matches) + { + fprintf (stderr, _("%s: unable to parse mapping file %s.\n"), + whoami, filename); + done (1); + } + + /* Just skip messages about files with no symbols. */ + if (!strncmp (dummy, "No symbols in ", 14)) + { + fscanf (file, "\n"); + continue; + } + + /* dummy has the filename, go ahead and copy it. */ + symbol_map[count].file_name = xmalloc (strlen (dummy) + 1); + strcpy (symbol_map[count].file_name, dummy); + + /* Now we need the function name. */ + fscanf (file, "%[^\n]\n", dummy); + tmp = strrchr (dummy, ' ') + 1; + symbol_map[count].function_name = xmalloc (strlen (tmp) + 1); + strcpy (symbol_map[count].function_name, tmp); + count++; + } + + /* Record the size of the map table for future reference. */ + symbol_map_count = count; +} + +void +DEFUN (core_init, (a_out_name), const char *a_out_name) +{ + core_bfd = bfd_openr (a_out_name, 0); + + if (!core_bfd) + { + perror (a_out_name); + done (1); + } + + if (!bfd_check_format (core_bfd, bfd_object)) + { + fprintf (stderr, _("%s: %s: not in a.out format\n"), whoami, a_out_name); + done (1); + } + + /* get core's text section: */ + core_text_sect = bfd_get_section_by_name (core_bfd, ".text"); + if (!core_text_sect) + { + core_text_sect = bfd_get_section_by_name (core_bfd, "$CODE$"); + if (!core_text_sect) + { + fprintf (stderr, _("%s: can't find .text section in %s\n"), + whoami, a_out_name); + done (1); + } + } + + /* read core's symbol table: */ + + /* this will probably give us more than we need, but that's ok: */ + core_num_syms = bfd_get_symtab_upper_bound (core_bfd); + if (core_num_syms < 0) + { + fprintf (stderr, "%s: %s: %s\n", whoami, a_out_name, + bfd_errmsg (bfd_get_error ())); + done (1); + } + + core_syms = (asymbol **) xmalloc (core_num_syms); + core_num_syms = bfd_canonicalize_symtab (core_bfd, core_syms); + if (core_num_syms < 0) + { + fprintf (stderr, "%s: %s: %s\n", whoami, a_out_name, + bfd_errmsg (bfd_get_error ())); + done (1); + } + + min_insn_size = 1; + offset_to_code = 0; + + switch (bfd_get_arch (core_bfd)) + { + case bfd_arch_vax: + case bfd_arch_tahoe: + offset_to_code = 2; + break; + + case bfd_arch_alpha: + min_insn_size = 4; + break; + + default: + break; + } + + if (function_mapping_file) + read_function_mappings (function_mapping_file); +} + + +/* + * Read in the text space of an a.out file + */ +void +DEFUN (core_get_text_space, (core_bfd), bfd * core_bfd) +{ + core_text_space = (PTR) malloc (core_text_sect->_raw_size); + + if (!core_text_space) + { + fprintf (stderr, _("%s: ran out room for %lu bytes of text space\n"), + whoami, (unsigned long) core_text_sect->_raw_size); + done (1); + } + if (!bfd_get_section_contents (core_bfd, core_text_sect, core_text_space, + 0, core_text_sect->_raw_size)) + { + bfd_perror ("bfd_get_section_contents"); + free (core_text_space); + core_text_space = 0; + } + if (!core_text_space) + { + fprintf (stderr, _("%s: can't do -c\n"), whoami); + } +} + + +void +DEFUN (find_call, (parent, p_lowpc, p_highpc), + Sym * parent AND bfd_vma p_lowpc AND bfd_vma p_highpc) +{ + switch (bfd_get_arch (core_bfd)) + { + case bfd_arch_i386: + i386_find_call (parent, p_lowpc, p_highpc); + break; + + case bfd_arch_alpha: + alpha_find_call (parent, p_lowpc, p_highpc); + break; + + case bfd_arch_vax: + vax_find_call (parent, p_lowpc, p_highpc); + break; + + case bfd_arch_sparc: + sparc_find_call (parent, p_lowpc, p_highpc); + break; + + case bfd_arch_tahoe: + tahoe_find_call (parent, p_lowpc, p_highpc); + break; + + default: + fprintf (stderr, _("%s: -c not supported on architecture %s\n"), + whoami, bfd_printable_name(core_bfd)); + + /* Don't give the error more than once. */ + ignore_direct_calls = FALSE; + } +} + +/* + * Return class of symbol SYM. The returned class can be any of: + * 0 -> symbol is not interesting to us + * 'T' -> symbol is a global name + * 't' -> symbol is a local (static) name + */ +static int +DEFUN (core_sym_class, (sym), asymbol * sym) +{ + symbol_info syminfo; + const char *name; + char sym_prefix; + int i; + + if (sym->section == NULL || (sym->flags & BSF_DEBUGGING) != 0) + { + return 0; + } + + /* + * Must be a text symbol, and static text symbols don't qualify if + * ignore_static_funcs set. + */ + if (ignore_static_funcs && (sym->flags & BSF_LOCAL)) + { + DBG (AOUTDEBUG, printf ("[core_sym_class] %s: not a function\n", + sym->name)); + return 0; + } + + bfd_get_symbol_info (core_bfd, sym, &syminfo); + i = syminfo.type; + + if (i == 'T') + { + return i; /* it's a global symbol */ + } + + if (i == 'W') + { + /* Treat weak symbols as text symbols. FIXME: a weak symbol may + also be a data symbol. */ + return 'T'; + } + + if (i != 't') + { + /* not a static text symbol */ + DBG (AOUTDEBUG, printf ("[core_sym_class] %s is of class %c\n", + sym->name, i)); + return 0; + } + + /* do some more filtering on static function-names: */ + + if (ignore_static_funcs) + { + return 0; + } + /* + * Can't zero-length name or funny characters in name, where + * `funny' includes: `.' (.o file names) and `$' (Pascal labels). + */ + if (!sym->name || sym->name[0] == '\0') + { + return 0; + } + + for (name = sym->name; *name; ++name) + { + if (*name == '.' || *name == '$') + { + return 0; + } + } + /* + * On systems where the C compiler adds an underscore to all + * names, static names without underscores seem usually to be + * labels in hand written assembler in the library. We don't want + * these names. This is certainly necessary on a Sparc running + * SunOS 4.1 (try profiling a program that does a lot of + * division). I don't know whether it has harmful side effects on + * other systems. Perhaps it should be made configurable. + */ + sym_prefix = bfd_get_symbol_leading_char (core_bfd); + if ((sym_prefix && sym_prefix != sym->name[0]) + /* + * GCC may add special symbols to help gdb figure out the file + * language. We want to ignore these, since sometimes they mask + * the real function. (dj@ctron) + */ + || !strncmp (sym->name, "__gnu_compiled", 14) + || !strncmp (sym->name, "___gnu_compiled", 15)) + { + return 0; + } + + /* If the object file supports marking of function symbols, then we can + zap anything that doesn't have BSF_FUNCTION set. */ + if (ignore_non_functions && (sym->flags & BSF_FUNCTION) == 0) + return 0; + + return 't'; /* it's a static text symbol */ +} + + +/* + * Get whatever source info we can get regarding address ADDR: + */ +static bool +DEFUN (get_src_info, (addr, filename, name, line_num), + bfd_vma addr AND const char **filename AND const char **name + AND int *line_num) +{ + const char *fname = 0, *func_name = 0; + int l = 0; + + if (bfd_find_nearest_line (core_bfd, core_text_sect, core_syms, + addr - core_text_sect->vma, + &fname, &func_name, (unsigned int *) &l) + && fname && func_name && l) + { + DBG (AOUTDEBUG, printf ("[get_src_info] 0x%lx -> %s:%d (%s)\n", + (unsigned long) addr, fname, l, func_name)); + *filename = fname; + *name = func_name; + *line_num = l; + return TRUE; + } + else + { + DBG (AOUTDEBUG, printf ("[get_src_info] no info for 0x%lx (%s:%d,%s)\n", + (long) addr, fname ? fname : "<unknown>", l, + func_name ? func_name : "<unknown>")); + return FALSE; + } +} + + +/* + * Read in symbol table from core. One symbol per function is + * entered. + */ +void +core_create_function_syms (core_bfd) + bfd *core_bfd ATTRIBUTE_UNUSED; +{ + bfd_vma min_vma = ~0, max_vma = 0; + int class; + long i, found, skip; + unsigned int j; + + /* pass 1 - determine upper bound on number of function names: */ + symtab.len = 0; + for (i = 0; i < core_num_syms; ++i) + { + if (!core_sym_class (core_syms[i])) + { + continue; + } + + /* This should be replaced with a binary search or hashed + search. Gross. + + Don't create a symtab entry for a function that has + a mapping to a file, unless it's the first function + in the file. */ + skip = 0; + for (j = 0; j < symbol_map_count; j++) + if (!strcmp (core_syms[i]->name, symbol_map[j].function_name)) + { + if (j > 0 && ! strcmp (symbol_map [j].file_name, + symbol_map [j - 1].file_name)) + skip = 1; + break; + } + if (!skip) + ++symtab.len; + } + + if (symtab.len == 0) + { + fprintf (stderr, _("%s: file `%s' has no symbols\n"), whoami, a_out_name); + done (1); + } + + /* the "+ 2" is for the sentinels: */ + symtab.base = (Sym *) xmalloc ((symtab.len + 2) * sizeof (Sym)); + + /* pass 2 - create symbols: */ + + symtab.limit = symtab.base; + for (i = 0; i < core_num_syms; ++i) + { + class = core_sym_class (core_syms[i]); + if (!class) + { + DBG (AOUTDEBUG, + printf ("[core_create_function_syms] rejecting: 0x%lx %s\n", + (unsigned long) core_syms[i]->value, + core_syms[i]->name)); + continue; + } + /* This should be replaced with a binary search or hashed + search. Gross. */ + + skip = 0; + found = 0; + for (j = 0; j < symbol_map_count; j++) + if (!strcmp (core_syms[i]->name, symbol_map[j].function_name)) + { + if (j > 0 && ! strcmp (symbol_map [j].file_name, + symbol_map [j - 1].file_name)) + skip = 1; + else + found = j; + break; + } + + if (skip) + continue; + + sym_init (symtab.limit); + + /* symbol offsets are always section-relative: */ + + symtab.limit->addr = core_syms[i]->value + core_syms[i]->section->vma; + if (symbol_map_count + && !strcmp (core_syms[i]->name, symbol_map[found].function_name)) + { + symtab.limit->name = symbol_map[found].file_name; + symtab.limit->mapped = 1; + } + else + { + symtab.limit->name = core_syms[i]->name; + symtab.limit->mapped = 0; + } + + /* Lookup filename and line number, if we can */ + + { + const char *filename, *func_name; + + if (get_src_info (symtab.limit->addr, &filename, &func_name, + &symtab.limit->line_num)) + { + symtab.limit->file = source_file_lookup_path (filename); + + /* FIXME: Checking __osf__ here does not work with a cross + gprof. */ +#ifdef __osf__ + /* + * Suppress symbols that are not function names. This is + * useful to suppress code-labels and aliases. + * + * This is known to be useful under DEC's OSF/1. Under SunOS 4.x, + * labels do not appear in the symbol table info, so this isn't + * necessary. + */ + + if (strcmp (symtab.limit->name, func_name) != 0) + { + /* + * The symbol's address maps to a different name, so + * it can't be a function-entry point. This happens + * for labels, for example. + */ + DBG (AOUTDEBUG, + printf ("[core_create_function_syms: rej %s (maps to %s)\n", + symtab.limit->name, func_name)); + continue; + } +#endif + } + } + + symtab.limit->is_func = TRUE; + symtab.limit->is_bb_head = TRUE; + if (class == 't') + { + symtab.limit->is_static = TRUE; + } + + min_vma = MIN (symtab.limit->addr, min_vma); + max_vma = MAX (symtab.limit->addr, max_vma); + + /* + * If we see "main" without an initial '_', we assume names + * are *not* prefixed by '_'. + */ + if (symtab.limit->name[0] == 'm' && discard_underscores + && strcmp (symtab.limit->name, "main") == 0) + { + discard_underscores = 0; + } + + DBG (AOUTDEBUG, printf ("[core_create_function_syms] %ld %s 0x%lx\n", + (long) (symtab.limit - symtab.base), + symtab.limit->name, + (unsigned long) symtab.limit->addr)); + ++symtab.limit; + } + + /* create sentinels: */ + + sym_init (symtab.limit); + symtab.limit->name = "<locore>"; + symtab.limit->addr = 0; + symtab.limit->end_addr = min_vma - 1; + ++symtab.limit; + + sym_init (symtab.limit); + symtab.limit->name = "<hicore>"; + symtab.limit->addr = max_vma + 1; + symtab.limit->end_addr = ~0; + ++symtab.limit; + + symtab.len = symtab.limit - symtab.base; + symtab_finalize (&symtab); +} + + +/* + * Read in symbol table from core. One symbol per line of source code + * is entered. + */ +void +DEFUN (core_create_line_syms, (core_bfd), bfd * core_bfd) +{ + char *prev_name, *prev_filename; + int prev_name_len, prev_filename_len; + bfd_vma vma, min_vma = ~0, max_vma = 0; + bfd_vma offset; + Sym *prev, dummy, *sentinel, *sym; + const char *filename; + int prev_line_num; + Sym_Table ltab; + /* + * Create symbols for functions as usual. This is necessary in + * cases where parts of a program were not compiled with -g. For + * those parts we still want to get info at the function level: + */ + core_create_function_syms (core_bfd); + + /* pass 1 - counter number of symbols: */ + + /* + * To find all line information, walk through all possible + * text-space addresses (one by one!) and get the debugging + * info for each address. When the debugging info changes, + * it is time to create a new symbol. + * + * Of course, this is rather slow and it would be better if + * bfd would provide an iterator for enumerating all line infos + */ + prev_name_len = PATH_MAX; + prev_filename_len = PATH_MAX; + prev_name = xmalloc (prev_name_len); + prev_filename = xmalloc (prev_filename_len); + ltab.len = 0; + prev_line_num = 0; + for (offset = 0; offset < core_text_sect->_raw_size; offset += min_insn_size) + { + int len; + + vma = core_text_sect->vma + offset; + if (!get_src_info (vma, &filename, &dummy.name, &dummy.line_num) + || (prev_line_num == dummy.line_num + && prev_name != NULL + && strcmp (prev_name, dummy.name) == 0 + && strcmp (prev_filename, filename) == 0)) + { + continue; + } + + ++ltab.len; + prev_line_num = dummy.line_num; + + len = strlen (dummy.name); + if (len >= prev_name_len) + { + prev_name_len = len + 1024; + free (prev_name); + prev_name = xmalloc (prev_name_len); + } + strcpy (prev_name, dummy.name); + + len = strlen (filename); + if (len >= prev_filename_len) + { + prev_filename_len = len + 1024; + free (prev_filename); + prev_filename = xmalloc (prev_filename_len); + } + strcpy (prev_filename, filename); + + min_vma = MIN (vma, min_vma); + max_vma = MAX (vma, max_vma); + } + + free (prev_name); + free (prev_filename); + + /* make room for function symbols, too: */ + ltab.len += symtab.len; + ltab.base = (Sym *) xmalloc (ltab.len * sizeof (Sym)); + ltab.limit = ltab.base; + + /* pass 2 - create symbols: */ + + /* We now set is_static as we go along, rather than by running + through the symbol table at the end. + + The old way called symtab_finalize before the is_static pass, + causing a problem since symtab_finalize uses is_static as part of + its address conflict resolution algorithm. Since global symbols + were prefered over static symbols, and all line symbols were + global at that point, static function names that conflicted with + their own line numbers (static, but labeled as global) were + rejected in favor of the line num. + + This was not the desired functionality. We always want to keep + our function symbols and discard any conflicting line symbols. + Perhaps symtab_finalize should be modified to make this + distinction as well, but the current fix works and the code is a + lot cleaner now. */ + + prev = 0; + for (offset = 0; offset < core_text_sect->_raw_size; offset += min_insn_size) + { + sym_init (ltab.limit); + if (!get_src_info (core_text_sect->vma + offset, &filename, + <ab.limit->name, <ab.limit->line_num) + || (prev && prev->line_num == ltab.limit->line_num + && strcmp (prev->name, ltab.limit->name) == 0 + && strcmp (prev->file->name, filename) == 0)) + { + continue; + } + + /* make name pointer a malloc'ed string: */ + ltab.limit->name = xstrdup (ltab.limit->name); + ltab.limit->file = source_file_lookup_path (filename); + + ltab.limit->addr = core_text_sect->vma + offset; + + /* Set is_static based on the enclosing function, using either: + * 1) the previous symbol, if it's from the same function, or + * 2) a symtab lookup + */ + + if (prev && ltab.limit->file == prev->file && + strcmp (ltab.limit->name, prev->name) == 0) + { + ltab.limit->is_static = prev->is_static; + } + else + { + sym = sym_lookup(&symtab, ltab.limit->addr); + ltab.limit->is_static = sym->is_static; + } + + prev = ltab.limit; + + /* + * If we see "main" without an initial '_', we assume names + * are *not* prefixed by '_'. + */ + if (ltab.limit->name[0] == 'm' && discard_underscores + && strcmp (ltab.limit->name, "main") == 0) + { + discard_underscores = 0; + } + + DBG (AOUTDEBUG, printf ("[core_create_line_syms] %lu %s 0x%lx\n", + (unsigned long) (ltab.limit - ltab.base), + ltab.limit->name, + (unsigned long) ltab.limit->addr)); + ++ltab.limit; + } + + /* update sentinels: */ + + sentinel = sym_lookup (&symtab, 0); + if (strcmp (sentinel->name, "<locore>") == 0 + && min_vma <= sentinel->end_addr) + { + sentinel->end_addr = min_vma - 1; + } + + sentinel = sym_lookup (&symtab, ~0); + if (strcmp (sentinel->name, "<hicore>") == 0 && max_vma >= sentinel->addr) + { + sentinel->addr = max_vma + 1; + } + + /* copy in function symbols: */ + memcpy (ltab.limit, symtab.base, symtab.len * sizeof (Sym)); + ltab.limit += symtab.len; + + if ((unsigned int) (ltab.limit - ltab.base) != ltab.len) + { + fprintf (stderr, + _("%s: somebody miscounted: ltab.len=%d instead of %ld\n"), + whoami, ltab.len, (long) (ltab.limit - ltab.base)); + done (1); + } + + /* finalize ltab and make it symbol table: */ + + symtab_finalize (<ab); + free (symtab.base); + symtab = ltab; + +} diff --git a/gnu/usr.bin/binutils/gprof/corefile.h b/gnu/usr.bin/binutils/gprof/corefile.h new file mode 100644 index 00000000000..b396f8500b2 --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/corefile.h @@ -0,0 +1,21 @@ +#ifndef corefile_h +#define corefile_h + +#include "bfd.h" + +extern bfd *core_bfd; /* bfd for core-file */ +extern int core_num_syms; /* # of entries in symbol-table */ +extern asymbol **core_syms; /* symbol table in a.out */ +extern asection *core_text_sect; /* core text section */ +extern PTR core_text_space; /* text space of a.out in core */ + +extern int min_insn_size; /* size of smallest instruction, in bytes */ +extern int offset_to_code; /* offset (in bytes) of code from entry + address of routine */ + +extern void core_init PARAMS ((const char *a_out_name)); +extern void core_get_text_space PARAMS ((bfd * core_bfd)); +extern void core_create_function_syms PARAMS ((bfd * core_bfd)); +extern void core_create_line_syms PARAMS ((bfd * core_bfd)); + +#endif /* corefile_h */ diff --git a/gnu/usr.bin/binutils/gprof/gconfig.in b/gnu/usr.bin/binutils/gprof/gconfig.in new file mode 100644 index 00000000000..b528f4be885 --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/gconfig.in @@ -0,0 +1,132 @@ +/* gconfig.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have <alloca.h> and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if <sys/types.h> doesn't define. */ +#undef off_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you have the __argz_count function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the __argz_next function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the __argz_stringify function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the setmode function. */ +#undef HAVE_SETMODE + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the <argz.h> header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the <malloc.h> header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the <nl_types.h> header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the <values.h> header file. */ +#undef HAVE_VALUES_H + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION + +/* Define if you have the stpcpy function */ +#undef HAVE_STPCPY + +/* Define if your locale.h file contains LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define to 1 if NLS is requested */ +#undef ENABLE_NLS + +/* Define as 1 if you have gettext and don't want to use GNU gettext. */ +#undef HAVE_GETTEXT + diff --git a/gnu/usr.bin/binutils/gprof/po/Make-in b/gnu/usr.bin/binutils/gprof/po/Make-in new file mode 100644 index 00000000000..0552db1feef --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/po/Make-in @@ -0,0 +1,251 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = $(prefix)/@DATADIRNAME@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in + rm -f $(srcdir)/$(PACKAGE).pot + mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-info: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(top_srcdir)/mkinstalldirs $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(top_srcdir)/mkinstalldirs $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ + $(gettextsrcdir)/Makefile.in.in; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-Makefile.in.in + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +POTFILES.in: @MAINT@ ../Makefile + cd .. && $(MAKE) po/POTFILES.in + +Makefile: Make-in ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \ + CONFIG_HEADERS= $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gnu/usr.bin/binutils/gprof/po/POTFILES.in b/gnu/usr.bin/binutils/gprof/po/POTFILES.in new file mode 100644 index 00000000000..5ae8116a5c1 --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/po/POTFILES.in @@ -0,0 +1,37 @@ +alpha.c +basic_blocks.c +basic_blocks.h +call_graph.c +call_graph.h +cg_arcs.c +cg_arcs.h +cg_dfn.c +cg_dfn.h +cg_print.c +cg_print.h +corefile.c +corefile.h +gmon.h +gmon_io.c +gmon_io.h +gmon_out.h +gprof.c +gprof.h +hertz.c +hertz.h +hist.c +hist.h +i386.c +search_list.c +search_list.h +source.c +source.h +sparc.c +sym_ids.c +sym_ids.h +symtab.c +symtab.h +tahoe.c +utils.c +utils.h +vax.c diff --git a/gnu/usr.bin/binutils/gprof/po/gprof.pot b/gnu/usr.bin/binutils/gprof/po/gprof.pot new file mode 100644 index 00000000000..fe28232e5ef --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/po/gprof.pot @@ -0,0 +1,477 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2000-04-05 14:09+0930\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: alpha.c:89 +msgid "<indirect child>" +msgstr "" + +#: alpha.c:106 +#, c-format +msgid "[find_call] %s: 0x%lx to 0x%lx\n" +msgstr "" + +#: alpha.c:128 +#, c-format +msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n" +msgstr "" + +#: alpha.c:137 +#, c-format +msgid "[find_call] 0x%lx: bsr" +msgstr "" + +#: basic_blocks.c:134 call_graph.c:70 hist.c:105 +#, c-format +msgid "%s: %s: unexpected end of file\n" +msgstr "" + +#: basic_blocks.c:215 +#, c-format +msgid "%s: warning: ignoring basic-block exec counts (use -l or --line)\n" +msgstr "" + +#. FIXME: This only works if bfd_vma is unsigned long. +#: basic_blocks.c:324 basic_blocks.c:333 +#, c-format +msgid "%s:%d: (%s:0x%lx) %lu executions\n" +msgstr "" + +#: basic_blocks.c:325 basic_blocks.c:334 +msgid "<unknown>" +msgstr "" + +#: basic_blocks.c:596 +#, c-format +msgid "" +"\n" +"\n" +"Top %d Lines:\n" +"\n" +" Line Count\n" +"\n" +msgstr "" + +#: basic_blocks.c:620 +msgid "" +"\n" +"Execution Summary:\n" +"\n" +msgstr "" + +#: basic_blocks.c:621 +#, c-format +msgid "%9ld Executable lines in this file\n" +msgstr "" + +#: basic_blocks.c:623 +#, c-format +msgid "%9ld Lines executed\n" +msgstr "" + +#: basic_blocks.c:624 +#, c-format +msgid "%9.2f Percent of the file executed\n" +msgstr "" + +#: basic_blocks.c:628 +#, c-format +msgid "" +"\n" +"%9lu Total number of line executions\n" +msgstr "" + +#: basic_blocks.c:630 +#, c-format +msgid "%9.2f Average executions per line\n" +msgstr "" + +#: call_graph.c:48 +#, c-format +msgid "[cg_tally] arc from %s to %s traversed %lu times\n" +msgstr "" + +#: cg_print.c:39 +msgid "" +"\t\t Call graph (explanation follows)\n" +"\n" +msgstr "" + +#: cg_print.c:43 +msgid "" +"\t\t\tCall graph\n" +"\n" +msgstr "" + +#: cg_print.c:46 hist.c:385 +#, c-format +msgid "" +"\n" +"granularity: each sample hit covers %ld byte(s)" +msgstr "" + +#: cg_print.c:50 +msgid "" +" for %.2f%% of %.2f seconds\n" +"\n" +msgstr "" + +#: cg_print.c:55 +msgid "" +" no time propagated\n" +"\n" +msgstr "" + +#: cg_print.c:64 cg_print.c:67 cg_print.c:69 +msgid "called" +msgstr "" + +#: cg_print.c:64 cg_print.c:69 +msgid "total" +msgstr "" + +#: cg_print.c:64 +msgid "parents" +msgstr "" + +#: cg_print.c:66 cg_print.c:67 +msgid "index" +msgstr "" + +#: cg_print.c:66 +msgid "%time" +msgstr "" + +#: cg_print.c:66 cg_print.c:67 +msgid "self" +msgstr "" + +#: cg_print.c:66 +msgid "descendents" +msgstr "" + +#: cg_print.c:67 hist.c:409 +msgid "name" +msgstr "" + +#: cg_print.c:69 +msgid "children" +msgstr "" + +#: cg_print.c:74 +msgid "index %% time self children called name\n" +msgstr "" + +#: cg_print.c:101 +#, c-format +msgid " <cycle %d as a whole> [%d]\n" +msgstr "" + +#: cg_print.c:353 +#, c-format +msgid "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <spontaneous>\n" +msgstr "" + +#: cg_print.c:354 +#, c-format +msgid "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontaneous>\n" +msgstr "" + +#: cg_print.c:587 +msgid "" +"Index by function name\n" +"\n" +msgstr "" + +#: cg_print.c:644 cg_print.c:653 +#, c-format +msgid "<cycle %d>" +msgstr "" + +#: corefile.c:39 +#, c-format +msgid "%s: could not open %s.\n" +msgstr "" + +#: corefile.c:53 corefile.c:87 +#, c-format +msgid "%s: unable to parse mapping file %s.\n" +msgstr "" + +#: corefile.c:128 +#, c-format +msgid "%s: %s: not in a.out format\n" +msgstr "" + +#: corefile.c:139 +#, c-format +msgid "%s: can't find .text section in %s\n" +msgstr "" + +#: corefile.c:198 +#, c-format +msgid "%s: ran out room for %lu bytes of text space\n" +msgstr "" + +#: corefile.c:211 +#, c-format +msgid "%s: can't do -c\n" +msgstr "" + +#: corefile.c:243 +#, c-format +msgid "%s: -c not supported on architecture %s\n" +msgstr "" + +#: corefile.c:433 +#, c-format +msgid "%s: file `%s' has no symbols\n" +msgstr "" + +#: corefile.c:755 +#, c-format +msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n" +msgstr "" + +#: gmon_io.c:33 gmon_io.c:55 +#, c-format +msgid "%s: bfd_vma has unexpected size of %ld bytes\n" +msgstr "" + +#: gmon_io.c:87 gmon_io.c:182 +#, c-format +msgid "%s: file too short to be a gmon file\n" +msgstr "" + +#: gmon_io.c:97 gmon_io.c:215 +#, c-format +msgid "%s: file `%s' has bad magic cookie\n" +msgstr "" + +#: gmon_io.c:108 +#, c-format +msgid "%s: file `%s' has unsupported version %d\n" +msgstr "" + +#: gmon_io.c:138 +#, c-format +msgid "%s: %s: found bad tag %d (file corrupted?)\n" +msgstr "" + +#: gmon_io.c:203 +#, c-format +msgid "%s: profiling rate incompatible with first gmon file\n" +msgstr "" + +#: gmon_io.c:232 +#, c-format +msgid "%s: incompatible with first gmon file\n" +msgstr "" + +#: gmon_io.c:258 +#, c-format +msgid "%s: file '%s' does not appear to be in gmon.out format\n" +msgstr "" + +#: gmon_io.c:280 +#, c-format +msgid "%s: unexpected EOF after reading %d/%d bins\n" +msgstr "" + +#: gmon_io.c:315 +msgid "time is in ticks, not seconds\n" +msgstr "" + +#: gmon_io.c:321 gmon_io.c:461 +#, c-format +msgid "%s: don't know how to deal with file format %d\n" +msgstr "" + +#: gmon_io.c:328 +#, c-format +msgid "File `%s' (version %d) contains:\n" +msgstr "" + +#: gmon_io.c:330 +#, c-format +msgid "\t%d histogram record%s\n" +msgstr "" + +#: gmon_io.c:332 +#, c-format +msgid "\t%d call-graph record%s\n" +msgstr "" + +#: gmon_io.c:334 +#, c-format +msgid "\t%d basic-block count record%s\n" +msgstr "" + +#: gprof.c:59 +msgid "" +"@(#) Copyright (c) 1983 Regents of the University of California.\n" +" All rights reserved.\n" +msgstr "" + +#: gprof.c:144 +#, c-format +msgid "" +"Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n" +"\t[-d[num]] [-k from/to] [-m min-count] [-t table-length]\n" +"\t[--[no-]annotated-source[=name]] [--[no-]exec-counts[=name]]\n" +"\t[--[no-]flat-profile[=name]] [--[no-]graph[=name]]\n" +"\t[--[no-]time=name] [--all-lines] [--brief] [--debug[=level]]\n" +"\t[--function-ordering] [--file-ordering]\n" +"\t[--directory-path=dirs] [--display-unused-functions]\n" +"\t[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]\n" +"\t[--no-static] [--print-path] [--separate-files]\n" +"\t[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n" +"\t[--version] [--width=n] [--ignore-non-functions]\n" +"\t[--demangle] [--no-demangle]\n" +"\t[image-file] [profile-file...]\n" +msgstr "" + +#: gprof.c:160 +#, c-format +msgid "Report bugs to %s\n" +msgstr "" + +#: gprof.c:229 +#, c-format +msgid "%s: debugging not supported; -d ignored\n" +msgstr "" + +#: gprof.c:309 +#, c-format +msgid "%s: unknown file format %s\n" +msgstr "" + +#. This output is intended to follow the GNU standards document. +#: gprof.c:393 +#, c-format +msgid "GNU gprof %s\n" +msgstr "" + +#: gprof.c:394 +msgid "" +"Based on BSD gprof, copyright 1983 Regents of the University of California.\n" +msgstr "" + +#: gprof.c:395 +msgid "" +"This program is free software. This program has absolutely no warranty.\n" +msgstr "" + +#: gprof.c:441 +#, c-format +msgid "" +"%s: Only one of --function-ordering and --file-ordering may be specified.\n" +msgstr "" + +#: gprof.c:541 +#, c-format +msgid "%s: sorry, file format `prof' is not yet supported\n" +msgstr "" + +#: gprof.c:602 +#, c-format +msgid "%s: gmon.out file is missing histogram\n" +msgstr "" + +#: gprof.c:609 +#, c-format +msgid "%s: gmon.out file is missing call-graph data\n" +msgstr "" + +#: hist.c:143 +#, c-format +msgid "%s: `%s' is incompatible with first gmon file\n" +msgstr "" + +#: hist.c:159 +#, c-format +msgid "%s: %s: unexpected EOF after reading %d of %d samples\n" +msgstr "" + +#: hist.c:381 +#, c-format +msgid "%c%c/call" +msgstr "" + +#: hist.c:389 +msgid "" +" for %.2f%% of %.2f %s\n" +"\n" +msgstr "" + +#: hist.c:395 +#, c-format +msgid "" +"\n" +"Each sample counts as %g %s.\n" +msgstr "" + +#: hist.c:400 +msgid "" +" no time accumulated\n" +"\n" +msgstr "" + +#: hist.c:406 +msgid "cumulative" +msgstr "" + +#: hist.c:406 +msgid "self " +msgstr "" + +#: hist.c:406 +msgid "total " +msgstr "" + +#: hist.c:408 +msgid "time" +msgstr "" + +#: hist.c:408 +msgid "calls" +msgstr "" + +#: hist.c:517 +msgid "" +"\n" +"\n" +"\n" +"flat profile:\n" +msgstr "" + +#: hist.c:523 +msgid "Flat profile:\n" +msgstr "" + +#: source.c:140 +#, c-format +msgid "%s: could not locate `%s'\n" +msgstr "" + +#: source.c:200 +#, c-format +msgid "*** File %s:\n" +msgstr "" + +#: utils.c:93 +#, c-format +msgid " <cycle %d>" +msgstr "" diff --git a/gnu/usr.bin/binutils/gprof/stamp-h.in b/gnu/usr.bin/binutils/gprof/stamp-h.in new file mode 100644 index 00000000000..9788f70238c --- /dev/null +++ b/gnu/usr.bin/binutils/gprof/stamp-h.in @@ -0,0 +1 @@ +timestamp |