ggcov-0.8.4/0000777000175000017500000000000011613000502007621 500000000000000ggcov-0.8.4/version.m4.in0000644000175000017500000000003411453570563012113 00000000000000define(VERSION,`@VERSION@') ggcov-0.8.4/install-sh0000755000175000017500000002202111455722463011563 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ggcov-0.8.4/.gdbinit0000644000175000017500000000020711453570563011202 00000000000000file src/ggcov #set args --disable-crash-dialog --sm-disable test/test001/foo set args test/test001/o.i386-fc-linux-3/foo bre log_func ggcov-0.8.4/aclocal.m40000644000175000017500000116257311612714662011436 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; 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_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) 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 ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname 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(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_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 # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # Generated from ltversion.in. # serial 3012 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6]) m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6' macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl 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 fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. 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"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # 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 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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 # 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. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])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 # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 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 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # 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 4 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 ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2005 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 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])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 # 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. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # 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 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 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 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # 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 conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $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]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 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 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) ggcov-0.8.4/config.h.in0000644000175000017500000000711111563155400011574 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Whether the raw size field in struct bfd_section is called rawsize */ #undef HAVE_BFD_ASECTION_RAWSIZE /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ELF_H /* Whether to use the GnomeProgram feature to initialise GNOME. */ #undef HAVE_GNOME_PROGRAM_INIT /* * The function gtk_text_buffer_select_range may or may * not be present in the gtk2 libraries...we have to work * around it if not. */ #undef HAVE_GTK_TEXT_BUFFER_SELECT_RANGE /* * An iterator for GHashTables may or may not be present * in the glib library...we have to work around it if not. */ #undef HAVE_G_HASH_TABLE_ITER /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* the GNU bfd library is available */ #undef HAVE_LIBBFD /* Whether the GConf library for storing application preferences is available. */ #undef HAVE_LIBGCONF /* Define to 1 if the popt library is present */ #undef HAVE_LIBPOPT /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the `sincos' function. */ #undef HAVE_SINCOS /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Whether the va_copy builtin works */ #undef HAVE_VA_COPY /* Define to 1 if you have the `wait3' system call. Deprecated, you should no longer depend upon `wait3'. */ #undef HAVE_WAIT3 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `int' if does not define. */ #undef pid_t ggcov-0.8.4/.gitignore0000644000175000017500000000057511604051477011555 00000000000000*.o lib*.a *.lo *.la .libs .deps COPYING INSTALL aclocal.m4 config.guess config.sub config.log config.status config.cache configure config.h config.h.in stamp-h stamp-h.in compile depcomp install-sh missing Makefile.in Makefile libtool ltmain.sh rpm.d ggcov.spec ggcov-*.tar.gz version.m4 core.* ggcov-*.rpm vg*.log autom4te.cache stamp-h1 .nautilus-metafile.xml *.bck .pc patches ggcov-0.8.4/src/0000777000175000017500000000000011613000472010416 500000000000000ggcov-0.8.4/src/utils.H0000644000175000017500000000217611453570563011630 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_utils_H_ #define _ggcov_utils_H_ 1 #include "ui.h" #include "cov.H" void populate_function_combo(GtkCombo *combo, const list_t *, gboolean add_all_item, const cov_function_t **currentp); #endif /* _ggcov_utils_H_ */ ggcov-0.8.4/src/php_serializer.C0000644000175000017500000001122311453570563013474 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "php_serializer.H" CVSID("$Id: php_serializer.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ php_serializer_t::php_serializer_t() { array_depth_ = 0; needs_deflation_ = FALSE; } php_serializer_t::~php_serializer_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const estring & php_serializer_t::data() { assert(array_depth_ == 0); if (needs_deflation_) { /* * Scan through the buffer, deflating inflated array lengths. */ char *in, *out; enum {SCAN,DEFLATE,STRING} state = SCAN; int ndeflated = 0; for (in = out = (char *)buf_.data() ; *in ; in++) { switch (state) { case SCAN: if (*in == ':') { state = DEFLATE; ndeflated = 0; } else if (*in == '"') state = STRING; *out++ = *in; break; case DEFLATE: if (*in != '0') { state = SCAN; if (!isdigit(*in) && ndeflated > 0) *out++ = '0'; *out++ = *in; } else { ndeflated++; } break; case STRING: if (*in == '"') state = SCAN; *out++ = *in; break; } } buf_.truncate_to(out - buf_.data()); needs_deflation_ = FALSE; } return buf_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_serializer_t::array_element() { if (array_depth_ > 0) { array_t *a = &arrays_[array_depth_-1]; a->seen_++; if (a->count_offset_ == 0) { assert(a->seen_ <= a->length_*2); } } } #define INFLATED_LENGTH 8 #define INFLATED_FORMAT "%08u" void php_serializer_t::_begin_array(unsigned int length, gboolean known) { const char *fmt; array_element(); assert(array_depth_ < MAX_ARRAY_DEPTH); array_t *a = &arrays_[array_depth_++]; a->length_ = length; a->seen_ = 0; a->next_key_ = 0; if (known) { a->count_offset_ = 0; fmt = "a:%u:{"; } else { /* * Unknown length. Format a wide field of zeros and remember where * it's stored so we can overwrite it later with the correct value. */ needs_deflation_ = TRUE; a->count_offset_ = buf_.length()+2; fmt = "a:"INFLATED_FORMAT":{"; } buf_.append_printf(fmt, length); } void php_serializer_t::begin_array(unsigned int length) { _begin_array(length, TRUE); } void php_serializer_t::begin_array() { _begin_array(0, FALSE); } void php_serializer_t::next_key() { assert(array_depth_ > 0); array_t *a = &arrays_[array_depth_-1]; integer(a->next_key_++); } void php_serializer_t::end_array() { assert(array_depth_ > 0); array_t *a = &arrays_[--array_depth_]; if (a->count_offset_ == 0) { /* length was provided in begin_array() call so check it here */ assert(a->seen_ == a->length_ * 2); } else { /* check that we get balanced key/value pairs */ assert(a->seen_ % 2 == 0); /* go back and format the actual length */ char bb[INFLATED_LENGTH+1]; snprintf(bb, sizeof(bb), INFLATED_FORMAT, a->seen_/2); memcpy((char *)buf_.data() + a->count_offset_, bb, INFLATED_LENGTH); } buf_.append_char('}'); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_serializer_t::integer(int i) { array_element(); buf_.append_printf("i:%d;", i); } void php_serializer_t::string(const char *s) { array_element(); if (s == 0) s = ""; buf_.append_printf("s:%d:\"%s\";", strlen(s), s); } void php_serializer_t::stringl(const char *s, unsigned int l) { array_element(); if (s == 0) s = ""; buf_.append_printf("s:%d:\"", l); buf_.append_chars(s, l); buf_.append_string("\";"); } void php_serializer_t::floating(double x) { array_element(); buf_.append_printf("d:%f;", x); } void php_serializer_t::null() { array_element(); buf_.append_printf("N;"); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cpp_parser.C0000644000175000017500000003333711453570563012624 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2004-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cpp_parser.H" #include "tok.H" #define ISBLANK(c) ((c) == ' ' || (c) == '\t') CVSID("$Id: cpp_parser.C,v 1.7 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cpp_parser_t::cpp_parser_t(const char *filename) : filename_(filename) { } cpp_parser_t::~cpp_parser_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int cpp_parser_t::xgetc() { return line_.data()[index_++]; } void cpp_parser_t::xungetc(int c) { assert(index_ > 0); assert(line_.data()[index_-1] == c); index_--; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int cpp_parser_t::getc_commentless() { while (index_ < line_.length()) { int c = xgetc(); if (!in_comment_) { /* scanning for start of comment */ if (c == '/') { c = xgetc(); if (c == '*') { in_comment_ = TRUE; comment_.truncate(); } else if (c == '/') /* // C++ style comment */ { got_comment(line_, index_); return EOF; } else { xungetc(c); return '/'; } } else return c; } else { /* scanning for '*' at end of C comment */ if (c == '*') { c = xgetc(); if (c == '/') { in_comment_ = FALSE; got_comment(comment_, 0); } } else { comment_.append_char(c); } } } return EOF; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * Called when a single-line comment has become available * via lexical analysis, with a buffer and the offset * into the buffer at which the comment starts (it's * assumed to continue until the end of the buffer). * Strips surrounding whitespace, inplace and destructively, * Then calls the virtual handle_comment(). */ void cpp_parser_t::got_comment(estring &e, unsigned int offset) { if (comment_.length()) { dprintf2(D_CPP|D_VERBOSE, "got_comment: e=\"%s\", offset=%u\n", e.data(), offset); char *buf = (char *)e.data() + offset; char *p = (char *)e.data() + e.length() - 1; while (*buf && isspace(*buf)) buf++; while (p >= buf && isspace(*p)) *p-- = '\0'; handle_comment(buf); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* TODO: handle token pasting ??? */ int cpp_parser_t::get_token() { int c; unsigned int len = 0; while ((c = getc_commentless()) != EOF && ISBLANK(c)) ; if (c == EOF) return EOF; tokenbuf_[0] = '\0'; if (isdigit(c)) { do { tokenbuf_[len++] = c; } while ((c = getc_commentless()) != EOF && isdigit(c) && len < sizeof(tokenbuf_)); tokenbuf_[len] = '\0'; if (c != EOF) xungetc(c); return T_NUMBER; } else if (isalpha(c) || (c) == '_') { do { tokenbuf_[len++] = c; } while ((c = getc_commentless()) != EOF && (isalnum(c) || (c) == '_') && len < sizeof(tokenbuf_)); tokenbuf_[len] = '\0'; if (c != EOF) xungetc(c); if (!strcmp(tokenbuf_, "include")) return T_INCLUDE; if (!strcmp(tokenbuf_, "if")) return T_IF; if (!strcmp(tokenbuf_, "ifdef")) return T_IFDEF; if (!strcmp(tokenbuf_, "ifndef")) return T_IFNDEF; if (!strcmp(tokenbuf_, "else")) return T_ELSE; if (!strcmp(tokenbuf_, "elif")) return T_ELIF; if (!strcmp(tokenbuf_, "endif")) return T_ENDIF; if (!strcmp(tokenbuf_, "define")) return T_DEFINE; if (!strcmp(tokenbuf_, "undef")) return T_UNDEF; if (!strcmp(tokenbuf_, "defined")) return T_DEFINED; return T_IDENTIFIER; } else if (c == '&') { if ((c = xgetc()) == '&') return T_LOG_AND; xungetc(c); return '&'; } else if (c == '|') { if ((c = xgetc()) == '|') return T_LOG_OR; xungetc(c); return '|'; } return c; } const char * cpp_parser_t::token_as_string(int tok) const { static const char *token_strs[] = { "INCLUDE", "IF", "IFDEF", "IFNDEF", "ELSE", "ELIF", "ENDIF", "DEFINE", "UNDEF", "DEFINED", "&&", "||", "NUMBER", "IDENTIFIER", "BOOL_EXPR", "LOG_OP" }; if (tok < 256) { static char cbuf[8]; if (isprint(tok)) { cbuf[0] = tok; cbuf[1] = '\0'; } else { snprintf(cbuf, sizeof(cbuf), "\\%03o", tok); } return cbuf; } return (tok >= T_MAX_TOKEN ? "unknown" : token_strs[tok-256]); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cpp_parser_t::depend_t::depend_t() { deltas_ = new hashtable_t; } static gboolean delete_one_delta(const char *var, int *dd, void *closure) { delete dd; return TRUE; } cpp_parser_t::depend_t::~depend_t() { deltas_->foreach_remove(delete_one_delta, 0); delete deltas_; } void cpp_parser_t::set_delta(depend_t *dep, const char *var, int delta) { int *dd; if ((dd = dep->deltas_->lookup(var)) == 0) { dd = new int; dep->deltas_->insert(g_strdup(var), dd); } else if (*dd != delta) { fprintf(stderr, "%s:%ld: Warning: complex expression involves %s" " more than once, code suppression may not work.\n", filename_.data(), lineno_, var); } *dd = delta; } gboolean cpp_parser_t::depends(const char *var) const { unsigned int count[3]; list_iterator_t iter; gboolean ret; memset(count, 0, sizeof(count)); for (iter = depend_stack_.first() ; *iter ; ++iter) { depend_t *dep = *iter; int *dd = dep->deltas_->lookup(var); if (dd != 0) count[(*dd)+1]++; } ret = (count[2] && !count[0]); // some positive and no negative dprintf2(D_CPP|D_VERBOSE, "depends: %s=%d\n", var, ret); return ret; } static void dump_one_delta(const char *var, int *dd, void *closure) { fprintf(stderr, " %s=%d", var, *dd); } void cpp_parser_t::dump() const { list_iterator_t iter; fprintf(stderr, "Depend stack dump:\n"); for (iter = depend_stack_.last() ; *iter ; --iter) { fprintf(stderr, " [%ld]", (*iter)->lineno_); (*iter)->deltas_->foreach(dump_one_delta, 0); fputc('\n', stderr); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cpp_parser_t::stack_dump() { int i; fprintf(stderr, "Parse stack:"); for (i = 0 ; i < depth_ ; i++) fprintf(stderr, " %s", token_as_string(stack_[i])); fputc('\n', stderr); } void cpp_parser_t::stack_push(int token) { assert(depth_ < MAX_STACK); stack_[depth_++] = token; if (debug_enabled(D_CPP|D_VERBOSE)) stack_dump(); } int cpp_parser_t::stack_pop() { assert(depth_ > 0); return stack_[--depth_]; if (debug_enabled(D_CPP|D_VERBOSE)) stack_dump(); } int cpp_parser_t::stack_peek(int off) { assert(depth_ > off); return stack_[depth_-1-off]; } void cpp_parser_t::stack_replace(int ntoks, int newtoken) { assert(depth_ >= ntoks); depth_ -= ntoks; stack_[depth_++] = newtoken; if (debug_enabled(D_CPP|D_VERBOSE)) stack_dump(); } gboolean cpp_parser_t::parse_boolean_expr(gboolean inverted) { int tok; string_var tmp; while ((tok = get_token()) != EOF) { dprintf2(D_CPP|D_VERBOSE, "Read token %s %s\n", token_as_string(tok), tokenbuf_); /* shift */ switch (tok) { case T_LEFT_PAREN: case T_DEFINED: stack_push(tok); break; case T_LOG_AND: case T_LOG_OR: stack_push(T_LOG_OP); break; case T_RIGHT_PAREN: if (depth_ >= 3 && stack_peek(0) == T_IDENTIFIER && stack_peek(1) == T_LEFT_PAREN && stack_peek(2) == T_DEFINED) stack_replace(3, T_BOOL_EXPR); else if (depth_ >= 2 && stack_peek(0) == T_BOOL_EXPR && stack_peek(1) == T_LEFT_PAREN) stack_replace(2, stack_peek(0)); break; case T_IDENTIFIER: stack_push(T_IDENTIFIER); set_delta(depend_stack_.head(), tokenbuf_, (inverted ? -1 : 1)); break; case T_BANG: stack_push(T_BANG); inverted = !inverted; break; default: return FALSE; } /* reduce */ for (;;) { if (depth_ >= 2 && stack_peek(0) == T_BOOL_EXPR && stack_peek(1) == T_BANG) { stack_replace(2, stack_peek(0)); inverted = !inverted; } else if (depth_ >= 3 && stack_peek(0) == T_BOOL_EXPR && stack_peek(1) == T_LOG_OP && stack_peek(2) == T_BOOL_EXPR) stack_replace(3, T_BOOL_EXPR); else break; } } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cpp_parser_t::parse_if() { dprintf1(D_CPP, "[%ld] if\n", lineno_); depend_t *dep = new depend_t; dep->lineno_ = lineno_; depend_stack_.prepend(dep); depth_ = 0; parse_boolean_expr(FALSE); // notify subclasses depends_changed(); } void cpp_parser_t::parse_ifdef() { dprintf1(D_CPP, "[%ld] ifdef\n", lineno_); if (get_token() != T_IDENTIFIER) return; /* syntax error */ if (get_token() != EOF) return; /* syntax error */ depend_t *dep = new depend_t; dep->lineno_ = lineno_; depend_stack_.prepend(dep); set_delta(dep, tokenbuf_, 1); // notify subclasses depends_changed(); } void cpp_parser_t::parse_ifndef() { dprintf1(D_CPP, "[%ld] ifndef\n", lineno_); if (get_token() != T_IDENTIFIER) return; /* syntax error */ if (get_token() != EOF) return; /* syntax error */ depend_t *dep = new depend_t; dep->lineno_ = lineno_; depend_stack_.prepend(dep); set_delta(dep, tokenbuf_, -1); // notify subclasses depends_changed(); } static void invert_one_delta(const char *var, int *dd, void *closure) { *dd = -*dd; } void cpp_parser_t::parse_else() { dprintf1(D_CPP, "[%ld] else\n", lineno_); depend_t *dep; if ((dep = depend_stack_.head()) == 0) { fprintf(stderr, "%s:%ld: Warning: unmatched else\n", filename_.data(), lineno_); return; } dep->lineno_ = lineno_; dep->deltas_->foreach(invert_one_delta, 0); // notify subclasses depends_changed(); } void cpp_parser_t::parse_endif() { dprintf1(D_CPP, "[%ld] endif\n", lineno_); depend_t *dep; if ((dep = depend_stack_.remove_head()) == 0) { fprintf(stderr, "%s:%ld: Warning: unmatched endif\n", filename_.data(), lineno_); return; } delete dep; // notify subclasses depends_changed(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cpp_parser_t::parse_cpp_line(unsigned long lineno) { lineno_ = lineno; index_ = 0; in_comment_ = FALSE; dprintf2(D_CPP|D_VERBOSE, "parse_cpp_line: line[%lu]=\"%s\"\n", lineno, line_.data()); #if 0 int c; fprintf(stderr, "cpp_parser_t::parse: line[%lu]=\"%s\"\n\t\t\"", lineno, data_); while ((c = getc_commentless()) != EOF) { fputc(c, stderr); } fprintf(stderr, "\"\n"); #endif #if 0 int tok; fprintf(stderr, "cpp_parser_t::parse: line[%lu]=\"%s\"\n ->", lineno, data_); while ((tok = get_token()) != EOF) { fprintf(stderr, " %d(%s)", tok, token_as_string(tok)); } fprintf(stderr, "\n"); #endif int tok = get_token(); switch (tok) { case T_IF: parse_if(); break; case T_IFDEF: parse_ifdef(); break; case T_IFNDEF: parse_ifndef(); break; case T_ELSE: parse_else(); break; case T_ENDIF: parse_endif(); break; } post_line(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cpp_parser_t::parse_c_line(unsigned long lineno) { lineno_ = lineno; index_ = 0; in_comment_ = FALSE; dprintf2(D_CPP|D_VERBOSE, "parse_c_line: line[%lu]=\"%s\"\n", lineno, line_.data()); while (getc_commentless() != EOF) ; post_line(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cpp_parser_t::parse() { FILE *fp; char *start, *end; unsigned long lineno = 0, extended = 0, lineno_adj = 0; char buf[1024]; if ((fp = fopen(filename_, "r")) == 0) { perror(filename_); return FALSE; } while (fgets(buf, sizeof(buf), fp) != 0) { ++lineno; /* drop trailing newline */ for (end = buf+strlen(buf)-1 ; end >= buf && (*end == '\n' || *end == '\r') ; ) *end-- = '\0'; /* skip initial ws */ for (start = buf ; ISBLANK(*start) ; start++) ; if (extended) /* previous line was extended */ { line_.append_char(' '); } else { line_.truncate(); if (*start != '#') { line_.append_string(start); parse_c_line(lineno - lineno_adj); continue; /* not a pre-processor line */ } start++; } if (*end == '\\') { *end-- = '\0'; extended++; } else { lineno_adj = extended; extended = 0; } line_.append_string(start); if (extended) /* this line is extended */ continue; /* Have a complete pre-processor line in `line_' */ parse_cpp_line(lineno - lineno_adj); } fclose(fp); return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/callswin.C0000644000175000017500000002740611557262605012302 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "callswin.H" #include "sourcewin.H" #include "utils.H" #include "filename.h" #include "cov.H" #include "estring.H" CVSID("$Id: callswin.C,v 1.24 2010-05-09 05:37:14 gnb Exp $"); #define COL_FROM 0 #define COL_TO 1 #define COL_LINE 2 #define COL_COUNT 3 #if !GTK2 #define COL_CLOSURE 0 #define NUM_COLS 4 #else #define COL_CLOSURE 4 #define NUM_COLS 5 #define COL_TYPES \ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, \ G_TYPE_STRING, G_TYPE_POINTER #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ struct callswin_call_t { cov_function_t *from_; const char *to_; const cov_location_t *location_; count_t count_; callswin_call_t(cov_function_t *fn, cov_call_iterator_t *itr) : from_(fn), to_(itr->name()), location_(itr->location()), count_(itr->count()) { } static int compare( const callswin_call_t *a, const callswin_call_t *b, int column) { int cols[NUM_COLS+1]; int i, n = 0, r; /* primary sort key */ cols[n++] = column; /* secondary sort keys */ cols[n++] = COL_FROM; cols[n++] = COL_LINE; cols[n++] = COL_TO; for (i = 0 ; i < n ; i++) { switch (cols[i]) { case COL_FROM: r = strcmp(safestr(a->from_->name()), safestr(b->from_->name())); break; case COL_TO: r = strcmp(safestr(a->to_), safestr(b->to_)); break; case COL_LINE: r = u32cmp(a->location_->lineno, b->location_->lineno); break; case COL_COUNT: r = u64cmp(a->count_, b->count_); break; default: r = 0; break; } if (r) return r; } return 0; } }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if !GTK2 static int callswin_clist_compare(GtkCList *clist, const void *ptr1, const void *ptr2) { return callswin_call_t::compare( (callswin_call_t *)((GtkCListRow *)ptr1)->data, (callswin_call_t *)((GtkCListRow *)ptr2)->data, clist->sort_column); } #else static int callswin_tree_iter_compare( GtkTreeModel *tm, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer data) { callswin_call_t *a = 0; callswin_call_t *b = 0; gtk_tree_model_get(tm, iter1, COL_CLOSURE, &a, -1); gtk_tree_model_get(tm, iter2, COL_CLOSURE, &b, -1); return callswin_call_t::compare(a, b, GPOINTER_TO_INT(data)); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ callswin_t::callswin_t() { GladeXML *xml; #if GTK2 GtkTreeViewColumn *col; GtkCellRenderer *rend; #endif /* load the interface & connect signals */ xml = ui_load_tree("calls"); set_window(glade_xml_get_widget(xml, "calls")); from_function_combo_ = glade_xml_get_widget(xml, "calls_from_function_combo"); from_function_view_ = glade_xml_get_widget(xml, "calls_from_function_view"); to_function_combo_ = glade_xml_get_widget(xml, "calls_to_function_combo"); to_function_view_ = glade_xml_get_widget(xml, "calls_to_function_view"); clist_ = glade_xml_get_widget(xml, "calls_clist"); #if !GTK2 gtk_clist_column_titles_passive(GTK_CLIST(clist_)); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_FROM); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_TO); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_COUNT); gtk_clist_set_compare_func(GTK_CLIST(clist_), callswin_clist_compare); ui_clist_set_sort_type(GTK_CLIST(clist_), GTK_SORT_ASCENDING); #else store_ = gtk_list_store_new(NUM_COLS, COL_TYPES); /* default alphabetic sort is adequate for COL_FROM, COL_TO */ gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_LINE, callswin_tree_iter_compare, GINT_TO_POINTER(COL_LINE), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_COUNT, callswin_tree_iter_compare, GINT_TO_POINTER(COL_COUNT), 0); gtk_tree_view_set_model(GTK_TREE_VIEW(clist_), GTK_TREE_MODEL(store_)); rend = gtk_cell_renderer_text_new(); col = gtk_tree_view_column_new_with_attributes(_("From"), rend, "text", COL_FROM, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_FROM); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("To"), rend, "text", COL_TO, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_TO); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Line"), rend, "text", COL_LINE, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_LINE); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Count"), rend, "text", COL_COUNT, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_COUNT); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(clist_), TRUE); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(clist_), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(clist_), COL_FROM); #endif ui_register_windows_menu(ui_get_dummy_menu(xml, "calls_windows_dummy")); } callswin_t::~callswin_t() { #if GTK2 g_object_unref(G_OBJECT(store_)); #endif functions_->remove_all(); delete functions_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void callswin_t::populate() { dprintf0(D_CALLSWIN, "callswin_t::populate\n"); functions_ = cov_function_t::list_all(); ::populate_function_combo(GTK_COMBO(from_function_combo_), functions_, /*add_all_item*/TRUE, /*currentp*/0); ::populate_function_combo(GTK_COMBO(to_function_combo_), functions_, /*add_all_item*/TRUE, /*currentp*/0); update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void callswin_t::update_for_func(cov_function_t *from_fn, cov_function_t *to_fn) { #if GTK2 GtkTreeIter titer; #else int row; #endif const cov_location_t *loc; callswin_call_t *call; const char *text[NUM_COLS]; char countbuf[32]; char linebuf[32]; cov_call_iterator_t *itr = new cov_function_call_iterator_t(from_fn); while (itr->next()) { if (to_fn != 0 && (itr->name() == 0 || strcmp(to_fn->name(), itr->name()))) continue; snprintf(countbuf, sizeof(countbuf), GNB_U64_DFMT, itr->count()); text[COL_COUNT] = countbuf; if ((loc = itr->location()) == 0) strncpy(linebuf, "WTF??", sizeof(linebuf)); else snprintf(linebuf, sizeof(linebuf), "%lu", loc->lineno); text[COL_LINE] = linebuf; text[COL_FROM] = (char *)from_fn->name(); if ((text[COL_TO] = (char *)itr->name()) == 0) text[COL_TO] = "(unknown)"; call = new callswin_call_t(from_fn, itr); #if !GTK2 row = gtk_clist_append(GTK_CLIST(clist_), (char **)text); gtk_clist_set_row_data(GTK_CLIST(clist_), row, call); #else gtk_list_store_append(store_, &titer); gtk_list_store_set(store_, &titer, COL_FROM, text[COL_FROM], COL_TO, text[COL_TO], COL_LINE, text[COL_LINE], COL_COUNT, text[COL_COUNT], COL_CLOSURE, call, -1); #endif } delete itr; } void callswin_t::update() { cov_function_t *from_fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(from_function_combo_)); cov_function_t *to_fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(to_function_combo_)); estring title; dprintf0(D_CALLSWIN, "callswin_t::update\n"); switch ((from_fn == 0 ? 0 : 2)|(to_fn == 0 ? 0 : 1)) { case 0: break; case 1: title.append_printf(_("to %s"), to_fn->name()); break; case 2: title.append_printf(_("from %s"), from_fn->name()); break; case 3: title.append_printf(_("from %s to %s"), from_fn->name(), to_fn->name()); break; } set_title(title.data()); gtk_widget_set_sensitive(from_function_view_, (from_fn != 0)); gtk_widget_set_sensitive(to_function_view_, (to_fn != 0)); #if !GTK2 gtk_clist_freeze(GTK_CLIST(clist_)); gtk_clist_clear(GTK_CLIST(clist_)); #else gtk_list_store_clear(store_); #endif if (from_fn != 0) { update_for_func(from_fn, to_fn); } else { /* all functions */ list_iterator_t iter; for (iter = functions_->first() ; iter != (cov_function_t *)0 ; ++iter) { update_for_func(*iter, to_fn); } } #if !GTK2 gtk_clist_columns_autosize(GTK_CLIST(clist_)); gtk_clist_thaw(GTK_CLIST(clist_)); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_calls_call_from_check_activate(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); ui_list_set_column_visibility(cw->clist_, COL_FROM, GTK_CHECK_MENU_ITEM(w)->active); } GLADE_CALLBACK void on_calls_call_to_check_activate(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); ui_list_set_column_visibility(cw->clist_, COL_TO, GTK_CHECK_MENU_ITEM(w)->active); } GLADE_CALLBACK void on_calls_line_check_activate(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); ui_list_set_column_visibility(cw->clist_, COL_LINE, GTK_CHECK_MENU_ITEM(w)->active); } GLADE_CALLBACK void on_calls_count_check_activate(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); ui_list_set_column_visibility(cw->clist_, COL_COUNT, GTK_CHECK_MENU_ITEM(w)->active); } GLADE_CALLBACK void on_calls_from_function_entry_changed(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); cw->update(); } GLADE_CALLBACK void on_calls_to_function_entry_changed(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); cw->update(); } GLADE_CALLBACK void on_calls_from_function_view_clicked(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); cov_function_t *fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(cw->from_function_combo_)); g_return_if_fail(fn != 0); sourcewin_t::show_function(fn); } GLADE_CALLBACK void on_calls_to_function_view_clicked(GtkWidget *w, gpointer data) { callswin_t *cw = callswin_t::from_widget(w); cov_function_t *fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(cw->to_function_combo_)); g_return_if_fail(fn != 0); sourcewin_t::show_function(fn); } GLADE_CALLBACK gboolean on_calls_clist_button_press_event(GtkWidget *w, GdkEvent *event, gpointer data) { callswin_call_t *call; const cov_location_t *loc; call = (callswin_call_t *)ui_list_double_click_data(w, event, COL_CLOSURE); if (call != 0 && (loc = call->location_) != 0) sourcewin_t::show_lines(loc->filename, loc->lineno, loc->lineno); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/callgraphwin.C0000644000175000017500000002644611557262605013144 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "callgraphwin.H" #include "sourcewin.H" #include "cov.H" #include "estring.H" CVSID("$Id: callgraphwin.C,v 1.17 2010-05-09 05:37:14 gnb Exp $"); #define COL_COUNT 0 #define COL_NAME 1 #if !GTK2 #define COL_CLOSURE 0 #define NUM_COLS 2 #else #define COL_CLOSURE 2 #define NUM_COLS 3 #define COL_TYPES \ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if !GTK2 static int callgraphwin_ancestors_compare(GtkCList *clist, const void *ptr1, const void *ptr2) { cov_callarc_t *ca1 = (cov_callarc_t *)((GtkCListRow *)ptr1)->data; cov_callarc_t *ca2 = (cov_callarc_t *)((GtkCListRow *)ptr2)->data; switch (clist->sort_column) { case COL_COUNT: return u64cmp(ca1->count, ca2->count); case COL_NAME: return strcmp(ca1->from->name, ca2->from->name); default: return 0; } } static int callgraphwin_descendants_compare(GtkCList *clist, const void *ptr1, const void *ptr2) { cov_callarc_t *ca1 = (cov_callarc_t *)((GtkCListRow *)ptr1)->data; cov_callarc_t *ca2 = (cov_callarc_t *)((GtkCListRow *)ptr2)->data; switch (clist->sort_column) { case COL_COUNT: return u64cmp(ca1->count, ca2->count); case COL_NAME: return strcmp(ca1->to->name, ca2->to->name); default: return 0; } } #else static int callgraphwin_count_compare( GtkTreeModel *tm, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer data) { cov_callarc_t *ca1 = 0; cov_callarc_t *ca2 = 0; gtk_tree_model_get(tm, iter1, COL_CLOSURE, &ca1, -1); gtk_tree_model_get(tm, iter2, COL_CLOSURE, &ca2, -1); return u64cmp(ca1->count, ca2->count); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if !GTK2 void callgraphwin_t::init_clist( GtkCList *clist, int (*sortfn)(GtkCList *, const void*, const void*)) { gtk_clist_column_titles_passive(clist); ui_clist_init_column_arrow(clist, COL_COUNT); ui_clist_init_column_arrow(clist, COL_NAME); gtk_clist_set_compare_func(clist, sortfn); ui_clist_set_sort_column(clist, COL_COUNT); ui_clist_set_sort_type(clist, GTK_SORT_DESCENDING); } #else void callgraphwin_t::init_tree_view(GtkTreeView *tv) { GtkListStore *store; GtkTreeViewColumn *col; GtkCellRenderer *rend; store = gtk_list_store_new(NUM_COLS, COL_TYPES); /* default alphabetic sort is adequate for COL_NAME */ gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store, COL_COUNT, callgraphwin_count_compare, 0, 0); gtk_tree_view_set_model(tv, GTK_TREE_MODEL(store)); rend = gtk_cell_renderer_text_new(); col = gtk_tree_view_column_new_with_attributes(_("Count"), rend, "text", COL_COUNT, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_COUNT); gtk_tree_view_append_column(tv, col); col = gtk_tree_view_column_new_with_attributes(_("Function"), rend, "text", COL_NAME, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_NAME); gtk_tree_view_append_column(tv, col); /* the TreeView has another reference, so we can safely drop ours */ g_object_unref(G_OBJECT(store)); } #endif callgraphwin_t::callgraphwin_t() { GladeXML *xml; /* load the interface & connect signals */ xml = ui_load_tree("callgraph"); set_window(glade_xml_get_widget(xml, "callgraph")); function_combo_ = glade_xml_get_widget(xml, "callgraph_function_combo"); function_view_ = glade_xml_get_widget(xml, "callgraph_function_view"); ancestors_clist_ = glade_xml_get_widget(xml, "callgraph_ancestors_clist"); #if !GTK2 init_clist(GTK_CLIST(ancestors_clist_), callgraphwin_ancestors_compare); #else init_tree_view(GTK_TREE_VIEW(ancestors_clist_)); #endif descendants_clist_ = glade_xml_get_widget(xml, "callgraph_descendants_clist"); #if !GTK2 init_clist(GTK_CLIST(descendants_clist_), callgraphwin_descendants_compare); #else init_tree_view(GTK_TREE_VIEW(descendants_clist_)); #endif ui_register_windows_menu(ui_get_dummy_menu(xml, "callgraph_windows_dummy")); hpaned_ = glade_xml_get_widget(xml, "callgraph_hpaned"); gtk_signal_connect(GTK_OBJECT(get_window()), "show", GTK_SIGNAL_FUNC(on_callgraph_show), 0); } callgraphwin_t::~callgraphwin_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int compare_callnodes(const void *a, const void *b) { const cov_callnode_t *cna = (const cov_callnode_t *)a; const cov_callnode_t *cnb = (const cov_callnode_t *)b; int ret; ret = strcmp(cna->name, cnb->name); if (ret == 0 && cna->function != 0 && cnb->function != 0) ret = strcmp(cna->function->file()->name(), cnb->function->file()->name()); return ret; } static void add_callnode(cov_callnode_t *cn, void *userdata) { GList **listp = (GList **)userdata; *listp = g_list_prepend(*listp, cn); } /* * TODO: invert this function and make the loop with the unambiguous * label building a library function which calls a callback. */ void callgraphwin_t::populate_function_combo(GtkCombo *combo) { GList *list = 0, *iter; estring label; ui_combo_clear(combo); /* stupid glade2 */ cov_callnode_t::foreach(add_callnode, &list); list = g_list_sort(list, compare_callnodes); for (iter = list ; iter != 0 ; iter = iter->next) { cov_callnode_t *cn = (cov_callnode_t *)iter->data; label.truncate(); label.append_string(cn->name); /* see if we need to present some more scope to uniquify the name */ if ((iter->next != 0 && !strcmp(((cov_callnode_t *)iter->next->data)->name, cn->name)) || (iter->prev != 0 && !strcmp(((cov_callnode_t *)iter->prev->data)->name, cn->name))) { label.append_string(" ("); if (cn->function != 0) label.append_string(cn->function->file()->minimal_name()); else label.append_string("library"); label.append_string(")"); } ui_combo_add_data(combo, label.data(), cn); } while (list != 0) list = g_list_remove_link(list, list); } void callgraphwin_t::populate() { dprintf0(D_GRAPHWIN, "callgraphwin_t::populate\n"); populate_function_combo(GTK_COMBO(function_combo_)); ui_combo_set_current_data(GTK_COMBO(function_combo_), callnode_); update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static count_t cov_callarcs_total(GList *list) { count_t total = 0; for ( ; list != 0 ; list = list->next) total += ((cov_callarc_t *)list->data)->count; return total; } /* TODO: this is common code too */ static void format_stat( char *buf, unsigned int maxlen, gboolean percent_flag, count_t numerator, count_t denominator) { if (denominator == 0) *buf = '\0'; else if (percent_flag) snprintf(buf, maxlen, "%.2f", (double)numerator * 100.0 / denominator); else snprintf(buf, maxlen, GNB_U64_DFMT"/"GNB_U64_DFMT, numerator, denominator); } void callgraphwin_t::update_clist(GtkWidget *clist, GList *arcs, gboolean isin) { GList *iter; #if !GTK2 int row; #else GtkListStore *store = (GtkListStore *)gtk_tree_view_get_model( GTK_TREE_VIEW(clist)); GtkTreeIter titer; #endif count_t total; char *text[NUM_COLS]; char countbuf[32]; total = cov_callarcs_total(arcs); #if !GTK2 gtk_clist_freeze(GTK_CLIST(clist)); gtk_clist_clear(GTK_CLIST(clist)); #else gtk_list_store_clear(store); #endif for (iter = arcs ; iter != 0 ; iter = iter->next) { cov_callarc_t *ca = (cov_callarc_t *)iter->data; format_stat(countbuf, sizeof(countbuf), /*percent*/FALSE, /*numerator*/ca->count, /*denominator*/total); text[COL_COUNT] = countbuf; text[COL_NAME] = (char *)(isin ? ca->from : ca->to)->name.data(); #if !GTK2 row = gtk_clist_prepend(GTK_CLIST(clist), text); gtk_clist_set_row_data(GTK_CLIST(clist), row, ca); #else gtk_list_store_append(store, &titer); gtk_list_store_set(store, &titer, COL_COUNT, text[COL_COUNT], COL_NAME, text[COL_NAME], COL_CLOSURE, ca, -1); #endif } #if !GTK2 gtk_clist_sort(GTK_CLIST(clist)); gtk_clist_columns_autosize(GTK_CLIST(clist)); gtk_clist_thaw(GTK_CLIST(clist)); #endif } void callgraphwin_t::update() { cov_callnode_t *cn = callnode_; dprintf0(D_GRAPHWIN, "callgraphwin_t::update\n"); gtk_widget_set_sensitive(function_view_, (cn->function != 0)); set_title(cn->name); update_clist(ancestors_clist_, cn->in_arcs, TRUE); update_clist(descendants_clist_, cn->out_arcs, FALSE); } void callgraphwin_t::set_node(cov_callnode_t *cn) { callnode_ = cn; assert(callnode_ != 0); if (shown_) update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_callgraph_function_entry_changed(GtkWidget *w, gpointer data) { callgraphwin_t *cw = callgraphwin_t::from_widget(w); cov_callnode_t *cn; cn = (cov_callnode_t *)ui_combo_get_current_data( GTK_COMBO(cw->function_combo_)); if (cn != 0) { /* stupid gtk2 */ cw->set_node(cn); } } GLADE_CALLBACK void on_callgraph_function_view_clicked(GtkWidget *w, gpointer data) { callgraphwin_t *cw = callgraphwin_t::from_widget(w); sourcewin_t::show_function(cw->callnode_->function); } GLADE_CALLBACK gboolean on_callgraph_ancestors_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data) { callgraphwin_t *cw = callgraphwin_t::from_widget(w); cov_callarc_t *ca; ca = (cov_callarc_t *)ui_list_double_click_data(w, event, COL_CLOSURE); if (ca != 0) cw->set_node(ca->from); return FALSE; } GLADE_CALLBACK gboolean on_callgraph_descendants_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data) { callgraphwin_t *cw = callgraphwin_t::from_widget(w); cov_callarc_t *ca; ca = (cov_callarc_t *)ui_list_double_click_data(w, event, COL_CLOSURE); if (ca != 0) cw->set_node(ca->to); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void callgraphwin_t::on_callgraph_show(GtkWidget *w, gpointer data) { callgraphwin_t *cw = callgraphwin_t::from_widget(w); GtkPaned *paned = GTK_PANED(cw->hpaned_); gtk_paned_set_position(paned, (paned->max_position + paned->min_position) / 2); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_bfd.C0000644000175000017500000002301011453570563012053 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov_bfd.H" #include "string_var.H" #include "demangle.h" #ifdef HAVE_LIBBFD CVSID("$Id: cov_bfd.C,v 1.9 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_bfd_t::cov_bfd_t() { } cov_bfd_t::~cov_bfd_t() { if (abfd_ != 0) bfd_close(abfd_); if (symbols_ != 0) g_free(symbols_); if (code_sections_ != 0) g_free(code_sections_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_bfd_t::post_open() { if (!bfd_check_format(abfd_, bfd_object)) { /* TODO */ bfd_perror(bfd_get_filename(abfd_)); bfd_close(abfd_); abfd_ = 0; return FALSE; } #if __BYTE_ORDER == __LITTLE_ENDIAN assert(bfd_little_endian(abfd_)); #else assert(bfd_big_endian(abfd_)); #endif abfd_->usrdata = this; return TRUE; } gboolean cov_bfd_t::open(const char *filename) { if ((abfd_ = bfd_openr(filename, /*target*/0)) == 0) { /* TODO */ bfd_perror(filename); return FALSE; } return post_open(); } gboolean cov_bfd_t::open(const char *filename, FILE *fp) { if ((abfd_ = bfd_openstreamr(filename, /*target*/0, fp)) == 0) { /* TODO */ bfd_perror(filename); return FALSE; } return post_open(); } const char * cov_bfd_t::filename() const { return (abfd_ == 0 ? 0 : abfd_->filename); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_bfd_section_t * cov_bfd_t::find_section(const char *secname) { asection *sec; if (abfd_ == 0) return 0; if ((sec = bfd_get_section_by_name(abfd_, secname)) == 0) { /* TODO */ // fprintf(stderr, "%s: no %s section\n", filename(), secname); return 0; } return (cov_bfd_section_t *)sec; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_bfd_t::get_symbols() { assert(!have_symbols_); have_symbols_ = true; dprintf1(D_CGRAPH, "Reading symbols from %s\n", filename()); num_symbols_ = bfd_get_symtab_upper_bound(abfd_); symbols_ = g_new(asymbol*, num_symbols_); num_symbols_ = bfd_canonicalize_symtab(abfd_, symbols_); if (num_symbols_ < 0) { bfd_perror(filename()); g_free(symbols_); symbols_ = 0; num_symbols_ = 0; return FALSE; } if (debug_enabled(D_CGRAPH|D_VERBOSE)) { unsigned int i; for (i = 0 ; i < num_symbols_ ; i++) cov_bfd_t::dump_symbol(i, symbols_[i]); } return TRUE; } unsigned int cov_bfd_t::num_symbols() { if (abfd_ == 0) return 0; if (!have_symbols_ && !get_symbols()) return 0; return num_symbols_; } const asymbol * cov_bfd_t::nth_symbol(unsigned int i) { if (abfd_ == 0) return 0; if (!have_symbols_ && !get_symbols()) return 0; return (symbols_ == 0 || i >= num_symbols_ ? 0 : symbols_[i]); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define codesectype \ (SEC_ALLOC|SEC_HAS_CONTENTS|SEC_RELOC|SEC_CODE|SEC_READONLY) gboolean cov_bfd_t::get_code_sections() { asection *sec; assert(!have_code_sections_); have_code_sections_ = true; if (abfd_ == 0) return FALSE; dprintf1(D_CGRAPH, "Gathering code sections from %s\n", filename()); code_sections_ = g_new(asection*, abfd_->section_count); for (sec = abfd_->sections ; sec != 0 ; sec = sec->next) { dprintf2(D_CGRAPH|D_VERBOSE, " [%d]%s: ", sec->index, sec->name); if ((sec->flags & codesectype) != codesectype) { dprintf0(D_CGRAPH|D_VERBOSE, "skipping\n"); continue; } dprintf0(D_CGRAPH|D_VERBOSE, "is code section\n"); code_sections_[num_code_sections_++] = sec; } return TRUE; } unsigned int cov_bfd_t::num_code_sections() { if (abfd_ == 0) return 0; if (!have_code_sections_ && !get_code_sections()) return 0; return num_code_sections_; } cov_bfd_section_t * cov_bfd_t::nth_code_section(unsigned int i) { if (abfd_ == 0) return 0; if (!have_code_sections_ && !get_code_sections()) return 0; return (code_sections_ == 0 || i >= num_code_sections_ ? 0 : (cov_bfd_section_t *)code_sections_[i]); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static const char * symbol_type_as_string(const asymbol *sym) { if (sym->flags & BSF_FILE) return "file"; else if (sym->flags & BSF_SECTION_SYM) return "sect"; else if (sym->flags & BSF_WEAK) return (sym->flags & BSF_GLOBAL ? "WEAK" : "weak"); else if (sym->flags & BSF_FUNCTION) return (sym->flags & BSF_GLOBAL ? "FUNC" : "func"); else if (sym->flags & BSF_OBJECT) return (sym->flags & BSF_GLOBAL ? "DATA" : "data"); else if ((sym->flags & (BSF_LOCAL|BSF_GLOBAL)) == 0) return "und"; return ""; } void cov_bfd_t::dump_symbol(unsigned int idx, asymbol *sym) { if (!idx) duprintf0("index|value |flags|type|section |name\n"); if (sym == 0) return; string_var dem = demangle(sym->name); duprintf6("%5d|%08lx|%5x|%-4s|%-10s|%s", idx, (long unsigned)sym->value, (unsigned)sym->flags, symbol_type_as_string(sym), sym->section->name, sym->name); if (strcmp(dem, sym->name)) duprintf1(" (%s)", dem.data()); duprintf0("\n"); } void cov_bfd_t::dump_reloc(unsigned int idx, arelent *rel) { if (!idx) { duprintf0("relocation |symbol\n"); duprintf0("index|address |addend |type |flags|type|name\n"); } if (rel == 0) return; asymbol *sym = *rel->sym_ptr_ptr; string_var name_dem = demangle(sym->name); char reltype[32]; snprintf(reltype, sizeof(reltype), "%d(%s)", rel->howto->type, rel->howto->name); duprintf7("%5d|%08lx|%08lx|%-16s|%5x|%-4s|%s\n", idx, (long unsigned)rel->address, (long unsigned)rel->addend, reltype, (unsigned)sym->flags, symbol_type_as_string(sym), name_dem.data()); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ unsigned char * cov_bfd_section_t::get_contents(bfd_size_type *lenp) { asection *sec = (asection *)this; bfd_size_type size; unsigned char *contents; size = bfd_section_size(sec->owner, sec); contents = get_contents(0, size); if (lenp != 0) *lenp = size; return contents; } unsigned char * cov_bfd_section_t::get_contents(unsigned long startaddr, unsigned long length) { asection *sec = (asection *)this; unsigned char *contents; contents = (unsigned char *)gnb_xmalloc(length); if (!bfd_get_section_contents(sec->owner, sec, contents, startaddr, length)) { /* TODO */ bfd_perror(owner()->filename()); free(contents); return 0; } return contents; } static int compare_arelentp(const void *va, const void *vb) { const arelent *a = *(const arelent **)va; const arelent *b = *(const arelent **)vb; #ifdef BFD64 return u64cmp(a->address, b->address); #else return u32cmp(a->address, b->address); #endif } arelent ** cov_bfd_section_t::get_relocs(unsigned int *lenp) { asection *sec = (asection *)this; cov_bfd_t *b = owner(); arelent **relocs; unsigned int nrelocs; if (!b->have_symbols_ && !b->get_symbols()) return FALSE; dprintf1(D_CGRAPH, "Reading relocs from %s\n", b->filename()); nrelocs = bfd_get_reloc_upper_bound(sec->owner, sec); relocs = g_new(arelent*, nrelocs); nrelocs = bfd_canonicalize_reloc(sec->owner, sec, relocs, b->symbols_); if (nrelocs < 0) { bfd_perror(b->filename()); g_free(relocs); return 0; } /* * Call scanners expect the relocs to be sorted in * increasing address order, so ensure this is true. */ qsort(relocs, nrelocs, sizeof(arelent*), compare_arelentp); if (lenp != 0) *lenp = nrelocs; return relocs; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_bfd_section_t::find_nearest_line( unsigned long address, cov_location_t *locp, const char **functionp) { asection *sec = (asection *)this; cov_bfd_t *b = owner(); const char *filename = 0; const char *function = 0; unsigned int lineno = 0; if (b == 0 || b->abfd_ == 0) return 0; if (!b->have_symbols_ && !b->get_symbols()) return FALSE; if (!bfd_find_nearest_line(sec->owner, sec, b->symbols_, address, &filename, &function, &lineno)) return FALSE; if (locp != 0) { locp->filename = (char *)filename; locp->lineno = (unsigned long)lineno; } if (functionp != 0) *functionp = function; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #endif /*HAVE_LIBBFD*/ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/fakepopt.c0000644000175000017500000001260711453570563012334 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fakepopt.h" #ifndef HAVE_LIBPOPT CVSID("$Id: fakepopt.c,v 1.5 2010-05-09 05:37:15 gnb Exp $"); /* * Simulate enough of the popt interface so that I only have * to write and maintain a single argument parsing routine for * all builds, e.g. gtk1.2, gtk2+popt, gtk2-popt. */ #ifdef __cplusplus extern "C" { #endif struct _poptContext { int argc; const char **argv; int argi; const char *current; int nfiles; const char **files; int filei; gboolean file_mode; char *other_option_help; const struct poptOption *options; }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ poptContext poptGetContext( const char *ignored, int argc, const char **argv, const struct poptOption *options, int flags) { poptContext con; con = g_new0(struct _poptContext, 1); con->argc = argc; con->argv = argv; con->argi = 0; /* points at last argument visited */ con->nfiles = 0; con->files = g_new0(const char *, con->argc); con->filei = 0; con->file_mode = FALSE; con->options = options; return con; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void poptSetOtherOptionHelp(poptContext con, const char *help) { con->other_option_help = g_strdup(help); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static const struct poptOption * find_long_option(const struct poptOption *opt, const char *name, const char **valp) { const struct poptOption *o; int len; for ( ; opt->long_name || opt->short_name ; opt++) { switch (opt->type) { case POPT_ARG_INCLUDE_TABLE: o = find_long_option((const struct poptOption *)opt->value_ptr, name, valp); if (o != 0) return o; break; default: len = strlen(opt->long_name); if (!strncmp(name, opt->long_name, len) && name[len] == '=') { *valp = name+len+1; return opt; } /* fall through */ case POPT_ARG_NONE: if (!strcmp(name, opt->long_name)) return opt; break; } } return 0; } static const struct poptOption * find_short_option(const struct poptOption *opt, char name) { const struct poptOption *o; for ( ; opt->long_name || opt->short_name ; opt++) { switch (opt->type) { case POPT_ARG_INCLUDE_TABLE: o = find_short_option((const struct poptOption *)opt->value_ptr, name); if (o != 0) return o; break; default: if (name == opt->short_name) return opt; break; } } return 0; } static int handle_option(poptContext con, const struct poptOption *opt, const char *val) { if (opt == 0) return -2; /* unknown option */ assert(opt->value_ptr != 0); assert(opt->value == 0); switch (opt->type) { case POPT_ARG_NONE: assert(val == 0); *(int *)opt->value_ptr = TRUE; break; case POPT_ARG_STRING: if (val == 0) { val = con->argv[++con->argi]; if (val == 0) return -3; /* no value */ } *(const char **)opt->value_ptr = val; break; } return opt->value; } int poptGetNextOpt(poptContext con) { const char *arg; int rc; const char *val; const struct poptOption *opt; for (;;) { arg = con->argv[++con->argi]; if (arg == 0) return -1; /* end of arguments */ con->current = arg; if (con->file_mode || arg[0] != '-') { con->files[con->nfiles++] = arg; } else if (arg[0] == '-' && arg[1] == '-') { if (arg[2] == '\0') { /* handle '--' */ con->file_mode = TRUE; continue; } val = 0; opt = find_long_option(con->options, arg+2, &val); if ((rc = handle_option(con, opt, val))) return rc; } else { for (arg++ ; *arg ; arg++) { if ((rc = handle_option(con, find_short_option(con->options, *arg), 0))) return rc; } } } /*NOTREACHED*/ return 0; } const char * poptGetArg(poptContext con) { if (con->filei >= con->nfiles) return 0; return con->files[con->filei++]; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const char * poptStrerror(int rc) { switch (rc) { case -2: return "bad option"; case -3: return "no value"; default: return "no error"; } } const char * poptBadOption(poptContext con, int ignored) { return con->current; } void poptFreeContext(poptContext con) { if (con->other_option_help != 0) free(con->other_option_help); free(con->files); free(con); } #ifdef __cplusplus } #endif #endif /* !HAVE_LIBPOPT */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/gnbstackedbar.h0000644000175000017500000000662011453570563013320 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2004 Greg Banks * * Derived from gtkprogressbar.h which bore the message: * GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __GNBSTACKEDBAR_H__ #define __GNBSTACKEDBAR_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GNB_TYPE_STACKED_BAR (gnb_stacked_bar_get_type ()) #define GNB_STACKED_BAR(obj) (GTK_CHECK_CAST ((obj), GNB_TYPE_STACKED_BAR, GnbStackedBar)) #define GNB_STACKED_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNB_TYPE_STACKED_BAR, GnbStackedBarClass)) #define GNB_IS_STACKED_BAR(obj) (GTK_CHECK_TYPE ((obj), GNB_TYPE_STACKED_BAR)) #define GNB_IS_STACKED_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNB_TYPE_STACKED_BAR)) typedef struct _GnbStackedBar GnbStackedBar; typedef struct _GnbStackedBarMetric GnbStackedBarMetric; typedef struct _GnbStackedBarClass GnbStackedBarClass; struct _GnbStackedBarMetric { unsigned long value; /* client value */ guint length; /* length in pixels */ GdkColor color; GdkGC *gc; gboolean color_set; gboolean color_allocated; }; struct _GnbStackedBar { GtkWidget widget; guint nmetrics; GnbStackedBarMetric *metrics; GdkPixmap *offscreen_pixmap; /* orientation is hardcoded for GTK_PROGRESS_LEFT_TO_RIGHT */ }; struct _GnbStackedBarClass { GtkWidgetClass parent_class; }; GtkType gnb_stacked_bar_get_type (void); GtkWidget* gnb_stacked_bar_new (void); void gnb_stacked_bar_set_num_metrics (GnbStackedBar *sbar, guint nmetrics); void gnb_stacked_bar_set_metric_color (GnbStackedBar *sbar, guint metric, const GdkColor *); void gnb_stacked_bar_set_metric_colors (GnbStackedBar *sbar, const GdkColor **); void gnb_stacked_bar_set_metric_value (GnbStackedBar *sbar, guint metric, unsigned long value); void gnb_stacked_bar_set_metric_values (GnbStackedBar *sbar, const unsigned long *values); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GNBSTACKEDBAR_H__ */ ggcov-0.8.4/src/cov_suppression.C0000644000175000017500000000512411453570563013720 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" #include "cov_suppression.H" hashtable_t * cov_suppression_t::all_[cov_suppression_t::NUM_TYPES]; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_suppression_t * cov_suppression_t::add(const char *w, type_t t) { cov_suppression_t *s = new cov_suppression_t(w, t); if (all_[t] == 0) all_[t] = new hashtable_t; all_[t]->insert(s->word_, s); return s; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_suppression_t * cov_suppression_t::find(const char *w, type_t t) { return (all_[t] == 0 ? 0 : all_[t]->lookup(w)); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_suppression_t::foreach( type_t t, void (*func)(const char *, cov_suppression_t *, void *), void *closure) { if (all_[t] != 0) all_[t]->foreach(func, closure); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ unsigned int cov_suppression_t::count() { unsigned int t; unsigned int n = 0; for (t = 0 ; t < NUM_TYPES ; t++) n += (all_[t] ? all_[t]->size() : 0); return n; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_suppress_ifdef(const char *variable) { cov_suppression_t::add(variable, cov_suppression_t::IFDEF); } void cov_suppress_lines_with_comment(const char *word) { cov_suppression_t::add(word, cov_suppression_t::COMMENT_LINE); } void cov_suppress_lines_between_comments(const char *startw, const char *endw) { cov_suppression_t *s; s = cov_suppression_t::add(startw, cov_suppression_t::COMMENT_RANGE); s->word2_ = endw; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/window.C0000644000175000017500000001523711557262605011774 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "window.H" #include "cov.H" #include "mvc.h" #include "tok.H" #include "string_var.H" #include "prefs.H" CVSID("$Id: window.C,v 1.17 2010-05-09 05:37:15 gnb Exp $"); static const char window_key[] = "ggcov_window_key"; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ window_t::window_t() { mvc_listen(cov_file_t::files_model(), ~0, files_changed, this); } window_t::~window_t() { /* JIC of strange gui stuff */ assert(!deleting_); deleting_ = true; mvc_unlisten(cov_file_t::files_model(), ~0, files_changed, this); assert(window_ != 0); gtk_widget_destroy(window_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static char * dnd_data_as_text(void *data, unsigned int length) { char *text; text = (char *)gnb_xmalloc(length+1); memcpy(text, data, length); text[length] = '\0'; return text; } extern gboolean ggcov_read_file(const char *filename); /* * Parse the given string as a list of URIs and load each file * into the global cov* data structures. */ static void dnd_handle_uri_list(void *data, unsigned int length) { tok_t tok(dnd_data_as_text(data, length), "\n\r"); int nfiles = 0; const char *uri; cov_pre_read(); while ((uri = tok.next()) != 0) { dprintf1(D_UICORE, "dnd_handle_uri_list: uri=\"%s\"\n", uri); if (!strncmp(uri, "file:", 5) && ggcov_read_file(uri+5)) nfiles++; } if (nfiles) cov_post_read(); } /* * Experiment shows that Nautilus on RH7.3 supports the following targets: * * x-special/gnome-icon-list * some kind of (?) binary formatted list of URLs and other * icon-related information which doesn't matter. * text/uri-list * list of URLs one per line. * _NETSCAPE_URL * single URL (no matter how many files are actually dragged). * * So we support text/uri-list because it's both simple and works. */ #define URI_LIST 2 static const GtkTargetEntry dnd_targets[] = { {(char *)"text/uri-list", 0, URI_LIST} }; void dnd_drag_data_received( GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { if (debug_enabled(D_UICORE)) { string_var selection_str = gdk_atom_name(data->selection); string_var target_str = gdk_atom_name(data->target); string_var type_str = gdk_atom_name(data->type); duprintf7("dnd_drag_data_received: info=%d, " "data={selection=%s target=%s type=%s " "data=0x%p length=%d format=%d}\n", info, selection_str.data(), target_str.data(), type_str.data(), data->data, data->length, data->format); } switch (info) { case URI_LIST: dnd_handle_uri_list(data->data, data->length); break; } } /* Define this to 1 to enable debugging of DnD targets from sources */ #define DEBUG_DND_TARGETS 0 #if DEBUG_DND_TARGETS static gboolean dnd_drag_motion( GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, guint time, gpointer user_data) { GList *iter; fprintf(stderr, "dnd_drag_motion: x=%d y=%d targets={", x, y); for (iter = drag_context->targets ; iter != 0 ; iter = iter->next) { gchar *name = gdk_atom_name((GdkAtom)GPOINTER_TO_INT(iter->data)); fprintf(stderr, "\"%s\"%s", name, (iter->next == 0 ? "" : ", ")); g_free (name); } fprintf(stderr, "}\n"); gdk_drag_status(drag_context, GDK_ACTION_COPY, GDK_CURRENT_TIME); return TRUE; } #endif /* DEBUG_DND_TARGETS */ static void dnd_setup(GtkWidget *w) { GtkDestDefaults defaults; #if DEBUG_DND_TARGETS defaults = (GtkDestDefaults) (GTK_DEST_DEFAULT_ALL & ~GTK_DEST_DEFAULT_MOTION); #else /* !DEBUG_DND_TARGETS */ defaults = GTK_DEST_DEFAULT_ALL; #endif /* !DEBUG_DND_TARGETS */ gtk_drag_dest_set(w, defaults, dnd_targets, sizeof(dnd_targets)/sizeof(dnd_targets[0]), GDK_ACTION_COPY); #if DEBUG_DND_TARGETS gtk_signal_connect(GTK_OBJECT(w), "drag_motion", GTK_SIGNAL_FUNC(dnd_drag_motion), 0); #endif /* DEBUG_DND_TARGETS */ gtk_signal_connect(GTK_OBJECT(w), "drag-data-received", GTK_SIGNAL_FUNC(dnd_drag_data_received), 0); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void window_t::attach(GtkWidget *w) { gtk_object_set_data(GTK_OBJECT(w), window_key, this); } void window_t::set_window(GtkWidget *w) { assert(GTK_IS_WINDOW(w)); window_ = w; attach(window_); ui_register_window(window_); dnd_setup(w); } void window_t::set_title(const char *file) { ui_window_set_title(window_, file); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ window_t * window_t::from_widget(GtkWidget *w) { w = ui_get_window(w); return (w == 0 ? 0 : (window_t *)gtk_object_get_data(GTK_OBJECT(w), window_key)); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void window_t::grey_items() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void window_t::populate() { } /* * Call the populate() method when the set of files changes, * e.g. a new is loaded from the File->Open dialog. */ void window_t::files_changed(void *obj, unsigned int features, void *closure) { ((window_t *)closure)->populate(); } void window_t::show() { if (!shown_) populate(); gtk_widget_show(window_); if (shown_) gdk_window_raise(window_->window); shown_ = true; prefs.post_load(window_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_window_close_activate(GtkWidget *w, gpointer data) { window_t *win = window_t::from_widget(w); assert(win != 0); delete win; } GLADE_CALLBACK void on_window_exit_activate(GtkWidget *w, gpointer data) { gtk_main_quit(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/sourcewin.C0000644000175000017500000007334711557262605012511 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2006 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "sourcewin.H" #include "summarywin.H" #include "diagwin.H" #include "flow_diagram.H" #include "canvas_scenegen.H" #include "cov.H" #include "estring.H" #include "prefs.H" CVSID("$Id: sourcewin.C,v 1.35 2010-05-09 05:37:15 gnb Exp $"); #ifndef GTK_SCROLLED_WINDOW_GET_CLASS #define GTK_SCROLLED_WINDOW_GET_CLASS(obj) \ GTK_SCROLLED_WINDOW_CLASS(GTK_OBJECT_CLASS(GTK_OBJECT(obj)->klass)) #endif list_t sourcewin_t::instances_; /* column widths, in *characters* */ const int sourcewin_t::column_widths_[sourcewin_t::NUM_COLS] = { 6, 8, 16, 8, -1 }; const char *sourcewin_t::column_names_[sourcewin_t::NUM_COLS] = { "Flow", "Line", "Blocks", "Count", "Source" }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if GTK2 void sourcewin_t::on_vadjustment_value_changed( GtkAdjustment *adj, gpointer userdata) { sourcewin_t *sw = (sourcewin_t *)userdata; sw->update_flows(); } void sourcewin_t::update_flow_window() { GtkTextView *tv = GTK_TEXT_VIEW(text_); dprintf0(D_SOURCEWIN, "sourcewin_t::update_flow_window\n"); if (!GTK_CHECK_MENU_ITEM(column_checks_[COL_FLOW])->active) { gtk_text_view_set_border_window_size(tv, GTK_TEXT_WINDOW_LEFT, 0); delete_flows(); return; } // make the left child visible gtk_text_view_set_border_window_size(tv, GTK_TEXT_WINDOW_LEFT, flow_width_); if (GTK_WIDGET_REALIZED(text_)) { // copy the text window's background to the left child GtkStyle *style = gtk_widget_get_style(text_); gdk_window_set_background( gtk_text_view_get_window(tv, GTK_TEXT_WINDOW_LEFT), &style->base[GTK_STATE_NORMAL]); } } /* * Get the first and last line number visible in the text window. * Returns FALSE if there are no numbers yet. */ gboolean sourcewin_t::get_visible_lines( unsigned long *begin_linenop, unsigned long *end_linenop) { GtkTextView *tv = GTK_TEXT_VIEW(text_); GdkRectangle rect; GtkTextIter begin_iter; GtkTextIter end_iter; gtk_text_view_get_visible_rect(tv, &rect); dprintf4(D_SOURCEWIN, " visible rect={%u,%u,%u,%u}\n", rect.x, rect.y, rect.width, rect.height); gtk_text_view_get_iter_at_location(tv, &begin_iter, rect.x, rect.y); gtk_text_view_get_iter_at_location(tv, &end_iter, rect.x, rect.y+rect.height); unsigned long begin_lineno = gtk_text_iter_get_line(&begin_iter); unsigned long end_lineno = gtk_text_iter_get_line(&end_iter); dprintf2(D_SOURCEWIN, " begin=%lu end=%lu\n", begin_lineno, end_lineno); if (begin_lineno == 0 && end_lineno == 0) return FALSE; if (begin_linenop != 0) *begin_linenop = begin_lineno; if (end_linenop != 0) *end_linenop = end_lineno; return TRUE; } void sourcewin_t::update_flows() { GtkTextView *tv = GTK_TEXT_VIEW(text_); GtkTextBuffer *buffer = gtk_text_view_get_buffer(tv); if (!GTK_WIDGET_REALIZED(text_)) return; if (!GTK_CHECK_MENU_ITEM(column_checks_[COL_FLOW])->active) return; cov_file_t *f; if ((f = cov_file_t::find(filename_)) == 0) return; dprintf0(D_SOURCEWIN, "sourcewin_t::update_flows\n"); unsigned long begin_lineno, end_lineno; if (!get_visible_lines(&begin_lineno, &end_lineno)) return; flow_shown_++; cov_function_t *oldfn = 0, *fn; unsigned int lineno; if (begin_lineno < 1) begin_lineno = 1; if (end_lineno > f->num_lines()) end_lineno = f->num_lines(); for (lineno = begin_lineno ; lineno <= end_lineno ; lineno++) { cov_line_t *ln = f->nth_line(lineno); if (ln == 0 || (fn = ln->function()) == 0 || fn == oldfn) continue; oldfn = fn; dprintf2(D_SOURCEWIN, " %u: fn=%s\n", lineno, fn->name()); list_iterator_t fiter; flow_t *flow = 0; for (fiter = flows_.first() ; fiter != (flow_t *)0 ; ++fiter) { if ((*fiter)->function_ == fn) { flow = *fiter; break; } } if (flow == 0) { GtkTextIter first_iter, last_iter; gtk_text_buffer_get_iter_at_line(buffer, &first_iter, fn->get_first_location()->lineno); gtk_text_buffer_get_iter_at_line(buffer, &last_iter, fn->get_last_location()->lineno); int first_y, last_y, height; gtk_text_view_get_line_yrange(tv, &first_iter, &first_y, &height); gtk_text_view_get_line_yrange(tv, &last_iter, &last_y, &height); dprintf2(D_SOURCEWIN, " y=%d height=%d\n", first_y-height, last_y-first_y+height); flow = create_flow(fn, first_y-height, last_y-first_y+height); flows_.append(flow); gtk_text_view_add_child_in_window(tv, flow->canvas_, GTK_TEXT_WINDOW_LEFT, 0, 0); } int wx, wy; gtk_text_view_buffer_to_window_coords(tv, GTK_TEXT_WINDOW_LEFT, 0, flow->bufy_, &wx, &wy); dprintf2(D_SOURCEWIN, " moving to %d,%d\n", 0, wy); gtk_text_view_move_child(tv, flow->canvas_, 0, wy); gtk_widget_show(flow->canvas_); flow->shown_ = flow_shown_; } /* Hide flows not just shown */ list_iterator_t fiter; dprintf0(D_SOURCEWIN, " hiding flows\n"); for (fiter = flows_.first() ; fiter != (flow_t *)0 ; ++fiter) { flow_t *flow = *fiter; if (flow->shown_ < flow_shown_ && GTK_WIDGET_VISIBLE(flow->canvas_)) { dprintf1(D_SOURCEWIN, " %s\n", flow->function_->name()); gtk_widget_hide(flow->canvas_); } } /* Recalculate the flow_width_ if necessary */ if (flow_width_dirty_) { flow_width_ = column_widths_[COL_FLOW] * font_width_; dprintf0(D_SOURCEWIN, " resizing window\n"); for (fiter = flows_.first() ; fiter != (flow_t *)0 ; ++fiter) { flow_t *flow = *fiter; if (GTK_WIDGET_VISIBLE(flow->canvas_) && flow->width_ > flow_width_) { flow_width_ = flow->width_; dprintf2(D_SOURCEWIN, " %s -> %u\n", flow->function_->name(), flow_width_); } } flow_width_dirty_ = FALSE; update_flow_window(); update_title_buttons(); } } #define GDK_TO_RGB(gdkcol) \ RGB(((gdkcol)->red>>8), ((gdkcol)->green>>8), ((gdkcol)->blue>>8)) static void set_diagram_colors(diagram_t *di) { int i; for (i = 0 ; i < cov::NUM_STATUS ; i++) { di->set_fg((cov::status_t)i, GDK_TO_RGB(foregrounds_by_status[i])); di->set_bg((cov::status_t)i, GDK_TO_RGB(backgrounds_by_status[i])); } } sourcewin_t::flow_t * sourcewin_t::create_flow(cov_function_t *fn, int y, int h) { flow_t *flow = new flow_t; flow->function_ = fn; flow->bufy_ = y; dprintf0(D_SOURCEWIN, " creating flow\n"); flow->canvas_ = gnome_canvas_new(); GtkStyle *style = gtk_widget_get_style(text_); gtk_widget_modify_bg(flow->canvas_, GTK_STATE_NORMAL, &style->base[GTK_STATE_NORMAL]); dprintf4(D_SOURCEWIN, "bg[%d] = {%04x,%04x,%04x}\n", GTK_STATE_NORMAL, style->bg[GTK_STATE_NORMAL].red, style->bg[GTK_STATE_NORMAL].green, style->bg[GTK_STATE_NORMAL].blue); dprintf4(D_SOURCEWIN, "base[%d] = {%04x,%04x,%04x}\n", GTK_STATE_NORMAL, style->base[GTK_STATE_NORMAL].red, style->base[GTK_STATE_NORMAL].green, style->base[GTK_STATE_NORMAL].blue); diagram_t *diag = new flow_diagram_t(flow->function_); set_diagram_colors(diag); diag->prepare(); scenegen_t *sg = new canvas_scenegen_t(GNOME_CANVAS(flow->canvas_)); diag->render(sg); delete sg; /* setup the canvas to show the whole diagram, preserving aspect */ dbounds_t bounds; diag->get_bounds(&bounds); double ppu = h / bounds.height(); flow->width_ = (unsigned int)(bounds.width() * ppu + 0.5) + 2; gtk_widget_set_usize(flow->canvas_, flow->width_, h); gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(flow->canvas_), ppu); gnome_canvas_set_scroll_region(GNOME_CANVAS(flow->canvas_), bounds.x1, bounds.y1, bounds.x2, bounds.y2); dprintf4(D_SOURCEWIN, " canvas %g x %g units = %u x %u pixels\n", bounds.width(), bounds.height(), flow->width_, h); if (flow->width_ > flow_width_) { flow_width_dirty_ = TRUE; dprintf0(D_SOURCEWIN, " flow width dirty\n"); } return flow; } void sourcewin_t::delete_flows() { flow_t *flow; while ((flow = flows_.remove_head())) { gtk_widget_hide(flow->canvas_); gtk_widget_unref(flow->canvas_); delete flow; } flow_width_dirty_ = TRUE; } /* * Poll and dispatch events (and in particular, the idle callbacks * that GtkTextView uses to update its data structures) until we * can do something with the GtkTextView that depends on that * state, like update the flows. */ void sourcewin_t::wait_for_text_validation() { gboolean vis = FALSE; int n = 5; while (g_main_context_iteration(NULL, FALSE)) { dprintf0(D_SOURCEWIN, "wait_for_text_validation\n"); if (!vis) vis = get_visible_lines(0, 0); if (!vis) continue; /* * Need to run at least one more callback, otherwise * we miscalculate the size of a flow which extends * off the bottom of the visible window. */ if (n-- == 0) break; } } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void sourcewin_t::setup_text() { ui_text_setup(text_); font_width_ = ui_text_font_width(text_); text_tags_[cov::COVERED] = ui_text_create_tag(text_, "covered", &prefs.covered_foreground); text_tags_[cov::PARTCOVERED] = ui_text_create_tag(text_, "partcovered", &prefs.partcovered_foreground); text_tags_[cov::UNCOVERED] = ui_text_create_tag(text_, "uncovered", &prefs.uncovered_foreground); text_tags_[cov::UNINSTRUMENTED] = ui_text_create_tag(text_, "uninstrumented", &prefs.uninstrumented_foreground); text_tags_[cov::SUPPRESSED] = ui_text_create_tag(text_, "suppressed", &prefs.suppressed_foreground); #if GTK2 /* * Setup the left child to show function flows. */ GtkTextView *tv = GTK_TEXT_VIEW(text_); // hook up the function to update the flows on scrolling text_initialised_ = FALSE; flow_width_ = column_widths_[COL_FLOW] * font_width_; flow_width_dirty_ = FALSE; g_signal_connect_after(G_OBJECT(tv->vadjustment), "value-changed", G_CALLBACK(on_vadjustment_value_changed), (gpointer)this); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ sourcewin_t::sourcewin_t() { GladeXML *xml; /* load the interface & connect signals */ xml = ui_load_tree("source"); set_window(glade_xml_get_widget(xml, "source")); text_ = glade_xml_get_widget(xml, "source_text"); setup_text(); column_checks_[COL_FLOW] = glade_xml_get_widget(xml, "source_flow_check"); column_checks_[COL_LINE] = glade_xml_get_widget(xml, "source_line_check"); column_checks_[COL_BLOCK] = glade_xml_get_widget(xml, "source_block_check"); column_checks_[COL_COUNT] = glade_xml_get_widget(xml, "source_count_check"); column_checks_[COL_SOURCE] = glade_xml_get_widget(xml, "source_source_check"); colors_check_ = glade_xml_get_widget(xml, "source_colors_check"); flow_diagram_item_ = glade_xml_get_widget(xml, "source_flow_diagram"); toolbar_ = glade_xml_get_widget(xml, "source_toolbar"); filenames_combo_ = glade_xml_get_widget(xml, "source_filenames_combo"); functions_combo_ = glade_xml_get_widget(xml, "source_functions_combo"); titles_hbox_ = glade_xml_get_widget(xml, "source_titles_hbox"); left_pad_label_ = glade_xml_get_widget(xml, "source_left_pad_label"); title_buttons_[COL_FLOW] = glade_xml_get_widget(xml, "source_col_flow_button"); title_buttons_[COL_LINE] = glade_xml_get_widget(xml, "source_col_line_button"); title_buttons_[COL_BLOCK] = glade_xml_get_widget(xml, "source_col_block_button"); title_buttons_[COL_COUNT] = glade_xml_get_widget(xml, "source_col_count_button"); title_buttons_[COL_SOURCE] = glade_xml_get_widget(xml, "source_col_source_button"); right_pad_label_ = glade_xml_get_widget(xml, "source_right_pad_label"); ui_register_windows_menu(ui_get_dummy_menu(xml, "source_windows_dummy")); #if GTK2 /* * The View->Text Size->Increase menu item has an accelerator * which is nominally "Ctrl++", unfortunately what GTK sees on * many keyboards when the user tries that is "Ctrl+=" because * the + symbol is a shift-glyph on the = key and people don't * understand to press Shift. So we hack around the problem * by registering a second accelerator for Ctrl+=. */ GtkWidget *w = glade_xml_get_widget(xml, "source_text_size_increase"); const GSList *groups = gtk_accel_groups_from_object(G_OBJECT(window_)); gtk_widget_add_accelerator(w, "activate", GTK_ACCEL_GROUP(groups->data), GDK_equal, GDK_CONTROL_MASK, (GtkAccelFlags)0); #endif xml = ui_load_tree("source_saveas"); saveas_dialog_ = glade_xml_get_widget(xml, "source_saveas"); attach(saveas_dialog_); instances_.append(this); } sourcewin_t::~sourcewin_t() { #if GTK2 // delete_flows(); #endif instances_.remove(this); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_source_filenames_entry_changed(GtkWidget *w, gpointer userdata) { sourcewin_t *sw = sourcewin_t::from_widget(w); cov_file_t *f = (cov_file_t *)ui_combo_get_current_data( GTK_COMBO(sw->filenames_combo_)); if (sw->populating_ || !sw->shown_ || f == 0/*stupid gtk2*/) return; sw->set_filename(f->name(), f->minimal_name()); } void sourcewin_t::populate_filenames() { list_iterator_t iter; populating_ = TRUE; /* suppress combo entry callback */ ui_combo_clear(GTK_COMBO(filenames_combo_)); /* stupid glade2 */ for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; ui_combo_add_data(GTK_COMBO(filenames_combo_), f->minimal_name(), f); } populating_ = FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_source_functions_entry_changed(GtkWidget *w, gpointer userdata) { sourcewin_t *sw = sourcewin_t::from_widget(w); cov_function_t *fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(sw->functions_combo_)); const cov_location_t *first; const cov_location_t *last; if (sw->populating_ || !sw->shown_ || fn == 0 /*stupid gtk2*/) return; first = fn->get_first_location(); last = fn->get_last_location(); dprintf5(D_SOURCEWIN, "Function %s -> %s:%ld to %s:%ld\n", fn->name(), first->filename, first->lineno, last->filename, last->lineno); /* Check for weirdness like functions spanning files */ if (strcmp(first->filename, sw->filename_)) { fprintf(stderr, "WTF? Wrong filename for first loc: %s vs %s\n", first->filename, sw->filename_.data()); return; } if (strcmp(last->filename, sw->filename_)) { fprintf(stderr, "WTF? Wrong filename for last loc: %s vs %s\n", last->filename, sw->filename_.data()); return; } sw->ensure_visible(first->lineno); /* This only selects the span of the lines which contain executable code */ sw->select_region(first->lineno, last->lineno); } void sourcewin_t::populate_functions() { list_t functions; unsigned fnidx; cov_file_t *f; cov_function_t *fn; /* build an alphabetically sorted list of functions in the file */ f = cov_file_t::find(filename_); assert(f != 0); for (fnidx = 0 ; fnidx < f->num_functions() ; fnidx++) { fn = f->nth_function(fnidx); if (fn->is_suppressed() || fn->get_first_location() == 0) continue; functions.prepend(fn); } functions.sort(cov_function_t::compare); /* now build the menu */ ui_combo_clear(GTK_COMBO(functions_combo_)); populating_ = TRUE; /* suppress combo entry callback */ while ((fn = functions.remove_head()) != 0) ui_combo_add_data(GTK_COMBO(functions_combo_), fn->name(), fn); populating_ = FALSE; } void sourcewin_t::populate() { populate_filenames(); populate_functions(); update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * Expand tabs in the line because GTK 1.2.7 through 1.2.9 can * only be trusted to expand *initial* tabs correctly, DAMMIT. */ static char * fgets_tabexpand(char *buf, unsigned int maxlen, FILE *fp) { int c; unsigned int len = 0, ns; static const char spaces[] = " "; maxlen--; /* allow for nul terminator */ for (;;) { if ((c = getc(fp)) == EOF) return (len == 0 ? 0 : buf); if (c == '\t') { ns = 8-(len&7); if (len+ns >= maxlen) { ungetc(c, fp); return buf; } memcpy(buf+len, spaces, ns); len += ns; buf[len] = '\0'; } else { if (len+1 == maxlen) { ungetc(c, fp); return buf; } buf[len++] = c; buf[len] = '\0'; if (c == '\n') break; } } return buf; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static char * pad(char *buf, unsigned int width, char c) { char *p = buf; for ( ; *p && width > 0 ; p++, width--) ; for ( ; width > 0 ; width--) *p++ = c; *p = '\0'; return buf; } void sourcewin_t::update() { FILE *fp; unsigned long lineno; cov_file_t *f; cov_line_t *ln; int i, nstrs; gfloat scrollval; ui_text_tag *tag; const char *strs[NUM_COLS]; char linenobuf[32]; char blockbuf[32]; char countbuf[32]; char linebuf[1024]; update_title_buttons(); if ((f = cov_file_t::find(filename_)) == 0) return; if ((fp = fopen(filename_, "r")) == 0) { /* TODO: gui error report */ perror(filename_); return; } scrollval = ui_text_vscroll_sample(text_); ui_text_begin(text_); lineno = 0; while (fgets_tabexpand(linebuf, sizeof(linebuf), fp) != 0) { ++lineno; ln = f->nth_line(lineno); /* choose colours */ tag = 0; if (GTK_CHECK_MENU_ITEM(colors_check_)->active) tag = text_tags_[ln->status()]; /* generate strings */ nstrs = 0; if (GTK_CHECK_MENU_ITEM(column_checks_[COL_LINE])->active) { snprintf(linenobuf, sizeof(linenobuf), "%*lu ", column_widths_[COL_LINE]-1, lineno); strs[nstrs++] = linenobuf; } if (GTK_CHECK_MENU_ITEM(column_checks_[COL_BLOCK])->active) { ln->format_blocks(blockbuf, column_widths_[COL_BLOCK]-1); strs[nstrs++] = pad(blockbuf, column_widths_[COL_BLOCK], ' '); } if (GTK_CHECK_MENU_ITEM(column_checks_[COL_COUNT])->active) { switch (ln->status()) { case cov::COVERED: case cov::PARTCOVERED: snprintf(countbuf, sizeof(countbuf), "%*llu", column_widths_[COL_COUNT]-1, ln->count()); break; case cov::UNCOVERED: strncpy(countbuf, " ######", sizeof(countbuf)); break; case cov::UNINSTRUMENTED: case cov::SUPPRESSED: countbuf[0] = '\0'; break; } strs[nstrs++] = pad(countbuf, column_widths_[COL_COUNT], ' '); } if (GTK_CHECK_MENU_ITEM(column_checks_[COL_SOURCE])->active) strs[nstrs++] = linebuf; else strs[nstrs++] = "\n"; for (i = 0 ; i < nstrs ; i++) ui_text_add(text_, tag, strs[i], -1); } fclose(fp); ui_text_end(text_); /* scroll back to the line we were at before futzing with the text */ #if GTK2 wait_for_text_validation(); #endif ui_text_vscroll_restore(text_, scrollval); #if GTK2 delete_flows(); update_flow_window(); update_flows(); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void sourcewin_t::update_title_buttons() { GtkWidget *scrollw; int lpad, rpad, sbwidth; int i; /* * Need the window to be realized so that the scrollbar has * its final width for our calculations. */ if (!GTK_WIDGET_REALIZED(window_)) gtk_widget_realize(window_); /* * Set the left and right padding labels to just the right values * to align the title buttons with the main text window body. */ scrollw = text_->parent; lpad = rpad = GTK_CONTAINER(scrollw)->border_width; sbwidth = GTK_SCROLLED_WINDOW(scrollw)->vscrollbar->allocation.width + GTK_SCROLLED_WINDOW_GET_CLASS(scrollw)->scrollbar_spacing; switch (GTK_SCROLLED_WINDOW(scrollw)->window_placement) { case GTK_CORNER_TOP_LEFT: case GTK_CORNER_BOTTOM_LEFT: rpad += sbwidth; break; case GTK_CORNER_TOP_RIGHT: case GTK_CORNER_BOTTOM_RIGHT: lpad += sbwidth; break; } gtk_widget_set_usize(left_pad_label_, lpad, /*height=whatever*/5); gtk_widget_set_usize(right_pad_label_, rpad, /*height=whatever*/5); /* * Size each title button to match the size of each column in * the text window. Note the Source column takes up all the slack. */ gtk_widget_set_usize(title_buttons_[COL_FLOW], flow_width_, /*height=whatever*/5); for (i = COL_LINE ; i < NUM_COLS ; i++) { if (column_widths_[i] > 0) gtk_widget_set_usize(title_buttons_[i], column_widths_[i] * font_width_, /*height=whatever*/5); } /* * Show or hide the title buttons. */ for (i = 0 ; i < NUM_COLS ; i++) { if (GTK_CHECK_MENU_ITEM(column_checks_[i])->active) gtk_widget_show(title_buttons_[i]); else gtk_widget_hide(title_buttons_[i]); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void sourcewin_t::set_filename(const char *filename, const char *display_fname) { set_title((display_fname == 0 ? filename : display_fname)); filename_ = filename; if (shown_) { #if GTK2 delete_flows(); #endif populate_functions(); update(); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void sourcewin_t::select_region(unsigned long startline, unsigned long endline) { dprintf2(D_SOURCEWIN, "sourcewin_t::select_region: startline=%ld endline=%ld\n", startline, endline); ui_text_select_lines(text_, startline, endline); } void sourcewin_t::ensure_visible(unsigned long line) { ui_text_ensure_visible(text_, line); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_function_t * sourcewin_t::selected_function() const { cov_location_t loc; cov_line_t *ln; cov_function_t *fn; loc.filename = (char *)filename_.data(); ui_text_get_selected_lines(text_, &loc.lineno, 0); if (loc.lineno == 0 || (ln = cov_line_t::find(&loc)) == 0 || (fn = ln->function()) == 0) return 0; return fn; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ sourcewin_t * sourcewin_t::instance() { sourcewin_t *sw = 0; if (prefs.reuse_srcwin) sw = instances_.head(); if (sw == 0) sw = new sourcewin_t; return sw; } void sourcewin_t::show_lines( const char *filename, unsigned long startline, unsigned long endline) { sourcewin_t *sw = instance(); estring fullname = cov_file_t::unminimise_name(filename); estring displayname = cov_file_t::minimise_name(fullname.data()); dprintf4(D_SOURCEWIN, "sourcewin_t::show_lines(\"%s\", %lu, %lu) => \"%s\"\n", filename, startline, endline, fullname.data()); sw->set_filename(fullname.data(), displayname.data()); sw->show(); if (startline > 0) { sw->ensure_visible(startline); sw->select_region(startline, endline); } } void sourcewin_t::show_function(const cov_function_t *fn) { const cov_location_t *start, *end; start = fn->get_first_location(); end = fn->get_last_location(); if (start != 0 && end != 0) show_lines(start->filename, start->lineno, end->lineno); } void sourcewin_t::show_file(const cov_file_t *f) { show_lines(f->name(), 0, 0); } void sourcewin_t::show_filename(const char *filename) { show_lines(filename, 0, 0); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_source_column_check_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); sw->update(); } GLADE_CALLBACK void on_source_colors_check_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); sw->update(); } GLADE_CALLBACK void on_source_toolbar_check_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); if (GTK_CHECK_MENU_ITEM(w)->active) gtk_widget_show(sw->toolbar_); else gtk_widget_hide(sw->toolbar_); } GLADE_CALLBACK void on_source_titles_check_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); if (GTK_CHECK_MENU_ITEM(w)->active) { sw->update_title_buttons(); gtk_widget_show(sw->titles_hbox_); } else gtk_widget_hide(sw->titles_hbox_); } GLADE_CALLBACK void on_source_summarise_file_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); summarywin_t::show_file(cov_file_t::find(sw->filename_)); } GLADE_CALLBACK void on_source_summarise_function_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); cov_function_t *fn = sw->selected_function(); if (fn != 0) summarywin_t::show_function(fn); } GLADE_CALLBACK void on_source_summarise_range_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); unsigned long start, end; ui_text_get_selected_lines(sw->text_, &start, &end); if (start != 0) summarywin_t::show_lines(sw->filename_, start, end); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_source_flow_diagram_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); cov_function_t *fn = sw->selected_function(); if (fn != 0) { diagwin_t *dw = new diagwin_t(new flow_diagram_t(fn)); dw->show(); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean sourcewin_t::save_with_annotations(const char *filename) { int i; FILE *fp; char *contents; guint length; if ((fp = fopen(filename, "w")) == 0) { perror(filename); return FALSE; } /* Generate header line */ for (i = COL_LINE ; i < NUM_COLS ; i++) { if (GTK_CHECK_MENU_ITEM(column_checks_[i])->active) { if (column_widths_[i] > 0) fprintf(fp, "%-*s ", column_widths_[i]-1, column_names_[i]); else fprintf(fp, "%s", column_names_[i]); } } fputc('\n', fp); /* Generate separator line */ for (i = COL_LINE ; i < NUM_COLS ; i++) { if (GTK_CHECK_MENU_ITEM(column_checks_[i])->active) { int j, n = column_widths_[i]; if (n < 0) n = 20; else n--; for (j = 0 ; j < n ; j++) fputc('-', fp); fputc(' ', fp); } } fputc('\n', fp); /* * Get the contents of the text window, including all visible columns */ contents = ui_text_get_contents(text_); length = strlen(contents); /* * Write out the contents. */ if (fwrite(contents, 1, length, fp) < length) { perror("fwrite"); g_free(contents); fclose(fp); return FALSE; } g_free(contents); fclose(fp); return TRUE; } GLADE_CALLBACK void on_source_saveas_ok_button_clicked(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); const char *filename; filename = gtk_file_selection_get_filename( GTK_FILE_SELECTION(sw->saveas_dialog_)); sw->save_with_annotations(filename); gtk_widget_hide(sw->saveas_dialog_); } GLADE_CALLBACK void on_source_saveas_cancel_button_clicked(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); gtk_widget_hide(sw->saveas_dialog_); } GLADE_CALLBACK void on_source_save_as_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); char *txt_filename; txt_filename = g_strconcat(sw->filename_.data(), ".cov.txt", (char *)0); gtk_file_selection_set_filename(GTK_FILE_SELECTION(sw->saveas_dialog_), txt_filename); g_free(txt_filename); gtk_widget_show(sw->saveas_dialog_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if GTK2 void sourcewin_t::adjust_text_size(int dirn) { ui_text_adjust_text_size(text_, dirn); font_width_ = ui_text_font_width(text_); delete_flows(); update_flows(); update_title_buttons(); } GLADE_CALLBACK void on_source_text_size_increase_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); dprintf0(D_SOURCEWIN, "on_source_text_size_increase_activate\n"); sw->adjust_text_size(1); } GLADE_CALLBACK void on_source_text_size_normal_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); dprintf0(D_SOURCEWIN, "on_source_text_size_normal_activate\n"); sw->adjust_text_size(0); } GLADE_CALLBACK void on_source_text_size_decrease_activate(GtkWidget *w, gpointer data) { sourcewin_t *sw = sourcewin_t::from_widget(w); dprintf0(D_SOURCEWIN, "on_source_text_size_decrease_activate\n"); sw->adjust_text_size(-1); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/tok.C0000644000175000017500000000335211453570563011255 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2003 Greg Banks * copied from * CANT - A C implementation of the Apache/Tomcat ANT build system * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "tok.H" CVSID("$Id: tok.C,v 1.5 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void tok_t::init(char *str, const char *sep) { first_ = TRUE; buf_ = str; state_ = 0; sep_ = (sep == 0 ? " \t\r\n" : sep); } tok_t::tok_t(const char *str, const char *sep) { init((str == 0 ? 0 : g_strdup(str)), sep); } tok_t::tok_t(char *str, const char *sep) { init(str, sep); } tok_t::~tok_t() { if (buf_) g_free(buf_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const char * tok_t::next() { if (!buf_) return 0; if (first_) { first_ = FALSE; return strtok_r(buf_, sep_, &state_); } return strtok_r(0, sep_, &state_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/uix.c0000644000175000017500000001561011453570563011325 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "uix.h" #include /* This is what we want to avoid in the main code */ CVSID("$Id: uix.c,v 1.8 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static XFontProp * xfont_get_prop(Display *display, XFontStruct *xfont, const char *name) { Atom atom; int i; if ((atom = XInternAtom(display, name, /*only_if_exists*/True)) == None) return 0; for (i = 0 ; i < xfont->n_properties ; i++) { XFontProp *fprop = &xfont->properties[i]; if (fprop->name == atom) return fprop; } return 0; } static char * xfont_get_string_prop(Display *display, XFontStruct *xfont, const char *name) { XFontProp *fprop; if ((fprop = xfont_get_prop(display, xfont, name)) == 0) return 0; return XGetAtomName(display, fprop->card32); } static unsigned long xfont_get_integer_prop(Display *display, XFontStruct *xfont, const char *name) { XFontProp *fprop; if ((fprop = xfont_get_prop(display, xfont, name)) == 0) return 0; return fprop->card32; } /* -B&H-Lucida-Medium-R-Normal-Sans-12-120-75-75-P-71-ISO8859-1 */ typedef struct { char *family; char *weight; char *slant; unsigned long pixel_size; unsigned long resolution; char *spacing; char *charset_registry; char *charset_encoding; } uix_font_desc_t; static void uix_font_desc_get(uix_font_desc_t *desc, Display *display, XFontStruct *xfont) { desc->family = xfont_get_string_prop(display, xfont, "FAMILY_NAME"); desc->weight = xfont_get_string_prop(display, xfont, "WEIGHT_NAME"); desc->slant = xfont_get_string_prop(display, xfont, "SLANT"); desc->pixel_size = xfont_get_integer_prop(display, xfont, "PIXEL_SIZE"); desc->resolution = xfont_get_integer_prop(display, xfont, "RESOLUTION_X"); desc->spacing = xfont_get_string_prop(display, xfont, "SPACING"); desc->charset_registry = xfont_get_string_prop(display, xfont, "CHARSET_REGISTRY"); desc->charset_encoding = xfont_get_string_prop(display, xfont, "CHARSET_ENCODING"); } static void uix_font_desc_free(uix_font_desc_t *desc) { if (desc->family != 0) XFree(desc->family); if (desc->weight != 0) XFree(desc->weight); if (desc->slant != 0) XFree(desc->slant); if (desc->spacing != 0) XFree(desc->spacing); if (desc->charset_registry != 0) XFree(desc->charset_registry); if (desc->charset_encoding != 0) XFree(desc->charset_encoding); } #define safestr(s) ((s) == 0 ? "" : (s)) static GdkFont * uix_font_desc_load(const uix_font_desc_t *desc) { GdkFont *font; char *fontname; static const char anything[] = "*"; int n; const char *fields[16]; char sizebuf[16]; char resbuf[16]; /* -B&H-Lucida-Medium-R-Normal-Sans-12-120-75-75-P-71-ISO8859-1 */ n = 0; fields[n++] = ""; /* to get initial seperator */ fields[n++] = /*foundry*/anything; fields[n++] = desc->family; fields[n++] = safestr(desc->weight); fields[n++] = safestr(desc->slant); fields[n++] = /*setwidth*/anything; fields[n++] = /*addstyle*/anything; snprintf(sizebuf, sizeof(sizebuf), "%ld", desc->pixel_size); fields[n++] = sizebuf; fields[n++] = /*pointsize*/anything; snprintf(resbuf, sizeof(resbuf), "%ld", desc->resolution); fields[n++] = resbuf; /* resolutionx */ fields[n++] = resbuf; /* resolutiony */ fields[n++] = desc->spacing; fields[n++] = /*avgwidth*/anything; fields[n++] = safestr(desc->charset_registry); fields[n++] = safestr(desc->charset_encoding); fields[n++] = 0; assert(n == sizeof(fields)/sizeof(fields[0])); fontname = g_strjoinv("-", (char **)fields); dprintf1(D_UICORE, "uix_font_desc_load: trying \"%s\"\n", fontname); font = gdk_font_load(fontname); g_free(fontname); return font; } static GdkFont * uix_find_fixed(const uix_font_desc_t *origdesc) { uix_font_desc_t tmpdesc; int i; GdkFont *newfont; static const char *families[] = { "lucidatypewriter", "lucidasanstypewriter", "courier", "fixed", 0 }; tmpdesc = *origdesc; tmpdesc.spacing = (char *)"M"; /* first try everything the same except the spacing -- we might get lucky */ if ((newfont = uix_font_desc_load(&tmpdesc)) != 0) return newfont; /* try the well known monospaced families */ for (i = 0 ; families[i] != 0 ; i++) { tmpdesc.family = (char *)families[i]; if ((newfont = uix_font_desc_load(&tmpdesc)) != 0) return newfont; } /* set some fields to safe defaults and try the well-known families again */ tmpdesc.weight = (char *)"Medium"; tmpdesc.slant = (char *)"R"; for (i = 0 ; families[i] != 0 ; i++) { tmpdesc.family = (char *)families[i]; if ((newfont = uix_font_desc_load(&tmpdesc)) != 0) return newfont; } return 0; } GdkFont * uix_fixed_width_font(GdkFont *goldfont) { Display *display = GDK_FONT_XDISPLAY(goldfont); XFontStruct *oldfont = (XFontStruct *)GDK_FONT_XFONT(goldfont); GdkFont *newfont = 0; uix_font_desc_t origdesc; #if 0 printf("font properties:\n"); for (i = 0 ; i < oldfont->n_properties ; i++) { XFontProp *fprop = &oldfont->properties[i]; printf("name=%s value=%ld (%s)\n", XGetAtomName(display, fprop->name), fprop->card32, XGetAtomName(display, fprop->card32)); } #endif uix_font_desc_get(&origdesc, display, oldfont); if (strcasecmp(origdesc.spacing, "M")) newfont = uix_find_fixed(&origdesc); uix_font_desc_free(&origdesc); return (newfont == 0 ? goldfont : newfont); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int uix_font_width(GdkFont *gfont) { XFontStruct *xfont = (XFontStruct *)GDK_FONT_XFONT(gfont); return xfont->max_bounds.width; } int uix_font_height(GdkFont *gfont) { XFontStruct *xfont = (XFontStruct *)GDK_FONT_XFONT(gfont); return xfont->ascent + xfont->descent; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_file.C0000644000175000017500000014635511604051140012240 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" #include "cov_specific.H" #include "covio.H" #include "estring.H" #include "string_var.H" #include "tok.H" #include "hashtable.H" #include "filename.h" #include "demangle.h" #include "cpp_parser.H" #include "cpp_parser.H" #include "cov_suppression.H" CVSID("$Id: cov_file.C,v 1.83 2010-05-09 05:37:15 gnb Exp $"); static gboolean filename_is_common(const char *filename); hashtable_t *cov_file_t::files_; list_t cov_file_t::files_list_; list_t cov_file_t::search_path_; string_var cov_file_t::gcda_prefix_; char *cov_file_t::common_path_; int cov_file_t::common_len_; void *cov_file_t::files_model_; #define _NEW_VERSION(major, minor, release) \ (((gnb_u32_t)('0'+(major))<<24)| \ ((gnb_u32_t)('0'+(minor)/10)<<16)| \ ((gnb_u32_t)('0'+(minor)%10)<<8)| \ ((gnb_u32_t)(release))) #define BBG_VERSION_GCC34 _NEW_VERSION(3,4,'*') #define BBG_VERSION_GCC33 _NEW_VERSION(3,3,'p') /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_file_t::cov_file_t(const char *name, const char *relpath) : name_(name), relpath_(relpath) { /* * It is the caller's responsibility to create cov_file_t objects * with an absolute filename which is not already known. */ assert(name[0] == '/'); assert(find(name_) == 0); functions_ = new ptrarray_t(); functions_by_name_ = new hashtable_t; functions_by_id_ = new hashtable_t; lines_ = new ptrarray_t(); null_line_ = new cov_line_t(); files_->insert(name_, this); if ((common_ = filename_is_common(name_))) add_name(name_); } cov_file_t::~cov_file_t() { unsigned int i; files_list_.remove(this); files_->remove(name_); for (i = 0 ; i < functions_->length() ; i++) delete functions_->nth(i); delete functions_; delete functions_by_name_; delete functions_by_id_; for (i = 0 ; i < lines_->length() ; i++) delete lines_->nth(i); delete lines_; delete null_line_; if (common_) dirty_common_path(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_file_t::init() { files_ = new hashtable_t; common_path_ = 0; common_len_ = 0; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static gboolean filename_matches_directory_prefix(const char *filename, const char *dir) { int dirlen = strlen(dir); return (!strncmp(dir, filename, dirlen) && (filename[dirlen] == '\0' || filename[dirlen] == '/')); } static gboolean filename_is_common(const char *filename) { static const char * const uncommon_dirs[] = { "/usr/include", "/usr/lib", 0 }; const char * const * dirp; for (dirp = uncommon_dirs ; *dirp != 0 ; dirp++) { if (filename_matches_directory_prefix(filename, *dirp)) return FALSE; } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if 0 gboolean cov_file_t::is_self_suppressed() const { /* TOOO: implement suppression by filename, directory, or library here */ } void cov_file_t::suppress() { unsigned int i; suppressed_ = TRUE; for (i = 0 ; i < functions_->length() ; i++) functions_->nth(i)->suppress(); } #endif void cov_file_t::finalise() { unsigned int i; if (finalised_) return; finalised_ = TRUE; #if 0 /* TODO: push file-level suppression downwards to functions */ if (is_self_suppressed()) suppress(); #endif for (i = 0 ; i < functions_->length() ; i++) functions_->nth(i)->finalise(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int compare_files(const cov_file_t *fa, const cov_file_t *fb) { return strcmp(fa->minimal_name(), fb->minimal_name()); } void cov_file_t::post_read_1( const char *name, cov_file_t *f, gpointer userdata) { files_list_.prepend(f); f->finalise(); } void cov_file_t::post_read() { files_list_.remove_all(); files_->foreach(post_read_1, 0); files_list_.sort(compare_files); } list_iterator_t cov_file_t::first() { return files_list_.first(); } unsigned int cov_file_t::length() { return files_->size(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_file_t * cov_file_t::find(const char *name) { assert(files_ != 0); string_var fullname = unminimise_name(name); return files_->lookup(fullname); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_file_t::add_name(const char *name) { assert(name[0] == '/'); if (common_len_ < 0) return; /* dirty, need to recalculate later */ if (common_path_ == 0) { /* first filename: initialise the common path to the directory */ char *p; common_path_ = g_strdup(name); if ((p = strrchr(common_path_, '/')) != 0) p[1] = '\0'; } else { /* subsequent filenames: shrink common path as necessary */ char *cs, *ce, *ns, *ne; cs = common_path_+1; ns = (char *)name+1; for (;;) { if ((ne = strchr(ns, '/')) == 0) break; if ((ce = strchr(cs, '/')) == 0) break; if ((ce - cs) != (ne - ns)) break; if (memcmp(cs, ns, (ne - ns))) break; cs = ce+1; ns = ne+1; } *cs = '\0'; } common_len_ = strlen(common_path_); dprintf2(D_FILES, "cov_file_t::add_name: name=\"%s\" => common=\"%s\"\n", name, common_path_); } void cov_file_t::dirty_common_path() { if (common_path_ != 0) { g_free(common_path_); common_path_ = 0; common_len_ = -1; /* indicates dirty */ } } void cov_file_t::add_name_tramp(const char *name, cov_file_t *f, gpointer userdata) { if (f->common_) add_name(name); } void cov_file_t::check_common_path() { if (common_len_ < 0) { dprintf0(D_FILES, "cov_file_t::check_common_path: recalculating common path\n"); common_len_ = 0; files_->foreach(add_name_tramp, 0); } } const char * cov_file_t::minimal_name() const { if (!common_) return name_; check_common_path(); return name_.data() + common_len_; } char * cov_file_t::minimise_name(const char *name) { check_common_path(); if (!strncmp(name, common_path_, common_len_)) { return g_strdup(name + common_len_); } else { assert(name[0] == '/'); return g_strdup(name); } } char * cov_file_t::unminimise_name(const char *name) { if (name[0] == '/') { /* absolute name */ return g_strdup(name); } else { /* partial, presumably minimal, name */ check_common_path(); return g_strconcat(common_path_, name, (char *)0); } } const char * cov_file_t::common_path() { check_common_path(); return common_path_; } void * cov_file_t::files_model() { /* currently MVC models just need to be a unique address */ if (files_model_ == 0) files_model_ = (void *)&files_model_; return files_model_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_line_t * cov_file_t::nth_line(unsigned int n) const { cov_line_t *ln; if (n > lines_->length() || (ln = lines_->nth(n-1)) == 0) ln = null_line_; return ln; } cov_line_t * cov_file_t::get_nth_line(unsigned int lineno) { cov_line_t *ln; if (lineno > lines_->length() || (ln = lines_->nth(lineno-1)) == 0) lines_->set(lineno-1, ln = new cov_line_t()); return ln; } void cov_file_t::add_location( cov_block_t *b, const char *filename, unsigned long lineno) { cov_file_t *f; cov_line_t *ln; if (!strcmp(filename, name_)) { /* * The common case is that we add locations in the file * we're currently read()ing, which has not yet been * inserted so that find() can find it. */ f = this; } else if ((f = find(filename)) == 0) { f = new cov_file_t(filename, filename); assert(f != 0); } assert(f->name_[0] == '/'); assert(lineno > 0); ln = f->get_nth_line(lineno); /* * This incredibly obscure corner case keeps tripping the regression * tests. The 2nd last block in a function normally represents the * function epilogue; in some functions which have an empty epilogue * the gcc 2.96 compiler spits out a line entry for the epilogue block * which is a duplicate of the real last line. This is mostly harmless * except in functions where the last line is not always executed, e.g. * foo() * { * ... * if (...) * yadda(); * } * Here the last line spuriously contains 2 blocks, one of which counts * the number of times yadda() was called and the other counts the number * of times it wasn't; the result reported is the maximum of the two. * This tweak suppresses the line entry for the epilogue block if * another block already has the line. */ if (ln->blocks_ != 0 && b->is_epilogue()) { if (debug_enabled(D_BB)) { string_var desc = b->describe(); duprintf3("Block %s skipping duplicate epilogue line %s:%lu\n", desc.data(), filename, lineno); } return; } if (debug_enabled(D_BB)) { string_var desc = b->describe(); duprintf3("Block %s adding location %s:%lu\n", desc.data(), filename, lineno); if (ln->blocks_ != 0) duprintf3("%s:%lu: this line belongs to %d blocks\n", filename, lineno, g_list_length(ln->blocks_)+1); } ln->blocks_ = g_list_append(ln->blocks_, b); b->add_location(f->name_, lineno); f->has_locations_ = TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_function_t * cov_file_t::add_function() { cov_function_t *fn; fn = new cov_function_t(); fn->idx_ = functions_->append(fn); fn->file_ = this; return fn; } cov_function_t * cov_file_t::find_function(const char *fnname) const { return functions_by_name_->lookup(fnname); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov::status_t cov_file_t::calc_stats(cov_stats_t *stats) const { unsigned int fnidx; cov_stats_t mine; assert(finalised_); for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) nth_function(fnidx)->calc_stats(&mine); stats->accumulate(&mine); return mine.status_by_blocks(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_file_t::zero_arc_counts() { unsigned int fnidx; for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) nth_function(fnidx)->zero_arc_counts(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_file_t::solve() { unsigned int fnidx; for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) { if (!nth_function(fnidx)->solve()) { fprintf(stderr, "ERROR: could not solve flow graph for %s\n", nth_function(fnidx)->name()); return FALSE; } } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define BB_FILENAME 0x80000001 #define BB_FUNCTION 0x80000002 #define BB_ENDOFLIST 0x00000000 gboolean cov_file_t::read_bb_file(covio_t *io) { gnb_u32_t tag; estring funcname; estring filename; cov_function_t *fn = 0; int funcidx; int bidx = 0; int line; int nlines; dprintf1(D_FILES, "Reading .bb file \"%s\"\n", io->filename()); io->set_format(covio_t::FORMAT_OLD); funcidx = 0; line = 0; nlines = 0; while (io->read_u32(tag)) { switch (tag) { case BB_FILENAME: if (!io->read_bbstring(filename, tag)) return FALSE; filename = make_absolute(filename); dprintf1(D_BB, "BB filename = \"%s\"\n", filename.data()); break; case BB_FUNCTION: if (!io->read_bbstring(funcname, tag)) return FALSE; funcname = normalise_mangled(funcname); dprintf1(D_BB, "BB function = \"%s\"\n", funcname.data()); fn = nth_function(funcidx); funcidx++; bidx = 0; line = 0; nlines = 0; fn->set_name(funcname); break; case BB_ENDOFLIST: if (line != 0 && nlines == 0) { assert(fn != 0); assert(bidx != 0); assert(filename != (const char*)0); add_location(fn->nth_block(bidx), filename, line); } bidx++; nlines = 0; break; default: dprintf2(D_BB, "BB line = %d (block %d)\n", (int)tag, bidx); assert(fn != 0); line = tag; add_location(fn->nth_block(bidx), filename, line); nlines++; break; } } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define BBG_SEPARATOR 0x80000001 /* arc flags */ #define BBG_ON_TREE 0x1 #define BBG_FAKE 0x2 #define BBG_FALL_THROUGH 0x4 /* * Put an arbitrary upper limit on complexity of functions to * prevent bogus data files (or the gcc 3.2 format which we don't * yet parse) from causing us to eat all swap in a tight loop. */ #define BBG_MAX_BLOCKS (64 * 1024) #define BBG_MAX_ARCS (64 * 1024) /* * The bbg_failed*() macros are for debugging problems with .bbg files. */ #define bbg_failed0(fmt) \ { \ dprintf1(D_BBG, "BBG:%d, " fmt "\n", __LINE__); \ return FALSE; \ } #define bbg_failed1(fmt, a1) \ { \ dprintf2(D_BBG, "BBG:%d, " fmt "\n", __LINE__, a1); \ return FALSE; \ } #define bbg_failed2(fmt, a1, a2) \ { \ dprintf3(D_BBG, "BBG:%d, " fmt "\n", __LINE__, a1, a2); \ return FALSE; \ } /* * Skip some pointless crap seen in Fedora Core 1: a per-function * header with the function name, which duplicates the info in * the .bb file which is also present. This rubbish is seen in * both the .bbg and .da files. Returns TRUE if header correct, * FALSE if broken and EOF on EOF. */ int cov_file_t::skip_oldplus_func_header(covio_t *io, const char *prefix) { gnb_u32_t crud; estring funcname; if (!io->read_u32(crud)) return EOF; if (crud != BBG_SEPARATOR) bbg_failed1("expecting separator, got %u", crud); if (!io->read_string(funcname)) bbg_failed0("short file"); dprintf2(D_BBG, "%sskipping function name: \"%s\"\n", prefix, funcname.data()); if (!io->read_u32(crud)) bbg_failed0("short file"); if (crud != BBG_SEPARATOR) bbg_failed1("expecting separator, got %u", crud); if (!io->read_u32(crud)) bbg_failed0("short file"); dprintf2(D_BBG, "%sskipping function flags(?): 0x%08x\n", prefix, crud); return TRUE; } gboolean cov_file_t::read_old_bbg_function(covio_t *io) { gnb_u32_t nblocks, totnarcs, narcs; gnb_u32_t bidx, aidx; gnb_u32_t dest, flags; gnb_u32_t sep; cov_arc_t *a; cov_function_t *fn; dprintf0(D_BBG, "BBG reading function\n"); if ((features_ & FF_OLDPLUS)) { switch (skip_oldplus_func_header(io, "BBG ")) { case FALSE: return FALSE; case EOF: return TRUE; } } if (!io->read_u32(nblocks)) { if ((features_ & FF_OLDPLUS)) bbg_failed0("short file"); return TRUE; /* end of file */ } if (!io->read_u32(totnarcs)) bbg_failed0("short file"); if (nblocks > BBG_MAX_BLOCKS) bbg_failed2("nblocks=%u > %u", nblocks, BBG_MAX_BLOCKS); if (totnarcs > BBG_MAX_ARCS) bbg_failed2("totnarcs=%u > %u", totnarcs, BBG_MAX_ARCS); fn = add_function(); for (bidx = 0 ; bidx < nblocks ; bidx++) fn->add_block(); for (bidx = 0 ; bidx < nblocks ; bidx++) { dprintf1(D_BBG, "BBG block %d\n", bidx); if (!io->read_u32(narcs)) bbg_failed0("short file"); if (narcs > BBG_MAX_ARCS) bbg_failed2("narcs=%u > %u", narcs, BBG_MAX_ARCS); for (aidx = 0 ; aidx < narcs ; aidx++) { io->read_u32(dest); if (!io->read_u32(flags)) bbg_failed0("short file"); dprintf7(D_BBG, "BBG arc %u: %u->%u flags %x(%s,%s,%s)\n", aidx, bidx, dest, flags, (flags & BBG_ON_TREE ? "on_tree" : ""), (flags & BBG_FAKE ? "fake" : ""), (flags & BBG_FALL_THROUGH ? "fall_through" : "")); if (dest >= nblocks) bbg_failed2("dest=%u > nblocks=%u", dest, nblocks); a = new cov_arc_t(); a->on_tree_ = !!(flags & BBG_ON_TREE); a->fall_through_ = !!(flags & BBG_FALL_THROUGH); a->call_ = (nblocks >= 2 && dest == nblocks-1 && !a->fall_through_); a->attach(fn->nth_block(bidx), fn->nth_block(dest)); /* * We used to be able to detect function calls with the fake_ flag * from the .bbg file, but that flag went away in braindead versions * of gcc 2.96 so we have to fall back to a more subtle test. The * test relies on the last block in a function being an unreal block * whose purpose is to be the target of all call arcs in the function. * This works with most of the data generated by gcc 2.96, but sometimes * it screws that up too. Note that the commandline "gcov" utility * that comes with gcc 2.96 cannot get any call stats at all. */ if (a->call_) { num_expected_fake_++; if (!(flags & BBG_FAKE)) { num_missing_fake_++; dprintf0(D_BBG, "BBG missing fake flag\n"); } } } } io->read_u32(sep); if (sep != BBG_SEPARATOR) bbg_failed2("sep=0x%08x != 0x%08x", sep, BBG_SEPARATOR); return TRUE; } gboolean cov_file_t::read_old_bbg_file_common(covio_t *io) { io->set_format(covio_t::FORMAT_OLD); io->seek(0L); while (!io->eof()) { if (!read_old_bbg_function(io)) { /* TODO */ fprintf(stderr, "%s: file is corrupted or in a bad file format.\n", io->filename()); return FALSE; } } return TRUE; } gboolean cov_file_t::read_old_bbg_file(covio_t *io) { features_ |= FF_BBFILE; return read_old_bbg_file_common(io); } gboolean cov_file_t::read_oldplus_bbg_file(covio_t *io) { features_ |= FF_BBFILE|FF_OLDPLUS; return read_old_bbg_file_common(io); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * GCOV_TAG_* defines copied from gcc/gcc/gcov-io.h (cvs 20030615) */ /* The record tags. Values [1..3f] are for tags which may be in either file. Values [41..9f] for those in the bbg file and [a1..ff] for the data file. */ #define GCOV_TAG_FUNCTION ((gnb_u32_t)0x01000000) #define GCOV_TAG_BLOCKS ((gnb_u32_t)0x01410000) #define GCOV_TAG_ARCS ((gnb_u32_t)0x01430000) #define GCOV_TAG_LINES ((gnb_u32_t)0x01450000) #define GCOV_TAG_COUNTER_BASE ((gnb_u32_t)0x01a10000) #define GCOV_TAG_OBJECT_SUMMARY ((gnb_u32_t)0xa1000000) #define GCOV_TAG_PROGRAM_SUMMARY ((gnb_u32_t)0xa3000000) static const struct { const char *name; gnb_u32_t value; } gcov_tags[] = { {"GCOV_TAG_FUNCTION", GCOV_TAG_FUNCTION}, {"GCOV_TAG_BLOCKS", GCOV_TAG_BLOCKS}, {"GCOV_TAG_ARCS", GCOV_TAG_ARCS}, {"GCOV_TAG_LINES", GCOV_TAG_LINES}, {"GCOV_TAG_COUNTER_BASE", GCOV_TAG_COUNTER_BASE}, {"GCOV_TAG_OBJECT_SUMMARY", GCOV_TAG_OBJECT_SUMMARY}, {"GCOV_TAG_PROGRAM_SUMMARY", GCOV_TAG_PROGRAM_SUMMARY}, {0, 0} }; static const char * gcov_tag_as_string(gnb_u32_t tag) { int i; for (i = 0 ; gcov_tags[i].name != 0 ; i++) { if (gcov_tags[i].value == tag) return gcov_tags[i].name; } return "unknown"; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * If `relpath' matches the tail part of `abspath', * return the number of characters from `abspath' * which *preceed* the match. Otherwise, return -1. */ static int path_is_suffix(const char *abspath, const char *relpath) { unsigned int rellen = strlen(relpath); unsigned int abslen = strlen(abspath); if (rellen < abslen && abspath[abslen-rellen-1] == '/' && !strcmp(abspath+abslen-rellen, relpath)) return abslen-rellen-1; return -1; } void cov_file_t::infer_compilation_directory(const char *path) { int clen; dprintf1(D_BBG, "infer_compilation_directory(\"%s\")\n", path); /* * If used without the -o option, flex generates #lines like * * #line 3 "" * * which results in a filename of "" in the .gcno file. * We're not going to get anywhere useful with this, so there's * little point trying and complaining. */ if (!strcmp(path, "")) return; string_var normpath = file_normalise(path); path = normpath.data(); if (path[0] == '/' && (clen = path_is_suffix(path, relpath_)) > 0) { /* * `path' is an absolute path whose tail is * identical to `relpath_', so we can infer that * the compiledir is the remainder of `path'. */ compiledir_ = g_strndup(path, clen); dprintf1(D_BBG, "compiledir_=\"%s\"\n", compiledir_.data()); return; } if (path[0] != '/' && (clen = path_is_suffix(name_, path)) > 0) { /* * `path' is a relative path whose last element is * identical to the last element of `relpath_', so * we infer (possibly ambiguously) that path_ is the * relative path seen by the compiler at compiletime * and thus the compiledir is the absolute path `name_' * with `path' removed from its tail. */ compiledir_ = g_strndup(name_, clen); dprintf1(D_BBG, "compiledir_=\"%s\"\n", compiledir_.data()); return; } /* This might be a problem...but probably not */ dprintf2(D_BBG, "Could not calculate compiledir for %s from location %s\n", name_.data(), path); } char * cov_file_t::make_absolute(const char *filename) const { if (compiledir_ != (const char *)0) return file_make_absolute_to_dir(filename, compiledir_); if (*filename != '/') dprintf1(D_BBG, "Warning: no compiledir when converting " "path \"%s\" to absolute, trying plan B\n", filename); return file_make_absolute_to_file(filename, name_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static gboolean decode_new_version(gnb_u32_t ver, unsigned int *major, unsigned int *minor, unsigned char *rel) { unsigned char b; b = (ver>>24) & 0xff; if (!isdigit(b)) return FALSE; *major = b - '0'; b = (ver>>16) & 0xff; if (!isdigit(b)) return FALSE; *minor = b - '0'; b = (ver>>8) & 0xff; if (!isdigit(b)) return FALSE; *minor = (*minor * 10) + (b - '0'); b = (ver) & 0xff; if (!isalnum(b) && b != '*') return FALSE; *rel = b; return TRUE; } gboolean cov_file_t::read_gcc3_bbg_file(covio_t *io, gnb_u32_t expect_version, covio_t::format_t ioformat) { gnb_u32_t tag, length; cov_function_t *fn = 0; estring filename, funcname; gnb_u32_t tmp; unsigned int nblocks = 0; gnb_u32_t bidx, last_bidx = 0; unsigned int nlines = 0; cov_arc_t *a; gnb_u32_t dest, flags; gnb_u32_t line, last_line = 0; unsigned int len_unit = 1; gnb_u64_t funcid = 0; io->set_format(ioformat); if (!io->read_u32(format_version_)) bbg_failed0("short file"); switch (format_version_) { case _NEW_VERSION(3,3,'S'): /* SUSE crud */ features_ |= FF_DAMANGLED; /* fall through */ case _NEW_VERSION(3,3,'M'): /* Mandrake crud */ case BBG_VERSION_GCC33: if (expect_version != BBG_VERSION_GCC33) bbg_failed1("unexpected version=0x%08x", format_version_); break; case _NEW_VERSION(4,0,'*'): case _NEW_VERSION(4,0,'R'): case _NEW_VERSION(4,0,'U'): /* Ubuntu Dapper Drake */ case _NEW_VERSION(4,0,'A'): /* Apple MacOS X*/ case _NEW_VERSION(4,1,'*'): case _NEW_VERSION(4,1,'p'): /* Ubuntu Edgy */ case _NEW_VERSION(4,3,'*'): case _NEW_VERSION(4,4,'*'): case _NEW_VERSION(4,5,'*'): case _NEW_VERSION(4,6,'p'): /* pre-release in Debian Wheezy */ case _NEW_VERSION(4,6,'*'): case _NEW_VERSION(4,6,'U'): /* Ubuntu Oneiric */ features_ |= FF_DA0TAG; /* fall through */ case _NEW_VERSION(3,4,'U'): /* Ubuntu */ case _NEW_VERSION(3,4,'R'): /* RedHat */ case _NEW_VERSION(3,4,'M'): /* Mandrake crud */ features_ |= FF_FUNCIDS; /* fall through */ case BBG_VERSION_GCC34: features_ |= FF_TIMESTAMP; if (expect_version != BBG_VERSION_GCC34) bbg_failed1("unexpected version=0x%08x", format_version_); break; default: unsigned int major, minor; unsigned char rel; if (!decode_new_version(format_version_, &major, &minor, &rel)) fprintf(stderr, "%s: undecodable compiler version %08x, " "probably corrupted file\n", io->filename(), format_version_); else fprintf(stderr, "%s: unsupported compiler version %u.%u(%c), " "contact author for support\n", io->filename(), major, minor, rel); return FALSE; } if ((features_ & FF_TIMESTAMP)) { io->read_u32(tmp); /* ignore the timestamp */ /* TODO: should really do something useful with this */ len_unit = 4; /* records lengths are in 4-byte units now */ } while (io->read_u32(tag)) { if (!io->read_u32(length)) bbg_failed0("short file"); length *= len_unit; dprintf3(D_BBG, "tag=0x%08x (%s) length=%u\n", tag, gcov_tag_as_string(tag), length); switch (tag) { case GCOV_TAG_FUNCTION: if ((features_ & FF_FUNCIDS)) { estring filename; if (!io->read_u64(funcid) || !io->read_string(funcname) || !io->read_string(filename) || !io->read_u32(tmp)/* this seems to be a line number */) bbg_failed0("short file"); if (compiledir_ == (const char *)0) infer_compilation_directory(filename); } else { if (!io->read_string(funcname) || !io->read_u32(tmp)/* ignore the checksum */) bbg_failed0("short file"); } funcname = demangle(funcname); funcname = normalise_mangled(funcname); fn = add_function(); fn->set_name(funcname); if (funcid != 0) fn->set_id(funcid); dprintf1(D_BBG, "added function \"%s\"\n", funcname.data()); nblocks = 0; break; case GCOV_TAG_BLOCKS: if (fn == 0) bbg_failed0("no FUNCTION tag seen"); if (nblocks > 0) bbg_failed0("duplicate BLOCKS tag"); nblocks = length/4; for (bidx = 0 ; bidx < nblocks ; bidx++) fn->add_block(); /* skip the per-block flags */ io->skip(length); break; case GCOV_TAG_ARCS: if (!io->read_u32(bidx)) bbg_failed0("short file"); for (length -= 4 ; length > 0 ; length -= 8) { if (!io->read_u32(dest) || !io->read_u32(flags)) bbg_failed0("short file"); dprintf6(D_BBG, "BBG arc %u->%u flags %x(%s,%s,%s)\n", bidx, dest, flags, (flags & BBG_ON_TREE ? "on_tree" : ""), (flags & BBG_FAKE ? "fake" : ""), (flags & BBG_FALL_THROUGH ? "fall_through" : "")); if (dest >= nblocks) bbg_failed2("dest=%u > nblocks=%u", dest, nblocks); a = new cov_arc_t(); a->fall_through_ = !!(flags & BBG_FALL_THROUGH); /* * The FAKE flag is used both for calls and exception handling, * so we can't rely on it exclusively to determine calls. * * Note that the FAKE flag appears to be reliably present again * from at least gcc 3.4. However FALL_THROUGH becomes unreliable * at gcc 4.1.1, which will emit an arc (N-2 -> N-1, !FALL_THROUGH) * for a "return" statement which the last line in a function. */ a->call_ = (dest == nblocks-1 && (flags & BBG_FAKE)); a->on_tree_ = !!(flags & BBG_ON_TREE); a->attach(fn->nth_block(bidx), fn->nth_block(dest)); } break; case GCOV_TAG_LINES: if (!io->read_u32(bidx)) bbg_failed0("short file"); if (bidx >= nblocks) bbg_failed2("bidx=%u > nblocks=%u", bidx, nblocks); if (bidx > 0 && bidx < nblocks-1) { /* may need to interpolate some block->line assignments */ for (last_bidx++ ; last_bidx < bidx ; last_bidx++) { dprintf0(D_BBG, "BBG interpolating line:\n"); add_location(fn->nth_block(last_bidx), filename, last_line); } } nlines = 0; while (io->read_u32(line)) { if (line == 0) { estring s; if (!io->read_string(s)) bbg_failed0("short file"); if (s.length() == 0) { /* end of LINES block */ break; } if (compiledir_ == (const char *)0) infer_compilation_directory(s); filename = make_absolute(s); } else { add_location(fn->nth_block(bidx), filename, line); nlines++; last_line = line; } } last_bidx = bidx; break; default: fprintf(stderr, "%s: skipping unknown tag 0x%08x\n", io->filename(), tag); io->skip(length); break; } } return TRUE; } gboolean cov_file_t::read_gcc33_bbg_file(covio_t *io) { return read_gcc3_bbg_file(io, BBG_VERSION_GCC33, covio_t::FORMAT_GCC33); } gboolean cov_file_t::read_gcc34l_bbg_file(covio_t *io) { return read_gcc3_bbg_file(io, BBG_VERSION_GCC34, covio_t::FORMAT_GCC34L); } gboolean cov_file_t::read_gcc34b_bbg_file(covio_t *io) { return read_gcc3_bbg_file(io, BBG_VERSION_GCC34, covio_t::FORMAT_GCC34B); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_file_t::read_bbg_file(covio_t *io) { dprintf1(D_FILES, "Reading .bbg file \"%s\"\n", io->filename()); return (this->*(format_->read_bbg_))(io); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const cov_file_t::format_rec_t cov_file_t::formats[] = { { "gcno", 4, &cov_file_t::read_gcc34b_bbg_file, &cov_file_t::read_gcc34b_da_file, "gcc 3.4 or 4.0 .gcno (big-endian) format" }, { "oncg", 4, &cov_file_t::read_gcc34l_bbg_file, &cov_file_t::read_gcc34l_da_file, "gcc 3.4 or 4.0 .gcno (little-endian) format" }, { "gbbg", 4, &cov_file_t::read_gcc33_bbg_file, &cov_file_t::read_gcc33_da_file, "gcc 3.3 .bbg format" }, { "\x01\x00\x00\x80", 4, &cov_file_t::read_oldplus_bbg_file, &cov_file_t::read_oldplus_da_file, "old .bbg format plus function names (e.g. Fedora Core 1)" }, { 0, 0, &cov_file_t::read_old_bbg_file, &cov_file_t::read_old_da_file, "old .bbg format" }, }; #define MAX_MAGIC_LEN 4 gboolean cov_file_t::discover_format(covio_t *io) { char magic[MAX_MAGIC_LEN]; const format_rec_t *fmt; dprintf1(D_FILES, "Detecting format of .bbg file \"%s\"\n", io->filename()); if (io->read(magic, MAX_MAGIC_LEN) != MAX_MAGIC_LEN) { /* TODO */ fprintf(stderr, "%s: short file while reading magic number\n", io->filename()); return FALSE; } for (fmt = formats ; fmt->magic_ != 0 ; fmt++) { if (!memcmp(magic, fmt->magic_, fmt->magic_len_)) break; } dprintf1(D_FILES, "Detected %s\n", fmt->description_); format_ = fmt; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_file_t::read_old_da_file(covio_t *io) { gnb_u64_t nents; gnb_u64_t ent; unsigned int fnidx; unsigned int bidx; list_iterator_t aiter; io->set_format(covio_t::FORMAT_OLD); io->read_u64(nents); for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) { cov_function_t *fn = nth_function(fnidx); for (bidx = 0 ; bidx < fn->num_blocks() ; bidx++) { cov_block_t *b = fn->nth_block(bidx); for (aiter = b->out_arc_iterator() ; aiter != (cov_arc_t *)0 ; ++aiter) { cov_arc_t *a = *aiter; if (a->on_tree_) continue; /* TODO: check that nents is correct */ if (!io->read_u64(ent)) { fprintf(stderr, "%s: short file\n", io->filename()); return FALSE; } if (debug_enabled(D_DA)) { string_var fromdesc = a->from()->describe(); string_var todesc = a->to()->describe(); duprintf3("DA arc {from=%s to=%s} count=%llu\n", fromdesc.data(), todesc.data(), ent); } a->set_count(ent); } } } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * The da_failed*() macros are for debugging problems with .da files. */ #define da_failed0(fmt) \ { \ dprintf1(D_DA, "da:%d, " fmt "\n", __LINE__); \ return FALSE; \ } #define da_failed1(fmt, a1) \ { \ dprintf2(D_DA, "da:%d, " fmt "\n", __LINE__, a1); \ return FALSE; \ } #define da_failed2(fmt, a1, a2) \ { \ dprintf3(D_DA, "da:%d, " fmt "\n", __LINE__, a1, a2); \ return FALSE; \ } #define DA_OLDPLUS_MAGIC 0x8000007b gboolean cov_file_t::read_oldplus_da_file(covio_t *io) { gnb_u32_t crud; gnb_u32_t file_narcs; gnb_u64_t ent; unsigned int fnidx; unsigned int bidx; unsigned int actual_narcs; list_iterator_t aiter; io->set_format(covio_t::FORMAT_OLD); /* * I haven't yet looked in the FC1 gcc source to figure out what * it's writing in the .da header...this is reverse engineered. */ if (!io->read_u32(crud)) da_failed0("short file"); if (crud != DA_OLDPLUS_MAGIC) da_failed2("bad magic, expecting 0x%08x got 0x%08x\n", DA_OLDPLUS_MAGIC, crud); if (!io->read_u32(crud)) da_failed0("short file"); if (crud != num_functions()) da_failed2("bad num functions, expecting %d got %d\n", num_functions(), crud); if (!io->read_u32(crud) || !io->skip(crud)) da_failed0("short file"); for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) { cov_function_t *fn = nth_function(fnidx); if (!skip_oldplus_func_header(io, "DA ")) return FALSE; if (!io->read_u32(file_narcs)) da_failed0("short file"); actual_narcs = 0; for (bidx = 0 ; bidx < fn->num_blocks() ; bidx++) { cov_block_t *b = fn->nth_block(bidx); for (aiter = b->out_arc_iterator() ; aiter != (cov_arc_t *)0 ; ++aiter) { cov_arc_t *a = *aiter; if (a->on_tree_) continue; if (++actual_narcs > file_narcs) da_failed2("bad num arcs, expecting %d got >= %d\n", file_narcs, actual_narcs); if (!io->read_u64(ent)) da_failed0("short file"); if (debug_enabled(D_DA)) { string_var fromdesc = a->from()->describe(); string_var todesc = a->to()->describe(); duprintf3("DA arc {from=%s to=%s} count=%llu\n", fromdesc.data(), todesc.data(), ent); } a->set_count(ent); } } if (actual_narcs != file_narcs) da_failed2("bad num arcs, expecting %d got %d\n", file_narcs, actual_narcs); } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define _DA_MAGIC(a,b,c,d) \ (((gnb_u32_t)a<<24)| \ ((gnb_u32_t)b<<16)| \ ((gnb_u32_t)c<<8)| \ ((gnb_u32_t)d)) #define DA_GCC34_MAGIC _DA_MAGIC('g','c','d','a') /* also 4.0 */ #define DA_GCC33_MAGIC _DA_MAGIC('g','c','o','v') gboolean cov_file_t::read_gcc3_da_file(covio_t *io, gnb_u32_t expect_magic, covio_t::format_t ioformat) { gnb_u32_t magic, version; gnb_u32_t tag, length; cov_function_t *fn = 0; gnb_u64_t count; gnb_u32_t tmp; unsigned int bidx; list_iterator_t aiter; unsigned int len_unit = 1; io->set_format(ioformat); if (!io->read_u32(magic) || !io->read_u32(version)) da_failed0("short file"); if (magic != expect_magic) da_failed2("bad magic=0x%08x != 0x%08x", magic, expect_magic); if (version != format_version_) da_failed2("bad version=0x%08x != 0x%08x", version, format_version_); if ((features_ & FF_TIMESTAMP)) { if (!io->read_u32(tmp)) /* ignore timestamp */ da_failed0("short file"); len_unit = 4; /* record lengths are in 4-byte units */ } while (io->read_u32(tag)) { if (tag == 0 && ((features_ & FF_DA0TAG))) break; /* end of file */ if (!io->read_u32(length)) da_failed0("short file"); length *= len_unit; dprintf3(D_DA, "tag=0x%08x (%s) length=%u\n", tag, gcov_tag_as_string(tag), length); switch (tag) { case GCOV_TAG_FUNCTION: if ((features_ & FF_FUNCIDS)) { gnb_u64_t funcid; if (!io->read_u64(funcid)) fn = 0; else if ((fn = functions_by_id_->lookup(&funcid)) == 0) da_failed1("unexpected function id %llu", (unsigned long long)funcid); } else { estring funcname; if (!io->read_string(funcname)) da_failed0("short file"); if ((features_ & FF_DAMANGLED)) funcname = demangle(funcname); funcname = normalise_mangled(funcname); fn = find_function(funcname); if (fn == 0) da_failed1("unexpected function name \"%s\"", funcname.data()); io->read_u32(tmp); /* ignore the checksum */ } break; case GCOV_TAG_COUNTER_BASE: if (fn == 0) da_failed0("missing FUNCTION or duplicate COUNTER_BASE tags"); for (bidx = 0 ; bidx < fn->num_blocks() ; bidx++) { cov_block_t *b = fn->nth_block(bidx); for (aiter = b->out_arc_iterator() ; aiter != (cov_arc_t *)0 ; ++aiter) { cov_arc_t *a = *aiter; if (a->on_tree_) continue; if (!io->read_u64(count)) da_failed0("short file"); if (debug_enabled(D_DA)) { string_var fromdesc = a->from()->describe(); string_var todesc = a->to()->describe(); duprintf3("DA arc {from=%s to=%s} count=%llu\n", fromdesc.data(), todesc.data(), count); } a->set_count(count); } } fn = 0; break; default: fprintf(stderr, "%s: skipping unknown tag 0x%08x\n", io->filename(), tag); /* fall through */ case GCOV_TAG_OBJECT_SUMMARY: case GCOV_TAG_PROGRAM_SUMMARY: io->skip(length); break; } } return TRUE; } gboolean cov_file_t::read_gcc33_da_file(covio_t *io) { return read_gcc3_da_file(io, DA_GCC33_MAGIC, covio_t::FORMAT_GCC33); } gboolean cov_file_t::read_gcc34b_da_file(covio_t *io) { return read_gcc3_da_file(io, DA_GCC34_MAGIC, covio_t::FORMAT_GCC34B); } gboolean cov_file_t::read_gcc34l_da_file(covio_t *io) { return read_gcc3_da_file(io, DA_GCC34_MAGIC, covio_t::FORMAT_GCC34L); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_file_t::read_da_file(covio_t *io) { dprintf1(D_FILES, "Reading runtime data file \"%s\"\n", io->filename()); return (this->*(format_->read_da_))(io); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #ifdef HAVE_LIBBFD gboolean cov_file_t::o_file_add_call( const cov_location_t *loc, const char *callname_dem) { cov_line_t *ln; const GList *iter; cov_block_t *pure_candidate = 0; if ((ln = cov_line_t::find(loc)) == 0) { fprintf(stderr, "No blocks for call to %s at %s:%ld\n", callname_dem, loc->filename, loc->lineno); return FALSE; } for (iter = ln->blocks() ; iter != 0 ; iter = iter->next) { cov_block_t *b = (cov_block_t *)iter->data; /* * Multiple blocks on the same line, the first doesn't * do the call: skip until we find the one that does. * Also, multiple blocks with calls in the same statement * (line numbers are only recorded at the start of the * statement); both the blocks and relocs are ordered, * so assume it's 1:1 and skip blocks which already have * a call name recorded. This breaks if the statement * mixes calls to static and extern functions. */ if (b->needs_call()) { if (debug_enabled(D_CGRAPH)) { string_var desc = b->describe(); duprintf1(" block %s\n", desc.data()); } b->add_call(callname_dem, loc); return TRUE; } if (debug_enabled(D_CGRAPH)) { string_var desc = b->describe(); duprintf1(" skipping block %s\n", desc.data()); } if (pure_candidate == 0) pure_candidate = b; } /* * Maybe it's a pure call from one of the blocks on the line * that we skipped. There's no way to know for sure from the * information in the object file, so guess that the first * block we skipped is the one. If you want block-accurate * callgraph data, use the 12bp file! */ if (pure_candidate != 0) { pure_candidate->add_call(callname_dem, loc); return TRUE; } /* * Something is badly wrong if we get here: at least one of * the blocks on the line should have needed a call and none * did. Either the .o file is out of sync with the .bb or * .bbg files, or we've encountered the braindead gcc 2.96. */ fprintf(stderr, "Could not assign block for call to %s at %s:%ld\n", callname_dem, loc->filename, loc->lineno); return FALSE; } /* * Use the BFD library to scan relocation records in the .o file. */ gboolean cov_file_t::scan_o_file_calls(covio_t *io) { cov_bfd_t *cbfd; cov_call_scanner_t *cs; gboolean ret = FALSE; dprintf1(D_FILES, "Reading .o file \"%s\"\n", io->filename()); if ((cbfd = new(cov_bfd_t)) == 0 || !cbfd->open(io->filename(), io->take()) || cbfd->num_symbols() == 0) { delete cbfd; return FALSE; } cov_factory_t factory; do { dprintf1(D_FILES, "Trying scanner %s\n", factory.name()); if ((cs = factory.create()) != 0 && cs->attach(cbfd)) break; delete cs; cs = 0; } while (factory.next()); if (cs != 0) { int r; cov_call_scanner_t::calldata_t cdata; while ((r = cs->next(&cdata)) == 1) { cov_location_t loc = cdata.location; loc.filename = make_absolute(loc.filename); o_file_add_call(&loc, cdata.callname); g_free(loc.filename); } delete cs; ret = (r == 0); /* 0=>successfully finished scan */ } delete cbfd; return ret; } gboolean cov_file_t::read_o_file(covio_t *io) { unsigned int fnidx; if (!scan_o_file_calls(io)) return TRUE; /* this info is optional */ /* * Calls can fail to be reconciled for perfectly harmless * reasons (e.g. the code uses function pointers) so don't * fail if reconciliation fails. * TODO: record the failure in the cov_function_t. */ for (fnidx = 0 ; fnidx < num_functions() ; fnidx++) nth_function(fnidx)->reconcile_calls(); return TRUE; } #endif /* HAVE_LIBBFD */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ class cov_file_src_parser_t : public cpp_parser_t { private: cov_file_t *file_; unsigned int is_suppressed_; /* mask of active suppression types */ hashtable_t *active_ranges_; static void check_one_ifdef(const char *key, cov_suppression_t *s, void *closure) { cov_file_src_parser_t *self = (cov_file_src_parser_t *)closure; if (self->depends(key)) self->is_suppressed_ |= (1<lines_->length() && (ln = file_->lines_->nth(lineno()-1)) != 0) { dprintf1(D_CPP|D_VERBOSE, "post_line: suppressing %u\n", is_suppressed_); ln->suppress(); } /* line suppression is one-shot */ is_suppressed_ &= ~(1<word_.data(), s->word2_.data()); if (active_ranges_ == 0) { active_ranges_ = new hashtable_t; active_ranges_->insert(s->word2_, s); } else if (active_ranges_->lookup(s->word2_) == 0) { active_ranges_->insert(s->word2_, s); } is_suppressed_ |= (1<lookup(text)) != 0) { /* comment ends an active range */ active_ranges_->remove(text); dprintf2(D_CPP, "handle_comment: ending range %s-%s\n", s->word_.data(), s->word2_.data()); if (active_ranges_->size() == 0) { /* * Removed last active range; stop suppressing * by range, but suppress this line so the range * is inclusive of the closing magical comment line */ is_suppressed_ &= ~(1<name()), file_(f), is_suppressed_(0), active_ranges_(0) { } ~cov_file_src_parser_t() { delete active_ranges_; } }; gboolean cov_file_t::read_src_file() { cov_file_src_parser_t parser(this); if (!parser.parse()) return FALSE; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_file_t::search_path_append(const char *dir) { search_path_.append(g_strdup(dir)); } void cov_file_t::set_gcda_prefix(const char *dir) { gcda_prefix_ = dir; } covio_t * cov_file_t::try_file(const char *fn, const char *ext) const { string_var ofilename = fn, dfilename; if (ext[0] == '+') dfilename = g_strconcat(ofilename, ext+1, (char *)0); else dfilename = file_change_extension(ofilename, 0, ext); dprintf1(D_FILES|D_VERBOSE, " try %s\n", dfilename.data()); if (file_is_regular(dfilename) < 0) return 0; covio_t *io = new covio_t(dfilename); if (!io->open_read()) { int e = errno; perror(dfilename); delete io; errno = e; return 0; } return io; } covio_t * cov_file_t::find_file(const char *ext, gboolean quiet, const char *prefix) const { list_iterator_t iter; covio_t *io; dprintf2(D_FILES|D_VERBOSE, "Searching for %s file matching %s\n", ext, file_basename_c(name())); if (prefix) { /* * First try the prefix. */ string_var fn = g_strconcat(prefix, name(), (char *)0); if ((io = try_file(fn, ext)) != 0) return io; } /* * Then try the same directory as the source file. */ if ((io = try_file(name(), ext)) != 0) return io; /* * Now look in the search path. */ for (iter = search_path_.first() ; iter != (char *)0 ; ++iter) { string_var fn = g_strconcat(*iter, "/", file_basename_c(name()), (char *)0); if ((io = try_file(fn, ext)) != 0) return io; } if (!quiet) { int e = errno; file_missing(ext, 0); errno = e; } return 0; } void cov_file_t::file_missing(const char *ext, const char *ext2) const { list_iterator_t iter; string_var dir = file_dirname(name()); string_var which = (ext2 == 0 ? g_strdup("") : g_strdup_printf(" or %s", ext2)); fprintf(stderr, "Couldn't find %s%s file for %s in path:\n", ext, which.data(), file_basename_c(name())); fprintf(stderr, " %s\n", dir.data()); for (iter = search_path_.first() ; iter != (char *)0 ; ++iter) fprintf(stderr, " %s\n", *iter); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_file_t::read(gboolean quiet) { string_var filename; const char *da_ext = ".da"; covio_var io; if ((io = find_file(".bbg", TRUE, 0)) == 0) { /* The .bbg file was gratuitously renamed .gcno in gcc 3.4 */ if ((io = find_file(".gcno", TRUE, 0)) == 0) { if (!quiet) file_missing(".bbg", ".gcno"); return FALSE; } /* The .da file was renamed too */ da_ext = ".gcda"; } if (!discover_format(io)) return FALSE; if (!read_bbg_file(io)) return FALSE; /* * In the new formats, the information from the .bb file has been * merged into the .bbg file, so only read the .bb for the old format. */ if ((features_ & FF_BBFILE)) { if ((io = find_file(".bb", quiet, 0)) == 0 || !read_bb_file(io)) return FALSE; } /* * We can successfully read a .gcno, all of whose locations * refer to *other* files. This happens for example when * we've done a directory walk and discovered both of foo.c * and foo.y where foo.c is generated from foo.y. In this * case we want to silently ignore foo.c. */ if (!has_locations_) { dprintf1(D_FILES, "Ignoring file %s because it has no locations\n", name_.data()); return FALSE; } /* TODO: read multiple .da files from the search path & accumulate */ if ((io = find_file(da_ext, quiet, gcda_prefix_)) == 0) { if (errno != ENOENT) return FALSE; zero_arc_counts(); } else if (!read_da_file(io)) return FALSE; if (cov_suppression_t::count() != 0 && !read_src_file()) { static const char warnmsg[] = "could not scan source file for cpp conditionals or comments, " "reports may be inaccurate.\n"; /* TODO: save and report in alert to user */ fprintf(stderr, "%s: WARNING: %s", name(), warnmsg); } /* * If the data files were written by broken versions of gcc 2.96 * the callgraph will be irretrievably broken and there's no point * at all trying to read the object file. */ #ifdef HAVE_LIBBFD if (gcc296_braindeath()) { static const char warnmsg[] = "data files written by a broken gcc 2.96; the Calls " "statistics and the contents of the Calls, Call Butterfly and " "Call Graph windows will be incomplete. Skipping object " "file.\n" ; /* TODO: save and report in alert to user */ /* TODO: update the message to point out that line stats are fine */ fprintf(stderr, "%s: WARNING: %s", name(), warnmsg); } else { /* * The data we get from object files is optional, a user can * still get lots of value from ggcov with the remainder of the * files. So if we can't find the object or can't read it, * complain and keep going. */ if ((io = find_file(".o", quiet, 0)) == 0 || !read_o_file(io)) { static const char warnmsg[] = "could not find or read matching object file; the contents " "of the Calls, Call Butterfly and Call Graph windows may " "be inaccurate or incomplete.\n" ; /* TODO: save and report in alert to user */ fprintf(stderr, "%s: WARNING: %s", name(), warnmsg); } } #endif if (!solve()) return FALSE; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_arc.H0000644000175000017500000000653211557262605012104 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_arc_H_ #define _ggcov_cov_arc_H_ 1 #include "string_var.H" class cov_file_t; class cov_function_t; class cov_block_t; class cov_arc_t { public: const char * name() const { return name_; } count_t count() const { return count_; } unsigned int aindex() const { return idx_; } boolean is_call() const { return call_; } boolean is_fall_through() const { return fall_through_; } const char *call_name() const { return name_; } const cov_location_t *call_location() const { /* * Experiment indicates that gcc always allocates basic blocks * which contain a call such that the call is the last part * of the block. Thus we can avoid storing the call location * explicitly, even though we do get it from either the object * file scan or the 12bp file. * * Actually this isn't true of calls to functions marked * with attribute((pure)), which don't cause a bb break but * are instead subject to optimisation within a bb. However * gcc doesn't instrument those calls, so there's point trying * to handle them. */ return from_->get_last_location(); } cov_block_t * from() const { return from_; } cov_block_t * to() const { return to_; } const cov_location_t * get_from_location() const { return from_->get_first_location(); } boolean is_suppressed() const; cov::status_t status() { if (is_suppressed()) return cov::SUPPRESSED; else if (count_) return cov::COVERED; else return cov::UNCOVERED; } void finalise(); private: cov_arc_t(); void attach(cov_block_t *from, cov_block_t *to); ~cov_arc_t(); void suppress() { suppressed_ = true; } void set_count(count_t count); static count_t total(const list_t &list); static cov_arc_t *find_invalid(const list_t &list, gboolean may_be_call); cov_block_t *from_, *to_; unsigned int idx_; /* serial number in from->out_arcs */ count_t count_; string_var name_; /* name of function called (if known) or NULL */ boolean on_tree_:1; boolean call_:1; boolean fall_through_:1; boolean count_valid_:1; boolean suppressed_:1; friend class cov_file_t; friend class cov_function_t; friend class cov_block_t; friend void dump_arc(FILE *, cov_arc_t *a); }; #endif /* _ggcov_cov_arc_H_ */ ggcov-0.8.4/src/hashtabletest.c0000644000175000017500000001150511557262605013352 00000000000000#include "filename.h" #include "string_var.H" #include "hashtable.H" struct pairx { string_var name_; int x_; pairx(const char *name, int x) : name_(name), x_(x) { } }; const char *argv0; extern int end; int verbose = 0; // static int // is_heap(const void *x) // { // return (x > (void *)&end); // } static inline void __check(int res, const char *expr, const char *file, int line) { if (verbose) fprintf(stderr, "%s:%d: checking %s\n", file, line, expr); if (!res) { fprintf(stderr, "%s:%d: check FAILED: %s\n", file, line, expr); abort(); } } #define check(expr) __check(!!(expr), #expr, __FILE__, __LINE__) static inline void subtest(const char *desc) { if (verbose) fprintf(stderr, "=== %s ===\n", desc); } static void test_ctors(void) { hashtable_t *ht = new hashtable_t; check(ht->size() == 0); check(ht->lookup("foo") == 0); delete ht; } static void test_insert_remove(void) { hashtable_t *ht = new hashtable_t; pairx *foo, *bar, *baz; check(ht->size() == 0); check(ht->lookup("foo") == 0); check(ht->lookup("bar") == 0); check(ht->lookup("baz") == 0); foo = new pairx("foo", 1001); ht->insert(foo->name_, foo); check(ht->size() == 1); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == 0); check(ht->lookup("baz") == 0); bar = new pairx("bar", 1002); ht->insert(bar->name_, bar); check(ht->size() == 2); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == bar); check(ht->lookup("baz") == 0); baz = new pairx("baz", 1003); ht->insert(baz->name_, baz); check(ht->size() == 3); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == bar); check(ht->lookup("baz") == baz); ht->remove("bar"); check(ht->size() == 2); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == 0); check(ht->lookup("baz") == baz); ht->remove("baz"); check(ht->size() == 1); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == 0); check(ht->lookup("baz") == 0); ht->remove("foo"); check(ht->size() == 0); check(ht->lookup("foo") == 0); check(ht->lookup("bar") == 0); check(ht->lookup("baz") == 0); delete foo; delete bar; delete baz; delete ht; } static void test_keys(void) { hashtable_t *ht = new hashtable_t; pairx *foo, *bar, *baz; list_t keys; ht->keys(&keys); check(keys.length() == 0); foo = new pairx("foo", 1001); ht->insert(foo->name_, foo); bar = new pairx("bar", 1002); ht->insert(bar->name_, bar); baz = new pairx("baz", 1003); ht->insert(baz->name_, baz); check(ht->size() == 3); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == bar); check(ht->lookup("baz") == baz); ht->keys(&keys); check(keys.length() == 3); unsigned int found = 0x0; int i; for (i = 0 ; i < 3 ; i++) { const char *k = keys.remove_head(); check(k != 0); if (!strcmp(k, "foo")) found |= 0x1; else if (!strcmp(k, "bar")) found |= 0x2; else if (!strcmp(k, "baz")) found |= 0x4; } check(keys.length() == 0); check(found == 0x7); delete foo; delete bar; delete baz; delete ht; } static void test_iterator(void) { hashtable_t *ht = new hashtable_t; pairx *foo, *bar, *baz; foo = new pairx("foo", 1001); ht->insert(foo->name_, foo); bar = new pairx("bar", 1002); ht->insert(bar->name_, bar); baz = new pairx("baz", 1003); ht->insert(baz->name_, baz); check(ht->size() == 3); check(ht->lookup("foo") == foo); check(ht->lookup("bar") == bar); check(ht->lookup("baz") == baz); hashtable_iter_t itr; check(*itr == 0); check(itr.key() == 0); check(itr.value() == 0); check(++itr == FALSE); unsigned int found = 0x0; int i; itr = ht->first(); for (i = 0 ; i < 3 ; i++) { check(itr.key() != 0); check(itr.value() != 0); if (!strcmp(itr.key(), "foo")) { check(itr.value() == foo); found |= 0x1; } else if (!strcmp(itr.key(), "bar")) { check(itr.value() == bar); found |= 0x2; } else if (!strcmp(itr.key(), "baz")) { check(itr.value() == baz); found |= 0x4; } if (i < 2) check(++itr != 0); else check(++itr == 0); } check(itr.key() == 0); check(itr.value() == 0); check(++itr == 0); delete foo; delete bar; delete baz; delete ht; } int main(int argc, char **argv) { argv0 = file_basename_c(argv[0]); if (argc > 1 && !strcmp(argv[1], "--verbose")) verbose++; test_ctors(); test_insert_remove(); test_keys(); test_iterator(); return 0; } ggcov-0.8.4/src/canvas_function_popup.C0000644000175000017500000002121511453570563015061 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" #include "canvas_function_popup.H" #include "summarywin.H" #include "sourcewin.H" #include "ui.h" CVSID("$Id: canvas_function_popup.C,v 1.2 2010-05-09 05:37:14 gnb Exp $"); canvas_function_popup_t::widgets_t canvas_function_popup_t::widgets_; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ canvas_function_popup_t::canvas_function_popup_t( GnomeCanvasItem *item, cov_function_t *fn) : item_(item), function_(fn) { cov_scope_t *scope = new cov_function_scope_t(fn); snprintf(coverage_, sizeof(coverage_), "%lu/%lu %4.2f%%", scope->get_stats()->blocks_executed(), scope->get_stats()->blocks_total(), 100.0 * scope->get_stats()->blocks_fraction()); delete scope; gtk_signal_connect(GTK_OBJECT(item), "event", GTK_SIGNAL_FUNC(on_item_event), this); gtk_signal_connect(GTK_OBJECT(item), "destroy", GTK_SIGNAL_FUNC(on_item_destroy), this); widgets_.refcount_++; } canvas_function_popup_t::~canvas_function_popup_t() { if (--widgets_.refcount_ == 0 && widgets_.popup_ != 0) { gtk_widget_destroy(widgets_.popup_); widgets_.popup_ = 0; gtk_widget_destroy(widgets_.menu_); widgets_.menu_ = 0; } if (widgets_.current_ == this) widgets_.current_ = 0; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_function_popup_t::set_foreground(const char *s) { strncpy(foreground_, s, sizeof(foreground_)); foreground_[sizeof(foreground_)-1] = '\0'; } void canvas_function_popup_t::set_background(const char *s) { strncpy(background_, s, sizeof(background_)); background_[sizeof(background_)-1] = '\0'; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if 0 static const char * describe_event(GnomeCanvas *canvas, const GdkEvent *event) { static char buf[256]; switch (event->type) { case GDK_ENTER_NOTIFY: return "ENTER"; case GDK_LEAVE_NOTIFY: return "LEAVE"; case GDK_MOTION_NOTIFY: int cx, cy; if (canvas != 0) gnome_canvas_w2c(canvas, event->motion.x, event->motion.y, &cx, &cy); int cox, coy; cox = (int)event->motion.x_root - cx; coy = (int)event->motion.y_root - cy; snprintf(buf, sizeof(buf), "MOTION(%g,%g = %u,%u) + %u,%u", event->motion.x, event->motion.y, cx, cy, cox, coy); return buf; case GDK_BUTTON_PRESS: snprintf(buf, sizeof(buf), "BUTTON_PRESS(button=%u)", event->button.button); return buf; case GDK_2BUTTON_PRESS: snprintf(buf, sizeof(buf), "BUTTON_2PRESS(button=%u)", event->button.button); return buf; case GDK_3BUTTON_PRESS: snprintf(buf, sizeof(buf), "BUTTON_3PRESS(button=%u)", event->button.button); return buf; case GDK_BUTTON_RELEASE: snprintf(buf, sizeof(buf), "BUTTON_RELEASE(button=%u)", event->button.button); return buf; default: snprintf(buf, sizeof(buf), "%d", event->type); return buf; } } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_canfn_view_summary_activate(GtkWidget *w, GdkEvent *event, gpointer closure) { // fprintf(stderr, "on_canfn_view_summary_activate:\n"); cov_function_t *fn = canvas_function_popup_t::widgets_.current_->function_; summarywin_t::show_function(fn); } GLADE_CALLBACK void on_canfn_view_call_butterfly_activate(GtkWidget *w, GdkEvent *event, gpointer closure) { fprintf(stderr, "on_canfn_view_call_butterfly_activate:\n"); // cov_function_t *fn = canvas_function_popup_t::widgets_.current_->function_; } GLADE_CALLBACK void on_canfn_view_source_activate(GtkWidget *w, GdkEvent *event, gpointer closure) { // fprintf(stderr, "on_canfn_view_source_activate:\n"); cov_function_t *fn = canvas_function_popup_t::widgets_.current_->function_; sourcewin_t::show_function(fn); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean canvas_function_popup_t::on_button_press_event( GtkWidget *w, GdkEvent *event, gpointer closure) { // fprintf(stderr, "on_button_press_event: %s\n", // describe_event(0, event)); if (event->type == GDK_BUTTON_PRESS && event->button.button == 3) widgets_.current_->show_menu(event); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean canvas_function_popup_t::on_item_event( GnomeCanvasItem *item, GdkEvent *event, gpointer closure) { canvas_function_popup_t *fpop = (canvas_function_popup_t *)closure; #if 0 fprintf(stderr, "on_item_event: %s\n", describe_event(item->canvas, event)); #endif switch (event->type) { case GDK_ENTER_NOTIFY: fpop->show(event); break; default: break; } return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean canvas_function_popup_t::on_leave_event( GtkWidget *window, GdkEvent *event, gpointer closure) { // canvas_function_popup_t *fpop = (canvas_function_popup_t *)closure; // fprintf(stderr, "on_canvas_function_popup_leave_event\n"); gtk_widget_hide(window); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_function_popup_t::on_item_destroy(GnomeCanvasItem *item, gpointer closure) { canvas_function_popup_t *fpop = (canvas_function_popup_t *)closure; delete fpop; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_function_popup_t::show(GdkEvent *event) { GdkColor fg, bg; widgets_t *w = &widgets_; if (w->popup_ == 0) { GladeXML *xml; /* load the interface & connect signals */ xml = ui_load_tree("canvas_function_popup"); w->popup_ = glade_xml_get_widget(xml, "canvas_function_popup"); w->border_ = w->popup_; w->background_ = glade_xml_get_widget(xml, "canfn_eventbox"); w->function_label_ = glade_xml_get_widget(xml, "canfn_function_label"); w->source_label_ = glade_xml_get_widget(xml, "canfn_source_label"); w->coverage_label_ = glade_xml_get_widget(xml, "canfn_coverage_label"); gtk_signal_connect(GTK_OBJECT(w->popup_), "leave_notify_event", GTK_SIGNAL_FUNC(on_leave_event), (gpointer)0); gtk_signal_connect(GTK_OBJECT(w->background_), "button_press_event", GTK_SIGNAL_FUNC(on_button_press_event), (gpointer)0); /* load the interface & connect signals */ xml = ui_load_tree("canvas_function_menu"); w->menu_ = glade_xml_get_widget(xml, "canvas_function_menu"); } w->current_ = this; gtk_label_set_text(GTK_LABEL(w->function_label_), function_->name()); gtk_label_set_text(GTK_LABEL(w->source_label_), function_->file()->minimal_name()); gtk_label_set_text(GTK_LABEL(w->coverage_label_), coverage_); gnome_canvas_get_color(item_->canvas, foreground_, &fg); gtk_widget_modify_bg(w->border_, GTK_STATE_NORMAL, &fg); gtk_widget_modify_fg(w->background_, GTK_STATE_NORMAL, &fg); gnome_canvas_get_color(item_->canvas, background_, &bg); gtk_widget_modify_bg(w->background_, GTK_STATE_NORMAL, &bg); int cx, cy; gnome_canvas_w2c(item_->canvas, event->crossing.x, event->crossing.y, &cx, &cy); cx = (int)item_->x1 + ((int)event->crossing.x_root - cx); cy = (int)item_->y1 + ((int)event->crossing.y_root - cy); // fprintf(stderr, "cx,cy=%u,%u\n", cx, cy); gtk_window_move(GTK_WINDOW(w->popup_), cx, cy); gtk_widget_show(w->popup_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_function_popup_t::show_menu(GdkEvent *event) { gtk_menu_popup(GTK_MENU(widgets_.menu_), /*parent_menu_shell*/0, /*parent_menu_item*/0, (GtkMenuPositionFunc)0, /*data*/(gpointer)0, event->button.button, event->button.time); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/help.c0000644000175000017500000000571011453570563011450 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #include "estring.H" #include "ui.h" CVSID("$Id: help.c,v 1.8 2010-05-09 05:37:15 gnb Exp $"); static GtkWidget *about_window; static GtkWidget *licence_window; static const char licence_str[] = #include "licence.c" ; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_about_close_clicked(GtkWidget *w, gpointer data) { gtk_widget_hide(about_window); } GLADE_CALLBACK void on_licence_close_clicked(GtkWidget *w, gpointer data) { gtk_widget_hide(licence_window); } GLADE_CALLBACK void on_about_licence_clicked(GtkWidget *w, gpointer data) { if (licence_window == 0) { GladeXML *xml = ui_load_tree("licence"); GtkWidget *text; /* GtkText in gtk1.2, GtkTextView in gtk2.0 */ licence_window = glade_xml_get_widget(xml, "licence"); text = glade_xml_get_widget(xml, "licence_text"); ui_text_setup(text); ui_text_begin(text); ui_text_add(text, /*tag*/0, licence_str, sizeof(licence_str)-1); ui_text_end(text); ui_text_ensure_visible(text, 1); /* show the start of the text */ } gtk_widget_show(licence_window); } static const char warranty_str[] = N_("\ GGCov comes with ABSOLUTELY NO WARRANTY.\n\ This is free software and you are welcome\n\ to redistribute it under certain conditions.\n\ For details, press the Licence button.\ "); GLADE_CALLBACK void on_about_activate(GtkWidget *w, gpointer data) { if (about_window == 0) { GladeXML *xml = ui_load_tree("about"); GtkWidget *about_label; char *blurb_proto = 0; about_window = glade_xml_get_widget(xml, "about"); ui_window_set_title(about_window, ""); about_label = glade_xml_get_widget(xml, "about_label"); gtk_label_get(GTK_LABEL(about_label), &blurb_proto); estring blurb; blurb.append_string(blurb_proto); blurb.replace_all("@VERSION@", VERSION); blurb.replace_all("@AUTHOR@", "Greg Banks "); blurb.replace_all("@WARRANTY@", _(warranty_str)); gtk_label_set_text(GTK_LABEL(about_label), blurb.data()); } gtk_widget_show(about_window); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/mvc.c0000644000175000017500000001263711453570563011313 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Derived from ggui code * Copyright (c) 2000-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "mvc.h" CVSID("$Id: mvc.c,v 1.4 2010-05-09 05:37:15 gnb Exp $"); typedef struct mvc_listener_s mvc_listener_t; typedef struct mvc_batch_s mvc_batch_t; struct mvc_listener_s { mvc_listener_t *next; /* chain for same object */ unsigned int features; /* interested only in these features */ mvc_callback_t callback; void *closure; }; struct mvc_batch_s { unsigned int features; }; static GHashTable *listeners; static gboolean batching; static GHashTable *batch; static enum { NONE, LISTEN, UNLISTEN, CHANGED, UNBATCH } state = NONE; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void mvc_listen(void *obj, unsigned int feat, mvc_callback_t proc, void *closure) { mvc_listener_t *ml; // assert(state == NONE); state = LISTEN; ml = new(mvc_listener_t); ml->features = feat; ml->callback = proc; ml->closure = closure; if (listeners == 0) { listeners = g_hash_table_new(g_direct_hash, g_direct_equal); assert(listeners != 0); } else { mvc_listener_t *chain = (mvc_listener_t *)g_hash_table_lookup( listeners, obj); if (chain != 0) { g_hash_table_remove(listeners, obj); ml->next = chain; } } g_hash_table_insert(listeners, obj, ml); state = NONE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void mvc_do_unlisten( void *obj, gboolean all, unsigned int feat, mvc_callback_t proc, void *closure) { mvc_listener_t *ml, *head, *next, *prev, *orig_head; // assert(state == NONE); state = UNLISTEN; orig_head = head = (mvc_listener_t *)g_hash_table_lookup(listeners, obj); prev = 0; for (ml = head ; ml != 0 ; prev = ml, ml = next) { next = ml->next; if (all || (ml->callback == proc && ml->closure == closure)) { ml->features &= ~feat; if (all || ml->features == 0) { /* remove from chain */ if (prev == 0) head = ml->next; else prev->next = ml->next; g_free(ml); } } } if (head != orig_head) { g_hash_table_remove(listeners, obj); g_hash_table_insert(listeners, obj, head); } state = NONE; } void mvc_unlisten(void *obj, unsigned int feat, mvc_callback_t proc, void *closure) { mvc_do_unlisten(obj, /*all*/FALSE, feat, proc, closure); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void mvc_dispatch(void *obj, unsigned int features) { mvc_listener_t *ml; if (listeners == 0) return; /* no listeners on any object */ for (ml = (mvc_listener_t *)g_hash_table_lookup(listeners, obj) ; ml != 0 ; ml = ml->next) { if ((ml->features & features)) (*ml->callback)(obj, features, ml->closure); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void mvc_changed(void *obj, unsigned int features) { // assert(state == NONE); state = CHANGED; if (batching) { mvc_batch_t *mb; if ((mb = (mvc_batch_t *)g_hash_table_lookup(batch, obj)) == 0) { mb = new(mvc_batch_t); mb->features = features; g_hash_table_insert(batch, obj, mb); } else { mb->features |= features; } } else { mvc_dispatch(obj, features); } state = NONE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void mvc_deleted(void *obj) { if (batching) { mvc_batch_t *mb; if ((mb = (mvc_batch_t *)g_hash_table_lookup(batch, obj)) != 0) { fprintf(stderr, "mvc_deleted: object 0x%p deleted with pending 0x%x\n", obj, mb->features); g_hash_table_remove(batch, obj); g_free(mb); } } mvc_do_unlisten(obj, /*all*/TRUE, 0, 0, 0); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void mvc_batch(void) { if (!batching) { if (batch == 0) batch = g_hash_table_new(g_direct_hash, g_direct_equal); batching = TRUE; } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static gboolean mvc_unbatch_1(gpointer key, gpointer value, gpointer user_data) { void *object = (void *)key; mvc_batch_t *mb = (mvc_batch_t *)value; mvc_dispatch(object, mb->features); g_free(mb); return TRUE; /* remove me */ } void mvc_unbatch(void) { // assert(state == NONE); state = UNBATCH; assert(batching); batching = FALSE; g_hash_table_foreach_remove(batch, mvc_unbatch_1, 0); state = NONE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/php_scenegen.H0000644000175000017500000000404611557262605013124 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_php_scenegen_H_ #define _ggcov_php_scenegen_H_ 1 #include "common.h" #include "scenegen.H" #include "php_serializer.H" class php_scenegen_t : public scenegen_t { public: php_scenegen_t(); ~php_scenegen_t(); void noborder(); void border(unsigned int rgb); void nofill(); void fill(unsigned int rgb); void box(double x, double y, double w, double h); void textbox(double x, double y, double w, double h, const char *text); void polyline_begin(gboolean arrow); void polyline_point(double x, double y); void polyline_end(gboolean arrow); void bounds(double x, double y, double w, double h); const estring &data(); private: unsigned int get_color(unsigned int rgb); enum _codes { CODE_COLOR = 1, CODE_RECTANGLE, CODE_TEXT, CODE_POLYLINE, CODE_POLYGON }; php_serializer_t ser_; unsigned int ncolors_; unsigned int *colors_; gboolean fill_flag_; unsigned int fill_idx_; gboolean border_flag_; unsigned int border_idx_; /* state for polylines */ gboolean first_arrow_flag_; struct { unsigned int num_points; unsigned int size; double *coords; } points_; }; #endif /* _ggcov_php_scenegen_H_ */ ggcov-0.8.4/src/cov_calliter.H0000644000175000017500000000522111466064134013124 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_calliter_H_ #define _ggcov_cov_calliter_H_ 1 #include "common.h" #include "cov_block.H" #include "cov_arc.H" class cov_function_t; class cov_call_iterator_t { protected: cov_call_iterator_t(); public: virtual ~cov_call_iterator_t(); virtual gboolean next() = 0; cov_block_t *block() const { return block_; } const char *name() const { if (pure_ != 0) return pure_->name_; else if (arc_ != 0) return arc_->call_name(); else return 0; } const cov_location_t *location() const { if (pure_ != 0) return &pure_->location_; else if (arc_ != 0) return arc_->call_location(); else return 0; } count_t count() const { if (pure_ != 0) return block_->count(); else if (arc_ != 0) return arc_->count(); else return 0; } gboolean is_pure() const { return (block_ != 0 && pure_ != 0); } protected: void block_start(cov_block_t *); gboolean block_next(); private: int state_; cov_block_t *block_; list_iterator_t pure_iter_; cov_block_t::call_t *pure_; cov_arc_t *arc_; }; class cov_function_call_iterator_t : public cov_call_iterator_t { public: cov_function_call_iterator_t(cov_function_t *); ~cov_function_call_iterator_t(); gboolean next(); private: cov_function_t *function_; unsigned int bindex_; }; class cov_range_call_iterator_t : public cov_call_iterator_t { public: cov_range_call_iterator_t(const cov_location_t *first, const cov_location_t *last); ~cov_range_call_iterator_t(); gboolean next(); private: const cov_location_t *first_, *last_; cov_location_t location_; const GList *blocks_; }; #endif /* _ggcov_cov_calliter_H_ */ ggcov-0.8.4/src/diagwin.C0000644000175000017500000001014511557262605012100 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "diagwin.H" #include "cov.H" #include "canvas_scenegen.H" #include "prefs.H" CVSID("$Id: diagwin.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ diagwin_t::diagwin_t(diagram_t *di) { GladeXML *xml; zoom_ = 1.0; diagram_ = di; /* load the interface & connect signals */ xml = ui_load_tree("diag"); set_window(glade_xml_get_widget(xml, "diag")); set_title(diagram_->title()); canvas_ = glade_xml_get_widget(xml, "diag_canvas"); gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(canvas_), zoom_); ui_register_windows_menu(ui_get_dummy_menu(xml, "diag_windows_dummy")); } diagwin_t::~diagwin_t() { delete diagram_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void diagwin_t::zoom_to(double factor) { zoom_ = factor; gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(canvas_), zoom_); } void diagwin_t::zoom_all() { double zoomx, zoomy; dbounds_t bounds; diagram_->get_bounds(&bounds); zoomx = canvas_->allocation.width / bounds.width(); zoomy = canvas_->allocation.height / bounds.height(); zoom_ = MIN(zoomx, zoomy); dprintf3(D_DIAGWIN, "diagwin_t::zoom_all: zoomx=%g zoomy=%g zoom=%g\n", zoomx, zoomy, zoom_); gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(canvas_), zoom_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define GDK_TO_RGB(gdkcol) \ RGB(((gdkcol)->red>>8), ((gdkcol)->green>>8), ((gdkcol)->blue>>8)) static void set_diagram_colors(diagram_t *di) { int i; for (i = 0 ; i < cov::NUM_STATUS ; i++) { di->set_fg((cov::status_t)i, GDK_TO_RGB(foregrounds_by_status[i])); di->set_bg((cov::status_t)i, GDK_TO_RGB(backgrounds_by_status[i])); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void diagwin_t::populate() { GnomeCanvasGroup *root = gnome_canvas_root(GNOME_CANVAS(canvas_)); dprintf0(D_DIAGWIN, "diagwin_t::populate\n"); while (root->item_list != 0) { gtk_object_destroy(GTK_OBJECT(root->item_list->data)); } set_diagram_colors(diagram_); diagram_->prepare(); scenegen_t *sg = new canvas_scenegen_t(GNOME_CANVAS(canvas_)); diagram_->render(sg); delete sg; /* setup the canvas to show the whole diagram */ dbounds_t bounds; diagram_->get_bounds(&bounds); gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas_), bounds.x1, bounds.y1, bounds.x2, bounds.y2); zoom_all(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_diag_zoom_in_activate(GtkWidget *w, gpointer data) { diagwin_t *cw = diagwin_t::from_widget(w); dprintf0(D_DIAGWIN, "on_diag_zoom_in_activate\n"); cw->zoom_to(cw->zoom_*2.0); } GLADE_CALLBACK void on_diag_zoom_out_activate(GtkWidget *w, gpointer data) { diagwin_t *cw = diagwin_t::from_widget(w); dprintf0(D_DIAGWIN, "on_diag_zoom_out_activate\n"); cw->zoom_to(cw->zoom_/2.0); } GLADE_CALLBACK void on_diag_show_all_activate(GtkWidget *w, gpointer data) { diagwin_t *cw = diagwin_t::from_widget(w); dprintf0(D_DIAGWIN, "on_diag_show_all_activate\n"); cw->zoom_all(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/demangle.c0000644000175000017500000001012111453570563012264 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #include "demangle.h" #include "estring.H" #include "string_var.H" #ifdef HAVE_LIBBFD extern "C" { #include "libiberty/demangle.h" } #endif CVSID("$Id: demangle.c,v 1.4 2010-05-09 05:37:15 gnb Exp $"); #define LEFT_BRACKET '(' #define RIGHT_BRACKET ')' static inline int issym(char c) { return (isalnum(c) || c == ':' || c == '_'); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #ifdef HAVE_LIBBFD static char * normalise_whitespace(const char *p) { estring r; char lastc; /* * Run through the symbol forwards, building a new string * `r' which is the same but with probably less whitespace. * First, preallocate slightly more than enough room in `r'. */ r.append_string(p); r.truncate(); lastc = '\0'; for (;;) { /* skip any whitespace */ while (*p && isspace(*p)) p++; if (!*p) break; /* * Preserve a single space only between consecutive * alphanumerics or after commas. */ if ((issym(*p) && issym(lastc))) r.append_char(' '); /* append sequence of non-whitespace */ while (*p && !isspace(*p)) r.append_char(*p++); if (!*p) break; lastc = p[-1]; } return r.take(); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * demangle(const char *sym) { #ifdef HAVE_LIBBFD string_var dem = cplus_demangle(sym, DMGL_ANSI|DMGL_PARAMS); return (dem == 0 ? g_strdup(sym) : normalise_whitespace(dem)); #else return g_strdup(sym); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * normalise_mangled(const char *sym) { #ifdef HAVE_LIBBFD string_var buf = sym; int func_count = 0; char *p; p = (char *)buf.data() + strlen(buf.data()) - 1; if (strchr(buf.data(), LEFT_BRACKET) == 0) return buf.take(); /* not mangled */ /* * Use a simple state machine to strip off the return type. * It's simple (rather than trivial) to handle return types * which are pointers to functions. */ do { while (p > buf.data() && isspace(*p)) p--; if (*p == RIGHT_BRACKET) { int bracket_count = 0; do { switch (*p--) { case LEFT_BRACKET: bracket_count--; break; case RIGHT_BRACKET: bracket_count++; break; } } while (p > buf.data() && bracket_count > 0); } while (p > buf.data() && isspace(*p)) p--; if (*p == RIGHT_BRACKET) { *p-- = '\0'; func_count++; } else if (*p == LEFT_BRACKET) { *p = ' '; --func_count; } else { while (p > buf.data() && issym(*p)) p--; if (p > buf.data() && (*p == '*' || *p == '&')) *p-- = ' '; } } while (func_count); /* * At this point `p' points to (some whitespace before) * the symbol with the return type stripped. Now normalise * the whitespace. */ buf = normalise_whitespace(p); /* * The C++ main routine is mangled as just "main". */ if (!strcmp(buf, "main(int,char**)") || !strcmp(buf, "main(int,char**,char**)")) buf = "main"; return buf.take(); #else return g_strdup(sym); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/scenegen.C0000644000175000017500000000427211557262605012251 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "scenegen.H" CVSID("$Id: scenegen.C,v 1.5 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ scenegen_t::scenegen_t() { arrow_size_ = 0.5; arrow_shape_[0] = 1.0; arrow_shape_[1] = 1.0; arrow_shape_[2] = 0.25; } scenegen_t::~scenegen_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void scenegen_t::arrow_size(double s) { arrow_size_ = s; } void scenegen_t::arrow_shape(double a, double b, double c) { arrow_shape_[0] = a; arrow_shape_[1] = b; arrow_shape_[2] = c; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void scenegen_t::set_object(object_type_t type, void *obj) { object_ = obj; object_type_ = type; } void scenegen_t::object(cov_function_t *fn) { set_object(OT_FUNCTION, fn); } void scenegen_t::object(cov_file_t *f) { set_object(OT_FILE, f); } void * scenegen_t::get_object(object_type_t type) { void *obj = 0; if (type == object_type_) { obj = object_; object_ = 0; object_type_ = OT_NONE; } return obj; } cov_function_t * scenegen_t::get_function() { return (cov_function_t *)get_object(OT_FUNCTION); } cov_file_t * scenegen_t::get_file() { return (cov_file_t *)get_object(OT_FILE); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_dwarf2.C0000644000175000017500000003307511453570563012521 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov_specific.H" #include "ptrarray.H" #ifdef HAVE_LIBBFD CVSID("$Id: cov_dwarf2.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /* * Machine-specific code to read DWARF v2 debug entries from an * object file or executable and parse them for source filenames. * Large chunks of code ripped from binutils/readelf.c and dwarf2.h */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * Streaming class for picking apart the binary encoding of DWARF structures. */ class dwarf_stream_t { private: const unsigned char *base_, *ptr_; bfd_size_type remain_; public: dwarf_stream_t() { } ~dwarf_stream_t() { } void init(const unsigned char *data, unsigned int len) { base_ = ptr_ = data; remain_ = len; } gboolean init_from_section(cov_bfd_t *cbfd, const char *name) { cov_bfd_section_t *sec; if ((sec = cbfd->find_section(name)) == 0 || (base_ = sec->get_contents(&remain_)) == 0) return FALSE; ptr_ = base_; return TRUE; } unsigned long tell() const; gboolean seek(unsigned long off); gboolean skip(unsigned long delta); const unsigned char *data() const { return base_; } gboolean get_string(const char **); gboolean get_uint8(uint8_t *); gboolean get_uint16(uint16_t *); gboolean get_uint32(uint32_t *); gboolean get_uint64(uint64_t *); gboolean get_address(void **); // TODO: use the BFD typedef? gboolean get_varint(unsigned long *); }; unsigned long dwarf_stream_t::tell() const { return (ptr_ - base_); } gboolean dwarf_stream_t::seek(unsigned long off) { unsigned int len = remain_ + (ptr_ - base_); if (off > len) return FALSE; ptr_ = base_ + off; remain_ = len - off; return TRUE; } gboolean dwarf_stream_t::skip(unsigned long delta) { if (delta > remain_) return FALSE; ptr_ += delta; remain_ -= delta; return TRUE; } gboolean dwarf_stream_t::get_string(const char **valp) { unsigned int i; for (i = 0 ; i <= remain_ && ptr_[i] ; i++) ; if (ptr_[i]) return FALSE; if (valp) *valp = (const char *)ptr_; i++; ptr_ += i; remain_ -= i; return TRUE; } gboolean dwarf_stream_t::get_uint8(uint8_t *valp) { if (remain_ < 1) return FALSE; if (valp) *valp = *ptr_; ptr_ += 1; remain_ -= 1; return TRUE; } /* * Note: we skirt the issue of endianness by assuming that ggcov * runs on the same architecture as the generated files, i.e. * cross-coverage is not supported. So this operation is * a simple memcpy. */ gboolean dwarf_stream_t::get_uint16(uint16_t *valp) { if (remain_ < sizeof(*valp)) return FALSE; if (valp) memcpy((void *)valp, ptr_, sizeof(*valp)); ptr_ += sizeof(*valp); remain_ -= sizeof(*valp); return TRUE; } gboolean dwarf_stream_t::get_uint32(uint32_t *valp) { if (remain_ < sizeof(*valp)) return FALSE; if (valp) memcpy((void *)valp, ptr_, sizeof(*valp)); ptr_ += sizeof(*valp); remain_ -= sizeof(*valp); return TRUE; } gboolean dwarf_stream_t::get_uint64(uint64_t *valp) { if (remain_ < sizeof(*valp)) return FALSE; if (valp) memcpy((void *)valp, ptr_, sizeof(*valp)); ptr_ += sizeof(*valp); remain_ -= sizeof(*valp); return TRUE; } gboolean dwarf_stream_t::get_address(void **valp) { if (remain_ < sizeof(*valp)) return FALSE; if (valp) memcpy((void *)valp, ptr_, sizeof(*valp)); ptr_ += sizeof(*valp); remain_ -= sizeof(*valp); return TRUE; } gboolean dwarf_stream_t::get_varint(unsigned long *valp) { unsigned int shift = 0; unsigned long val = 0; unsigned int i; for (i = 0 ; i < remain_ && shift < 25 ; i++, shift += 7) { val |= ((ptr_[i] & 0x7f) << shift); if (!(ptr_[i] & 0x80)) { if (valp) *valp = val; i++; ptr_ += i; remain_ -= i; return TRUE; } } return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ struct dwarf_attr_t { unsigned int tag_; unsigned int form_; }; struct dwarf_abbrev_t { unsigned int entry_; unsigned int tag_; list_t attrs_; }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define DW_TAG_compile_unit 0x11 class cov_dwarf2_filename_scanner_t : public cov_filename_scanner_t { public: ~cov_dwarf2_filename_scanner_t(); gboolean attach(cov_bfd_t *b); char *next(); private: void clear_dirs(); gboolean get_lineinfo(); char *get_lineinfo_filename(); gboolean get_abbrevs(); dwarf_abbrev_t *find_abbrev(unsigned long num) const; char *get_compunit_filename(); /* contents of .debug_line section */ dwarf_stream_t line_sec_; unsigned long lineinfo_off_; ptrarray_t *dir_table_; /* contents of .debug_abbrev section */ dwarf_stream_t abbrev_sec_; list_t abbrevs_; /* contents of .debug_info section */ dwarf_stream_t info_sec_; unsigned long compunit_off_; /* contents of .debug_str section */ char *strings_; bfd_size_type string_size_; /* iteration variables */ unsigned int state_; }; COV_FACTORY_STATIC_REGISTER(cov_filename_scanner_t, cov_dwarf2_filename_scanner_t); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_dwarf2_filename_scanner_t::~cov_dwarf2_filename_scanner_t() { if (line_sec_.data() != 0) g_free((void *)line_sec_.data()); if (abbrev_sec_.data() != 0) g_free((void *)abbrev_sec_.data()); if (info_sec_.data() != 0) g_free((void *)info_sec_.data()); if (strings_ != 0) g_free(strings_); if (dir_table_ != 0) { clear_dirs(); delete dir_table_; } } void cov_dwarf2_filename_scanner_t::clear_dirs() { unsigned int i; for (i = 0 ; i < dir_table_->length() ; i++) { g_free(dir_table_->nth(i)); dir_table_->set(i, 0); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_dwarf2_filename_scanner_t::attach(cov_bfd_t *b) { cov_bfd_section_t *sec; if (!cov_filename_scanner_t::attach(b)) return FALSE; if (!line_sec_.init_from_section(cbfd_, ".debug_line")) return FALSE; if (!abbrev_sec_.init_from_section(cbfd_, ".debug_abbrev")) return FALSE; if (!info_sec_.init_from_section(cbfd_, ".debug_info")) return FALSE; if ((sec = cbfd_->find_section(".debug_str")) == 0 || (strings_ = (char *)sec->get_contents(&string_size_)) == 0) return FALSE; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* read an external lineinfo struct, opcode lengths & dir table */ gboolean cov_dwarf2_filename_scanner_t::get_lineinfo() { uint32_t length; uint16_t version; uint8_t opcode_base; const char *dir; /* read the EXTERNAL_LineInfo struct */ if (lineinfo_off_) line_sec_.seek(lineinfo_off_); if (!line_sec_.get_uint32(&length)) return FALSE; /* TODO: bounds check length */ lineinfo_off_ = line_sec_.tell() + length; if (!line_sec_.get_uint16(&version) || version != 2) return FALSE; if (!line_sec_.get_uint32(/*prologue_length*/0) || !line_sec_.get_uint8(/*min_insn_length*/0) || !line_sec_.get_uint8(/*default_is_stmt*/0) || !line_sec_.get_uint8(/*line_base*/0) || !line_sec_.get_uint8(/*line_range*/0) || !line_sec_.get_uint8(&opcode_base)) return FALSE; /* read the opcode lengths */ if (!line_sec_.skip(opcode_base-1)) return FALSE; /* read the directory table */ if (dir_table_ == 0) { /* allocate a new table */ dir_table_ = new ptrarray_t; } else { /* clear out the old table */ clear_dirs(); dir_table_->resize(0); } for (;;) { if (!line_sec_.get_string(&dir)) return FALSE; if (*dir == '\0') break; dir_table_->append(g_strdup(dir)); dprintf2(D_DWARF, "dir_table[%d] = \"%s\"\n", dir_table_->length(), dir_table_->nth(dir_table_->length()-1)); } return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * cov_dwarf2_filename_scanner_t::get_lineinfo_filename() { const char *file; unsigned long diridx; char *path; if (!line_sec_.get_string(&file) || *file == '\0') return 0; if (!line_sec_.get_varint(&diridx) || !line_sec_.get_varint(/*time*/0) || !line_sec_.get_varint(/*size*/0)) return 0; if (diridx > dir_table_->length()) return 0; path = (diridx ? g_strconcat(dir_table_->nth(diridx-1), "/", file, (char *)0) : g_strdup(file)); dprintf1(D_DWARF, "get_lineinfo_filename() = \"%s\"\n", path); return path; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_dwarf2_filename_scanner_t::get_abbrevs() { unsigned long a, b; dwarf_abbrev_t *abbrev; dwarf_attr_t *attr; dprintf0(D_DWARF, "get_abbrevs:\n"); for (;;) { if (!abbrev_sec_.get_varint(&a)) return FALSE; if (a == 0) break; /* end of section */ if (!abbrev_sec_.get_varint(&b)) return FALSE; if (!abbrev_sec_.get_uint8(/*children*/0)) return FALSE; abbrev = new dwarf_abbrev_t; abbrev->entry_ = a; abbrev->tag_ = b; abbrevs_.append(abbrev); dprintf2(D_DWARF, "abbrev entry=%d tag=%d {\n", abbrev->entry_, abbrev->tag_); for (;;) { if (!abbrev_sec_.get_varint(&a)) return FALSE; if (!abbrev_sec_.get_varint(&b)) return FALSE; if (!a) break; attr = new dwarf_attr_t; attr->tag_ = a; attr->form_ = b; abbrev->attrs_.append(attr); dprintf2(D_DWARF, " attr=%d form=%d\n", attr->tag_, attr->form_); } dprintf0(D_DWARF, "}\n"); } dprintf0(D_DWARF, "get_abbrevs: end of section\n"); return TRUE; } dwarf_abbrev_t * cov_dwarf2_filename_scanner_t::find_abbrev(unsigned long num) const { list_iterator_t iter; for (iter = abbrevs_.first() ; iter != (dwarf_abbrev_t *)0 ; ++iter) { dwarf_abbrev_t *abbrev = (*iter); if (abbrev->entry_ == num) return abbrev; } return 0; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * cov_dwarf2_filename_scanner_t::get_compunit_filename() { uint32_t length; uint16_t version; unsigned long abbrevno; dwarf_abbrev_t *abbrev; uint32_t name_off, comp_dir_off, producer_off; char *path; /* read an external CompUnit structure */ if (compunit_off_) info_sec_.seek(compunit_off_); if (!info_sec_.get_uint32(&length)) return 0; /* TODO: bounds check length */ compunit_off_ = info_sec_.tell() + length; if (!info_sec_.get_uint16(&version) || version != 2) return 0; if (!info_sec_.get_uint32(/*abbrev_offset*/0) || !info_sec_.get_uint8(/*pointer_size*/0)) return 0; /* hardcoded to expect a DW_TAG_compile_unit abbrev first */ if (!info_sec_.get_varint(&abbrevno) || abbrevno == 0 || (abbrev = find_abbrev(abbrevno)) == 0 || abbrev->tag_ != DW_TAG_compile_unit) return 0; /* read hardcoded DW_TAG_compile_unit */ if (!info_sec_.get_uint32(/*stmt_list*/0) || !info_sec_.get_address(/*high_pc*/0) || !info_sec_.get_address(/*low_pc*/0) || !info_sec_.get_uint32(&name_off) || !info_sec_.get_uint32(&comp_dir_off) || !info_sec_.get_uint32(&producer_off)) return 0; if (name_off > string_size_ || comp_dir_off > string_size_ || producer_off > string_size_) return 0; path = g_strconcat( strings_+comp_dir_off, "/", strings_+name_off, (char *)0); dprintf1(D_DWARF, "get_compunit_filename() = \"%s\"\n", path); return path; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * cov_dwarf2_filename_scanner_t::next() { char *s; for (;;) { switch (state_) { case 0: /* scanning LineInfo in .debug_line */ state_ = (get_lineinfo() ? 1 : 2); break; case 1: /* scanning filename table in .debug_line */ if ((s = get_lineinfo_filename()) != 0) return s; state_ = 0; /* try for another LineInfo */ break; case 2: /* scanning .debug_abbrev etc */ if (!get_abbrevs()) return 0; /* end of iteration */ state_ = 3; /* start scanning compunits */ break; case 3: /* scanning CompUnits in .debug_info */ return get_compunit_filename(); default: return 0; /* end of iteration */ } } // dprintf0(D_DWARF|D_VERBOSE, "index|type|other|desc|value |string\n"); return 0; /* end of iteration */ } #endif /*HAVE_LIBBFD*/ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/mvc.h0000644000175000017500000000300211453570563011302 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Derived from ggui code * Copyright (c) 2000-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggui_mvc_h_ #define _ggui_mvc_h_ 1 #include "common.h" typedef void (*mvc_callback_t)(void *obj, unsigned int features, void *closure); void mvc_listen(void *obj, unsigned int features, mvc_callback_t, void *closure); void mvc_unlisten(void *obj, unsigned int features, mvc_callback_t, void *closure); void mvc_changed(void *obj, unsigned int features); void mvc_deleted(void *obj); /* * Between batch() and unbatch() all changed notifications are * queued internally in the mvc module, then emitted in unbatch(). */ void mvc_batch(void); void mvc_unbatch(void); #define MVC_FEATURE_BASE 2 #endif /* _ggui_mvc_h_ */ ggcov-0.8.4/src/popttest.c0000644000175000017500000000571511453570563012407 00000000000000#include "common.h" #undef HAVE_LIBPOPT #include "fakepopt.h" #include "fakepopt.c" static int boolopt = 0; static int spoolopt = 0; const char *stringopt = "before"; const char *ropeopt = "BEFORE"; GList *files; static const struct poptOption included_options[] = { { "rope", /* longname */ 'R', /* shortname */ POPT_ARG_STRING, /* argInfo */ &ropeopt, /* arg */ 0, /* val 0=don't return */ "he's ropable", /* descrip */ 0 /* argDescrip */ }, { "spool", /* longname */ 'S', /* shortname */ POPT_ARG_NONE, /* argInfo */ &spoolopt, /* arg */ 0, /* val 0=don't return */ "spoolin' spoolin' spoolin'", /* descrip */ 0 /* argDescrip */ }, POPT_TABLEEND }; static const struct poptOption options[] = { { "string", /* longname */ 's', /* shortname */ POPT_ARG_STRING, /* argInfo */ &stringopt, /* arg */ 0, /* val 0=don't return */ "how long is a piece of string", /* descrip */ 0 /* argDescrip */ }, { "bool", /* longname */ 'b', /* shortname */ POPT_ARG_NONE, /* argInfo */ &boolopt, /* arg */ 0, /* val 0=don't return */ "to be or not to be", /* descrip */ 0 /* argDescrip */ }, { "whatever", /* longname */ '?', /* shortname */ POPT_ARG_INCLUDE_TABLE, /* argInfo */ (void *)included_options, /* arg */ 0, /* val 0=don't return */ 0, /* descrip */ 0 /* argDescrip */ }, POPT_TABLEEND }; int main(int argc, char **argv) { int rc; poptContext con; const char *file; GList *iter; const char *argv0; argv0 = strrchr(argv[0], '/'); if (argv0 == NULL) argv0 = argv[0]; else argv0++; con = poptGetContext("popttest", argc, (const char**)argv, options, 0); poptSetOtherOptionHelp(con, "[OPTIONS] [executable|source|directory]..."); while ((rc = poptGetNextOpt(con)) > 0) ; if (rc < -1) { fprintf(stderr, "%s:%s at or near %s\n", argv0, poptStrerror(rc), poptBadOption(con, POPT_BADOPTION_NOALIAS)); exit(0); } while ((file = poptGetArg(con)) != 0) files = g_list_append(files, (gpointer)file); poptFreeContext(con); printf("boolopt=%d\n", boolopt); printf("spoolopt=%d\n", spoolopt); printf("stringopt=\"%s\"\n", stringopt); printf("ropeopt=\"%s\"\n", ropeopt); printf("files="); for (iter = files ; iter != 0 ; iter = iter->next) printf(" \"%s\"", (const char *)iter->data); printf("\n"); return 0; } ggcov-0.8.4/src/sourcewin.H0000644000175000017500000001473411557262605012511 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2006 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_sourcewin_H_ #define _ggcov_sourcewin_H_ 1 #include "window.H" #include "cov.H" #include "string_var.H" GLADE_CALLBACK void on_source_saveas_ok_button_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_saveas_cancel_button_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_save_as_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_column_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_colors_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_toolbar_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_titles_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_summarise_file_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_summarise_function_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_summarise_range_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_flow_diagram_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_filenames_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_functions_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_text_size_increase_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_text_size_decrease_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_source_text_size_normal_activate(GtkWidget *w, gpointer data); class sourcewin_t : public window_t { public: sourcewin_t(); ~sourcewin_t(); void set_filename(const char *filename, const char *display_fname); void select_region(unsigned long start, unsigned long end); void ensure_visible(unsigned long line); /* * Routines to create and show a source window with a particular * interesting range of contents selected. */ static void show_lines(const char *filename, unsigned long startline, unsigned long endline); static void show_function(const cov_function_t *); static void show_file(const cov_file_t *); static void show_filename(const char *filename); private: enum columns { COL_FLOW, COL_LINE, COL_BLOCK, COL_COUNT, COL_SOURCE, NUM_COLS }; #if GTK2 struct flow_t { GtkWidget *canvas_; int bufy_; /* buffer y coord of canvas */ unsigned int width_; /* width in pixels of canvas */ cov_function_t *function_; unsigned int shown_; /* generation number for showing flows */ }; #endif static sourcewin_t *instance(); void setup_text(); void populate_filenames(); void populate_functions(); void populate(); void update(); void update_title_buttons(); #if GTK2 void delete_flows(); void update_flow_window(); gboolean get_visible_lines(unsigned long*, unsigned long*); void update_flows(); flow_t *create_flow(cov_function_t *, int y, int h); void wait_for_text_validation(); #endif cov_function_t *selected_function() const; gboolean save_with_annotations(const char *filename); static int delayed_function_activate(gpointer userdata); static void on_source_filename_activate(GtkWidget *w, gpointer userdata); static void on_source_function_activate(GtkWidget *w, gpointer userdata); #if GTK2 static void on_vadjustment_value_changed(GtkAdjustment *, gpointer); void adjust_text_size(int dirn); #endif static sourcewin_t *from_widget(GtkWidget *w) { return (sourcewin_t *)window_t::from_widget(w); } static gboolean initialised_; int font_width_; static const int column_widths_[NUM_COLS]; static const char *column_names_[NUM_COLS]; static list_t instances_; GtkWidget *text_; /* GtkText in gtk1.2, GtkTextView in gtk2.0 */ ui_text_tag *text_tags_[cov::NUM_STATUS]; GtkWidget *column_checks_[NUM_COLS]; GtkWidget *colors_check_; GtkWidget *flow_diagram_item_; GtkWidget *toolbar_; GtkWidget *filenames_combo_; GtkWidget *functions_combo_; gboolean populating_; string_var filename_; GtkWidget *titles_hbox_; GtkWidget *left_pad_label_; GtkWidget *title_buttons_[NUM_COLS]; GtkWidget *right_pad_label_; GtkWidget *saveas_dialog_; #if GTK2 list_t flows_; unsigned int flow_shown_; gboolean text_initialised_; unsigned int flow_width_; gboolean flow_width_dirty_; #endif friend void on_source_saveas_ok_button_clicked(GtkWidget *w, gpointer data); friend void on_source_saveas_cancel_button_clicked(GtkWidget *w, gpointer data); friend void on_source_save_as_activate(GtkWidget *w, gpointer data); friend void on_source_column_check_activate(GtkWidget *w, gpointer data); friend void on_source_colors_check_activate(GtkWidget *w, gpointer data); friend void on_source_toolbar_check_activate(GtkWidget *w, gpointer data); friend void on_source_titles_check_activate(GtkWidget *w, gpointer data); friend void on_source_summarise_file_activate(GtkWidget *w, gpointer data); friend void on_source_summarise_function_activate(GtkWidget *w, gpointer data); friend void on_source_summarise_range_activate(GtkWidget *w, gpointer data); friend void on_source_flow_diagram_activate(GtkWidget *w, gpointer data); friend void on_source_filenames_entry_changed(GtkWidget *w, gpointer data); friend void on_source_functions_entry_changed(GtkWidget *w, gpointer data); friend void on_source_text_size_increase_activate(GtkWidget *w, gpointer data); friend void on_source_text_size_decrease_activate(GtkWidget *w, gpointer data); friend void on_source_text_size_normal_activate(GtkWidget *w, gpointer data); }; #endif /* _ggcov_sourcewin_H_ */ ggcov-0.8.4/src/functionswin.C0000644000175000017500000003071311565666244013215 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "functionswin.H" #include #include "sourcewin.H" #include "cov.H" #include "prefs.H" CVSID("$Id: functionswin.C,v 1.19 2010-05-09 05:37:15 gnb Exp $"); #define COL_BLOCKS 0 #define COL_LINES 1 #define COL_CALLS 2 #define COL_BRANCHES 3 #define COL_FUNCTION 4 #if !GTK2 #define COL_CLOSURE 0 #define NUM_COLS 5 #else #define COL_CLOSURE 5 #define COL_FG_GDK 6 #define NUM_COLS 7 #define COL_TYPES \ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, \ G_TYPE_POINTER, GDK_TYPE_COLOR #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int ratiocmp(double r1, double r2) { return (fabs(r1 - r2) < 0.00001 ? 0 : (r1 < r2) ? -1 : 1); } static int functionswin_compare( cov_function_scope_t *fs1, cov_function_scope_t *fs2, int column) { const cov_stats_t *s1 = fs1->get_stats(); const cov_stats_t *s2 = fs2->get_stats(); int ret = 0; dprintf2(D_FUNCSWIN|D_VERBOSE, "functionswin_compare: fs1=\"%s\" fs2=\"%s\"\n", fs1->describe(), fs2->describe()); switch (column) { case COL_BLOCKS: ret = ratiocmp(s1->blocks_sort_fraction(), s2->blocks_sort_fraction()); break; case COL_LINES: ret = ratiocmp(s1->lines_sort_fraction(), s2->lines_sort_fraction()); break; case COL_CALLS: ret = ratiocmp(s1->calls_sort_fraction(), s2->calls_sort_fraction()); break; case COL_BRANCHES: ret = ratiocmp(s1->branches_sort_fraction(), s2->branches_sort_fraction()); break; case COL_FUNCTION: ret = 0; break; default: return 0; } if (ret == 0) ret = strcmp(fs1->function()->name(), fs2->function()->name()); return ret; } #if !GTK2 static int functionswin_clist_compare(GtkCList *clist, const void *ptr1, const void *ptr2) { return functionswin_compare( (cov_function_scope_t *)((GtkCListRow *)ptr1)->data, (cov_function_scope_t *)((GtkCListRow *)ptr2)->data, clist->sort_column); } #else static int functionswin_tree_iter_compare( GtkTreeModel *tm, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer data) { cov_function_scope_t *fs1 = 0; cov_function_scope_t *fs2 = 0; gtk_tree_model_get(tm, iter1, COL_CLOSURE, &fs1, -1); gtk_tree_model_get(tm, iter2, COL_CLOSURE, &fs2, -1); return functionswin_compare(fs1, fs2, GPOINTER_TO_INT(data)); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ functionswin_t::functionswin_t() { GladeXML *xml; #if GTK2 GtkTreeViewColumn *col; GtkCellRenderer *rend; #endif /* load the interface & connect signals */ xml = ui_load_tree("functions"); set_window(glade_xml_get_widget(xml, "functions")); blocks_check_ = glade_xml_get_widget(xml, "functions_blocks_check"); lines_check_ = glade_xml_get_widget(xml, "functions_lines_check"); calls_check_ = glade_xml_get_widget(xml, "functions_calls_check"); branches_check_ = glade_xml_get_widget(xml, "functions_branches_check"); percent_check_ = glade_xml_get_widget(xml, "functions_percent_check"); clist_ = glade_xml_get_widget(xml, "functions_clist"); #if !GTK2 gtk_clist_set_column_justification(GTK_CLIST(clist_), COL_BLOCKS, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(clist_), COL_LINES, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(clist_), COL_CALLS, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(clist_), COL_BRANCHES, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(clist_), COL_FUNCTION, GTK_JUSTIFY_LEFT); gtk_clist_set_compare_func(GTK_CLIST(clist_), functionswin_clist_compare); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_BLOCKS); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_LINES); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_CALLS); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_BRANCHES); ui_clist_init_column_arrow(GTK_CLIST(clist_), COL_FUNCTION); ui_clist_set_sort_column(GTK_CLIST(clist_), COL_BLOCKS); ui_clist_set_sort_type(GTK_CLIST(clist_), GTK_SORT_DESCENDING); #else store_ = gtk_list_store_new(NUM_COLS, COL_TYPES); /* default alphabetic sort is adequate for COL_FUNCTION */ gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_BLOCKS, functionswin_tree_iter_compare, GINT_TO_POINTER(COL_BLOCKS), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_LINES, functionswin_tree_iter_compare, GINT_TO_POINTER(COL_LINES), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_CALLS, functionswin_tree_iter_compare, GINT_TO_POINTER(COL_CALLS), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_BRANCHES, functionswin_tree_iter_compare, GINT_TO_POINTER(COL_BRANCHES), 0); gtk_tree_view_set_model(GTK_TREE_VIEW(clist_), GTK_TREE_MODEL(store_)); rend = gtk_cell_renderer_text_new(); col = gtk_tree_view_column_new_with_attributes(_("Blocks"), rend, "text", COL_BLOCKS, "foreground-gdk", COL_FG_GDK,/* only needed on 1st column */ (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_BLOCKS); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Lines"), rend, "text", COL_LINES, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_LINES); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Calls"), rend, "text", COL_CALLS, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_CALLS); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Branches"), rend, "text", COL_BRANCHES, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_BRANCHES); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); col = gtk_tree_view_column_new_with_attributes(_("Function"), rend, "text", COL_FUNCTION, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_FUNCTION); gtk_tree_view_append_column(GTK_TREE_VIEW(clist_), col); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(clist_), TRUE); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(clist_), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(clist_), COL_FUNCTION); #endif ui_register_windows_menu(ui_get_dummy_menu(xml, "functions_windows_dummy")); } functionswin_t::~functionswin_t() { #if GTK2 g_object_unref(G_OBJECT(store_)); #endif functions_.delete_all(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void functionswin_t::populate() { list_iterator_t iter; unsigned int fnidx; dprintf0(D_FUNCSWIN, "functionswin_t::populate\n"); for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; for (fnidx = 0 ; fnidx < f->num_functions() ; fnidx++) { cov_function_t *fn = f->nth_function(fnidx); cov::status_t st = fn->status(); if (st != cov::SUPPRESSED && st != cov::UNINSTRUMENTED) functions_.prepend(new cov_function_scope_t(fn)); } } update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void format_stat( char *buf, unsigned int maxlen, gboolean percent_flag, unsigned long numerator, unsigned long denominator) { if (denominator == 0) *buf = '\0'; else if (percent_flag) snprintf(buf, maxlen, "%.2f", (double)numerator * 100.0 / denominator); else snprintf(buf, maxlen, "%lu/%lu", numerator, denominator); } void functionswin_t::update() { list_iterator_t iter; gboolean percent_flag; GdkColor *color; char *text[NUM_COLS]; char blocks_pc_buf[16]; char lines_pc_buf[16]; char calls_pc_buf[16]; char branches_pc_buf[16]; dprintf0(D_FUNCSWIN, "functionswin_t::update\n"); percent_flag = GTK_CHECK_MENU_ITEM(percent_check_)->active; #if !GTK2 gtk_clist_freeze(GTK_CLIST(clist_)); gtk_clist_clear(GTK_CLIST(clist_)); #else gtk_list_store_clear(store_); #endif for (iter = functions_.first() ; iter != (cov_function_scope_t *)0 ; ++iter) { const cov_stats_t *stats = (*iter)->get_stats(); #if !GTK2 int row; #else GtkTreeIter titer; #endif format_stat(blocks_pc_buf, sizeof(blocks_pc_buf), percent_flag, stats->blocks_executed(), stats->blocks_total()); text[COL_BLOCKS] = blocks_pc_buf; format_stat(lines_pc_buf, sizeof(lines_pc_buf), percent_flag, stats->lines_executed(), stats->lines_total()); text[COL_LINES] = lines_pc_buf; format_stat(calls_pc_buf, sizeof(calls_pc_buf), percent_flag, stats->calls_executed(), stats->calls_total()); text[COL_CALLS] = calls_pc_buf; format_stat(branches_pc_buf, sizeof(branches_pc_buf), percent_flag, stats->branches_executed(), stats->branches_total()); text[COL_BRANCHES] = branches_pc_buf; text[COL_FUNCTION] = (char *)(*iter)->function()->name(); color = foregrounds_by_status[(*iter)->function()->status()]; #if !GTK2 row = gtk_clist_prepend(GTK_CLIST(clist_), text); gtk_clist_set_row_data(GTK_CLIST(clist_), row, (*iter)); gtk_clist_set_foreground(GTK_CLIST(clist_), row, color); #else gtk_list_store_append(store_, &titer); gtk_list_store_set(store_, &titer, COL_FUNCTION, text[COL_FUNCTION], COL_BLOCKS, text[COL_BLOCKS], COL_LINES, text[COL_LINES], COL_CALLS, text[COL_CALLS], COL_BRANCHES, text[COL_BRANCHES], COL_CLOSURE, (*iter), COL_FG_GDK, color, -1); #endif } #if !GTK2 gtk_clist_columns_autosize(GTK_CLIST(clist_)); gtk_clist_sort(GTK_CLIST(clist_)); gtk_clist_thaw(GTK_CLIST(clist_)); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_functions_blocks_check_activate(GtkWidget *w, gpointer data) { functionswin_t *fw = functionswin_t::from_widget(w); ui_list_set_column_visibility(fw->clist_, COL_BLOCKS, GTK_CHECK_MENU_ITEM(fw->blocks_check_)->active); } GLADE_CALLBACK void on_functions_lines_check_activate(GtkWidget *w, gpointer data) { functionswin_t *fw = functionswin_t::from_widget(w); ui_list_set_column_visibility(fw->clist_, COL_LINES, GTK_CHECK_MENU_ITEM(fw->lines_check_)->active); } GLADE_CALLBACK void on_functions_calls_check_activate(GtkWidget *w, gpointer data) { functionswin_t *fw = functionswin_t::from_widget(w); ui_list_set_column_visibility(fw->clist_, COL_CALLS, GTK_CHECK_MENU_ITEM(fw->calls_check_)->active); } GLADE_CALLBACK void on_functions_branches_check_activate(GtkWidget *w, gpointer data) { functionswin_t *fw = functionswin_t::from_widget(w); ui_list_set_column_visibility(fw->clist_, COL_BRANCHES, GTK_CHECK_MENU_ITEM(fw->branches_check_)->active); } GLADE_CALLBACK void on_functions_percent_check_activate(GtkWidget *w, gpointer data) { functionswin_t *fw = functionswin_t::from_widget(w); fw->update(); } GLADE_CALLBACK gboolean on_functions_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data) { cov_function_scope_t *fs; fs = (cov_function_scope_t *)ui_list_double_click_data(w, event, COL_CLOSURE); if (fs != 0) sourcewin_t::show_function(fs->function()); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/hashtable.C0000644000175000017500000000604011453570563012410 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "hashtable.H" CVSID("$Id: hashtable.C,v 1.6 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void gnb_hash_table_add_one_key(gpointer key, gpointer value, gpointer closure) { list_t *list = (list_t *)closure; list->prepend(key); } static int string_compare(gconstpointer v1, gconstpointer v2) { return strcmp((const char *)v1, (const char *)v2); } static int direct_compare(gconstpointer v1, gconstpointer v2) { if ((unsigned long)v1 < (unsigned long)v2) return -1; else if ((unsigned long)v1 > (unsigned long)v2) return 1; else return 0; } /* copied from glib's g_str_hash() */ guint gnb_u64_t_hash (gconstpointer key) { const char *p = (const char *)key; unsigned int i; guint h = *p; for (i = 0 ; i < sizeof(gnb_u64_t) ; i++) h = (h << 5) - h + p[i]; return h; } static gboolean gnb_u64_t_equal(gconstpointer v1, gconstpointer v2) { return *(gnb_u64_t *)v1 == *(gnb_u64_t *)v2; } static int gnb_u64_t_compare(gconstpointer v1, gconstpointer v2) { gnb_u64_t u1 = *(gnb_u64_t *)v1; gnb_u64_t u2 = *(gnb_u64_t *)v2; if (u1 < u2) return -1; else if (u1 > u2) return 1; else return 0; } template<> GHashFunc hashtable_ops_t::hash = g_str_hash; template<> GCompareFunc hashtable_ops_t::compare = g_str_equal; template<> GCompareFunc hashtable_ops_t::sort_compare = string_compare; template<> GHashFunc hashtable_ops_t::hash = g_str_hash; template<> GCompareFunc hashtable_ops_t::compare = g_str_equal; template<> GCompareFunc hashtable_ops_t::sort_compare = string_compare; template<> GHashFunc hashtable_ops_t::hash = g_direct_hash; template<> GCompareFunc hashtable_ops_t::compare = g_direct_equal; template<> GCompareFunc hashtable_ops_t::sort_compare = direct_compare; template<> GHashFunc hashtable_ops_t::hash = gnb_u64_t_hash; template<> GCompareFunc hashtable_ops_t::compare = gnb_u64_t_equal; template<> GCompareFunc hashtable_ops_t::sort_compare = gnb_u64_t_compare; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/fileswin.C0000644000175000017500000004312611557262605012303 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fileswin.H" #include #include "sourcewin.H" #include "cov.H" #include "list.H" #include "prefs.H" #include "tok.H" CVSID("$Id: fileswin.C,v 1.27 2010-05-09 05:37:15 gnb Exp $"); #define COL_FILE 0 #define COL_BLOCKS 1 #define COL_LINES 2 #define COL_FUNCTIONS 3 #define COL_CALLS 4 #define COL_BRANCHES 5 #if !GTK2 #define NUM_COLS 6 #else #define COL_CLOSURE 6 #define COL_FG_GDK 7 #define NUM_COLS 8 #define COL_TYPES \ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, \ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, GDK_TYPE_COLOR #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ struct file_rec_t { string_var name; /* partial name */ cov_file_t *file; cov_scope_t *scope; #if !GTK2 GtkCTreeNode *node; #else GtkTreeIter iter; #endif list_t children; /* directory file_rec_t's have children and no file */ file_rec_t() { } file_rec_t(const char *nm, cov_file_t *f) : name(nm), file(f) { if (file != 0) scope = new cov_file_scope_t(file); else scope = new cov_compound_scope_t(); } ~file_rec_t() { delete scope; children.delete_all(); } void add_child(file_rec_t *child) { children.append(child); ((cov_compound_scope_t *)scope)->add_child(child->scope); } }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int ratiocmp(double r1, double r2) { return (fabs(r1 - r2) < 0.00001 ? 0 : (r1 < r2) ? -1 : 1); } static int fileswin_compare(file_rec_t *fr1, file_rec_t *fr2, int column) { const cov_stats_t *s1 = fr1->scope->get_stats(); const cov_stats_t *s2 = fr2->scope->get_stats(); dprintf2(D_FILESWIN|D_VERBOSE, "fileswin_compare: fr1=\"%s\" fr2=\"%s\"\n", fr1->name.data(), fr2->name.data()); switch (column) { case COL_BLOCKS: return ratiocmp(s1->blocks_sort_fraction(), s2->blocks_sort_fraction()); case COL_LINES: return ratiocmp(s1->lines_sort_fraction(), s2->lines_sort_fraction()); case COL_FUNCTIONS: return ratiocmp(s1->functions_sort_fraction(), s2->functions_sort_fraction()); case COL_CALLS: return ratiocmp(s1->calls_sort_fraction(), s2->calls_sort_fraction()); case COL_BRANCHES: return ratiocmp(s1->branches_sort_fraction(), s2->branches_sort_fraction()); case COL_FILE: return strcmp(fr1->name, fr2->name); default: return 0; } } #if !GTK2 static int fileswin_clist_compare(GtkCList *clist, const void *ptr1, const void *ptr2) { return fileswin_compare( (file_rec_t *)((GtkCListRow *)ptr1)->data, (file_rec_t *)((GtkCListRow *)ptr2)->data, clist->sort_column); } #else static int fileswin_tree_iter_compare( GtkTreeModel *tm, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer data) { file_rec_t *fr1 = 0; file_rec_t *fr2 = 0; gtk_tree_model_get(tm, iter1, COL_CLOSURE, &fr1, -1); gtk_tree_model_get(tm, iter2, COL_CLOSURE, &fr2, -1); return fileswin_compare(fr1, fr2, GPOINTER_TO_INT(data)); } #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ fileswin_t::fileswin_t() { GladeXML *xml; #if GTK2 GtkTreeViewColumn *col; GtkCellRenderer *rend; #endif /* load the interface & connect signals */ xml = ui_load_tree("files"); set_window(glade_xml_get_widget(xml, "files")); blocks_check_ = glade_xml_get_widget(xml, "files_blocks_check"); lines_check_ = glade_xml_get_widget(xml, "files_lines_check"); functions_check_ = glade_xml_get_widget(xml, "files_functions_check"); calls_check_ = glade_xml_get_widget(xml, "files_calls_check"); branches_check_ = glade_xml_get_widget(xml, "files_branches_check"); percent_check_ = glade_xml_get_widget(xml, "files_percent_check"); tree_check_ = glade_xml_get_widget(xml, "files_tree_check"); collapse_all_btn_ = glade_xml_get_widget(xml, "files_collapse_all"); expand_all_btn_ = glade_xml_get_widget(xml, "files_expand_all"); ctree_ = glade_xml_get_widget(xml, "files_ctree"); #if !GTK2 gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_BLOCKS, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_LINES, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_FUNCTIONS, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_CALLS, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_BRANCHES, GTK_JUSTIFY_RIGHT); gtk_clist_set_column_justification(GTK_CLIST(ctree_), COL_FILE, GTK_JUSTIFY_LEFT); gtk_clist_set_compare_func(GTK_CLIST(ctree_), fileswin_clist_compare); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_BLOCKS); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_LINES); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_FUNCTIONS); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_CALLS); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_BRANCHES); ui_clist_init_column_arrow(GTK_CLIST(ctree_), COL_FILE); ui_clist_set_sort_column(GTK_CLIST(ctree_), COL_BLOCKS); ui_clist_set_sort_type(GTK_CLIST(ctree_), GTK_SORT_DESCENDING); #else store_ = gtk_tree_store_new(NUM_COLS, COL_TYPES); /* default alphabetic sort is adequate for COL_FILE */ gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_BLOCKS, fileswin_tree_iter_compare, GINT_TO_POINTER(COL_BLOCKS), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_LINES, fileswin_tree_iter_compare, GINT_TO_POINTER(COL_LINES), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_FUNCTIONS, fileswin_tree_iter_compare, GINT_TO_POINTER(COL_FUNCTIONS), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_CALLS, fileswin_tree_iter_compare, GINT_TO_POINTER(COL_CALLS), 0); gtk_tree_sortable_set_sort_func((GtkTreeSortable *)store_, COL_BRANCHES, fileswin_tree_iter_compare, GINT_TO_POINTER(COL_BRANCHES), 0); gtk_tree_view_set_model(GTK_TREE_VIEW(ctree_), GTK_TREE_MODEL(store_)); rend = gtk_cell_renderer_text_new(); col = gtk_tree_view_column_new_with_attributes(_("File"), rend, "text", COL_FILE, "foreground-gdk", COL_FG_GDK,/* only needed on 1st column */ (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_FILE); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); col = gtk_tree_view_column_new_with_attributes(_("Blocks"), rend, "text", COL_BLOCKS, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_BLOCKS); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); col = gtk_tree_view_column_new_with_attributes(_("Lines"), rend, "text", COL_LINES, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_LINES); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); col = gtk_tree_view_column_new_with_attributes(_("Functions"), rend, "text", COL_FUNCTIONS, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_FUNCTIONS); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); col = gtk_tree_view_column_new_with_attributes(_("Calls"), rend, "text", COL_CALLS, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_CALLS); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); col = gtk_tree_view_column_new_with_attributes(_("Branches"), rend, "text", COL_BRANCHES, (char *)0); gtk_tree_view_column_set_sort_column_id(col, COL_BRANCHES); gtk_tree_view_append_column(GTK_TREE_VIEW(ctree_), col); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(ctree_), TRUE); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(ctree_), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(ctree_), COL_FILE); #endif ui_register_windows_menu(ui_get_dummy_menu(xml, "files_windows_dummy")); } fileswin_t::~fileswin_t() { #if GTK2 g_object_unref(G_OBJECT(store_)); #endif delete root_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void dump_file_tree(file_rec_t *fr, int indent) { int i; list_iterator_t friter; for (i = 0 ; i < indent ; i++) fputc(' ', stderr); fprintf(stderr, "%s\n", fr->name.data()); for (friter = fr->children.first() ; friter != (file_rec_t *)0 ; ++friter) dump_file_tree((*friter), indent+4); } void fileswin_t::populate() { list_iterator_t iter; dprintf0(D_FILESWIN, "fileswin_t::populate\n"); if (root_ != 0) delete root_; root_ = new file_rec_t(cov_file_t::common_path(), 0); for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov::status_t st = (*iter)->status(); if (st == cov::SUPPRESSED || st == cov::UNINSTRUMENTED) continue; file_rec_t *parent, *fr; char *buf = g_strdup((*iter)->minimal_name()); char *end = buf + strlen(buf); tok_t tok(buf, "/"); const char *part; parent = root_; while ((part = tok.next()) != 0) { if (part + strlen(part) == end) { parent->add_child(fr = new file_rec_t(part, (*iter))); } else { list_iterator_t friter; for (friter = parent->children.first() ; friter != (file_rec_t *)0 ; ++friter) { if (!strcmp((*friter)->name, part)) break; } if ((*friter) != 0) fr = (*friter); else parent->add_child(fr = new file_rec_t(part, 0)); } parent = fr; } } if (debug_enabled(D_FILESWIN|D_VERBOSE)) dump_file_tree(root_, 0); update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void format_stat( char *buf, unsigned int maxlen, gboolean percent_flag, unsigned long numerator, unsigned long denominator) { if (denominator == 0) *buf = '\0'; else if (percent_flag) snprintf(buf, maxlen, "%.2f", (double)numerator * 100.0 / denominator); else snprintf(buf, maxlen, "%lu/%lu", numerator, denominator); } void fileswin_t::add_node( file_rec_t *fr, file_rec_t *parent, gboolean percent_flag, gboolean tree_flag) { GdkColor *color; char *text[NUM_COLS]; char blocks_pc_buf[16]; char lines_pc_buf[16]; char functions_pc_buf[16]; char calls_pc_buf[16]; char branches_pc_buf[16]; gboolean is_leaf; list_iterator_t friter; is_leaf = (fr->children.head() == 0); if (tree_flag || is_leaf) { const cov_stats_t *stats = fr->scope->get_stats(); text[COL_FILE] = (char *)fr->name.data(); format_stat(blocks_pc_buf, sizeof(blocks_pc_buf), percent_flag, stats->blocks_executed(), stats->blocks_total()); text[COL_BLOCKS] = blocks_pc_buf; format_stat(lines_pc_buf, sizeof(lines_pc_buf), percent_flag, stats->lines_executed(), stats->lines_total()); text[COL_LINES] = lines_pc_buf; format_stat(functions_pc_buf, sizeof(functions_pc_buf), percent_flag, stats->functions_executed(), stats->functions_total()); text[COL_FUNCTIONS] = functions_pc_buf; format_stat(calls_pc_buf, sizeof(calls_pc_buf), percent_flag, stats->calls_executed(), stats->calls_total()); text[COL_CALLS] = calls_pc_buf; format_stat(branches_pc_buf, sizeof(branches_pc_buf), percent_flag, stats->branches_executed(), stats->branches_total()); text[COL_BRANCHES] = branches_pc_buf; color = foregrounds_by_status[fr->scope->status()]; #if !GTK2 fr->node = gtk_ctree_insert_node( GTK_CTREE(ctree_), (parent == 0 || !tree_flag ? 0 : parent->node), (GtkCTreeNode *)0, /* sibling */ text, 4, /* spacing */ (GdkPixmap *)0, /* pixmap_closed */ (GdkBitmap *)0, /* mask_closed */ (GdkPixmap *)0, /* pixmap_opened */ (GdkBitmap *)0, /* mask_opened */ is_leaf, /* is_leaf */ TRUE); /* expanded*/ gtk_ctree_node_set_row_data(GTK_CTREE(ctree_), fr->node, fr); if (color != 0) gtk_ctree_node_set_foreground(GTK_CTREE(ctree_), fr->node, color); #else gtk_tree_store_append(store_, &fr->iter, (parent == 0 || !tree_flag ? 0 : &parent->iter)); gtk_tree_store_set(store_, &fr->iter, COL_FILE, text[COL_FILE], COL_BLOCKS, text[COL_BLOCKS], COL_LINES, text[COL_LINES], COL_FUNCTIONS, text[COL_FUNCTIONS], COL_CALLS, text[COL_CALLS], COL_BRANCHES, text[COL_BRANCHES], COL_CLOSURE, fr, COL_FG_GDK, color, -1); #endif } for (friter = fr->children.first() ; friter != (file_rec_t *)0 ; ++friter) add_node((*friter), fr, percent_flag, tree_flag); } void fileswin_t::update() { gboolean percent_flag; gboolean tree_flag; dprintf0(D_FILESWIN, "fileswin_t::update\n"); percent_flag = GTK_CHECK_MENU_ITEM(percent_check_)->active; tree_flag = GTK_CHECK_MENU_ITEM(tree_check_)->active; #if !GTK2 gtk_clist_freeze(GTK_CLIST(ctree_)); gtk_clist_clear(GTK_CLIST(ctree_)); gtk_ctree_set_line_style(GTK_CTREE(ctree_), tree_flag ? GTK_CTREE_LINES_SOLID : GTK_CTREE_LINES_NONE); #else gtk_tree_store_clear(store_); #endif add_node(root_, 0, percent_flag, tree_flag); #if !GTK2 gtk_clist_columns_autosize(GTK_CLIST(ctree_)); gtk_clist_sort(GTK_CLIST(ctree_)); gtk_clist_thaw(GTK_CLIST(ctree_)); #else gtk_tree_view_expand_all(GTK_TREE_VIEW(ctree_)); #endif grey_items(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void fileswin_t::grey_items() { gboolean tree_flag = GTK_CHECK_MENU_ITEM(tree_check_)->active; gtk_widget_set_sensitive(collapse_all_btn_, tree_flag); gtk_widget_set_sensitive(expand_all_btn_, tree_flag); window_t::grey_items(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_files_blocks_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); dprintf0(D_FILESWIN, "on_files_blocks_check_activate\n"); ui_list_set_column_visibility(fw->ctree_, COL_BLOCKS, GTK_CHECK_MENU_ITEM(fw->blocks_check_)->active); } GLADE_CALLBACK void on_files_lines_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); dprintf0(D_FILESWIN, "on_files_lines_check_activate\n"); ui_list_set_column_visibility(fw->ctree_, COL_LINES, GTK_CHECK_MENU_ITEM(fw->lines_check_)->active); } GLADE_CALLBACK void on_files_functions_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); dprintf0(D_FILESWIN, "on_files_functions_check_activate\n"); ui_list_set_column_visibility(fw->ctree_, COL_FUNCTIONS, GTK_CHECK_MENU_ITEM(fw->lines_check_)->active); } GLADE_CALLBACK void on_files_calls_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); dprintf0(D_FILESWIN, "on_files_calls_check_activate\n"); ui_list_set_column_visibility(fw->ctree_, COL_CALLS, GTK_CHECK_MENU_ITEM(fw->calls_check_)->active); } GLADE_CALLBACK void on_files_branches_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); dprintf0(D_FILESWIN, "on_files_branches_check_activate\n"); ui_list_set_column_visibility(fw->ctree_, COL_BRANCHES, GTK_CHECK_MENU_ITEM(fw->branches_check_)->active); } GLADE_CALLBACK void on_files_percent_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); fw->update(); } GLADE_CALLBACK void on_files_tree_check_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); fw->update(); } GLADE_CALLBACK void on_files_collapse_all_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); #if !GTK2 gtk_ctree_collapse_recursive(GTK_CTREE(fw->ctree_), fw->root_->node); gtk_ctree_expand(GTK_CTREE(fw->ctree_), fw->root_->node); #else gtk_tree_view_collapse_all(GTK_TREE_VIEW(fw->ctree_)); #endif } GLADE_CALLBACK void on_files_expand_all_activate(GtkWidget *w, gpointer data) { fileswin_t *fw = fileswin_t::from_widget(w); #if !GTK2 gtk_ctree_expand_recursive(GTK_CTREE(fw->ctree_), fw->root_->node); #else gtk_tree_view_expand_all(GTK_TREE_VIEW(fw->ctree_)); #endif } GLADE_CALLBACK gboolean on_files_ctree_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data) { file_rec_t *fr; fr = (file_rec_t *)ui_list_double_click_data(w, event, COL_CLOSURE); if (fr != 0 && fr->file != 0) sourcewin_t::show_file(fr->file); return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/canvas_function_popup.H0000644000175000017500000000507411453570563015073 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_canvas_function_popup_H_ #define _ggcov_canvas_function_popup_H_ 1 #include "common.h" #include "ui.h" #include class cov_function_t; GLADE_CALLBACK void on_canfn_view_summary_activate(GtkWidget *, GdkEvent *, gpointer); GLADE_CALLBACK void on_canfn_view_call_butterfly_activate(GtkWidget *, GdkEvent *, gpointer); GLADE_CALLBACK void on_canfn_view_source_activate(GtkWidget *, GdkEvent *, gpointer); class canvas_function_popup_t { public: canvas_function_popup_t(GnomeCanvasItem *item, cov_function_t *fn); ~canvas_function_popup_t(); void set_foreground(const char *); void set_background(const char *); private: static gboolean on_leave_event(GtkWidget *, GdkEvent *, gpointer); static gboolean on_button_press_event(GtkWidget *, GdkEvent *, gpointer); static gboolean on_item_event(GnomeCanvasItem *, GdkEvent *, gpointer); static void on_item_destroy(GnomeCanvasItem *, gpointer); void show(GdkEvent *event); void show_menu(GdkEvent *event); struct widgets_t { int refcount_; canvas_function_popup_t *current_; GtkWidget *popup_; GtkWidget *border_; GtkWidget *background_; GtkWidget *function_label_; GtkWidget *source_label_; GtkWidget *coverage_label_; GtkWidget *menu_; }; static widgets_t widgets_; GnomeCanvasItem *item_; cov_function_t *function_; char foreground_[32]; char background_[32]; char coverage_[128]; friend void on_canfn_view_summary_activate(GtkWidget *, GdkEvent *, gpointer); friend void on_canfn_view_call_butterfly_activate(GtkWidget *, GdkEvent *, gpointer); friend void on_canfn_view_source_activate(GtkWidget *, GdkEvent *, gpointer); }; #endif /* _ggcov_canvas_function_popup_H_ */ ggcov-0.8.4/src/cov_scope.H0000644000175000017500000000641411557262605012447 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_scope_H_ #define _ggcov_cov_scope_H_ 1 #include "common.h" #include "cov_types.H" /* * Class cov_scope_t reifies a scope to which a coverage * statistics summary can be calculated. */ class cov_scope_t { public: cov_scope_t(); virtual ~cov_scope_t(); const cov_stats_t *get_stats(); virtual const char *describe() const = 0; cov::status_t status(); protected: virtual cov::status_t calc_stats(cov_stats_t *) = 0; void dirty(); private: gboolean dirty_; cov_stats_t stats_; cov::status_t status_; }; class cov_overall_scope_t : public cov_scope_t { public: cov_overall_scope_t(); ~cov_overall_scope_t(); virtual const char *describe() const; private: virtual cov::status_t calc_stats(cov_stats_t *); }; class cov_file_t; class cov_file_scope_t : public cov_scope_t { public: cov_file_scope_t(const char *filename); cov_file_scope_t(const cov_file_t *); ~cov_file_scope_t(); virtual const char *describe() const; private: virtual cov::status_t calc_stats(cov_stats_t *); const cov_file_t *file_; }; /* TODO: directory or group of files */ class cov_function_t; class cov_function_scope_t : public cov_scope_t { public: cov_function_scope_t(const cov_function_t *); ~cov_function_scope_t(); const cov_function_t *function() const { return function_; } virtual const char *describe() const; private: virtual cov::status_t calc_stats(cov_stats_t *); const cov_function_t *function_; }; class cov_range_scope_t : public cov_scope_t { public: cov_range_scope_t(const char *filename, unsigned long start, unsigned long end); cov_range_scope_t(const cov_file_t *, unsigned long start, unsigned long end); ~cov_range_scope_t(); virtual const char *describe() const; private: virtual cov::status_t calc_stats(cov_stats_t *); void set_description(); const cov_file_t *file_; unsigned long start_; unsigned long end_; char *description_; }; class cov_compound_scope_t : public cov_scope_t { public: cov_compound_scope_t(); cov_compound_scope_t(list_t *); ~cov_compound_scope_t(); void add_child(cov_scope_t *); void remove_child(cov_scope_t *); virtual const char *describe() const; private: virtual cov::status_t calc_stats(cov_stats_t *); list_t children_; }; #endif /* _ggcov_cov_scope_H_ */ ggcov-0.8.4/src/php_scenegen.C0000644000175000017500000001341311557262605013115 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "php_scenegen.H" #include CVSID("$Id: php_scenegen.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ php_scenegen_t::php_scenegen_t() { ser_.begin_array(); } php_scenegen_t::~php_scenegen_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ unsigned int php_scenegen_t::get_color(unsigned int rgb) { unsigned int i; for (i = 0 ; i < ncolors_ ; i++) { if (colors_[i] == rgb) return i; } ncolors_++; colors_ = (unsigned int *)g_realloc(colors_, sizeof(unsigned int)*ncolors_); i = ncolors_-1; colors_[i] = rgb; ser_.next_key(); ser_.begin_array(5); ser_.next_key(); ser_.integer(CODE_COLOR); ser_.next_key(); ser_.integer(i); ser_.next_key(); ser_.integer((rgb>>16)&0xff); ser_.next_key(); ser_.integer((rgb>>8)&0xff); ser_.next_key(); ser_.integer((rgb)&0xff); ser_.end_array(); return i; } void php_scenegen_t::noborder() { border_flag_ = FALSE; } void php_scenegen_t::border(unsigned int rgb) { border_flag_ = TRUE; border_idx_ = get_color(rgb); } void php_scenegen_t::nofill() { fill_flag_ = FALSE; } void php_scenegen_t::fill(unsigned int rgb) { fill_flag_ = TRUE; fill_idx_ = get_color(rgb); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_scenegen_t::box(double x, double y, double w, double h) { ser_.next_key(); ser_.begin_array(7); ser_.next_key(); ser_.integer(CODE_RECTANGLE); ser_.next_key(); ser_.floating(x); ser_.next_key(); ser_.floating(y); ser_.next_key(); ser_.floating(x+w); ser_.next_key(); ser_.floating(y+h); ser_.next_key(); if (fill_flag_) ser_.integer(fill_idx_); else ser_.null(); ser_.next_key(); if (border_flag_) ser_.integer(border_idx_); else ser_.null(); ser_.end_array(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_scenegen_t::textbox( double x, double y, double w, double h, const char *text) { ser_.next_key(); ser_.begin_array(5); ser_.next_key(); ser_.integer(CODE_TEXT); ser_.next_key(); ser_.floating(x); ser_.next_key(); ser_.floating(y); ser_.next_key(); ser_.string(text); ser_.next_key(); ser_.integer(border_idx_); ser_.end_array(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_scenegen_t::polyline_begin(gboolean arrow) { first_arrow_flag_ = arrow; points_.num_points = 0; } void php_scenegen_t::polyline_point(double x, double y) { unsigned int newsize = 2 * sizeof(double) * (points_.num_points+1); if (newsize > points_.size) { /* round newsize up to a 256-byte boundary to reduce allocations */ newsize = (newsize + 0xff) & ~0xff; /* TODO: use a new gnb_xrealloc */ points_.coords = (double *)g_realloc(points_.coords, newsize); points_.size = newsize; } double *p = points_.coords + 2*points_.num_points; p[0] = x; p[1] = y; points_.num_points++; } #if 0 // Serialize a polygon // (This code was used in the first attempt at rendering // arrowheads, but testing showed that the arrowhead // geometry calculations needed to be performed in image // space to avoid skewing. It might be useful again). ser_.next_key(); ser_.begin_array(4); ser_.next_key(); ser_.integer(CODE_POLYGON); ser_.next_key(); ser_.begin_array(6); for (i = 0 ; i < 6 ; i++) { ser_.next_key(); ser_.floating(c[i]); } ser_.end_array(); ser_.next_key(); ser_.integer(fill_idx_); // fill ser_.next_key(); ser_.integer(fill_idx_); // border ser_.end_array(); #endif /* * TODO: need to make use of the arrow_shape_ */ void php_scenegen_t::polyline_end(gboolean arrow) { unsigned int i; unsigned int nc = 2*points_.num_points; if (points_.num_points < 2) return; ser_.next_key(); ser_.begin_array(5); ser_.next_key(); ser_.integer(CODE_POLYLINE); ser_.next_key(); ser_.begin_array(nc); for (i = 0 ; i < nc ; i++) { ser_.next_key(); ser_.floating(points_.coords[i]); } ser_.end_array(); ser_.next_key(); if (first_arrow_flag_) ser_.floating(arrow_size_); else ser_.null(); ser_.next_key(); if (arrow) ser_.floating(arrow_size_); else ser_.null(); ser_.next_key(); ser_.integer(fill_idx_); ser_.end_array(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void php_scenegen_t::bounds(double x, double y, double w, double h) { ser_.next_key(); ser_.begin_array(5); ser_.next_key(); ser_.integer(0); ser_.next_key(); ser_.floating(x); ser_.next_key(); ser_.floating(y); ser_.next_key(); ser_.floating(w); ser_.next_key(); ser_.floating(h); ser_.end_array(); } const estring & php_scenegen_t::data() { ser_.end_array(); return ser_.data(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_line.H0000644000175000017500000000437511557262605012271 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_line_H_ #define _ggcov_cov_line_H_ 1 #include "string_var.H" class cov_file_t; class cov_function_t; class cov_line_t { public: count_t count() { if (!count_valid_) calculate_count(); return count_; } cov::status_t status() { if (!count_valid_) calculate_count(); return status_; } /* Check for suppression without the side effect of calculate_count() */ gboolean is_suppressed() const { return (count_valid_ && status_ == cov::SUPPRESSED); } const GList *blocks() const { return blocks_; } cov_function_t *function() const; static cov_line_t *find(const cov_location_t *); /* * Format a string compactly describing the list of blocks * on a particular line. Used in the Source window and * for tggcov. Width should be at least 8. */ unsigned int format_blocks(char *buf, unsigned int maxlen); private: cov_line_t(); ~cov_line_t(); static void remove(const cov_location_t *, cov_block_t *); void calculate_count(); void suppress() { count_valid_ = true; status_ = cov::SUPPRESSED; } GList *blocks_; boolean count_valid_; /* covers status_, count_ */ cov::status_t status_; count_t count_; friend class cov_file_t; friend class cov_block_t; friend class cov_file_src_parser_t; }; #endif /* _ggcov_cov_line_H_ */ ggcov-0.8.4/src/hashtable.H0000644000175000017500000001315711557262605012424 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2011 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _hashtable_H_ #define _hashtable_H_ 1 #include "common.h" #include "list.H" /* * Wrapper for glib's GHashTable structure. * * Note that for memory efficiency, we inherit from GHashTable rather * than contain a pointer to it. The problem is that GHashTable is * an opaque private structure, so you must never, ever ever allocate * hashtable_t as auto variables or struct member, in fact any way * except dynamically with new(). */ // fool the compiler into believing we have enough information // about GHashTable to be able to derive from it. struct _GHashTable { int dummy_; }; template class hashtable_ops_t { public: static GHashFunc hash; /* for hash, returns 1 iff same */ static GCompareFunc compare; /* for sorting keys, returns <0, 0, >0 like strcmp */ static GCompareFunc sort_compare; }; extern void gnb_hash_table_add_one_key(gpointer, gpointer, gpointer); template class hashtable_t; template class hashtable_iter_t { private: #if HAVE_G_HASH_TABLE_ITER GHashTableIter hiter_; #else GHashTable *table_; list_t keys_; gboolean init_; #endif gpointer key_, value_; gboolean valid_; hashtable_iter_t(GHashTable *ht) : key_(0), value_(0), valid_(TRUE) { #if HAVE_G_HASH_TABLE_ITER g_hash_table_iter_init(&hiter_, ht); next(); #else table_ = ht; init_ = FALSE; /* initialise the list of keys later so we can * return the iterator from ht::first() safely */ #endif } public: hashtable_iter_t() : key_(0), value_(0), valid_(FALSE) { #if HAVE_G_HASH_TABLE_ITER memset(&hiter_, 0, sizeof(hiter_)); #else table_ = 0; init_ = FALSE; #endif } ~hashtable_iter_t() { #if !HAVE_G_HASH_TABLE_ITER keys_.remove_all(); #endif } void delayed_init() { #if !HAVE_G_HASH_TABLE_ITER if (!init_ && table_) { ((hashtable_t*)table_)->keys(&keys_); init_ = TRUE; next(); } #endif } T *operator++() { delayed_init(); return next() ? (T *)value_ : 0; } T *operator*() { delayed_init(); return (T *)value_; } gboolean next() { delayed_init(); #if HAVE_G_HASH_TABLE_ITER gboolean r = (valid_ && g_hash_table_iter_next(&hiter_, &key_, &value_)); if (!r) { key_ = value_ = 0; valid_ = FALSE; } #else if (valid_) { key_ = (gpointer)keys_.remove_head(); if (key_) { value_ = g_hash_table_lookup(table_, key_); } else { value_ = 0; valid_ = FALSE; } } #endif return valid_; } gboolean next(K* &kt, T* &vt) { if (next()) { kt = (K *)key_; vt = (T *)value_; return TRUE; } return FALSE; } K *key() { delayed_init(); return (K *)key_; } T *value() { delayed_init(); return (T *)value_; } void remove() { delayed_init(); #if HAVE_G_HASH_TABLE_ITER if (valid_) g_hash_table_iter_remove(&hiter_); #else if (valid_) g_hash_table_remove(table_, key_); #endif } friend class hashtable_t; }; template class hashtable_t : public GHashTable { public: /* ctor */ hashtable_t() { } /* dtor */ ~hashtable_t() { } void *operator new(size_t) { return g_hash_table_new( hashtable_ops_t::hash, hashtable_ops_t::compare); } void operator delete(void *x) { g_hash_table_destroy((GHashTable *)x); } void insert(K *key, T *value) { g_hash_table_insert(this, (gpointer)key, (gpointer)value); } void remove(K *key) { g_hash_table_remove(this, (gconstpointer)key); } T *lookup(K *key) { return (T *)g_hash_table_lookup(this, (gconstpointer)key); } gboolean lookup_extended(K *key, K *orig_key_ret, T **value_ret) { return g_hash_table_lookup_extended(this, (gconstpointer)key, (gpointer *)orig_key_ret, (gpointer *)value_ret); } void foreach(void (*func)(K*, T*, void *closure), void *closure) { g_hash_table_foreach(this, (GHFunc)*func, closure); } void foreach_remove(gboolean (*func)(K*, T*, void *closure), void *closure) { g_hash_table_foreach_remove(this, (GHRFunc)func, closure); } guint size() const { return g_hash_table_size((GHashTable*)this); } /* Builds a list of all the keys, sorted in increasing key order */ void keys(list_t *list) const { g_hash_table_foreach((GHashTable*)this, gnb_hash_table_add_one_key, list); list->sort((gint (*)(const K*, const K*))hashtable_ops_t::sort_compare); } hashtable_iter_t first() const { return hashtable_iter_t((GHashTable *)this); } }; #endif /* _hashtable_H_ */ ggcov-0.8.4/src/ui.h0000644000175000017500000001222511453570563011141 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_ui_h_ #define _ggcov_ui_h_ 1 #include "common.h" #include "uicommon.h" #include #include GladeXML *ui_load_tree(const char *root); void ui_prepend_glade_path(const char *dir); GtkWidget *ui_get_dummy_menu(GladeXML *xml, const char *name); /* combobox get/set current item using index */ int gtk_combo_get_current(GtkCombo *combo); void gtk_combo_set_current(GtkCombo *combo, int n); /* combobox add/get current item using data */ void ui_combo_add_data(GtkCombo *combo, const char *label, gpointer data); gpointer ui_combo_get_current_data(GtkCombo *combo); void ui_combo_set_current_data(GtkCombo *combo, gpointer data); void ui_combo_clear(GtkCombo *combo); /* Get the nearest enclosing dialog or toplevel window */ GtkWidget *ui_get_window(GtkWidget *w); /* when the last registered window is destroyed, quit the main loop */ void ui_register_window(GtkWidget *w); /* remember a menu which is updated when windows are registered & destroyed */ void ui_register_windows_menu(GtkWidget *menu); /* add a predefined menu entry to all Windows menus */ void ui_register_windows_entry(const char *label, void (*callback)(GtkWidget *, gpointer userdata), gpointer userdata); /* * Set the icon that will be used for all toplevel windows. */ void ui_set_default_icon(const char * const *xpm_data); /* * Update the window's title to reflect `filename'. The * magic string @FILE@ is used in the glade file to mark * where the filename will be inserted; @VERSION@ works too. */ void ui_window_set_title(GtkWidget *w, const char *filename); /* delete every item in the menu except a tearoff */ void ui_delete_menu_items(GtkWidget *menu); GtkWidget *ui_menu_add_simple_item(GtkWidget *menu, const char *label, void (*callback)(GtkWidget*, gpointer), gpointer calldata); GtkWidget *ui_menu_add_seperator(GtkWidget *menu); #if !GTK2 /* Functions for making the column labels in a clist have sort arrows */ void ui_clist_init_column_arrow(GtkCList *, int col); void ui_clist_set_sort_column(GtkCList *, int col); void ui_clist_set_sort_type(GtkCList *, GtkSortType ty); #endif /* * Functions to abstract some of the differences between * gtk1's GtkCList/GtkCTree and gtk2's GtkTreeView. */ gpointer ui_list_double_click_data(GtkWidget *, GdkEvent *, int col/*gtk2 closure column*/); void ui_list_set_column_visibility(GtkWidget *, int col, gboolean vis); /* * Abstraction of GtkText (gtk 1.2) and GtkTextView et al (gtk 2.0). * Text windows get a fixed width font and support colour coding by * the use of "tags". Other features of gtk 2.0 are not supported * through this interface. */ /* set up a text window, force the font etc */ void ui_text_setup(GtkWidget *w); /* return the current font width, e.g. for aligning title columns */ int ui_text_font_width(GtkWidget *w); /* * Adjust the text size in the given text widget according to `dirn': * * < 0: decrease text size by 10% * == 0: set text size to normal text size for the window * > 0: increase text size by 10% */ void ui_text_adjust_text_size(GtkWidget *w, int dirn); #if GTK2 typedef GtkTextTag ui_text_tag; #else typedef struct ui_text_tag_s ui_text_tag; #endif /* create a colour coding tag */ ui_text_tag *ui_text_create_tag(GtkWidget *w, const char *name, GdkColor *fg); /* sample and restore the vertical scroll setting */ gfloat ui_text_vscroll_sample(GtkWidget *w); void ui_text_vscroll_restore(GtkWidget *w, gfloat); /* add text to the window in streaming mode. tag may be NULL. len may be -1 for strlen */ void ui_text_begin(GtkWidget *w); void ui_text_add(GtkWidget *w, ui_text_tag *tag, const char *s, int len); void ui_text_end(GtkWidget *w); /* select all the lines from `start' to `end' inclusive */ void ui_text_select_lines(GtkWidget *w, unsigned long start, unsigned long end); /* ensure the given line is visible, if necessary scrolling vertically */ void ui_text_ensure_visible(GtkWidget *w, unsigned long line); /* return the range of lines currently selected */ void ui_text_get_selected_lines(GtkWidget *w, unsigned long *startp, unsigned long *endp); /* get the entire contents of the window, needs to be g_free()d */ char *ui_text_get_contents(GtkWidget *w); typedef struct { const char *name; GCallback func; } ui_named_callback_t; #endif /* _ggcov_ui_h_ */ ggcov-0.8.4/src/cov_bfd.H0000644000175000017500000001173111453570563012067 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_bfd_H_ #define _ggcov_bfd_H_ 1 #include "common.h" #include "cov_types.H" #ifdef HAVE_LIBBFD #include #ifdef HAVE_ELF_H #include #endif /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * cov_bfd_t is an abstraction of an object file or executable * accessed using the GNU BFD (Binary File Descriptor) library. * As ggcov never writes objects, cov_bfd_t is hardcoded for * BFD read mode. */ class cov_bfd_t; class cov_bfd_section_t { public: const char *name() const { return ((asection *)this)->name; } cov_bfd_t *owner() const { return (cov_bfd_t *)((asection *)this)->owner->usrdata; } arelent **get_relocs(unsigned int *lenp); unsigned char *get_contents(bfd_size_type *lenp); unsigned char *get_contents(unsigned long startaddr, unsigned long length); gboolean find_nearest_line(unsigned long address, cov_location_t *locp/*return*/, const char **functionp/*return*/); unsigned long raw_size() const { #ifdef HAVE_BFD_ASECTION_RAWSIZE return ((asection *)this)->rawsize; #else return ((asection *)this)->_raw_size; #endif } }; class cov_bfd_t { public: cov_bfd_t(); ~cov_bfd_t(); gboolean open(const char *filename); gboolean open(const char *filename, FILE *); const char *filename() const; gboolean big_endian() const { return bfd_big_endian(abfd_); } gboolean little_endian() const { return bfd_little_endian(abfd_); } unsigned int num_symbols(); const asymbol *nth_symbol(unsigned int); unsigned int num_code_sections(); cov_bfd_section_t *nth_code_section(unsigned int); cov_bfd_section_t *find_section(const char *secname); /* Dump various structures, for debugging; idx==0 dumps header */ static void dump_symbol(unsigned int idx, asymbol *sym); static void dump_reloc(unsigned int idx, arelent *rel); enum bfd_flavour flavour() const { return bfd_get_flavour(abfd_); } private: /* utility functions */ gboolean get_symbols(); gboolean get_code_sections(); gboolean post_open(); bfd *abfd_; boolean have_symbols_:1; boolean have_code_sections_:1; unsigned int num_symbols_; asymbol **symbols_; unsigned int num_code_sections_; asection **code_sections_; friend class cov_bfd_section_t; }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #else /* !HAVE_LIBBFD */ /* just enough to get other code compiling but not running */ typedef struct _asymbol asymbol; typedef struct _arelent arelent; typedef uint32_t bfd_size_type; enum bfd_flavour { bfd_target_unknown_flavour }; class cov_bfd_section_t { public: arelent **get_relocs(unsigned int *lenp) { return 0; } unsigned char *get_contents(bfd_size_type *lenp) { return 0; } unsigned char *get_contents(unsigned long startaddr, unsigned long length) { return 0; } gboolean find_nearest_line(unsigned long address, cov_location_t *locp/*return*/, const char **functionp/*return*/) { return FALSE; } unsigned long raw_size() const { return 0; } }; class cov_bfd_t { public: cov_bfd_t() {} ~cov_bfd_t() {} gboolean open(const char *filename) { dprintf1(D_CGRAPH, "ggcov was compiled without the BFD library, " "cannot open %s\n", filename); return FALSE; } const char *filename() const { return 0; } unsigned int num_symbols() { return 0; } const asymbol *nth_symbol(unsigned int) { return 0; } unsigned int num_code_sections() { return 0; } cov_bfd_section_t *nth_code_section(unsigned int) { return 0; } cov_bfd_section_t *find_section(const char *secname) { return 0; } /* Dump various structures, for debugging; idx==0 dumps header */ static void dump_symbol(unsigned int idx, asymbol *sym) {} static void dump_reloc(unsigned int idx, arelent *rel) {} enum bfd_flavour flavour() const { return (enum bfd_flavour)0; } private: }; #endif /* !HAVE_LIBBFD */ #endif /* _ggcov_bfd_H_ */ ggcov-0.8.4/src/cov_stab32.C0000644000175000017500000001037111453570563012424 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov_specific.H" #include "string_var.H" #ifdef HAVE_LIBBFD CVSID("$Id: cov_stab32.C,v 1.7 2010-05-09 05:37:15 gnb Exp $"); /* * Machine-specific code to read 32-bit .stabs entries from an * object file or executable and parse them for source filenames. * Large chunks of code ripped from binutils/rddbg.c and stabs.c */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * This struct describes the in-file format of a 32-bit .stabs entry */ typedef struct { uint32_t strx; #define N_SO 0x64 uint8_t type; uint8_t other; uint16_t desc; uint32_t value; } cov_stab32_t; class cov_stab32_filename_scanner_t : public cov_filename_scanner_t { public: ~cov_stab32_filename_scanner_t(); gboolean attach(cov_bfd_t *b); char *next(); private: /* contents of .stab section */ cov_stab32_t *stabs_; bfd_size_type num_stabs_; /* contents of .stabstr section */ char *strings_; bfd_size_type string_size_; /* iteration variables */ unsigned int stabi_; bfd_size_type stroff_; bfd_size_type next_stroff_; string_var dir_; }; COV_FACTORY_STATIC_REGISTER(cov_filename_scanner_t, cov_stab32_filename_scanner_t); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_stab32_filename_scanner_t::~cov_stab32_filename_scanner_t() { if (stabs_ != 0) g_free(stabs_); if (strings_ != 0) g_free(strings_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_stab32_filename_scanner_t::attach(cov_bfd_t *b) { cov_bfd_section_t *sec; if (!cov_filename_scanner_t::attach(b)) return FALSE; if ((sec = cbfd_->find_section(".stab")) == 0 || (stabs_ = (cov_stab32_t *)sec->get_contents(&num_stabs_)) == 0) return FALSE; num_stabs_ /= sizeof(cov_stab32_t); if ((sec = cbfd_->find_section(".stabstr")) == 0 || (strings_ = (char *)sec->get_contents(&string_size_)) == 0) if (strings_ == 0) return FALSE; assert(sizeof(cov_stab32_t) == 12); return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * cov_stab32_filename_scanner_t::next() { if (!stabi_) dprintf0(D_STABS|D_VERBOSE, "index|type|other|desc|value |string\n"); for ( ; stabi_ < num_stabs_ ; stabi_++) { cov_stab32_t *st = &stabs_[stabi_]; if (st->type == 0) { /* * Special type 0 stabs indicate the offset to the * next string table. */ stroff_ = next_stroff_; next_stroff_ += st->value; } else if (st->type == N_SO) { if (stroff_ + st->strx > string_size_) { /* TODO */ fprintf(stderr, "%s: stab entry %u is corrupt, strx = 0x%x, type = %d\n", cbfd_->filename(), stabi_, st->strx, st->type); continue; } const char *s = strings_ + stroff_ + st->strx; dprintf6(D_STABS|D_VERBOSE, "%5u|%4x|%5x|%04x|%08x|%s\n", stabi_, st->type, st->other, st->desc, st->value, s); if (s[0] == '\0') continue; if (s[strlen(s)-1] == '/') dir_ = s; else { stabi_++; char *res = (s[0] == '/' ? g_strdup(s) : g_strconcat(dir_.data(), s, (char *)0)); dprintf1(D_STABS, "Scanned source file \"%s\"\n", res); return res; } } } return 0; /* end of iteration */ } #endif /*HAVE_LIBBFD*/ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/uicommon.h0000644000175000017500000000214211453570563012347 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_uicommon_h_ #define _ggcov_uicommon_h_ 1 #include #if GTK_CHECK_VERSION(1,99,0) #define GTK2 1 #else #define GTK2 0 #endif #ifdef __cplusplus #define GLADE_CALLBACK extern "C" #else #define GLADE_CALLBACK #endif #endif /* _ggcov_uicommon_h_ */ ggcov-0.8.4/src/filetest.c0000644000175000017500000000176511565735447012355 00000000000000#include "filename.h" char *argv0; int main(int argc, char **argv) { int i; char *in, *out, *expected; argv0 = argv[0]; for (i = 1 ; i < argc ; i++) { if (!strcmp(argv[i], "make_absolute")) { in = argv[++i]; expected = argv[++i]; out = file_make_absolute(in); fprintf(stderr, "file_make_absolute(\"%s\") => \"%s\"\n", in, out); if (strcmp(out, expected)) { fprintf(stderr, "ERROR: expected \"%s\" got \"%s\"\n", expected, out); exit(1); } g_free(out); } else if (!strcmp(argv[i], "normalise")) { in = argv[++i]; expected = argv[++i]; out = file_normalise(in); fprintf(stderr, "file_normalise(\"%s\") => \"%s\"\n", in, out); if (strcmp(out, expected)) { fprintf(stderr, "ERROR: expected \"%s\" got \"%s\"\n", expected, out); exit(1); } g_free(out); } else { fprintf(stderr, "Unknown function to test: %s\n", argv[i]); } } return 0; } ggcov-0.8.4/src/prefswin.C0000644000175000017500000001365011453570563012317 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #include "prefswin.H" #include "prefs.H" #include CVSID("$Id: prefswin.C,v 1.8 2010-05-09 05:37:15 gnb Exp $"); prefswin_t *prefswin_t::instance_ = 0; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ prefswin_t::prefswin_t() { GladeXML *xml; assert(instance_ == 0); instance_ = this; /* load the interface & connect signals */ xml = ui_load_tree("preferences"); set_window(glade_xml_get_widget(xml, "preferences")); reuse_srcwin_check_ = glade_xml_get_widget(xml, "preferences_general_reuse_srcwin_check"); reuse_summwin_check_ = glade_xml_get_widget(xml, "preferences_general_reuse_summwin_check"); color_pickers_[0] = glade_xml_get_widget(xml, "preferences_colors_covered_foreground"); color_pickers_[1] = glade_xml_get_widget(xml, "preferences_colors_covered_background"); color_pickers_[2] = glade_xml_get_widget(xml, "preferences_colors_partcovered_foreground"); color_pickers_[3] = glade_xml_get_widget(xml, "preferences_colors_partcovered_background"); color_pickers_[4] = glade_xml_get_widget(xml, "preferences_colors_uncovered_foreground"); color_pickers_[5] = glade_xml_get_widget(xml, "preferences_colors_uncovered_background"); color_pickers_[6] = glade_xml_get_widget(xml, "preferences_colors_uninstrumented_foreground"); color_pickers_[7] = glade_xml_get_widget(xml, "preferences_colors_uninstrumented_background"); color_pickers_[8] = glade_xml_get_widget(xml, "preferences_colors_suppressed_foreground"); color_pickers_[9] = glade_xml_get_widget(xml, "preferences_colors_suppressed_background"); } prefswin_t::~prefswin_t() { assert(instance_ == this); instance_ = 0; } prefswin_t * prefswin_t::instance() { if (instance_ == 0) new prefswin_t; return instance_; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void prefswin_t::update_picker(int i, const GdkColor *col) { gnome_color_picker_set_i16(GNOME_COLOR_PICKER(color_pickers_[i]), col->red, col->green, col->blue, 65535); } void prefswin_t::update() { dprintf0(D_PREFSWIN, "prefswin_t::update\n"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reuse_srcwin_check_), prefs.reuse_srcwin); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(reuse_summwin_check_), prefs.reuse_summwin); update_picker(0, &prefs.covered_foreground); update_picker(1, &prefs.covered_background); update_picker(2, &prefs.partcovered_foreground); update_picker(3, &prefs.partcovered_background); update_picker(4, &prefs.uncovered_foreground); update_picker(5, &prefs.uncovered_background); update_picker(6, &prefs.uninstrumented_foreground); update_picker(7, &prefs.uninstrumented_background); update_picker(8, &prefs.suppressed_foreground); update_picker(9, &prefs.suppressed_background); } void prefswin_t::populate() { update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void prefswin_t::grey_items() { dprintf0(D_PREFSWIN, "prefswin_t::grey_items\n"); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void prefswin_t::apply_picker(int i, GdkColor *col) { gushort dummy; gnome_color_picker_get_i16(GNOME_COLOR_PICKER(color_pickers_[i]), &col->red, &col->green, &col->blue, &dummy); } void prefswin_t::apply() { dprintf0(D_PREFSWIN, "prefswin_t::apply\n"); prefs.reuse_srcwin = GTK_TOGGLE_BUTTON(reuse_srcwin_check_)->active; prefs.reuse_summwin = GTK_TOGGLE_BUTTON(reuse_summwin_check_)->active; apply_picker(0, &prefs.covered_foreground); apply_picker(1, &prefs.covered_background); apply_picker(2, &prefs.partcovered_foreground); apply_picker(3, &prefs.partcovered_background); apply_picker(4, &prefs.uncovered_foreground); apply_picker(5, &prefs.uncovered_background); apply_picker(6, &prefs.uninstrumented_foreground); apply_picker(7, &prefs.uninstrumented_background); apply_picker(8, &prefs.suppressed_foreground); apply_picker(9, &prefs.suppressed_background); prefs.save(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_preferences_ok_clicked(GtkWidget *w, gpointer data) { prefswin_t *pw = prefswin_t::from_widget(w); pw->apply(); delete pw; } GLADE_CALLBACK void on_preferences_apply_clicked(GtkWidget *w, gpointer data) { prefswin_t *pw = prefswin_t::from_widget(w); pw->apply(); } GLADE_CALLBACK void on_preferences_cancel_clicked(GtkWidget *w, gpointer data) { prefswin_t *pw = prefswin_t::from_widget(w); delete pw; } GLADE_CALLBACK void on_preferences_activate(GtkWidget *w, gpointer data) { prefswin_t::instance()->show(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/estring.H0000644000175000017500000001222311565735435012142 00000000000000/* * CANT - A C implementation of the Apache/Tomcat ANT build system * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _estring_H_ #define _estring_H_ #include "common.h" /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #ifdef __GNUC__ #define _printf_fmt(fmtidx,firsta) \ __attribute (( format(printf, fmtidx, firsta) )) #else #define _printf_fmt(fmtidx,firsta) #endif class estring { private: char *data_; unsigned int length_; /* string length not including nul */ unsigned int available_; /* total bytes available, >= length+1 */ void inline expand_by(unsigned int dl); public: // default ctor estring() : data_(0), length_(0), available_(0) { } // const initialisation ctor estring(const char *s) { if (s == 0) { data_ = 0; length_ = available_ = 0; } else { data_ = g_strdup(s); length_ = strlen(s); available_ = length_+1; } } // const initialisation ctor with length estring(const char *s, unsigned int len) { if (s == 0) { data_ = 0; length_ = available_ = 0; } else { data_ = g_new(char, len+1); memcpy(data_, s, len); data_[len] = '\0'; length_ = len; available_ = len+1; } } // non-const initialisation ctor estring(char *s) : data_(s) { if (s == 0) { length_ = available_ = 0; } else { length_ = strlen(s); available_ = length_+1; } } // non-const initialisation ctor with length estring(char *s, unsigned int len) : data_(s) { if (s == 0) { length_ = available_ = 0; } else { length_ = len; available_ = len+1; data_[len] = '\0'; } } // dtor ~estring() { if (data_ != 0) { g_free(data_); data_ = 0; length_ = 0; available_ = 0; } } const char *data() const { return data_; } operator const char *() const { return data_; } // assignment operators const char *operator=(const char *s) { if (s == 0) { length_ = available_ = 0; if (data_ != 0) g_free(data_); data_ = 0; } else { length_ = 0; append_string(s); } return data_; } const char *operator=(char *s) { if (data_ != 0) g_free(data_); data_ = s; if (s == 0) { length_ = available_ = 0; } else { length_ = strlen(s); available_ = length_+1; } return data_; } unsigned int length() const { return length_; } char last() const { return data_[length_-1]; } char *take() { char *d = data_; data_ = 0; length_ = 0; available_ = 0; return d; } void append_string(const char *str); void append_char(char c); void append_chars(const char *buf, unsigned int buflen); void append_vprintf(const char *fmt, va_list); void append_printf(const char *fmt, ...) _printf_fmt(2,3); void replace_string(unsigned int start, unsigned int len, const char *str); void replace_char(unsigned int start, unsigned int len, char c); void replace_chars(unsigned int start, unsigned int len, const char *buf, unsigned int buflen); void replace_vprintf(unsigned int start, unsigned int len, const char *fmt, va_list); void replace_printf(unsigned int start, unsigned int len, const char *fmt, ...) _printf_fmt(4,5); void replace_all(const char *from, const char *to); void insert_string(unsigned int start, const char *str); void insert_char(unsigned int start, char c); void insert_chars(unsigned int start, const char *buf, int len); void insert_vprintf(unsigned int start, const char *fmt, va_list); void insert_printf(unsigned int start, const char *fmt, ...) _printf_fmt(3,4); void remove(unsigned int start, unsigned int len); void truncate(); void truncate_to(unsigned int len); void trim_nuls() { while (length_ > 0 && data_[length_-1] == '\0') length_--; } /* remove any trailing newlines or carriage returns */ void chomp(); /* searching */ int find_char(int c) const; int find_string(const char *s) const; int find_last_char(int c) const; int find_last_string(const char *s) const; }; #undef _printf_fmt /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #endif /* _estring_H_ */ ggcov-0.8.4/src/summarywin.H0000644000175000017500000001121711557262605012677 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_summarywin_H_ #define _ggcov_summarywin_H_ 1 #include "window.H" #include "cov.H" GLADE_CALLBACK void on_summary_overall_radio_toggled(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_filename_radio_toggled(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_filename_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_filename_view_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_function_radio_toggled(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_function_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_function_view_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_range_radio_toggled(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_range_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_range_start_spin_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_range_end_spin_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_summary_range_view_clicked(GtkWidget *w, gpointer data); class summarywin_t : public window_t { public: summarywin_t(); ~summarywin_t(); enum scope_t { SU_OVERALL, SU_FILENAME, SU_FUNCTION, SU_RANGE, SU_NSCOPES }; static void show_overall(); static void show_file(const cov_file_t *); static void show_function(const cov_function_t *); static void show_lines(const char *filename, unsigned long start, unsigned long end); private: static summarywin_t *instance(); void populate_filename_combo(GtkCombo *combo); void populate_function_combo(GtkCombo *combo); void populate(); void spin_update(); void update(); static summarywin_t *from_widget(GtkWidget *w) { return (summarywin_t *)window_t::from_widget(w); } void grey_items(); static list_t instances_; scope_t scope_; const cov_file_t *file_; /* SU_FILENAME, SU_RANGE */ const cov_function_t *function_; /* SU_FUNCTION */ unsigned long start_, end_; /* SU_RANGE */ GtkWidget *scope_radio_[SU_NSCOPES]; GtkWidget *filename_combo_; GtkWidget *filename_view_; GtkWidget *function_combo_; GtkWidget *function_view_; GtkWidget *range_combo_; GtkWidget *range_start_spin_; GtkWidget *range_end_spin_; GtkWidget *range_view_; gboolean populating_; GtkWidget *lines_label_; GtkWidget *lines_pc_label_; GtkWidget *lines_bar_; GtkWidget *functions_label_; GtkWidget *functions_pc_label_; GtkWidget *functions_bar_; GtkWidget *calls_label_; GtkWidget *calls_pc_label_; GtkWidget *calls_bar_; GtkWidget *branches_label_; GtkWidget *branches_pc_label_; GtkWidget *branches_bar_; GtkWidget *blocks_label_; GtkWidget *blocks_pc_label_; GtkWidget *blocks_bar_; friend void on_summary_overall_radio_toggled(GtkWidget *w, gpointer data); friend void on_summary_filename_radio_toggled(GtkWidget *w, gpointer data); friend void on_summary_filename_entry_changed(GtkWidget *w, gpointer data); friend void on_summary_filename_view_clicked(GtkWidget *w, gpointer data); friend void on_summary_function_radio_toggled(GtkWidget *w, gpointer data); friend void on_summary_function_entry_changed(GtkWidget *w, gpointer data); friend void on_summary_function_view_clicked(GtkWidget *w, gpointer data); friend void on_summary_range_radio_toggled(GtkWidget *w, gpointer data); friend void on_summary_range_entry_changed(GtkWidget *w, gpointer data); friend void on_summary_range_start_spin_changed(GtkWidget *w, gpointer data); friend void on_summary_range_end_spin_changed(GtkWidget *w, gpointer data); friend void on_summary_range_view_clicked(GtkWidget *w, gpointer data); }; #endif /* _ggcov_summarywin_H_ */ ggcov-0.8.4/src/cov_block.C0000644000175000017500000001621711557262605012425 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" #include "estring.H" #include "filename.h" CVSID("$Id: cov_block.C,v 1.21 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_block_t::cov_block_t() { } cov_block_t::~cov_block_t() { cov_arc_t *a; cov_location_t *loc; while ((loc = locations_.remove_head()) != 0) { cov_line_t::remove(loc, this); delete loc; } while ((a = in_arcs_.head()) != 0) delete a; while ((a = out_arcs_.head()) != 0) delete a; call_t *cc; while ((cc = pure_calls_.remove_head()) != 0) delete cc; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * cov_block_t::describe() const { return g_strdup_printf("%s:%d", function_->name(), idx_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_block_t::is_epilogue() const { unsigned int nblocks = function_->num_blocks(); return (nblocks >= 4 && idx_ == (nblocks - 2) && out_arcs_.length() == 1 && (*(out_arcs_.first()))->to()->bindex() == (nblocks-1)); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_block_t::add_location(const char *filename, unsigned lineno) { cov_location_t *loc; loc = new(cov_location_t); loc->filename = (char *)filename; /* stored externally */ loc->lineno = lineno; locations_.append(loc); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_block_t::set_count(count_t count) { assert(!count_valid_); count_valid_ = true; count_ = count; assert(out_ncalls_ == 0 || out_ncalls_ == 1); if (out_ncalls_) { list_iterator_t aiter; for (aiter = out_arcs_.first() ; aiter != (cov_arc_t *)0 ; ++aiter) { cov_arc_t *a = (*aiter); if (a->call_) { a->set_count(count); break; } } } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_block_t::is_call_site() const { return (idx_ > 0 && idx_ < function_->num_blocks()-1 && out_ncalls_ > 0); } gboolean cov_block_t::needs_call() const { return (is_call_site() && call_ == 0); } void cov_block_t::add_call(const char *name, const cov_location_t *loc) { static const char fn[] = "cov_block_t::add_call"; const cov_location_t *last; if (name == 0) name = "*pointer"; if (is_call_site() && ((last = get_last_location()) == 0 || *loc == *last)) { dprintf5(D_CGRAPH, "%s: call from %s:%u to %s at %s\n", fn, function_->name(), idx_, name, loc->describe()); if (call_ != 0) { /* multiple calls: assume the earlier one is actually pure */ dprintf5(D_CGRAPH, "%s: assuming earlier call from %s:%u to %s at %s was pure\n", fn, function_->name(), idx_, call_.data(), get_last_location()->describe()); pure_calls_.append(new call_t(call_, get_last_location())); } call_ = name; } else { dprintf5(D_CGRAPH, "%s: pure call from %s:%u to %s at %s\n", fn, function_->name(), idx_, name, loc->describe()); pure_calls_.append(new call_t(name, loc)); } } char * cov_block_t::pop_call() { assert(call_ != 0); return call_.take(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_block_t::suppress() { list_iterator_t aiter; list_iterator_t liter; suppressed_ = TRUE; /* suppress all outbound arcs */ for (aiter = out_arcs_.first() ; aiter != (cov_arc_t *)0 ; ++aiter) (*aiter)->suppress(); /* TODO: should we suppress inbound arcs also!?? */ /* suppress all lines */ for (liter = locations_.first() ; liter != (cov_location_t *)0 ; ++liter) cov_line_t::find(*liter)->suppress(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_block_t::finalise() { list_iterator_t aiter; for (aiter = out_arcs_.first() ; aiter != (cov_arc_t *)0 ; ++aiter) (*aiter)->finalise(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* * Calculate stats on a block. I don't really understand * the meaning of the arc bits, but copied the implications * from gcov.c. */ cov::status_t cov_block_t::calc_stats(cov_stats_t *stats) const { list_iterator_t aiter; list_iterator_t liter; unsigned int bits = 0; cov::status_t st; assert(function_->file()->finalised_); /* * Calculate call and branches coverage. */ for (aiter = out_arcs_.first() ; aiter != (cov_arc_t *)0 ; ++aiter) { cov_arc_t *a = *aiter; if (a->is_fall_through()) continue; /* control flow does not branch */ if (a->is_call()) stats->calls_[a->status()]++; else stats->branches_[a->status()]++; } /* * Calculate line coverage. */ for (liter = locations_.first() ; liter != (cov_location_t *)0 ; ++liter) { cov_line_t *ln = cov_line_t::find(*liter); const GList *blocks = ln->blocks(); st = ln->status(); /* * Compensate for multiple blocks on a line by * only counting when we hit the first block. * This will lead to anomalies when there are * multiple functions on the same line, but code * like that *deserves* anomalies. */ if (blocks->data != this) { if (st == cov::SUPPRESSED) bits |= (1<lines_[st]++; bits |= (1<blocks_[st]++; return st; } count_t cov_block_t::total(const GList *list) { count_t total = 0; for ( ; list != 0 ; list = list->next) { cov_block_t *b = (cov_block_t *)list->data; total += b->count_; } return total; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/reportwin.H0000644000175000017500000000305111453570563012512 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_reportwin_H_ #define _ggcov_reportwin_H_ 1 #include "window.H" #include "cov.H" #include "report.H" GLADE_CALLBACK void on_report_report_entry_changed(GtkWidget *w, gpointer data); class reportwin_t : public window_t { public: reportwin_t(); ~reportwin_t(); private: void populate_report_combo(); void populate(); void update(); static reportwin_t *from_widget(GtkWidget *w) { return (reportwin_t *)window_t::from_widget(w); } void grey_items(); const report_t *report_; GtkWidget *report_combo_; GtkWidget *text_; gboolean populating_; friend void on_report_report_entry_changed(GtkWidget *w, gpointer data); }; #endif /* _ggcov_reportwin_H_ */ ggcov-0.8.4/src/cov_calliter.C0000644000175000017500000000726111466064134013125 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" CVSID("$Id: cov_calliter.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_call_iterator_t::cov_call_iterator_t() { block_ = 0; pure_ = 0; } cov_call_iterator_t::~cov_call_iterator_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void cov_call_iterator_t::block_start(cov_block_t *b) { state_ = 0; block_ = b; pure_ = 0; arc_ = 0; pure_iter_ = b->pure_calls_.first(); } gboolean cov_call_iterator_t::block_next() { if (block_ == 0) return FALSE; if (state_ == 0) { if (pure_iter_ != (cov_block_t::call_t *)0) { pure_ = *pure_iter_; ++pure_iter_; return TRUE; } state_++; } if (state_ == 1) { pure_ = 0; list_iterator_t oi; for (oi = block_->out_arc_iterator() ; oi != (cov_arc_t *)0 ; ++oi) { arc_ = *oi; if (!arc_->is_call()) continue; if (arc_->is_suppressed()) continue; state_++; return TRUE; } } block_ = 0; arc_ = 0; pure_ = 0; // state remains =2 so we don't try to do more if called again return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_function_call_iterator_t::cov_function_call_iterator_t(cov_function_t *fn) : function_(fn), bindex_(1) { block_start(fn->nth_block(bindex_)); } cov_function_call_iterator_t::~cov_function_call_iterator_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_function_call_iterator_t::next() { for (;;) { if (block_next()) return TRUE; cov_block_t *b; if (++bindex_ >= function_->num_blocks() || (b = function_->nth_block(bindex_)) == 0) break; block_start(b); } return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_range_call_iterator_t::cov_range_call_iterator_t( const cov_location_t *first, const cov_location_t *last) : first_(first), last_(last) { if (first_) { location_ = *first; cov_line_t *ln = cov_line_t::find(&location_); if (ln != 0) blocks_ = ln->blocks(); } } cov_range_call_iterator_t::~cov_range_call_iterator_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_range_call_iterator_t::next() { for (;;) { if (block_next()) { if (*location() == location_) return TRUE; continue; } if (blocks_ != 0) { block_start((cov_block_t *)blocks_->data); blocks_ = blocks_->next; continue; } for (;;) { if (last_ == 0 || location_ == *last_) return FALSE; ++location_; cov_line_t *ln = cov_line_t::find(&location_); if (ln != 0 && (blocks_ = ln->blocks()) != 0) break; } } return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/newbbgdump.c0000644000175000017500000001537311453570563012660 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "covio.H" #include #include #include #include #include const char *argv0; static void hexdump(covio_t *io, off_t lastoff) { off_t here; gnb_u32_t d; off_t n = 0; here = io->tell(); assert((here - lastoff) % 4 == 0); io->seek(lastoff); for ( ; lastoff < here ; lastoff += 4, n += 4) { if (!(n & 0xf)) printf("%s%08lx: ", (n ? "\n" : ""), lastoff); io->read_u32(d); printf(GNB_U32_XFMT" ", d); } assert(here == lastoff); assert(lastoff == io->tell()); } static void fskip(covio_t *io, off_t len) { if (!io->skip(len)) { fprintf(stderr, "short file while skipping data\n"); exit(1); } } #define GCOV_TAG_FUNCTION ((gnb_u32_t)0x01000000) #define GCOV_TAG_BLOCKS ((gnb_u32_t)0x01410000) #define GCOV_TAG_ARCS ((gnb_u32_t)0x01430000) #define GCOV_TAG_LINES ((gnb_u32_t)0x01450000) #define GCOV_TAG_COUNTER_BASE ((gnb_u32_t)0x01a10000) #define GCOV_TAG_OBJECT_SUMMARY ((gnb_u32_t)0xa1000000) #define GCOV_TAG_PROGRAM_SUMMARY ((gnb_u32_t)0xa3000000) static const struct { const char *name; gnb_u32_t value; } gcov_tags[] = { {"GCOV_TAG_FUNCTION", GCOV_TAG_FUNCTION}, {"GCOV_TAG_BLOCKS", GCOV_TAG_BLOCKS}, {"GCOV_TAG_ARCS", GCOV_TAG_ARCS}, {"GCOV_TAG_LINES", GCOV_TAG_LINES}, {"GCOV_TAG_COUNTER_BASE", GCOV_TAG_COUNTER_BASE}, {"GCOV_TAG_OBJECT_SUMMARY", GCOV_TAG_OBJECT_SUMMARY}, {"GCOV_TAG_PROGRAM_SUMMARY", GCOV_TAG_PROGRAM_SUMMARY}, {0, 0} }; static const char * gcov_tag_as_string(gnb_u32_t tag) { int i; for (i = 0 ; gcov_tags[i].name != 0 ; i++) { if (gcov_tags[i].value == tag) return gcov_tags[i].name; } return "unknown"; } static void do_tags(covio_t *io) { gnb_u32_t tag, length; off_t lastoff = io->tell(); off_t chunkoff; while (io->read_u32(tag)) { if (!io->read_u32(length)) { fprintf(stderr, "%s: short file while reading tag header\n", io->filename()); exit(1); } hexdump(io, lastoff); printf("tag=%s length=%u\n", gcov_tag_as_string(tag), length); chunkoff = lastoff = io->tell(); switch (tag) { case GCOV_TAG_FUNCTION: { gnb_u32_t checksum; estring name; if (!io->read_string(name) || !io->read_u32(checksum)) { fprintf(stderr, "%s: short file while reading function\n", io->filename()); exit(1); } hexdump(io, lastoff); printf("name=\"%s\" checksum=0x%08x\n", name.data(), checksum); assert((off_t)(lastoff+length) == io->tell()); } break; case GCOV_TAG_BLOCKS: fskip(io, (off_t)length); hexdump(io, lastoff); printf("nblocks=%u\n", length/4); break; case GCOV_TAG_ARCS: { gnb_u32_t src, dst, flags; gnb_u32_t i; if (!io->read_u32(src)) { fprintf(stderr, "%s: short file while reading src block\n", io->filename()); exit(1); } hexdump(io, lastoff); printf("source-block=%u\n", src); lastoff = io->tell(); i = 4; while (i < length) { if (!io->read_u32(dst) || !io->read_u32(flags)) { fprintf(stderr, "%s: short file while reading arc\n", io->filename()); exit(1); } i += 8; hexdump(io, lastoff); printf("dest-block=%u flags=0x%x\n", dst, flags); lastoff = io->tell(); } } break; case GCOV_TAG_LINES: { gnb_u32_t block, line; if (!io->read_u32(block)) { fprintf(stderr, "%s: short file while reading block number\n", io->filename()); exit(1); } hexdump(io, lastoff); printf("block=%u\n", block); lastoff = io->tell(); while (io->read_u32(line)) { if (line == 0) { estring srcfilename; if (!io->read_string(srcfilename)) { fprintf(stderr, "%s: short file while reading filename\n", io->filename()); exit(1); } hexdump(io, lastoff); lastoff = io->tell(); if (srcfilename.length() == 0) { /* end of LINES block */ printf("end-of-lines\n"); break; } printf("srcfilename=\"%s\"\n", srcfilename.data()); } else { hexdump(io, lastoff); lastoff = io->tell(); printf("line=%u\n", line); } } } break; case GCOV_TAG_COUNTER_BASE: case GCOV_TAG_OBJECT_SUMMARY: case GCOV_TAG_PROGRAM_SUMMARY: default: fskip(io, (off_t)length); hexdump(io, lastoff); printf("???\n"); break; } assert((off_t)(chunkoff + length) == io->tell()); lastoff = io->tell(); } } static void do_file(const char *filename) { covio_t io(filename); gnb_u32_t magic, version; if (!io.open_read()) { perror(filename); return; } io.set_format(covio_t::FORMAT_GCC33); if (!io.read_u32(magic) || !io.read_u32(version)) { fprintf(stderr, "%s: short file while reading header\n", filename); exit(1); } hexdump(&io, 0UL); printf("magic=\"%c%c%c%c\" ", (magic>>24)&0xff, (magic>>16)&0xff, (magic>>8)&0xff, (magic)&0xff); printf("version=\"%c%c%c%c\"\n", (version>>24)&0xff, (version>>16)&0xff, (version>>8)&0xff, (version)&0xff); do_tags(&io); } static const char usage_str[] = "Usage: bbdump file.bb...\n"; static void usagef(int ec, const char *fmt, ...) { if (fmt != 0) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fputc('\n', stderr); } fputs(usage_str, stderr); fflush(stderr); /* JIC */ exit(ec); } int main(int argc, char **argv) { int i; int nfiles = 0; char **files = (char **)malloc(sizeof(char*) * argc); argv0 = argv[0]; for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '-') { usagef(1, "unknown option \"%s\"", argv[i]); } else { files[nfiles++] = argv[i]; } } if (nfiles == 0) usagef(1, "must specify at least one filename"); for (i = 0 ; i < nfiles ; i++) { do_file(files[i]); } return 0; } ggcov-0.8.4/src/filename.h0000644000175000017500000000377611565735443012323 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_filename_h_ #define _ggcov_filename_h_ 1 #include "common.h" typedef gboolean (*file_apply_proc_t)(const char *filename, void *userdata); const char *file_basename_c(const char *filename); const char *file_extension_c(const char *filename); char *file_change_extension(const char *filename, const char *oldext, const char *newext); char *file_dirname(const char *filename); int fd_length(int fd); int file_mode(const char *filename); FILE *file_open_mode(const char *filename, const char *rw, mode_t mode); char *file_make_absolute_to_file(const char *filename, const char *absfile); char *file_make_absolute_to_dir(const char *filename, const char *absdir); char *file_make_absolute(const char *filename); char *file_normalise(const char *filename); int file_exists(const char *filename); int file_is_regular(const char *filename); int file_build_tree(const char *dirname, mode_t mode); /* make sequence of directories */ mode_t file_mode_from_string(const char *str, mode_t base, mode_t deflt); int file_apply_children(const char *filename, file_apply_proc_t, void *userdata); int file_is_directory(const char *filename); #endif /* _ggcov_filename_h_ */ ggcov-0.8.4/src/cov_specific.C0000644000175000017500000001041611565736504013116 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov_specific.H" #include "string_var.H" #include "filename.h" #include "demangle.h" CVSID("$Id: cov_specific.C,v 1.8 2010-05-09 05:37:15 gnb Exp $"); cov_factory_item_t *cov_factory_item_t::all_; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_filename_scanner_t::cov_filename_scanner_t() { cbfd_ = 0; } cov_filename_scanner_t::~cov_filename_scanner_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_filename_scanner_t::attach(cov_bfd_t *c) { cbfd_ = c; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* TODO: allocate these dynamically */ int cov_filename_scanner_t::factory_category() { return 1; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_shlib_scanner_t::cov_shlib_scanner_t() { cbfd_ = 0; } cov_shlib_scanner_t::~cov_shlib_scanner_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_shlib_scanner_t::attach(cov_bfd_t *c) { cbfd_ = c; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* TODO: allocate these dynamically */ int cov_shlib_scanner_t::factory_category() { return 3; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_call_scanner_t::cov_call_scanner_t() { } cov_call_scanner_t::~cov_call_scanner_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_call_scanner_t::attach(cov_bfd_t *c) { cbfd_ = c; return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_call_scanner_t::setup_calldata( cov_bfd_section_t *sec, unsigned long address, const char *callname, cov_call_scanner_t::calldata_t *calld) { string_var callname_dem = demangle(callname); calld->callname = (char *)0; /* free and null out */ memset(calld, 0, sizeof(*calld)); if (!sec->find_nearest_line(address, &calld->location, &calld->function)) return FALSE; if (debug_enabled(D_CGRAPH)) { string_var function_dem = demangle(calld->function); duprintf4("%s:%ld: %s calls %s\n", calld->location.filename, calld->location.lineno, function_dem.data(), callname_dem.data()); } calld->callname = callname_dem.take(); return TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean cov_call_scanner_t::symbol_is_ignored(const char *name) const { static const char * const ignored[] = { "__bb_init_func", /* code inserted by gcc to instrument blocks */ "__gcov_init", /* a more modern version of the same */ "_Unwind_Resume", /* gcc 3.4 exception handling */ "__cxa_call_unexpected", /* gcc 3.4 exception handling */ "__cxa_end_catch", /* gcc 3.4 exception handling */ "__i686.get_pc_thunk.bx", /* gcc 4.x -fPIC */ /* Note: -fstack-protector is on by default on Ubuntu */ "__stack_chk_fail", /* gcc 4.x -fstack-protector */ "__stack_chk_fail_local", /* gcc 4.x -fstack-protector */ 0 }; const char * const *p; for (p = ignored ; *p != 0 ; p++) { if (!strcmp(name, *p)) return TRUE; } return FALSE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /* TODO: allocate these dynamically */ int cov_call_scanner_t::factory_category() { return 2; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/lego_diagram.H0000644000175000017500000000354711453570563013105 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_lego_diagram_H_ #define _ggcov_lego_diagram_H_ 1 #include "common.h" #include "cov.H" #include "diagram.H" class lego_diagram_t : public diagram_t { public: lego_diagram_t(); ~lego_diagram_t(); const char *name(); const char *title(); void prepare(); void render(scenegen_t *); void get_bounds(dbounds_t *db); private: struct node_t { cov_file_t *file_; /* NULL for directories */ string_var name_; /* TODO: really, really need a "directory" scope object */ cov_stats_t stats_; list_t children_; unsigned int depth_; /* 1 = immediate children of minimaldir */ double x_, y_, w_, h_; /* in [0,1] space */ double h_cov_, h_uncov_; node_t() : file_(0) {} ~node_t() {} }; void show_node(node_t *, scenegen_t *); void dump_node(node_t *node, FILE *fp); void assign_geometry(node_t *, double x, double y, double w, double h); char *root_name() const; node_t *root_; unsigned int maxdepth_; }; #endif /* _ggcov_lego_diagram_H_ */ ggcov-0.8.4/src/cov_types.H0000644000175000017500000002410011565666244012500 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_types_H_ #define _ggcov_cov_types_H_ 1 #include "common.h" #include "list.H" #if HAVE_STDINT_H typedef uint64_t count_t; #define COV_COUNT_MAX UINT64_MAX #else typedef unsigned long long int count_t; #define COV_COUNT_MAX 18446744073709551615ULL #endif class cov_file_t; class cov_function_t; class cov_block_t; class cov_arc_t; struct cov_callnode_t; struct cov_callarc_t; struct cov_read_state_t; struct cov_location_t { char *filename; unsigned long lineno; int operator==(const cov_location_t &o) const { return ((o.lineno == lineno) && !safe_strcmp(o.filename, filename)); } int operator!=(const cov_location_t &o) const { return ((o.lineno != lineno) || safe_strcmp(o.filename, filename)); } cov_location_t &operator++() { ++lineno; return *this; } const char *describe() const; }; struct cov_location_var { cov_location_t loc_; // default c'tor cov_location_var() { loc_.filename = 0; loc_.lineno = 0; } // copy c'tor cov_location_var(const cov_location_var &o) { loc_.filename = (o.loc_.filename != 0 ? g_strdup(o.loc_.filename) : 0); loc_.lineno = o.loc_.lineno; } // c'tor from cov_location cov_location_var(const cov_location_t &o) { loc_.filename = (o.filename != 0 ? g_strdup(o.filename) : 0); loc_.lineno = o.lineno; } ~cov_location_var() { if (loc_.filename != 0) g_free(loc_.filename); } void set(const char *filename, unsigned long lineno) { if (loc_.filename != 0) g_free(loc_.filename); loc_.filename = (filename != 0 ? g_strdup(filename) : 0); loc_.lineno = lineno; } void set(char *filename, unsigned long lineno) { if (loc_.filename != 0) g_free(loc_.filename); loc_.filename = filename; loc_.lineno = lineno; } void invalidate() { if (loc_.filename != 0) g_free(loc_.filename); loc_.filename = 0; loc_.lineno = 0; } // cast to cov_location_t operator const cov_location_t() const { return loc_; } int operator==(const cov_location_t &o) const { return (loc_ == o); } int operator!=(const cov_location_t &o) const { return (loc_ != o); } const char *describe() const { return loc_.describe(); } }; struct cov { enum status_t { COVERED, PARTCOVERED, UNCOVERED, UNINSTRUMENTED, SUPPRESSED }; enum _constants { NUM_STATUS=5 }; private: cov() { } /* prevent instantiation */ }; class cov_stats_t { public: /* * c'tor zeroes out counters, rather than relying on * global operator new, because cov_stats_t is mostly * used as an auto or member variable, not allocated. */ cov_stats_t() { memset(this, 0, sizeof(*this)); } void clear() { memset(this, 0, sizeof(*this)); } void accumulate(const cov_stats_t *st) { unsigned int i; unsigned long *uthis = (unsigned long *)this; unsigned long *ust = (unsigned long *)st; for (i = 0 ; i < sizeof(*this)/sizeof(unsigned long) ; i++) *uthis++ += *ust++; } /* there are no partial blocks; blocks are the unit of coverage */ unsigned long blocks_executed() const { return blocks_[cov::COVERED]; } unsigned long blocks_total() const { return blocks_[cov::COVERED] + blocks_[cov::UNCOVERED]; } unsigned long blocks_suppressed() const { return blocks_[cov::SUPPRESSED]; } const unsigned long *blocks_by_status() const { return blocks_; } double blocks_fraction() const { unsigned long n = blocks_executed(); unsigned long d = blocks_total(); return (d == 0 ? 0.0 : (double)n / (double)d); } /* for sorting objects: -1 forces uninstrumented last */ double blocks_sort_fraction() const { unsigned long n = blocks_executed(); unsigned long d = blocks_total(); return (d == 0 ? -1.0 : (double)n / (double)d); } unsigned long lines_executed() const { return lines_[cov::COVERED] + lines_[cov::PARTCOVERED]; } unsigned long lines_full() const { return lines_[cov::COVERED]; } unsigned long lines_partial() const { return lines_[cov::PARTCOVERED]; } unsigned long lines_total() const { return lines_[cov::COVERED] + lines_[cov::PARTCOVERED] + lines_[cov::UNCOVERED]; } unsigned long lines_suppressed() const { return lines_[cov::SUPPRESSED]; } const unsigned long *lines_by_status() const { return lines_; } double lines_fraction() const { unsigned long n = lines_executed(); unsigned long d = lines_total(); return (d == 0 ? 0.0 : (double)n / (double)d); } /* for sorting objects: -1 forces uninstrumented last */ double lines_sort_fraction() const { unsigned long n = lines_executed(); unsigned long d = lines_total(); return (d == 0 ? -1.0 : (double)n / (double)d); } unsigned long functions_executed() const { return functions_[cov::COVERED] + functions_[cov::PARTCOVERED]; } unsigned long functions_full() const { return functions_[cov::COVERED]; } unsigned long functions_partial() const { return functions_[cov::PARTCOVERED]; } unsigned long functions_total() const { return functions_[cov::COVERED] + functions_[cov::PARTCOVERED] + functions_[cov::UNCOVERED]; } unsigned long functions_suppressed() const { return functions_[cov::SUPPRESSED]; } const unsigned long *functions_by_status() const { return functions_; } double functions_fraction() const { unsigned long n = functions_executed(); unsigned long d = functions_total(); return (d == 0 ? 0.0 : (double)n / (double)d); } /* for sorting objects: -1 forces uninstrumented last */ double functions_sort_fraction() const { unsigned long n = functions_executed(); unsigned long d = functions_total(); return (d == 0 ? -1.0 : (double)n / (double)d); } /* calls happen on block boundaries hence cannot be partial */ unsigned long calls_executed() const { return calls_[cov::COVERED]; } unsigned long calls_total() const { return calls_[cov::COVERED] + calls_[cov::UNCOVERED]; } unsigned long calls_suppressed() const { return calls_[cov::SUPPRESSED]; } const unsigned long *calls_by_status() const { return calls_; } double calls_fraction() const { unsigned long n = calls_executed(); unsigned long d = calls_total(); return (d == 0 ? 0.0 : (double)n / (double)d); } /* for sorting objects: -1 forces uninstrumented last */ double calls_sort_fraction() const { unsigned long n = calls_executed(); unsigned long d = calls_total(); return (d == 0 ? -1.0 : (double)n / (double)d); } /* * Branches happen on block boundaries hence cannot be partial, * but for storage purposes we use [PARTCOVERED]=test executed * but branch not taken and [COVERED]=branch taken. */ unsigned long branches_executed() const { return branches_[cov::COVERED] + branches_[cov::PARTCOVERED]; } unsigned long branches_taken() const { return branches_[cov::COVERED]; } unsigned long branches_total() const { return branches_[cov::COVERED] + branches_[cov::PARTCOVERED] + branches_[cov::UNCOVERED]; } unsigned long branches_suppressed() const { return branches_[cov::SUPPRESSED]; } const unsigned long *branches_by_status() const { return branches_; } double branches_fraction() const { unsigned long n = branches_executed(); unsigned long d = branches_total(); return (d == 0 ? 0.0 : (double)n / (double)d); } /* for sorting objects: -1 forces uninstrumented last */ double branches_sort_fraction() const { unsigned long n = branches_executed(); unsigned long d = branches_total(); return (d == 0 ? -1.0 : (double)n / (double)d); } /* Used in calculating status for aggregated objects like functions */ cov::status_t status_by_blocks() { unsigned long ntot = blocks_total(); if (!ntot) return (blocks_[cov::SUPPRESSED] ? cov::SUPPRESSED : cov::UNINSTRUMENTED); else if (blocks_[cov::COVERED] == ntot) return cov::COVERED; else if (blocks_[cov::UNCOVERED] == ntot) return cov::UNCOVERED; else return cov::PARTCOVERED; } cov::status_t status_by_lines() { unsigned long ntot = lines_total(); if (!ntot) return (lines_[cov::SUPPRESSED] ? cov::SUPPRESSED : cov::UNINSTRUMENTED); else if (lines_[cov::COVERED] == ntot) return cov::COVERED; else if (lines_[cov::UNCOVERED] == ntot) return cov::UNCOVERED; else return cov::PARTCOVERED; } private: unsigned long blocks_[cov::NUM_STATUS]; unsigned long lines_[cov::NUM_STATUS]; unsigned long functions_[cov::NUM_STATUS]; unsigned long calls_[cov::NUM_STATUS]; unsigned long branches_[cov::NUM_STATUS]; friend class cov_block_t; friend class cov_function_t; friend class cov_file_t; }; #endif /* _ggcov_cov_types_H_ */ ggcov-0.8.4/src/covio.H0000644000175000017500000001254011557262605011603 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_covio_h_ #define _ggcov_covio_h_ 1 #include "common.h" #include "estring.H" #include "string_var.H" /* * There are twice as many functions as necessary because the * lowest level formatting changed at around gcc 3.3. Integral * data are now saved bigendian, and string data grew a preceeding * length field. The format now looks a *lot* like XDR! * * Then they changed once again at gcc 3.4 with three differences * a) now can be either bigendian or littleendian, b) string * lengths are recorded in 4-byte units not bytes and now include * the pad charrs and c) 64b ints are stored as lo32 then hi32 * but each of those is host endian. * * Given all that, plus the necessity for runtime switching * between gcc33/gcc34l/gcc34b formats, we now have a class * to abstract these differences. */ class covio_t; class covio_fmt_t { public: covio_fmt_t() { } virtual ~covio_fmt_t() { } /* These functions return TRUE unless EOF */ virtual gboolean read_u32(covio_t &, gnb_u32_t &) = 0; virtual gboolean read_u64(covio_t &, gnb_u64_t &) = 0; virtual gboolean read_string(covio_t &, estring &) = 0; }; class covio_t { public: covio_t(const char *fn) : refcount_(0), fn_(fn), buf_(0), ownbuf_(FALSE), fp_(0), ownfp_(TRUE), format_(0) { } covio_t(const char *fn, FILE *fp) : refcount_(0), fn_(fn), buf_(0), ownbuf_(FALSE), fp_(fp), ownfp_(FALSE), format_(0) { } covio_t(const char *fn, const char *buf, unsigned int len) : refcount_(0), fn_(fn), buf_((char *)buf), ownbuf_(FALSE), fp_(fmemopen((char *)buf, len, "r")), ownfp_(TRUE), format_(0) { } covio_t(const char *fn, char *buf, unsigned int len) : refcount_(0), fn_(fn), buf_(buf), ownbuf_(TRUE), fp_(fmemopen(buf, len, "r")), ownfp_(TRUE), format_(0) { } ~covio_t(); void ref() { refcount_++; } void unref() { if (--refcount_ <= 0) delete this; } gboolean open_read(); const char *filename() const { return fn_; } FILE *take() { FILE *fp = fp_; fp_ = 0; ownfp_ = FALSE; return fp; } gboolean skip(unsigned int len); int read(char *buf, unsigned int len); int read(estring &e, unsigned int len); gboolean gets(estring &e, unsigned int maxlen); off_t tell() const { return ftell(fp_); } int seek(off_t off) { return fseek(fp_, off, SEEK_SET); } gboolean eof() const { return feof(fp_); } /* Reads an old format .bb string up to the given tag & returns a new string */ gboolean read_bbstring(estring &, gnb_u32_t endtag); gboolean read_u32(gnb_u32_t &v) { return format_->read_u32(*this, v); } gboolean read_u64(gnb_u64_t &v) { return format_->read_u64(*this, v); } gboolean read_string(estring &v) { return format_->read_string(*this, v); } enum format_t { FORMAT_OLD, /* traditional gcc 2.x */ FORMAT_GCC33, /* gcc 3.3 */ FORMAT_GCC34L, /* gcc 3.4, little endian */ FORMAT_GCC34B, /* gcc 3.4, big endian */ FORMAT_NUM }; void set_format(format_t); private: int refcount_; string_var fn_; char *buf_; gboolean ownbuf_; FILE *fp_; gboolean ownfp_; covio_fmt_t *format_; /* These functions return TRUE unless EOF */ gboolean read_lu32(gnb_u32_t&); /* little-endian 32b */ gboolean read_bu32(gnb_u32_t&); /* big-endian 32b */ gboolean read_lu64(gnb_u64_t&); /* little-endian 64b */ gboolean read_bu64(gnb_u64_t&); /* big-endian 64b */ /* the given byte length into a new string */ gboolean read_string_len(estring &e, gnb_u32_t len); friend class covio_fmt_old_t; friend class covio_fmt_gcc33_t; friend class covio_fmt_gcc34l_t; friend class covio_fmt_gcc34b_t; }; // Smart pointer class for covio_t class covio_var { private: covio_t *io_; public: // default ctor covio_var() : io_(0) { } // const initialisation ctor covio_var(covio_t *io) : io_(io) { if (io_) io_->ref(); } // copy c'tor covio_var(const covio_var &o) { io_ = o.io_; if (io_) io_->ref(); } // dtor ~covio_var() { if (io_) io_->unref(); } operator covio_t *() const { return io_; } // assignment operators covio_t *operator=(covio_t *io) { if (io) io->ref(); if (io_) io_->unref(); return io_ = io; } }; #endif /* _ggcov_covio_h_ */ ggcov-0.8.4/src/ptrarray.H0000644000175000017500000000511111453570563012324 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ptrarray_H_ #define _ptrarray_H_ 1 #include "common.h" /* * Wrapper for glib's GPtrArray structure. * * Note that for memory efficiency, we inherit from GPtrArray rather * than contain a pointer to it. The problem is that GPtrArray is * actually a public subset of a larger private structure, so you * must never, ever ever allocate ptrarray_t as auto variables or * struct member, in fact any way except dynamically with new(). */ template class ptrarray_t : private GPtrArray { public: /* ctor */ ptrarray_t() { } /* dtor */ ~ptrarray_t() { } void * operator new(size_t) { return g_ptr_array_new(); } void operator delete(void *x) { g_ptr_array_free((GPtrArray *)x, /*free_seg*/TRUE); } void resize(unsigned int n) { g_ptr_array_set_size(this, n); } unsigned int append(T *p) { unsigned int i = len; g_ptr_array_add(this, p); return i; } gboolean remove(unsigned int i) { return g_ptr_array_remove_index(this, i); } gboolean remove(T *p) { return g_ptr_array_remove(this, p); } void set(unsigned i, T *p) { if (i >= len) g_ptr_array_set_size(this, i+1); ((T **)pdata)[i] = p; } T *nth(unsigned i) const { assert(i < len); return (T *)g_ptr_array_index(this, i); } T *operator[](unsigned i) const { return (T *)g_ptr_array_index(this, i); } T * const *data() const { return (T * const *)(pdata); } unsigned int length() const { return len; } void sort(int (*compare)(const T **, const T **)) { qsort(pdata, len, sizeof(void*), (int (*)(const void*, const void*))compare); } }; #endif /* _ptrarray_H_ */ ggcov-0.8.4/src/bbdump.c0000644000175000017500000000607411453570563011775 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "covio.H" #include #include #include #include #include const char *argv0; static void hexdump(covio_t *io, off_t lastoff) { off_t here; gnb_u32_t d; here = io->tell(); assert((here - lastoff) % 4 == 0); io->seek(lastoff); for ( ; lastoff < here ; lastoff += 4) { io->read_u32(d); printf(GNB_U32_XFMT" ", d); } assert(here == lastoff); assert(lastoff == io->tell()); } #define BB_FILENAME 0x80000001 #define BB_FUNCTION 0x80000002 #define BB_ENDOFLIST 0x00000000 static void do_tags(covio_t *io) { gnb_u32_t tag; off_t lastoff = 0; estring s; while (io->read_u32(tag)) { printf("%08lx: ", lastoff); switch (tag) { case BB_FILENAME: io->read_bbstring(s, tag); hexdump(io, lastoff); printf("file \"%s\"\n", s.data()); break; case BB_FUNCTION: io->read_bbstring(s, tag); hexdump(io, lastoff); printf("func \"%s\"\n", s.data()); break; case BB_ENDOFLIST: hexdump(io, lastoff); printf("eolist\n"); break; default: hexdump(io, lastoff); printf("line "GNB_U32_DFMT"\n", tag); break; } lastoff = io->tell(); } } static void do_file(const char *filename) { covio_t io(filename); if (!io.open_read()) { perror(filename); return; } io.set_format(covio_t::FORMAT_OLD); do_tags(&io); } static const char usage_str[] = "Usage: bbdump file.bb...\n"; static void usagef(int ec, const char *fmt, ...) { if (fmt != 0) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fputc('\n', stderr); } fputs(usage_str, stderr); fflush(stderr); /* JIC */ exit(ec); } int main(int argc, char **argv) { int i; int nfiles = 0; char **files = (char **)malloc(sizeof(char*) * argc); argv0 = argv[0]; for (i = 1 ; i < argc ; i++) { if (argv[i][0] == '-') { usagef(1, "unknown option \"%s\"", argv[i]); } else { files[nfiles++] = argv[i]; } } if (nfiles == 0) usagef(1, "must specify at least one filename"); for (i = 0 ; i < nfiles ; i++) { do_file(files[i]); } return 0; } ggcov-0.8.4/src/gnbstackedbar.c0000644000175000017500000003424411453570563013316 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2004 Greg Banks * * Derived from gtkprogress.c, gtkprogressbar.c which bore the message: * GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #if HAVE_CONFIG_H # include # include # include #else # include #endif #if HAVE_MEMORY_H #include #endif #include "uicommon.h" #include "gnbstackedbar.h" #include #ifndef STACKEDBAR_DEBUG #define STACKEDBAR_DEBUG 0 #endif static void gnb_stacked_bar_class_init(GnbStackedBarClass *klass); static void gnb_stacked_bar_init(GnbStackedBar *sbar); static void gnb_stacked_bar_paint(GnbStackedBar *sbar); #if GTK2 static void gnb_stacked_bar_finalize(GObject *object); #else static void gnb_stacked_bar_finalize(GtkObject *object); #endif static void gnb_stacked_bar_realize(GtkWidget *widget); static gint gnb_stacked_bar_expose(GtkWidget *widget, GdkEventExpose *event); static void gnb_stacked_bar_size_allocate(GtkWidget *, GtkAllocation *); static void gnb_stacked_bar_create_pixmap(GnbStackedBar *sbar); static GtkWidgetClass *parent_class = NULL; GtkType gnb_stacked_bar_get_type(void) { static GtkType stacked_bar_type = 0; if (!stacked_bar_type) { static const GtkTypeInfo stacked_bar_info = { (char *)"GnbStackedBar", sizeof (GnbStackedBar), sizeof (GnbStackedBarClass), (GtkClassInitFunc) gnb_stacked_bar_class_init, (GtkObjectInitFunc) gnb_stacked_bar_init, /* reserved_1 */ NULL, /* reserved_2 */ NULL, (GtkClassInitFunc) NULL }; stacked_bar_type = gtk_type_unique(GTK_TYPE_WIDGET, &stacked_bar_info); } return stacked_bar_type; } static void gnb_stacked_bar_class_init(GnbStackedBarClass *klass) { #if GTK2 GObjectClass *object_class = (GObjectClass *)klass; #else GtkObjectClass *object_class = (GtkObjectClass *)klass; #endif GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; parent_class = (GtkWidgetClass *)gtk_type_class(GTK_TYPE_WIDGET); object_class->finalize = gnb_stacked_bar_finalize; widget_class->realize = gnb_stacked_bar_realize; widget_class->expose_event = gnb_stacked_bar_expose; widget_class->size_allocate = gnb_stacked_bar_size_allocate; } static void gnb_stacked_bar_init(GnbStackedBar *sbar) { sbar->nmetrics = 0; sbar->metrics = NULL; sbar->offscreen_pixmap = NULL; } static void gnb_stacked_bar_realize(GtkWidget *widget) { GnbStackedBar *sbar; GdkWindowAttr attr; gint mask; g_return_if_fail(widget != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(widget)); sbar = GNB_STACKED_BAR(widget); GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); attr.window_type = GDK_WINDOW_CHILD; attr.x = widget->allocation.x; attr.y = widget->allocation.y; attr.width = widget->allocation.width; attr.height = widget->allocation.height; attr.wclass = GDK_INPUT_OUTPUT; attr.visual = gtk_widget_get_visual(widget); attr.colormap = gtk_widget_get_colormap(widget); attr.event_mask = gtk_widget_get_events(widget); attr.event_mask |= GDK_EXPOSURE_MASK; mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new(gtk_widget_get_parent_window(widget), &attr, mask); gdk_window_set_user_data(widget->window, sbar); widget->style = gtk_style_attach(widget->style, widget->window); gtk_style_set_background(widget->style, widget->window, GTK_STATE_ACTIVE); gnb_stacked_bar_create_pixmap(sbar); } static void gnb_stacked_bar_finalize( #if GTK2 GObject *object #else GtkObject *object #endif ) { GnbStackedBar *sbar; guint i; g_return_if_fail(object != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(object)); sbar = GNB_STACKED_BAR(object); for (i = 0 ; i < sbar->nmetrics ; i++) { if (sbar->metrics[i].gc != NULL) gtk_gc_release(sbar->metrics[i].gc); } if (sbar->metrics != NULL) { g_free(sbar->metrics); sbar->metrics = NULL; } sbar->nmetrics = 0; } static gint gnb_stacked_bar_expose(GtkWidget *widget, GdkEventExpose *event) { g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(GNB_IS_STACKED_BAR(widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); if (GTK_WIDGET_DRAWABLE(widget)) gdk_draw_pixmap(widget->window, widget->style->black_gc, GNB_STACKED_BAR(widget)->offscreen_pixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); return FALSE; } static void gnb_stacked_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { g_return_if_fail(widget != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(widget)); g_return_if_fail(allocation != NULL); #if STACKEDBAR_DEBUG fprintf(stderr, "%s: size_allocate %d %d %d %d\n", widget->name, allocation->x, allocation->y, allocation->width, allocation->height); #endif widget->allocation = *allocation; if (GTK_WIDGET_REALIZED(widget)) { gdk_window_move_resize(widget->window, allocation->x, allocation->y, allocation->width, allocation->height); gnb_stacked_bar_create_pixmap(GNB_STACKED_BAR(widget)); } } static void gnb_stacked_bar_create_pixmap(GnbStackedBar *sbar) { GtkWidget *widget; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); if (GTK_WIDGET_REALIZED(sbar)) { widget = GTK_WIDGET(sbar); if (sbar->offscreen_pixmap != NULL) gdk_pixmap_unref(sbar->offscreen_pixmap); sbar->offscreen_pixmap = gdk_pixmap_new(widget->window, widget->allocation.width, widget->allocation.height, -1); gnb_stacked_bar_paint(sbar); } } GLADE_CALLBACK GtkWidget * gnb_stacked_bar_new(void) { GtkWidget *widget; widget = gtk_widget_new(GNB_TYPE_STACKED_BAR, NULL); return widget; } static void gnb_stacked_bar_paint(GnbStackedBar *sbar) { GtkWidget *widget; guint x, xthick, ythick; unsigned long total, space; guint i; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); if (sbar->offscreen_pixmap == NULL) return; widget = GTK_WIDGET(sbar); /* The style [xy]thickness need to be halved for SHADOW_IN */ #if GTK2 xthick = widget->style->xthickness/2; ythick = widget->style->ythickness/2; #else xthick = widget->style->klass->xthickness/2; ythick = widget->style->klass->ythickness/2; #endif space = widget->allocation.width - 2 * xthick; total = 0; for (i = 0 ; i < sbar->nmetrics ; i++) total += sbar->metrics[i].value; #if STACKEDBAR_DEBUG fprintf(stderr, "%s: total=%lu xthick=%d ythick=%d\n", widget->name, total, xthick, ythick); #endif /* divide screen space up proportionally */ if (total == 0) { /* avoid division by zero: give all space to 0th metric */ /* TODO: not right!! */ for (i = 0 ; i < sbar->nmetrics ; i++) sbar->metrics[i].length = (i ? 0 : space); } else { x = 0; for (i = 0 ; i < sbar->nmetrics ; i++) { x += sbar->metrics[i].length = (sbar->metrics[i].value * space + total/2) / total; } /* add the roundoff error to the last nonzero metric */ x = space - x; if (x) { #if STACKEDBAR_DEBUG fprintf(stderr, "%s: cumulative rounding error %d\n", widget->name, x); #endif for (i = sbar->nmetrics-1 ; i >= 0 ; --i) { if (sbar->metrics[i].length > 0) { #if STACKEDBAR_DEBUG fprintf(stderr, "%s: applied to metric %d\n", widget->name, i); #endif sbar->metrics[i].length += x; break; } } } } /* paint the outside shadow */ #if STACKEDBAR_DEBUG fprintf(stderr, "%s: PAINTBOX(trough, %d, %d, %d, %d)\n", widget->name, 0, 0, widget->allocation.width, widget->allocation.height); #endif gtk_paint_box(widget->style, sbar->offscreen_pixmap, GTK_STATE_NORMAL, GTK_SHADOW_IN, NULL, widget, "trough", 0, 0, widget->allocation.width, widget->allocation.height); if (widget->allocation.width <= (gint)(2*xthick) || widget->allocation.height <= (gint)(2*ythick)) return; x = xthick; for (i = 0 ; i < sbar->nmetrics ; i++) { metric = &sbar->metrics[i]; if (!metric->length) continue; if (!metric->color_allocated) { metric->color_allocated = TRUE; gdk_color_alloc(widget->style->colormap, &metric->color); } if (metric->gc == NULL) { GdkGCValues gcvals; unsigned long gcmask = 0; gcvals.foreground = metric->color; gcmask |= GDK_GC_FOREGROUND; metric->gc = gtk_gc_get(widget->style->depth, widget->style->colormap, &gcvals, (GdkGCValuesMask)gcmask); } #if STACKEDBAR_DEBUG fprintf(stderr, "%s: metric[%d]length=%d fillrect(%u, %u, %u, %u)\n", widget->name, i, metric->length, x, ythick, metric->length, widget->allocation.height - 2*ythick); #endif gdk_draw_rectangle( sbar->offscreen_pixmap, metric->gc, /*filled*/TRUE, x, ythick, metric->length, widget->allocation.height - 2*ythick); x += metric->length; } } /*******************************************************************/ void gnb_stacked_bar_set_num_metrics(GnbStackedBar *sbar, guint nmetrics) { guint i; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); if (sbar->metrics != NULL) { for (i = 0 ; i < sbar->nmetrics ; i++) { if (sbar->metrics[i].gc != NULL) gtk_gc_release(sbar->metrics[i].gc); } g_free(sbar->metrics); } sbar->nmetrics = nmetrics; sbar->metrics = g_new(GnbStackedBarMetric, nmetrics); for (i = 0 ; i < sbar->nmetrics ; i++) { metric = &sbar->metrics[i]; metric->value = 0; metric->length = 0; memset(&metric->color, 0, sizeof(GdkColor)); metric->gc = 0; metric->color_set = 0; metric->color_allocated = 0; } } /*******************************************************************/ void gnb_stacked_bar_set_metric_color( GnbStackedBar *sbar, guint idx, const GdkColor *color) { gboolean changed = FALSE; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); g_return_if_fail(idx < sbar->nmetrics); metric = &sbar->metrics[idx]; if (color != NULL) { changed = !metric->color_set; metric->color_set = TRUE; metric->color = *color; } else { changed = metric->color_set; metric->color_set = FALSE; /* TODO: unallocate the color */ } if (changed) { if (metric->gc != NULL) { gtk_gc_release(metric->gc); metric->gc = NULL; } if (GTK_WIDGET_DRAWABLE(GTK_WIDGET(sbar))) gtk_widget_queue_draw(GTK_WIDGET(sbar)); } } /*******************************************************************/ void gnb_stacked_bar_set_metric_colors( GnbStackedBar *sbar, const GdkColor **colorp) { guint i; guint nchanged = 0; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); for (i = 0, metric = sbar->metrics ; i < sbar->nmetrics ; i++, metric++) { gboolean changed = FALSE; if (colorp != NULL && *colorp != NULL) { changed = !metric->color_set; metric->color_set = TRUE; metric->color = **colorp; } else { changed = metric->color_set; metric->color_set = FALSE; /* TODO: unallocate the color */ } if (changed) { nchanged++; if (metric->gc != NULL) { gtk_gc_release(metric->gc); metric->gc = NULL; } } if (colorp != NULL) colorp++; } if (nchanged && GTK_WIDGET_DRAWABLE(GTK_WIDGET(sbar))) gtk_widget_queue_draw(GTK_WIDGET(sbar)); } /*******************************************************************/ void gnb_stacked_bar_set_metric_value( GnbStackedBar *sbar, guint idx, unsigned long value) { gboolean changed = FALSE; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); g_return_if_fail(idx < sbar->nmetrics); metric = &sbar->metrics[idx]; if (metric->value != value) { changed = TRUE; metric->value = value; } if (changed && GTK_WIDGET_DRAWABLE(GTK_WIDGET(sbar))) gtk_widget_queue_draw(GTK_WIDGET(sbar)); } /*******************************************************************/ void gnb_stacked_bar_set_metric_values( GnbStackedBar *sbar, const unsigned long *valuep) { gboolean changed = FALSE; guint i; GnbStackedBarMetric *metric; g_return_if_fail(sbar != NULL); g_return_if_fail(GNB_IS_STACKED_BAR(sbar)); for (i = 0, metric = sbar->metrics ; i < sbar->nmetrics ; i++, metric++, valuep++) { if (metric->value != *valuep) { changed = TRUE; metric->value = *valuep; } } if (changed && GTK_WIDGET_DRAWABLE(GTK_WIDGET(sbar))) gtk_widget_queue_draw(GTK_WIDGET(sbar)); } /*******************************************************************/ ggcov-0.8.4/src/ui.c0000644000175000017500000007702311453570563011143 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "ui.h" #include "uix.h" #include "estring.H" #include "string_var.H" #include "tok.H" #include "confsection.H" CVSID("$Id: ui.c,v 1.38 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int gtk_combo_get_current(GtkCombo *combo) { GtkList *listw = GTK_LIST(combo->list); if (listw->selection == 0) return 0; return gtk_list_child_position(listw, (GtkWidget*)listw->selection->data); } void gtk_combo_set_current(GtkCombo *combo, int n) { gtk_list_select_item(GTK_LIST(combo->list), n); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static const char ui_combo_item_key[] = "ui_combo_item_key"; void ui_combo_add_data(GtkCombo *combo, const char *label, gpointer data) { GtkWidget *item; item = gtk_list_item_new_with_label(label); gtk_object_set_data(GTK_OBJECT(item), ui_combo_item_key, data); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(combo->list), item); } gpointer ui_combo_get_current_data(GtkCombo *combo) { GtkList *listw = GTK_LIST(combo->list); if (listw->selection == 0) return 0; return gtk_object_get_data(GTK_OBJECT(listw->selection->data), ui_combo_item_key); } void ui_combo_set_current_data(GtkCombo *combo, gpointer data) { GtkList *listw = GTK_LIST(combo->list); GList *iter; for (iter = listw->children ; iter != 0 ; iter = iter->next) { GtkWidget *item = (GtkWidget *)iter->data; if (gtk_object_get_data(GTK_OBJECT(item), ui_combo_item_key) == data) { gtk_list_select_child(listw, item); return; } } } void ui_combo_clear(GtkCombo *combo) { gtk_list_clear_items(GTK_LIST(combo->list), 0, -1); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #ifndef UI_DEBUG #define UI_DEBUG 0 #endif static string_var ui_glade_path = PKGDATADIR; static char * find_file(const char *path, const char *base) { tok_t tok(path, ":"); string_var file; const char *dir; struct stat sb; while ((dir = tok.next()) != 0) { file = g_strconcat(dir, "/", base, (char *)0); if (stat(file, &sb) == 0 && S_ISREG(sb.st_mode)) return file.take(); } return 0; } void ui_prepend_glade_path(const char *dir) { ui_glade_path = g_strconcat(dir, ":", ui_glade_path.data(), (char *)0); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ extern ui_named_callback_t ui_callbacks[]; /* in glade_callbacks.c */ /* * Connect up named functions for signal handlers. */ static void ui_register_callbacks(GladeXML *xml) { int i; for (i = 0 ; ui_callbacks[i].name ; i++) glade_xml_signal_connect(xml, ui_callbacks[i].name, ui_callbacks[i].func); } /* * Unfortunately, we can't use glade_xml_signal_connect() * to hook up our custom widget creation functions, we have * to do it this way instead. Fmeh. */ static GtkWidget * ui_custom_widget_handler( GladeXML *xml, gchar *func_name, gchar *name, gchar *string1, gchar *string2, gint int1, gint int2, gpointer user_data) { int i; for (i = 0 ; ui_callbacks[i].name ; i++) { if (!strcmp(func_name, ui_callbacks[i].name)) { /* TODO: pass down some of the string1 et al arguments */ return ((GtkWidget *(*)(void))ui_callbacks[i].func)(); } } return 0; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if GTK2 #define LIBGLADE "-glade2" #else #define LIBGLADE #endif GladeXML * ui_load_tree(const char *root) { GladeXML *xml = 0; /* load & create the interface */ static char *filename = 0; static const char gladefile[] = PACKAGE LIBGLADE ".glade"; if (filename == 0) { filename = find_file(ui_glade_path, gladefile); if (filename == 0) fatal("can't find %s in path %s\n", gladefile, ui_glade_path.data()); dprintf1(D_UICORE, "Loading Glade UI from file \"%s\"\n", filename); } glade_set_custom_handler(ui_custom_widget_handler, (gpointer)0); #if GTK2 xml = glade_xml_new(filename, root, /* translation domain */PACKAGE); #else xml = glade_xml_new(filename, root); #endif if (xml == 0) fatal("can't load Glade UI from file \"%s\"\n", filename); /* connect the signals in the interface */ ui_register_callbacks(xml); return xml; } GtkWidget * ui_get_dummy_menu(GladeXML *xml, const char *name) { GtkWidget *dummy; GtkWidget *menu; GtkWidget *tearoff; dummy = glade_xml_get_widget(xml, name); menu = dummy->parent; tearoff = gtk_tearoff_menu_item_new(); gtk_menu_append(GTK_MENU(menu), tearoff); gtk_widget_show(tearoff); return menu; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static GtkWidget * _ui_virtual_parent(GtkWidget *w) { if (GTK_IS_MENU(w)) #if GTK2 return gtk_menu_get_attach_widget(GTK_MENU(w)); #else return GTK_MENU(w)->parent_menu_item; #endif return GTK_WIDGET(w)->parent; } GtkWidget * ui_get_window(GtkWidget *w) { for ( ; w != 0 && !GTK_IS_WINDOW(w) ; w = _ui_virtual_parent(w)) ; return w; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static struct { const char * const *xpm; GdkPixmap *pm; GdkBitmap *mask; } ui_default_icon; static void ui_window_set_default_icon(GtkWidget *w) { if (!GTK_WIDGET_REALIZED(w)) { #if UI_DEBUG > 10 fprintf(stderr, "ui_window_set_default_icon(w=0x%08lx): delaying until realized\n", (unsigned)w); #endif /* delay self until realized */ gtk_signal_connect(GTK_OBJECT(w), "realize", GTK_SIGNAL_FUNC(ui_window_set_default_icon), 0); /* don't bother disconnecting the signal, it will only ever fire once */ return; } #if UI_DEBUG > 10 fprintf(stderr, "ui_window_set_default_icon(w=0x%08lx)\n", (unsigned)w); #endif if (ui_default_icon.pm == 0) ui_default_icon.pm = gdk_pixmap_create_from_xpm_d(w->window, &ui_default_icon.mask, 0, (char **)ui_default_icon.xpm); gdk_window_set_icon(w->window, 0, ui_default_icon.pm, ui_default_icon.mask); } void ui_set_default_icon(const char * const *xpm_data) { ui_default_icon.xpm = xpm_data; ui_default_icon.pm = 0; /* JIC */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ typedef struct { char *label; void (*callback)(GtkWidget*, gpointer); void *userdata; } ui_windows_entry_t; static GList *ui_windows; static GList *ui_windows_menus; static GList *ui_windows_entries; /* predefined entries, ui_windows_entry_t */ static void ui_on_windows_menu_activate(GtkWidget *w, gpointer userdata) { GtkWidget *win = (GtkWidget *)userdata; dprintf1(D_UICORE, "ui_on_windows_menu_activate: %s\n", GTK_WINDOW(win)->title); gdk_window_show(win->window); gdk_window_raise(win->window); } static void ui_update_windows_menu(GtkWidget *menu) { GList *iter; ui_delete_menu_items(menu); for (iter = ui_windows_entries ; iter != 0 ; iter = iter->next) { ui_windows_entry_t *we = (ui_windows_entry_t *)iter->data; /* * Presumably a side effect of the callback will be * the creation of a new window which is registered * by calling ui_register_window(). */ ui_menu_add_simple_item(menu, we->label, we->callback, we->userdata); } if (ui_windows_entries != 0) ui_menu_add_seperator(menu); for (iter = ui_windows ; iter != 0 ; iter = iter->next) { GtkWidget *win = (GtkWidget *)iter->data; const char *title; if ((title = strchr(GTK_WINDOW(win)->title, ':')) != 0) { title++; /* skip colon */ while (*title && isspace(*title)) title++; /* skip whitespace */ } if (title == 0 || *title == '\0') title = GTK_WINDOW(win)->title; ui_menu_add_simple_item(menu, title, ui_on_windows_menu_activate, win); } } static void ui_update_windows_menus(void) { GList *iter; for (iter = ui_windows_menus ; iter != 0 ; iter = iter->next) ui_update_windows_menu((GtkWidget *)iter->data); } static void ui_on_window_destroy(GtkWidget *w, gpointer userdata) { ui_windows = g_list_remove(ui_windows, w); if (ui_windows == 0) gtk_main_quit(); else ui_update_windows_menus(); } void ui_register_window(GtkWidget *w) { ui_windows = g_list_append(ui_windows, w); gtk_signal_connect(GTK_OBJECT(w), "destroy", GTK_SIGNAL_FUNC(ui_on_window_destroy), 0); ui_update_windows_menus(); if (GTK_WINDOW(w)->type == GTK_WINDOW_TOPLEVEL && ui_default_icon.xpm != 0) ui_window_set_default_icon(w); } static void ui_on_windows_menu_destroy(GtkWidget *w, gpointer userdata) { ui_windows_menus = g_list_remove(ui_windows_menus, w); } void ui_register_windows_menu(GtkWidget *menu) { ui_windows_menus = g_list_append(ui_windows_menus, menu); gtk_signal_connect(GTK_OBJECT(menu), "destroy", GTK_SIGNAL_FUNC(ui_on_windows_menu_destroy), 0); ui_update_windows_menu(menu); } void ui_register_windows_entry( const char *label, void (*callback)(GtkWidget *w, gpointer userdata), gpointer userdata) { ui_windows_entry_t *we; we = new(ui_windows_entry_t); we->label = g_strdup(label); we->callback = callback; we->userdata = userdata; ui_windows_entries = g_list_append(ui_windows_entries, we); ui_update_windows_menus(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static const char ui_title_key[] = "ui_title_key"; static void ui_window_title_destroy(void *data) { g_free(data); } void ui_window_set_title(GtkWidget *w, const char *filename) { char *proto; estring title; /* Grab the original title, derived from the glade file */ if ((proto = (char *)gtk_object_get_data(GTK_OBJECT(w), ui_title_key)) == 0) { proto = g_strdup(GTK_WINDOW(w)->title); gtk_object_set_data_full(GTK_OBJECT(w), ui_title_key, proto, ui_window_title_destroy); } title.append_string(proto); title.replace_all("@FILE@", filename); title.replace_all("@VERSION@", VERSION); gtk_window_set_title(GTK_WINDOW(w), title.data()); /* update windows menus if necessary */ if (g_list_find(ui_windows, w)) ui_update_windows_menus(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_delete_menu_items(GtkWidget *menu) { GList *list, *next; for (list = gtk_container_children(GTK_CONTAINER(menu)) ; list != 0 ; list = next) { GtkWidget *child = (GtkWidget *)list->data; next = list->next; if (GTK_IS_TEAROFF_MENU_ITEM(child)) continue; gtk_widget_destroy(child); } } GtkWidget * ui_menu_add_simple_item( GtkWidget *menu, const char *label, void (*callback)(GtkWidget*, gpointer), gpointer calldata) { GtkWidget *butt; butt = gtk_menu_item_new_with_label(label); gtk_menu_append(GTK_MENU(menu), butt); gtk_signal_connect(GTK_OBJECT(butt), "activate", GTK_SIGNAL_FUNC(callback), (gpointer)calldata); gtk_widget_show(butt); return butt; } GtkWidget * ui_menu_add_seperator(GtkWidget *menu) { GtkWidget *butt; butt = gtk_menu_item_new(); gtk_menu_append(GTK_MENU(menu), butt); gtk_widget_show(butt); return butt; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if !GTK2 /* column sorting is trivial in gtk2.x, extremely painful in gtk1.2 */ static const char ui_clist_arrow_key[] = "ui_clist_arrow_key"; static gboolean ui_clist_is_sortable_column(GtkCList *clist, int col) { GArray *sortables; unsigned int i; sortables = (GArray *)gtk_object_get_data(GTK_OBJECT(clist), ui_clist_arrow_key); assert(sortables != 0); for (i = 0 ; i < sortables->len ; i++) if (g_array_index(sortables, int, i) == col) return TRUE; return FALSE; /* this column not sortable */ } static void ui_clist_sortables_destroy(gpointer userdata) { g_array_free((GArray *)userdata, /*free_segment*/TRUE); } static void ui_on_clist_click_column(GtkCList *clist, int col, gpointer userdata) { /* first, check this is a sortable column */ if (!ui_clist_is_sortable_column(clist, col)) return; /* this column not sortable */ /* now we can update the sort specifications */ if (col == clist->sort_column) /* toggle the sort direction */ ui_clist_set_sort_type(clist, (clist->sort_type == GTK_SORT_ASCENDING ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING)); else /* make this the sortable column */ ui_clist_set_sort_column(clist, col); /* update the order in the list */ gtk_clist_sort(clist); } void ui_clist_init_column_arrow(GtkCList *clist, int col) { GtkWidget *hbox; GtkWidget *label; GtkWidget *arrow; GtkWidget *oldlabel; char *oldstr = 0; GArray *sortables; oldlabel = gtk_clist_get_column_widget(clist, col); if (GTK_IS_BIN(oldlabel)) oldlabel = GTK_BIN(oldlabel)->child; if (!GTK_IS_LABEL(oldlabel)) return; gtk_label_get(GTK_LABEL(oldlabel), &oldstr); hbox = gtk_hbox_new(/*homogeneous*/FALSE, /*spacing*/4); gtk_widget_show(hbox); label = gtk_label_new(oldstr); gtk_box_pack_start(GTK_BOX(hbox), label, /*expand*/TRUE, /*fill*/TRUE, /*padding*/0); gtk_widget_show(label); arrow = gtk_arrow_new(GTK_ARROW_DOWN, (col == clist->sort_column ? GTK_SHADOW_OUT : GTK_SHADOW_NONE)); gtk_box_pack_start(GTK_BOX(hbox), arrow, /*expand*/FALSE, /*fill*/TRUE, /*padding*/0); gtk_widget_show(arrow); gtk_clist_set_column_widget(clist, col, hbox); gtk_clist_column_title_active(clist, col); /* Setup signal handler and update sortables array */ sortables = (GArray *)gtk_object_get_data(GTK_OBJECT(clist), ui_clist_arrow_key); if (sortables == 0) { sortables = g_array_new(/*zero_terminated*/FALSE, /*clear*/FALSE, sizeof(int)); gtk_object_set_data_full(GTK_OBJECT(clist), ui_clist_arrow_key, sortables, ui_clist_sortables_destroy); gtk_signal_connect(GTK_OBJECT(clist), "click_column", GTK_SIGNAL_FUNC(ui_on_clist_click_column), 0); } g_array_append_val(sortables, col); } static GtkWidget * ui_clist_get_column_arrow(GtkCList *clist, int col) { GtkWidget *button = clist->column[col].button; GtkWidget *hbox = GTK_BIN(button)->child; GtkBoxChild *boxchild = (GtkBoxChild *)g_list_nth_data(GTK_BOX(hbox)->children, 1); return boxchild->widget; } void ui_clist_set_sort_column(GtkCList *clist, int col) { GtkWidget *arrow; if (!ui_clist_is_sortable_column(clist, col)) return; if (ui_clist_is_sortable_column(clist, clist->sort_column)) { arrow = ui_clist_get_column_arrow(clist, clist->sort_column); gtk_arrow_set(GTK_ARROW(arrow), GTK_ARROW_DOWN, GTK_SHADOW_NONE); } gtk_clist_set_sort_column(clist, col); arrow = ui_clist_get_column_arrow(clist, clist->sort_column); gtk_arrow_set(GTK_ARROW(arrow), (clist->sort_type == GTK_SORT_ASCENDING ? GTK_ARROW_DOWN : GTK_ARROW_UP), GTK_SHADOW_OUT); } void ui_clist_set_sort_type(GtkCList *clist, GtkSortType type) { GtkWidget *arrow; if (!ui_clist_is_sortable_column(clist, clist->sort_column)) return; gtk_clist_set_sort_type(clist, type); arrow = ui_clist_get_column_arrow(clist, clist->sort_column); gtk_arrow_set(GTK_ARROW(arrow), (clist->sort_type == GTK_SORT_ASCENDING ? GTK_ARROW_DOWN : GTK_ARROW_UP), GTK_SHADOW_OUT); } #endif /* !GTK2 */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gpointer ui_list_double_click_data(GtkWidget *w, GdkEvent *event, int column ) { #if !GTK2 GtkCList *clist = GTK_CLIST(w); int row, col; if (event->type == GDK_2BUTTON_PRESS && gtk_clist_get_selection_info(clist, (int)event->button.x, (int)event->button.y, &row, &col)) { dprintf2(D_UICORE, "ui_list_double_click_data: row=%d col=%d\n", row, col); return gtk_clist_get_row_data(clist, row); } return 0; #else GtkTreeView *tv = GTK_TREE_VIEW(w); GtkTreeModel *model; GtkTreePath *path = 0; GtkTreeIter iter; gpointer *data = 0; if (event->type == GDK_2BUTTON_PRESS && gtk_tree_view_get_path_at_pos(tv, (int)event->button.x, (int)event->button.y, &path, (GtkTreeViewColumn **)0, (gint *)0, (gint *)0)) { if (debug_enabled(D_UICORE)) { string_var path_str = gtk_tree_path_to_string(path); duprintf1("ui_list_double_click_data: path=\"%s\"\n", path_str.data()); } model = gtk_tree_view_get_model(tv); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, column, &data, -1); gtk_tree_path_free(path); return data; } return 0; #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_list_set_column_visibility(GtkWidget *w, int col, gboolean vis) { #if !GTK2 gtk_clist_set_column_visibility(GTK_CLIST(w), col, vis); #else gtk_tree_view_column_set_visible( gtk_tree_view_get_column(GTK_TREE_VIEW(w), col), vis); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if GTK2 static PangoFontDescription *ui_text_font_desc; static gboolean ui_text_font_dirty = FALSE; #else /* we have to fake a *lot* of stuff for gtk1.2 */ static GdkFont *ui_text_font; struct ui_text_tag_s { char *name; GdkColor foreground; }; typedef struct { GList *tags; /* list of tags */ int lineno; /* current line number */ GArray *offsets_by_line; /* for selecting by line number */ } ui_text_data; static const char ui_text_data_key[] = "ui_text_data_key"; static void ui_text_on_destroy(GtkWidget *w, gpointer closure) { ui_text_data *td = (ui_text_data *)closure; while (td->tags != 0) { ui_text_tag *tag = (ui_text_tag *)td->tags->data; g_free(tag->name); g_free(tag); td->tags = g_list_remove_link(td->tags, td->tags); } g_array_free(td->offsets_by_line, /*free_segment*/TRUE); g_free(td); } static void ui_text_line_start(GtkText *text, ui_text_data *td) { unsigned int offset = gtk_text_get_length(text); dprintf2(D_UICORE|D_VERBOSE, "offsets_by_line[%d] = %d\n", td->offsets_by_line->len, offset); g_array_append_val(td->offsets_by_line, offset); } #endif /* !GTK2 */ #if GTK2 #define UI_TEXT_SCALE_FACTOR 1.1 #define UI_TEXT_DEFAULT_SIZE 10240 #endif void ui_text_setup(GtkWidget *w) { #if GTK2 assert(GTK_IS_TEXT_VIEW(w)); /* * Override the font in the text window: it needs to be * fixedwidth so the source aligns properly. */ if (ui_text_font_dirty) { /* User changed text size */ g_assert(ui_text_font_desc != 0); pango_font_description_free(ui_text_font_desc); ui_text_font_desc = 0; ui_text_font_dirty = FALSE; } if (ui_text_font_desc == 0) { ui_text_font_desc = pango_font_description_from_string("monospace"); confsection_t *cs = confsection_t::get("general"); gint size = cs->get_int("text_size", UI_TEXT_DEFAULT_SIZE); pango_font_description_set_size(ui_text_font_desc, size); } gtk_widget_modify_font(w, ui_text_font_desc); /* Suppress wrap: it screws up our pretence of being multi-column */ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_NONE); #else /* !GTK2 */ ui_text_data *td; assert(GTK_IS_TEXT(w)); td = new(ui_text_data); if (ui_text_font == 0) ui_text_font = uix_fixed_width_font(gtk_widget_get_style(w)->font); td->offsets_by_line = g_array_new(/*zero_terminated*/TRUE, /*clear*/TRUE, sizeof(unsigned int)); gtk_object_set_data(GTK_OBJECT(w), ui_text_data_key, td); gtk_signal_connect(GTK_OBJECT(w), "destroy", GTK_SIGNAL_FUNC(ui_text_on_destroy), td); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int ui_text_font_width(GtkWidget *w) { #if GTK2 PangoLayout *layout = gtk_widget_create_pango_layout(w, "W"); PangoRectangle ink, logical; pango_layout_get_pixel_extents(layout, &ink, &logical); g_object_unref(layout); return logical.width; #else /* !GTK2 */ return uix_font_width(ui_text_font); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_text_adjust_text_size(GtkWidget *w, int dirn) { #if GTK2 static const char normal_size_key[] = "ui-text-normal-size"; PangoFontDescription *font_desc = w->style->font_desc; gint size = pango_font_description_get_size(font_desc); gint normal_size = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(w), normal_size_key)); if (normal_size == 0) { normal_size = pango_font_description_get_size(ui_text_font_desc); gtk_object_set_data(GTK_OBJECT(w), normal_size_key, GINT_TO_POINTER(normal_size)); } if (dirn < 0) size = (gint)((double)size / UI_TEXT_SCALE_FACTOR + 0.5); else if (dirn == 0) size = normal_size; else size = (gint)((double)size * UI_TEXT_SCALE_FACTOR + 0.5); font_desc = pango_font_description_copy(font_desc); pango_font_description_set_size(font_desc, size); gtk_widget_modify_font(w, font_desc); confsection_t::get("general")->set_int("text_size", size); confsection_t::sync(); ui_text_font_dirty = TRUE; #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ ui_text_tag * ui_text_create_tag(GtkWidget *w, const char *name, GdkColor *fg) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); return gtk_text_buffer_create_tag(buffer, name, "foreground-gdk", fg, (char *)0); #else /* !GTK2 */ ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); ui_text_tag *tag; tag = new(ui_text_tag); tag->name = g_strdup(name); tag->foreground = *fg; td->tags = g_list_prepend(td->tags, tag); return tag; #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gfloat ui_text_vscroll_sample(GtkWidget *w) { #if GTK2 return GTK_TEXT_VIEW(w)->vadjustment->value; #else /* !GTK2 */ return GTK_TEXT(w)->vadj->value; #endif /* !GTK2 */ } void ui_text_vscroll_restore(GtkWidget *w, gfloat vs) { #if GTK2 GtkTextView *tv = GTK_TEXT_VIEW(w); /* Work around rounding bug in gtk 2.0.2 */ if (vs + tv->vadjustment->page_size + 0.5 > tv->vadjustment->upper) vs = tv->vadjustment->upper - tv->vadjustment->page_size - 0.5; gtk_adjustment_set_value(tv->vadjustment, vs); #else /* !GTK2 */ gtk_adjustment_set_value(GTK_TEXT(w)->vadj, vs); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_text_begin(GtkWidget *w) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); gtk_text_buffer_set_text(buffer, "", -1); #else /* !GTK2 */ GtkText *text = GTK_TEXT(w); ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); gtk_text_freeze(text); gtk_editable_delete_text(GTK_EDITABLE(text), 0, -1); g_array_set_size(td->offsets_by_line, 0); ui_text_line_start(text, td); /* skip 0th entry */ #endif /* !GTK2 */ } void ui_text_add(GtkWidget *w, ui_text_tag *tag, const char *str, int len) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); GtkTextIter end; gtk_text_buffer_get_end_iter(buffer, &end); gtk_text_buffer_insert_with_tags(buffer, &end, str, len, tag, (char*)0); #else /* !GTK2 */ GtkText *text = GTK_TEXT(w); ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); const char *s, *e; GdkColor *fg = (tag == 0 ? 0 : &tag->foreground); GdkColor *bg = 0; if (len < 0) len = strlen(str); /* parse the string for newlines so we can track line offsets */ s = str; while (len > 0 && (e = strchr(s, '\n')) != 0) { e++; gtk_text_insert(text, ui_text_font, fg, bg, s, (e-s)); ui_text_line_start(text, td); len -= (e-s); s = e; } if (len > 0) gtk_text_insert(text, ui_text_font, fg, bg, s, len); #endif /* !GTK2 */ } void ui_text_end(GtkWidget *w) { #if !GTK2 GtkText *text = GTK_TEXT(w); gtk_text_thaw(text); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_text_select_lines(GtkWidget *w, unsigned long startline, unsigned long endline) { #if GTK2 #ifdef HAVE_GTK_TEXT_BUFFER_SELECT_RANGE GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); GtkTextIter start, end; if (startline > 1) startline--; /* workaround gtk bug */ gtk_text_buffer_get_iter_at_line(buffer, &start, startline); gtk_text_buffer_get_iter_at_line(buffer, &end, endline); /* this function appeared sometime after 2.0.2 */ gtk_text_buffer_select_range(buffer, &start, &end); #else /* GTK2 && !HAVE_GTK_TEXT_BUFFER_SELECT_RANGE */ /* * In GTK late 1.99 there is no way I can see to use the official * API to select a range of rows. However, we can fake it by * calling TextView class methods as if the user had entered the * keystrokes for cursor movement and selection...this is a HACK! * Unfortunately we can only move down by display lines not * logical text lines, so this technique relies on them being * identical, i.e. no line wrap. */ GtkTextViewClass *klass = GTK_TEXT_VIEW_GET_CLASS(w); GtkTextView *tview = GTK_TEXT_VIEW(w); /* first move the cursor to the start of the buffer */ (*klass->move_cursor)(tview, GTK_MOVEMENT_BUFFER_ENDS, -1, FALSE); /* move the cursor down to the start line */ if (startline > 1) (*klass->move_cursor)(tview, GTK_MOVEMENT_DISPLAY_LINES, (gint)startline-1, FALSE); /* select down to the end line */ if (endline == startline) (*klass->move_cursor)(tview, GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1, /*extend_selection*/TRUE); else (*klass->move_cursor)(tview, GTK_MOVEMENT_DISPLAY_LINES, (gint)(endline - startline + 1), /*extend_selection*/TRUE); #endif /* GTK2 && !HAVE_GTK_TEXT_BUFFER_SELECT_RANGE */ #else /* !GTK2 */ ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); int endoff; assert(td->offsets_by_line->len > 0); if (startline < 1) startline = 1; if (endline < 1) endline = startline; if (startline > td->offsets_by_line->len) startline = td->offsets_by_line->len; if (endline > td->offsets_by_line->len) endline = td->offsets_by_line->len; if (startline > endline) return; assert(startline >= 1); assert(startline <= td->offsets_by_line->len); assert(endline >= 1); assert(endline <= td->offsets_by_line->len); /* set endoff to the first location after the last line to be selected */ if (endline == td->offsets_by_line->len) endoff = -1; else endoff = g_array_index(td->offsets_by_line, unsigned int, endline)-1; gtk_editable_select_region(GTK_EDITABLE(w), g_array_index(td->offsets_by_line, unsigned int, startline-1), endoff); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void ui_text_ensure_visible(GtkWidget *w, unsigned long line) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); GtkTextIter iter; gtk_text_buffer_get_iter_at_line(buffer, &iter, line); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(w), &iter, 0.0, FALSE, 0.0, 0.0); #else /* This mostly works. Not totally predictable but good enough for now */ ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); GtkAdjustment *adj = GTK_TEXT(w)->vadj; gtk_adjustment_set_value(adj, adj->upper * (double)line / (double)td->offsets_by_line->len - adj->page_size/2.0); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #if !GTK2 static unsigned long ui_text_offset_to_lineno(ui_text_data *td, unsigned int offset) { unsigned int top, bottom; if (offset == 0) return 0; top = td->offsets_by_line->len-1; bottom = 0; dprintf3(D_UICORE|D_VERBOSE, "ui_text_offset_to_lineno: { offset=%u top=%u bottom=%u\n", offset, top, bottom); while (top - bottom > 1) { unsigned int mid = (top + bottom)/2; unsigned int midoff = g_array_index(td->offsets_by_line, unsigned int, mid); dprintf4(D_UICORE|D_VERBOSE, "ui_text_offset_to_lineno: top=%d bottom=%d mid=%d midoff=%u\n", top, bottom, mid, midoff); if (midoff == offset) top = bottom = mid; else if (midoff < offset) bottom = mid; else top = mid; } dprintf2(D_UICORE|D_VERBOSE, "ui_text_offset_to_lineno: offset=%u line=%u }\n", offset, bottom); return (unsigned long)bottom+1; } #endif /* !GTK2 */ void ui_text_get_selected_lines( GtkWidget *w, unsigned long *startp, unsigned long *endp) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); GtkTextIter start_iter, end_iter; if (!gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter)) { if (startp != 0) *startp = 0; if (endp != 0) *endp = 0; } else { if (startp != 0) *startp = gtk_text_iter_get_line(&start_iter)+1; if (endp != 0) *endp = gtk_text_iter_get_line(&end_iter)+1; } #else /* !GTK2 */ ui_text_data *td = (ui_text_data *)gtk_object_get_data(GTK_OBJECT(w), ui_text_data_key); if (GTK_EDITABLE(w)->selection_start_pos == 0 && GTK_EDITABLE(w)->selection_end_pos == 0) { if (startp != 0) *startp = 0; if (endp != 0) *endp = 0; } else { if (startp != 0) *startp = ui_text_offset_to_lineno(td, GTK_EDITABLE(w)->selection_start_pos); if (endp != 0) *endp = ui_text_offset_to_lineno(td, GTK_EDITABLE(w)->selection_end_pos-1); } #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * ui_text_get_contents(GtkWidget *w) { #if GTK2 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w)); GtkTextIter start, end; gtk_text_buffer_get_bounds(buffer, &start, &end); return gtk_text_buffer_get_text(buffer, &start, &end, /*include_hidden_chars*/FALSE); #else /* !GTK2 */ return gtk_editable_get_chars(GTK_EDITABLE(w), 0, -1); #endif /* !GTK2 */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov.H0000644000175000017500000000536511557262605011262 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_H_ #define _ggcov_cov_H_ 1 #include "cov_types.H" #include "cov_file.H" #include "cov_function.H" #include "cov_block.H" #include "cov_arc.H" #include "cov_callgraph.H" #include "cov_scope.H" #include "cov_line.H" #include "cov_calliter.H" #include "fakepopt.h" /* Call this to initialise the cov library */ void cov_init(void); void cov_suppress_ifdef(const char *variable); void cov_suppress_lines_with_comment(const char *word); void cov_suppress_lines_between_comments(const char *startw, const char *endw); gboolean cov_is_source_filename(const char *filename); /* Call this before reading any object or source files */ void cov_pre_read(void); /* Add a directory to the search path for .bb, .bbg, .da, and .o files */ void cov_add_search_directory(const char *dir); /* Read coverage data for the given source file */ gboolean cov_read_source_file(const char *cfilename); /* Read all the coveraged source files for the given object file or executable */ gboolean cov_read_object_file(const char *exefilename); /* Read all the coveraged source files in the given directory */ unsigned int cov_read_directory(const char *dirname, gboolean recursive); /* Call this after reading all files; mostly just calculates callgraph */ void cov_post_read(void); /* * If -DDEBUG > 1, dump human-readable debugging description * of contents of cov data structures to the given FILE* * (defaults to stderr if NULL is passed). */ void cov_dump(FILE *); extern const struct poptOption cov_popt_options[]; #define COV_POPT_OPTIONS \ { \ "whatever", /* longname */ \ '?', /* shortname */ \ POPT_ARG_INCLUDE_TABLE, /* argInfo */ \ (void *)cov_popt_options, /* arg */ \ 0, /* val 0=don't return */ \ 0, /* descrip */ \ 0 /* argDescrip */ \ }, extern void cov_post_args(void); extern void cov_read_files(GList *files); #endif /* _ggcov_cov_H_ */ ggcov-0.8.4/src/estring.C0000644000175000017500000001532311565735435012141 00000000000000/* * CANT - A C implementation of the Apache/Tomcat ANT build system * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "estring.H" #include CVSID("$Id: estring.C,v 1.10 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #define AVAIL_ROUND 256 void inline estring::expand_by(unsigned int dl) { if (length_ + dl + 1 > available_) { available_ = ((length_ + dl + 1) + AVAIL_ROUND-1) & ~(AVAIL_ROUND-1); data_ = (data_ == 0 ? g_new(char, available_) : g_renew(char, data_, available_)); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void estring::append_string(const char *str) { if (str != 0 && *str != '\0') append_chars(str, strlen(str)); } void estring::append_char(char c) { expand_by(1); data_[length_++] = c; data_[length_] = '\0'; } void estring::append_chars(const char *buf, unsigned int buflen) { expand_by(buflen); memcpy(&data_[length_], buf, buflen); length_ += buflen; data_[length_] = '\0'; } void estring::append_vprintf(const char *fmt, va_list args) { va_list args2; int len; #if HAVE_VA_COPY va_copy(args2, args); #else args2 = args; #endif /* ensure enough space exists for result, possibly too much */ len = g_printf_string_upper_bound(fmt, args); expand_by(len); /* format the string into the new space */ vsprintf(data_+length_, fmt, args2); length_ += strlen(data_+length_); } void estring::append_printf(const char *fmt, ...) { va_list args; va_start(args, fmt); append_vprintf(fmt, args); va_end(args); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void estring::replace_string( unsigned int start, unsigned int len, const char *str) { if (str == 0) str = ""; replace_chars(start, len, str, strlen(str)); } void estring::replace_char( unsigned int start, unsigned int len, char c) { replace_chars(start, len, &c, 1); } void estring::replace_chars( unsigned int start, unsigned int len, const char *buf, unsigned int buflen) { unsigned int remain; #if 0 fputs("estring::replace_chars: replacing \"", stderr); if (data_ != 0) fwrite(data_+start, 1, len, stderr); fputs("\" -> \"", stderr); if (buf != 0) fwrite(buf, 1, buflen, stderr); fputs("\"\n", stderr); #endif if (buflen > len) { expand_by(buflen-len); } if ((remain = length_ - (start+len)) > 0) { /* have to move some chars at the end, up or down */ memmove(data_+start+buflen, data_+start+len, remain); } /* insert new chars */ if (buflen > 0) memmove(data_+start, (char*)buf, buflen); /* update length_ */ if (buflen >= len) length_ += (buflen - len); else length_ -= (len - buflen); /* ensure there's a nul char at the right place */ data_[length_] = '\0'; } void estring::replace_vprintf( unsigned int start, unsigned int len, const char *fmt, va_list args) { char *str; str = g_strdup_printf(fmt, args); replace_chars(start, len, str, strlen(str)); g_free(str); } void estring::replace_printf( unsigned int start, unsigned int len, const char *fmt, ...) { va_list args; va_start(args, fmt); replace_vprintf(start, len, fmt, args); va_end(args); } void estring::replace_all(const char *from, const char *to) { char *p; int i; if (to == 0) to = ""; i = 0; while ((p = strstr(data_+i, from)) != 0) { i = (p - data_); replace_string(i, strlen(from), to); i += strlen(to); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void estring::insert_string(unsigned int start, const char *str) { replace_string(start, 0, str); } void estring::insert_char(unsigned int start, char c) { replace_char(start, 0, c); } void estring::insert_chars(unsigned int start, const char *buf, int buflen) { replace_chars(start, 0, buf, buflen); } void estring::insert_vprintf(unsigned int start, const char *fmt, va_list args) { replace_vprintf(start, 0, fmt, args); } void estring::insert_printf(unsigned int start, const char *fmt, ...) { va_list args; va_start(args, fmt); replace_vprintf(start, 0, fmt, args); va_end(args); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void estring::remove(unsigned int start, unsigned int len) { replace_chars(start, len, 0, 0); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void estring::truncate() { length_ = 0; if (data_ != 0) data_[0] = '\0'; } void estring::truncate_to(unsigned int len) { if (len < length_) { length_ = len; if (data_ != 0) data_[length_] = '\0'; } else if (len > length_) { expand_by(len - length_); memset(data_+length_, 0, len - length_); length_ = len; data_[length_] = '\0'; } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ //static inline gboolean is_crnl(int c) { return (c == '\n' || c == '\r'); } void estring::chomp() { while (length_ > 0 && isspace(data_[length_-1])) data_[--length_] = '\0'; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int estring::find_char(int c) const { const char *p = (data_ ? strchr(data_, c) : 0); return (p ? (p - data_) : -1); } int estring::find_string(const char *s) const { const char *p = (data_ ? strstr(data_, s) : 0); return (p ? (p - data_) : -1); } int estring::find_last_char(int c) const { const char *p = (data_ ? strrchr(data_, c) : 0); return (p ? (p - data_) : -1); } int estring::find_last_string(const char *s) const { /* libc doesn't have a strrstr(), we have to do this stupidly */ if (!data_) return -1; int slen = strlen(s); const char *p; for (p = data_+length_-1 ; p >= data_ ; --p) { if (*p == *s && !strncmp(p, s, slen)) return (p - data_); } return -1; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_callgraph.H0000644000175000017500000000430311557262605013266 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_callgraph_H_ #define _ggcov_cov_callgraph_H_ 1 #include "string_var.H" #include "hashtable.H" class cov_function_t; extern void cov_add_callnodes(cov_file_t*); extern void cov_add_callarcs(cov_file_t*); /* * Node in the callgraph, representing a function * which may be one of the covered functions or * may be an external library function. */ struct cov_callnode_t { string_var name; cov_function_t *function; /* may be NULL */ count_t count; GList *in_arcs, *out_arcs; void *userdata; static cov_callnode_t *find(const char *name); static void foreach(void (*func)(cov_callnode_t*, void *userdata), void *userdata); private: cov_callnode_t(const char *name); ~cov_callnode_t(); static void init(void); cov_callarc_t *find_arc_to(cov_callnode_t *to) const; static hashtable_t *all_; friend void cov_init(void); friend void cov_add_callnodes(cov_file_t*); friend void cov_add_callarcs(cov_file_t*); }; /* * Arcs between nodes in the callgraph. */ struct cov_callarc_t { cov_callnode_t *from, *to; count_t count; private: cov_callarc_t(cov_callnode_t *from, cov_callnode_t *to); ~cov_callarc_t(); void add_count(count_t); friend void cov_add_callarcs(cov_file_t*); }; #endif /* _ggcov_cov_callgraph_H_ */ ggcov-0.8.4/src/confsection.H0000644000175000017500000000372711453570563013005 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_confsection_H_ #define _ggcov_confsection_H_ 1 #include "common.h" #include "string_var.H" #include "hashtable.H" struct confenum_t { const char *string; int value; }; class confsection_t { public: static confsection_t *get(const char *secname); // returns a new string that must be freed char *get_string(const char *name, const char *deflt); void set_string(const char *name, const char *value); int get_enum(const char *name, const confenum_t *tbl, int deflt); void set_enum(const char *name, const confenum_t *tbl, int value); gboolean get_bool(const char *name, gboolean deflt); void set_bool(const char *name, gboolean value); int get_int(const char *name, int deflt); void set_int(const char *name, int value); float get_float(const char *name, float deflt); void set_float(const char *name, float value); static void sync(); private: confsection_t(const char *pref); ~confsection_t(); char *make_key(const char *name) const; static hashtable_t *all_; string_var secname_; }; #endif /* _ggcov_confsection_H_ */ ggcov-0.8.4/src/diagram.H0000644000175000017500000000275611557262605012100 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_diagram_H_ #define _ggcov_diagram_H_ 1 #include "common.h" #include "cov.H" #include "scenegen.H" #include "geometry.H" class diagram_t { public: diagram_t(); virtual ~diagram_t(); virtual const char *name() = 0; virtual const char *title() = 0; virtual void prepare() = 0; virtual void render(scenegen_t *) = 0; virtual void get_bounds(dbounds_t *) = 0; void set_fg(cov::status_t, unsigned int rgb); void set_bg(cov::status_t, unsigned int rgb); protected: unsigned int fg_rgb_by_status_[cov::NUM_STATUS]; unsigned int bg_rgb_by_status_[cov::NUM_STATUS]; private: }; #endif /* _ggcov_diagram_H_ */ ggcov-0.8.4/src/report.C0000644000175000017500000004002611565666244012000 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2011 Greg Banks * * * TODO: attribution for decode-gcov.c * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #include #include #include "cov.H" #include "filename.h" #include "estring.H" #include "report.H" #include "tok.H" CVSID("$Id: report.C,v 1.4 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int print_summary(FILE *fp, const cov_stats_t *stats, const char *what) { fprintf(fp, "Summary (%s)\n", what); fprintf(fp, "=======\n"); fprintf(fp, " %g%% blocks executed (%ld of %ld)\n", (stats->blocks_executed() / (double) stats->blocks_total()) * 100.0, stats->blocks_executed(), stats->blocks_total()); fprintf(fp, " (%ld blocks suppressed)\n", stats->blocks_suppressed()); fprintf(fp, " %g%% functions executed (%ld of %ld)\n", (stats->functions_executed() / (double) stats->functions_total()) * 100.0, stats->functions_executed(), stats->functions_total()); fprintf(fp, " %g%% functions completely executed (%ld of %ld)\n", (stats->functions_full() / (double) stats->functions_total()) * 100.0, stats->functions_full(), stats->functions_total()); fprintf(fp, " (%ld functions suppressed)\n", stats->functions_suppressed()); fprintf(fp, " %g%% lines executed (%ld of %ld)\n", (stats->lines_executed() / (double) stats->lines_total()) * 100.0, stats->lines_executed(), stats->lines_total()); fprintf(fp, " %g%% lines completely executed (%ld of %ld)\n", (stats->lines_full() / (double) stats->lines_total()) * 100.0, stats->lines_full(), stats->lines_total()); fprintf(fp, " (%ld lines suppressed)\n", stats->lines_suppressed()); return 10; } static int report_summary_all(FILE *fp) { cov_scope_t *sc = new cov_overall_scope_t; int nlines = print_summary(fp, sc->get_stats(), "all files"); delete sc; return nlines; } static int report_summary_per_directory(FILE *fp) { hashtable_t *ht; cov_stats_t *st; list_iterator_t fiter; unsigned int ndirs = 0; list_t keys; char *key; int nlines = 0; ht = new hashtable_t; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) { dprintf1(D_REPORT, "report_summary_per_directory: [1] \"%s\"\n", (*fiter)->minimal_name()); string_var dir = g_dirname((*fiter)->minimal_name()); if ((st = ht->lookup((char *)dir.data())) == 0) { st = new cov_stats_t; dprintf1(D_REPORT, "report_summary_per_directory: -> \"%s\"\n", dir.data()); ht->insert(dir.take(), st); ndirs++; } cov_file_scope_t fscope(*fiter); st->accumulate(fscope.get_stats()); } ht->keys(&keys); while ((key = keys.remove_head()) != 0) { dprintf1(D_REPORT, "report_summary_per_directory: [2] \"%s\"\n", key); st = ht->lookup(key); if (ndirs > 1) { if (nlines) fputc('\n', fp); nlines += print_summary(fp, st, key); } ht->remove(key); g_free(key); delete st; } delete ht; return nlines; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int report_untested_functions_per_file(FILE *fp) { list_iterator_t fiter; gboolean did_head1 = FALSE; int nlines = 0; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) { cov_file_t *f = (*fiter); unsigned int i; gboolean did_head2 = FALSE; for (i = 0 ; i < f->num_functions() ; i++) { cov_function_t *fn = f->nth_function(i); if (fn->status() != cov::UNCOVERED) continue; if (!did_head1) { did_head1 = TRUE; fprintf(fp, "Uncovered functions\n"); fprintf(fp, "===================\n"); nlines += 2; } if (!did_head2) { did_head2 = TRUE; fprintf(fp, "%s\n", f->minimal_name()); nlines++; } fprintf(fp, " %s\n", fn->name()); nlines++; } } return nlines; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static double global_fraction_covered(void) { cov_overall_scope_t sc; return sc.get_stats()->blocks_fraction(); } static int report_poorly_covered_functions_per_file(FILE *fp) { list_iterator_t fiter; double global_avg = global_fraction_covered(); gboolean did_head1 = FALSE; int nlines = 0; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) { cov_file_t *f = (*fiter); unsigned int i; gboolean did_head2 = FALSE; for (i = 0 ; i < f->num_functions() ; i++) { const cov_function_t *fn = f->nth_function(i); cov_function_scope_t fnscope(fn); double fraction; if (fnscope.status() != cov::PARTCOVERED) continue; fraction = fnscope.get_stats()->blocks_fraction(); if (fraction >= global_avg) continue; if (!did_head1) { did_head1 = TRUE; fprintf(fp, "Poorly covered functions\n"); fprintf(fp, "========================\n"); nlines += 2; } if (!did_head2) { did_head2 = TRUE; fprintf(fp, "%s\n", f->minimal_name()); nlines++; } fprintf(fp, " %s (%g%%)\n", fn->name(), fraction); nlines++; } } return nlines; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static int report_incompletely_covered_functions_per_file(FILE *fp) { list_iterator_t fiter; gboolean did_head1 = FALSE; int nlines = 0; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) { cov_file_t *f = (*fiter); unsigned int i; gboolean did_head2 = FALSE; for (i = 0 ; i < f->num_functions() ; i++) { const cov_function_t *fn = f->nth_function(i); cov_function_scope_t fnscope(fn); const cov_stats_t *st = fnscope.get_stats(); if (fnscope.status() != cov::PARTCOVERED) continue; if (!did_head1) { did_head1 = TRUE; fprintf(fp, "Incompletely covered functions\n"); fprintf(fp, "==============================\n"); nlines += 2; } if (!did_head2) { did_head2 = TRUE; fprintf(fp, "%s\n", f->minimal_name()); nlines++; } fprintf(fp, " %s (%ld/%ld uncovered blocks)\n", fn->name(), (st->blocks_total() - st->blocks_executed()), st->blocks_total()); nlines++; } } return nlines; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ class xml_node_t : private xmlNode { public: static xml_node_t *wrap(xmlNode *n) { return (xml_node_t *)n; } xmlNode *unwrap() { return (xmlNode *)this; } xml_node_t *new_child(const char *name, const char *content = 0) { return (xml_node_t *)xmlNewChild((xmlNode *)this, 0, (const xmlChar *)name, (const xmlChar *)content); } void add_prop(const char *name, const char *value) { xmlNewProp((xmlNode *)this, (const xmlChar *)name, (const xmlChar *)value); } void add_propf(const char *name, const char *fmt, ...) __attribute__((format(printf,3,4))) { estring e; va_list args; va_start(args, fmt); e.append_vprintf(fmt, args); va_end(args); xmlNewProp((xmlNode *)this, (const xmlChar *)name, (const xmlChar *)e.data()); } }; class cob_report_t { public: cob_report_t(); ~cob_report_t(); void add(cov_file_t *); void post_add(); void emit(FILE *fp); struct package_t { string_var name_; list_t files_; cov_stats_t stats_; package_t(char *name) : name_(name) { } ~package_t() { files_.remove_all(); } }; private: char *path(cov_file_t *f); void post_add_lines(xml_node_t *xparent, cov_file_t *f, unsigned int first, unsigned int last); void setup_common(); void setup_xdoc(); void post_add_coverage_props(xml_node_t *, const cov_stats_t *, int); void post_add_method(xml_node_t *, cov_function_t *fn); void post_add_class(xml_node_t *, package_t *pkg, cov_file_t *f); void post_add_package(xml_node_t *, package_t *pkg); hashtable_t *packages_; const char *common_; unsigned int common_len_; cov_stats_t stats_; xmlDoc *xdoc_; xml_node_t *xroot_; }; cob_report_t::cob_report_t() { packages_ = new hashtable_t; setup_common(); setup_xdoc(); } void cob_report_t::setup_common() { common_ = cov_file_t::common_path(); common_len_ = strlen(common_); /* double check that common_ starts and ends with a / and is at * least 3 chars long -- we rely on this */ assert(common_ != 0); assert(common_len_ >= 3); assert(common_[0] == '/'); assert(common_[common_len_-1] == '/'); const char *p = common_ + common_len_ - 2; while (p >= common_ && *p != '/') --p; /* common_len_ includes a trailing / */ common_len_ = p+1 - common_; } void cob_report_t::setup_xdoc() { xdoc_ = xmlNewDoc((const xmlChar *)XML_DEFAULT_VERSION); xmlCreateIntSubset(xdoc_, (const xmlChar *)"coverage", (const xmlChar *)"coverage", (const xmlChar *)"http://cobertura.sourceforge.net/xml/coverage-04.dtd"); xroot_ = xml_node_t::wrap(xmlNewDocNode(xdoc_, 0, (const xmlChar *)"coverage", 0)); xmlDocSetRootElement(xdoc_, xroot_->unwrap()); string_var common = g_strndup(common_, common_len_-1); xroot_->new_child("sources")->new_child("source", common); /* Fake a Java timestamp which appears to be milliseconds * since the Unix epoch */ struct timeval now; char buf[64]; gettimeofday(&now, 0); snprintf(buf, sizeof(buf), "%lu%03u", (unsigned long)now.tv_sec, ((unsigned)now.tv_usec) / 1000); xroot_->add_prop("timestamp", buf); xroot_->add_prop("version", "1.9"); } cob_report_t::~cob_report_t() { xmlFreeDoc(xdoc_); delete packages_; } // // Make and return a new string which is a partial pathname for the // given file but starting with a common first directory rather than // being minimal. This ensures that the cobertura file sees a root // instead of trying to put es in . // char * cob_report_t::path(cov_file_t *f) { return g_strconcat(common_ + common_len_, f->minimal_name(), (char *)0); } void cob_report_t::add(cov_file_t *f) { if (f->minimal_name()[0] == '/') return; /* not common, probably in /usr/include */ string_var fpath = path(f); string_var ppath = g_dirname(fpath); package_t *pkg = packages_->lookup(ppath); if (!pkg) { pkg = new package_t(ppath.take()); packages_->insert(pkg->name_, pkg); } pkg->files_.append(f); } void cob_report_t::post_add_lines( xml_node_t *xparent, cov_file_t *f, unsigned int first, unsigned int last) { xml_node_t *xlines = xparent->new_child("lines"); unsigned int lineno; for (lineno = first ; lineno <= last ; lineno++) { cov_line_t *ln = f->nth_line(lineno); if (ln->status() == cov::UNINSTRUMENTED || ln->status() == cov::SUPPRESSED) continue; xml_node_t *xline = xlines->new_child("line"); xline->add_propf("number", "%u", lineno); xline->add_propf("hits", "%llu", ln->count()); xline->add_prop("branch", "false"); /* TODO */ } } void cob_report_t::post_add_coverage_props( xml_node_t *xnode, const cov_stats_t *stats, int level) { xnode->add_propf("line-rate", "%f", stats->lines_fraction()); xnode->add_propf("branch-rate", "%f", stats->branches_fraction()); if (!level--) return; xnode->add_prop("complexity", "0.0"); /* TODO: WTF is this? */ if (!level--) return; xnode->add_propf("lines-covered", "%lu", stats->lines_executed()); xnode->add_propf("lines-valid", "%lu", stats->lines_total()); xnode->add_propf("branches-covered", "%lu", stats->branches_executed()); xnode->add_propf("branches-valid", "%lu", stats->branches_total()); } void cob_report_t::post_add_method(xml_node_t *xmethods, cov_function_t *fn) { cov_function_scope_t scope(fn); if (scope.status() == cov::SUPPRESSED) return; xml_node_t *xmethod = xmethods->new_child("method"); xmethod->add_prop("name", fn->name()); /* TODO: do proper demangling of C++ names */ xmethod->add_propf("signature", "void %s(void)", fn->name()); post_add_coverage_props(xmethod, scope.get_stats(), 0); const cov_location_t *first = fn->get_first_location(); const cov_location_t *last = fn->get_last_location(); if (first && last && !strcmp(first->filename, last->filename) && !strcmp(first->filename, fn->file()->name())) post_add_lines(xmethod, fn->file(), first->lineno, last->lineno); } void cob_report_t::post_add_class( xml_node_t *xclasses, package_t *pkg, cov_file_t *f) { xml_node_t *xclass = xclasses->new_child("class"); string_var fpath = path(f); xclass->add_prop("filename", fpath); estring name = fpath.data(); const char *ext = strrchr(name.data(), '.'); if (ext) name.truncate_to(ext - name.data()); name.replace_all("/", "."); xclass->add_prop("name", name); cov_file_scope_t scope(f); const cov_stats_t *stats = scope.get_stats(); pkg->stats_.accumulate(stats); post_add_coverage_props(xclass, stats, 1); xml_node_t *xmethods = xclass->new_child("methods"); unsigned int i; for (i = 0 ; i < f->num_functions() ; i++) post_add_method(xmethods, f->nth_function(i)); post_add_lines(xclass, f, 1, f->num_lines()); } void cob_report_t::post_add_package(xml_node_t *xpackages, package_t *pkg) { xml_node_t *xpkg = xpackages->new_child("package"); xpkg->add_prop("name", pkg->name_); xml_node_t *xclasses = xpkg->new_child("classes"); list_iterator_t fiter; for (fiter = pkg->files_.first() ; fiter != (cov_file_t *)0 ; ++fiter) post_add_class(xclasses, pkg, *fiter); post_add_coverage_props(xpkg, &pkg->stats_, 1); stats_.accumulate(&pkg->stats_); } void cob_report_t::post_add() { xml_node_t *xpackages = xroot_->new_child("packages"); hashtable_iter_t hiter; for (hiter = packages_->first() ; *hiter ; ++hiter) { hiter.remove(); post_add_package(xpackages, *hiter); } post_add_coverage_props(xroot_, &stats_, 2); } void cob_report_t::emit(FILE *fp) { xmlDocDump(fp, xdoc_); } static int report_cobertura(FILE *fp) { cob_report_t report; list_iterator_t fiter; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) report.add(*fiter); report.post_add(); report.emit(fp); return 1; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const report_t all_reports[] = { #define report(name, label) { #name, label, report_##name }, report(summary_all, N_("Summary, all files")) report(summary_per_directory, N_("Summary, per directory")) report(untested_functions_per_file, N_("Untested functions per file")) report(poorly_covered_functions_per_file, N_("Poorly covered functions per file")) report(incompletely_covered_functions_per_file, N_("Incompletely covered functions per file")) report(cobertura, N_("Cobertura-compatible XML report")) #undef report {0, 0} }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/mangletest.c0000644000175000017500000000333311453570563012662 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "demangle.h" const char *argv0; int main(int argc, char **argv) { enum { DEMANGLE, NORMALISE } mode = DEMANGLE; int i; argv0 = argv[0]; for (i = 1 ; i < argc ; i++) { if (!strcmp(argv[i], "--demangle")) { mode = DEMANGLE; } else if (!strcmp(argv[i], "--normalise")) { mode = NORMALISE; } else if (argv[i][0] == '-') { fprintf(stderr, "Usage: mangletest [--demangle|--normalise] sym...\n"); exit(1); } else { char *res; if (mode == DEMANGLE) { res = demangle(argv[i]); printf("demangle(\"%s\") =\n\"%s\"\n", argv[i], (res == 0 ? "(null)" : res)); } else { res = normalise_mangled(argv[i]); printf("normalise_mangled(\"%s\") =\n\"%s\"\n", argv[i], (res == 0 ? "(null)" : res)); } if (res) g_free(res); } } return 0; } ggcov-0.8.4/src/cov_block.H0000644000175000017500000000777011557262605012436 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_block_H_ #define _ggcov_cov_block_H_ 1 #include "common.h" #include "list.H" #include "hashtable.H" class cov_file_t; class cov_function_t; class cov_arc_t; class cov_call_iterator_t; class cov_block_t { public: cov::status_t status() const { cov_stats_t stats; return calc_stats(&stats); } gboolean is_suppressed() const { return (status() == cov::SUPPRESSED); } cov_function_t * function() const { return function_; } unsigned int bindex() const { return idx_; } /* returns a new string */ char *describe() const; /* For iterating over outgoing and incoming arcs */ list_iterator_t in_arc_iterator() const { return in_arcs_.first(); } list_iterator_t out_arc_iterator() const { return out_arcs_.first(); } const cov_location_t * get_first_location() const { return locations_.head(); } const cov_location_t * get_last_location() const { return locations_.tail(); } list_iterator_t location_iterator() const { return locations_.first(); } list_iterator_t location_reverse_iterator() const { return locations_.last(); } count_t count() const { return count_; } gboolean is_epilogue() const; void finalise(); private: struct call_t { call_t(const char *name, const cov_location_t *loc) : name_(name) { location_.filename = g_strdup(loc->filename); location_.lineno = loc->lineno; } ~call_t() { g_free(location_.filename); } string_var name_; cov_location_t location_; }; cov_block_t(); ~cov_block_t(); static count_t total(const GList *list); void set_count(count_t); void add_location(const char *filename, unsigned lineno); gboolean is_call_site() const; gboolean needs_call() const; void add_call(const char *name, const cov_location_t *loc); char *pop_call(); void suppress(); cov::status_t calc_stats(cov_stats_t *) const; gboolean suppressed_; /* suppressed from above or by self */ cov_function_t *function_; unsigned int idx_; /* serial number in function */ count_t count_; boolean count_valid_:1; list_t in_arcs_; unsigned in_ninvalid_; /* number of inbound non-call arcs with invalid counts */ list_t out_arcs_; unsigned out_ninvalid_; /* number of outbound non-call arcs with invalid counts */ unsigned int out_ncalls_;/* number of outbound call arcs */ list_t locations_; list_t pure_calls_; /* used while reading .o files to get arc names */ string_var call_; friend gboolean cov_o_file_add_call(cov_read_state_t *rs, unsigned long address, const char *callname); friend class cov_file_t; friend class cov_function_t; friend class cov_arc_t; friend class cov_range_scope_t; friend class cov_call_iterator_t; friend void dump_block(FILE *fp, cov_block_t *b); }; #endif /* _ggcov_cov_block_H_ */ ggcov-0.8.4/src/list.H0000644000175000017500000001430211453570563011435 00000000000000/* * CANT - A C implementation of the Apache/Tomcat ANT build system * Copyright (c) 2002-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _list_H_ #define _list_H_ 1 #include "common.h" /* * Wrapper for glib's GList structure. * * Unlike hashtable_t and strarray_t, list_t can be allocated * as auto variables or struct members. It's basically a head * and tail pointer made typesafe. */ template class list_t; template class list_iterator_t { private: GList *elem_; list_iterator_t(GList *elem) : elem_(elem) { } friend class list_t; public: list_iterator_t() : elem_(0) { } T *operator++() { T *item = 0; if (elem_ != 0) { item = (T *)elem_->data; elem_ = elem_->next; } return item; } T *operator--() { T *item = 0; if (elem_ != 0) { item = (T *)elem_->data; elem_ = elem_->prev; } return item; } T *operator*() { return (elem_ == 0 ? 0 : (T *)elem_->data); } list_iterator_t peek_next() const { return list_iterator_t(elem_ == 0 ? 0 : elem_->next); } list_iterator_t peek_prev() const { return list_iterator_t(elem_ == 0 ? 0 : elem_->prev); } void replace(T *item) { elem_->data = (gpointer)item; } void splice_after(list_t *list) { GList *last; if (list == 0 || list->head_ == 0) return; last = g_list_last(list->head_); // TODO: be smarter if (elem_->next != 0) elem_->next->prev = last; last->next = elem_->next; elem_->next = list->head_; list->head_->prev = elem_; list->head_ = list->tail_ = 0; } int operator==(T *item) { return (item == (elem_ == 0 ? 0 : (T *)elem_->data)); } int operator!=(T *item) { return (item != (elem_ == 0 ? 0 : (T *)elem_->data)); } }; template class list_t { private: GList *head_; GList *tail_; friend class list_iterator_t; public: /* ctor */ list_t() : head_(0), tail_(0) { } /* dtor */ ~list_t() { #if 0 // User must clear out list first assert(head_ == 0); assert(tail_ == 0); #endif } void append(T *item) { if (tail_ == 0) tail_ = g_list_last(head_); GList *elem = g_list_append(tail_, (gpointer)item); if (tail_ == 0) head_ = tail_ = elem; else tail_ = tail_->next; } void prepend(T *item) { head_ = g_list_append(head_, (gpointer)item); } void insert_sorted(T *item, gint (*compare)(const T*, const T*)) { head_ = g_list_insert_sorted(head_, (gpointer)item, (GCompareFunc)compare); // update tail_ pointer only if its no longer valid if (tail_ == 0 || tail_->next != 0) tail_ = g_list_last(head_); } void sort(gint (*compare)(const T*, const T*)) { head_ = g_list_sort(head_, (GCompareFunc)compare); // update tail_ pointer only if its no longer valid if (tail_ == 0 || tail_->next != 0) tail_ = g_list_last(head_); } void remove(T *item) { head_ = g_list_remove(head_, item); // invalidate tail tail_ = 0; } T *remove(list_iterator_t itr) { T *item = (T *)itr.elem_->data; if (tail_ != 0 && itr.elem_ == tail_) tail_ = tail_->prev; else tail_ = 0; // invalidate tail head_ = g_list_remove_link(head_, itr.elem_); return item; } void remove_all() { while (head_ != 0) head_ = g_list_remove_link(head_, head_); tail_ = 0; } T *remove_head() { T *item = 0; if (head_ != 0) { item = (T *)head_->data; if (head_ == tail_) tail_ = 0; head_ = g_list_remove_link(head_, head_); } return item; } void apply_remove(void (*dtor)(T *)) { while (head_ != 0) { T *item = (T *)head_->data; head_ = g_list_remove_link(head_, head_); (*dtor)(item); } tail_ = 0; } void delete_all() { while (head_ != 0) { delete (T *)head_->data; head_ = g_list_remove_link(head_, head_); } tail_ = 0; } void foreach(void (*func)(T*, void *closure), void *closure) { GList *iter; for (iter = head_ ; iter != 0 ; iter = iter->next) (*func)((T *)iter->data, closure); } void foreach_remove(gboolean (*func)(T*, void *closure), void *closure) { GList *iter, *next; for (iter = head_ ; iter != 0 ; iter = next) { next = iter->next; if ((*func)((T *)iter->data, closure)) remove(list_iterator_t(iter)); } } void concat(list_t *list) { // TODO: be smarter head_ = g_list_concat(head_, list->head_); tail_ = list->tail_; list->head_ = list->tail_ = 0; } void take(list_t *list) { head_ = list->head_; tail_ = list->tail_; list->head_ = list->tail_ = 0; } T *head() const { return (head_ == 0 ? 0 : (T *)head_->data); } T *tail() const { if (tail_ == 0) ((list_t *)this)->tail_ = g_list_last(head_); return (tail_ == 0 ? 0 : (T *)tail_->data); } guint length() const { return g_list_length(head_); } // iteration interface list_iterator_t first() const { return list_iterator_t(head_); } list_iterator_t last() const { if (tail_ == 0) ((list_t *)this)->tail_ = g_list_last(head_); return list_iterator_t(tail_); } }; #endif /* _list_H_ */ ggcov-0.8.4/src/cpp_parser.H0000644000175000017500000000560311453570563012624 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2004-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cpp_parser_H_ #define _ggcov_cpp_parser_H_ 1 #include "estring.H" #include "string_var.H" #include "hashtable.H" #include "list.H" class cpp_parser_t { public: cpp_parser_t(const char *filename); virtual ~cpp_parser_t(); gboolean parse(); protected: virtual void depends_changed() = 0; virtual void handle_comment(const char *text) = 0; virtual void post_line() = 0; unsigned long lineno() const { return lineno_; } gboolean depends(const char *var) const; void dump() const; private: struct depend_t { depend_t(); ~depend_t(); unsigned long lineno_; hashtable_t *deltas_; }; enum token_t { T_LEFT_PAREN = '(', T_RIGHT_PAREN = ')', T_BANG = '!', T_INCLUDE=256, T_IF, T_IFDEF, T_IFNDEF, T_ELSE, T_ELIF, T_ENDIF, T_DEFINE, T_UNDEF, T_DEFINED, T_LOG_AND, T_LOG_OR, T_NUMBER, T_IDENTIFIER, T_BOOL_EXPR, T_LOG_OP, T_MAX_TOKEN }; int xgetc(); void xungetc(int c); int getc_commentless(); void got_comment(estring &e, unsigned int off); int get_token(); const char *token_as_string(int tok) const; void parse_cpp_line(unsigned long lineno); void parse_c_line(unsigned long lineno); void stack_dump(); void stack_push(int token); int stack_pop(); int stack_peek(int off); void stack_replace(int ntoks, int newtoken); gboolean parse_boolean_expr(gboolean inverted); void parse_if(); void parse_ifdef(); void parse_ifndef(); void parse_else(); void parse_endif(); void set_delta(depend_t *dep, const char *var, int delta); string_var filename_; unsigned long lineno_; estring line_; unsigned int index_; /* index into line_ which xgetc() will next return */ gboolean in_comment_; estring comment_; /* text of all comments in the line, ws-separated */ char tokenbuf_[256]; list_t depend_stack_; #define MAX_STACK 32 int depth_; int stack_[MAX_STACK]; }; #endif /* _ggcov_cpp_parser_H_ */ ggcov-0.8.4/src/cov_scope.C0000644000175000017500000001575311557262605012450 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003-2004 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov.H" #include "estring.H" #include "string_var.H" #include "filename.h" CVSID("$Id: cov_scope.C,v 1.9 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_scope_t::cov_scope_t() { dirty_ = TRUE; } cov_scope_t::~cov_scope_t() { } const cov_stats_t * cov_scope_t::get_stats() { if (dirty_) { stats_.clear(); status_ = calc_stats(&stats_); dirty_ = FALSE; } return &stats_; } cov::status_t cov_scope_t::status() { get_stats(); return status_; } void cov_scope_t::dirty() { dirty_ = TRUE; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_overall_scope_t::cov_overall_scope_t() { } cov_overall_scope_t::~cov_overall_scope_t() { } const char * cov_overall_scope_t::describe() const { return _("Overall"); } cov::status_t cov_overall_scope_t::calc_stats(cov_stats_t *stats) { list_iterator_t iter; for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) (*iter)->calc_stats(stats); return stats->status_by_blocks(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_file_scope_t::cov_file_scope_t(const char *filename) : file_(cov_file_t::find(filename)) { } cov_file_scope_t::cov_file_scope_t(const cov_file_t *file) : file_(file) { } cov_file_scope_t::~cov_file_scope_t() { } const char * cov_file_scope_t::describe() const { return (file_ == 0 ? 0 : file_->minimal_name()); } cov::status_t cov_file_scope_t::calc_stats(cov_stats_t *stats) { assert(file_ != 0); return file_->calc_stats(stats); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_function_scope_t::cov_function_scope_t(const cov_function_t *fn) : function_(fn) { } cov_function_scope_t::~cov_function_scope_t() { } const char * cov_function_scope_t::describe() const { return (function_ == 0 ? 0 : function_->name()); } cov::status_t cov_function_scope_t::calc_stats(cov_stats_t *stats) { assert(function_ != 0); return function_->calc_stats(stats); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_range_scope_t::cov_range_scope_t( const char *filename, unsigned long start, unsigned long end) : file_(cov_file_t::find(filename)), start_(start), end_(end) { set_description(); } cov_range_scope_t::cov_range_scope_t( const cov_file_t *file, unsigned long start, unsigned long end) : file_(file), start_(start), end_(end) { set_description(); } cov_range_scope_t::~cov_range_scope_t() { if (description_) g_free(description_); } void cov_range_scope_t::set_description() { if (file_) description_ = g_strdup_printf("%s:%lu-%lu", file_->minimal_name(), start_, end_); } const char * cov_range_scope_t::describe() const { return description_; } /* * TODO: the method used here is completely wrong and doesn't * handle inline functions or functions in #included source * properly. Now that we have per-line records stored in an * array on the cov_file_t we should use that instead. */ cov::status_t cov_range_scope_t::calc_stats(cov_stats_t *stats) { cov_location_t start, end; cov_block_t *b; unsigned fnidx, bidx; unsigned long lastline; cov_line_t *startln, *endln; assert(file_ != 0); start.lineno = start_; end.lineno = end_; end.filename = start.filename = (char *)file_->name(); /* * Check inputs */ if (start.lineno > end.lineno) return cov::SUPPRESSED; /* invalid range */ if (start.lineno == 0 || end.lineno == 0) return cov::SUPPRESSED; /* invalid range */ lastline = file_->num_lines(); if (start.lineno > lastline) return cov::SUPPRESSED; /* range is outside file */ if (end.lineno > lastline) end.lineno = lastline; /* clamp range to file */ /* * Get blocklists for start and end. */ do { startln = cov_line_t::find(&start); } while ((startln == 0 || startln->blocks() == 0) && ++start.lineno <= end.lineno); if (startln == 0 || startln->blocks() == 0) return cov::SUPPRESSED; /* no executable lines in the given range */ assert(startln != 0); assert(startln->blocks() != 0); do { endln = cov_line_t::find(&end); } while ((endln == 0 || endln->blocks() == 0) && --end.lineno > start.lineno-1); assert(endln != 0); assert(endln->blocks() != 0); assert(start.lineno <= end.lineno); /* * Iterate over the blocks between start and end, * gathering stats as we go. Note that this can * span functions. */ b = (cov_block_t *)startln->blocks()->data; bidx = b->bindex(); fnidx = b->function()->findex(); do { b = file_->nth_function(fnidx)->nth_block(bidx); b->calc_stats(stats); if (++bidx == file_->nth_function(fnidx)->num_blocks()) { bidx = 0; ++fnidx; } } while (b != (cov_block_t *)endln->blocks()->data); return stats->status_by_blocks(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_compound_scope_t::cov_compound_scope_t() { } cov_compound_scope_t::cov_compound_scope_t(list_t *children) { children_.take(children); } cov_compound_scope_t::~cov_compound_scope_t() { children_.remove_all(); } void cov_compound_scope_t::add_child(cov_scope_t *sc) { /* caller's responsibility to avoid adding twice if so desired */ children_.prepend(sc); dirty(); } void cov_compound_scope_t::remove_child(cov_scope_t *sc) { children_.remove(sc); dirty(); } const char * cov_compound_scope_t::describe() const { return "compound"; } cov::status_t cov_compound_scope_t::calc_stats(cov_stats_t *stats) { list_iterator_t iter; const cov_stats_t *cstats; for (iter = children_.first() ; iter != (cov_scope_t *)0 ; ++iter) { // accumulate stats with caching if ((cstats = (*iter)->get_stats()) != 0) stats->accumulate(cstats); } return stats->status_by_blocks(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_i386.C0000644000175000017500000001552611453570563012026 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "cov_specific.H" #include "string_var.H" #if defined(HAVE_LIBBFD) && defined(COV_I386) CVSID("$Id: cov_i386.C,v 1.9 2010-05-09 05:37:15 gnb Exp $"); /* * Machine-specific code to scan i386 object code for function calls. */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ class cov_i386_call_scanner_t : public cov_call_scanner_t { public: cov_i386_call_scanner_t(); ~cov_i386_call_scanner_t(); int next(cov_call_scanner_t::calldata_t *); const asymbol *find_function_by_value(cov_bfd_section_t *, unsigned long); int scan_statics(cov_call_scanner_t::calldata_t *calld); private: unsigned int section_; unsigned int reloc_; arelent **relocs_; unsigned int nrelocs_; unsigned long startaddr_; /* section address of start of contents_ buffer */ unsigned long endaddr_; /* section address of end of contents_ buffer */ unsigned long offset_; /* current offset into contents_[] */ unsigned char *contents_; unsigned char *buf_; }; COV_FACTORY_STATIC_REGISTER(cov_call_scanner_t, cov_i386_call_scanner_t); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ cov_i386_call_scanner_t::cov_i386_call_scanner_t() { } cov_i386_call_scanner_t::~cov_i386_call_scanner_t() { if (relocs_) g_free(relocs_); if (buf_) g_free(buf_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ const asymbol * cov_i386_call_scanner_t::find_function_by_value( cov_bfd_section_t *sec, unsigned long value) { unsigned int i; for (i = 0 ; i < cbfd_->num_symbols() ; i++) { const asymbol *sym = cbfd_->nth_symbol(i); if (sym->section == (asection *)sec && sym->value == value && (sym->flags & (BSF_LOCAL|BSF_GLOBAL|BSF_FUNCTION)) == (BSF_LOCAL| BSF_FUNCTION)) return sym; } return 0; } #define read_lu32(p) \ ( (p)[0] | \ ((p)[1] << 8) | \ ((p)[2] << 16) | \ ((p)[3] << 24)) int cov_i386_call_scanner_t::scan_statics(cov_call_scanner_t::calldata_t *calld) { cov_bfd_section_t *sec = cbfd_->nth_code_section(section_); unsigned long len; unsigned char *p, *end; unsigned long callfrom, callto; const asymbol *sym; dprintf3(D_CGRAPH|D_VERBOSE, "scan_statics: scanning %s %lx to %lx\n", cbfd_->filename(), startaddr_, endaddr_); g_assert(endaddr_ >= startaddr_); if ((len = endaddr_ - startaddr_) < 1) return 0; if (contents_ == 0) { if ((contents_ = sec->get_contents(startaddr_, len)) == 0) return 0; /* end of scan */ offset_ = 0; } end = contents_ + len - 4; /* * It would presumably be more efficient to scan through the relocs * looking for PCREL32 to static functions and double-check that the * preceding byte is the CALL instruction. Except that we don't * actually get any such relocs, at least for some versions of gcc. */ /* CALL instruction is 5 bytes long so don't bother scanning last 5 bytes */ for (p = contents_+offset_ ; p < end ; p++) { if (*p != 0xe8) continue; /* not a CALL instruction */ callfrom = startaddr_ + (p - contents_); p++; callto = callfrom + read_lu32(p) + 5; p += 4; dprintf2(D_CGRAPH|D_VERBOSE, "scan_statics: possible call from %lx to %lx\n", callfrom, callto); /* * Scan symbols to see if this is a PCREL32 * reference to a static function entry point */ if ((sym = find_function_by_value(sec, callto)) != 0) { offset_ = (p - contents_); dprintf0(D_CGRAPH, "scan_statics: scanned static call\n"); return (setup_calldata(sec, callfrom, sym->name, calld) ? 1/* have calldata */ : -1/* something is wrong */); } } g_free(contents_); contents_ = 0; return 0; /* end of scan */ } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int cov_i386_call_scanner_t::next(cov_call_scanner_t::calldata_t *calld) { int r; for ( ; section_ < cbfd_->num_code_sections() ; section_++) { cov_bfd_section_t *sec = cbfd_->nth_code_section(section_); if (relocs_ == 0) { if ((relocs_ = sec->get_relocs(&nrelocs_)) == 0) continue; reloc_ = 0; startaddr_ = endaddr_ = 0UL; } for ( ; reloc_ < nrelocs_ ; reloc_++) { arelent *rel = relocs_[reloc_]; const asymbol *sym = *rel->sym_ptr_ptr; if (debug_enabled(D_CGRAPH|D_VERBOSE)) cov_bfd_t::dump_reloc(reloc_, rel); switch (rel->howto->type) { case R_386_32: /* external data reference from static code */ case R_386_GOTPC: /* external data reference from PIC code */ case R_386_GOTOFF: /* external data reference from PIC code */ case R_386_GOT32: /* external data reference from ??? code */ continue; case R_386_PC32: /* function call from static code */ case R_386_PLT32: /* function call from PIC code */ break; default: fprintf(stderr, "%s: Warning unexpected 386 reloc howto type %d\n", cbfd_->filename(), rel->howto->type); continue; } if (symbol_is_ignored(sym->name)) continue; if ((sym->flags & BSF_FUNCTION) || (sym->flags & (BSF_LOCAL|BSF_GLOBAL|BSF_SECTION_SYM|BSF_OBJECT)) == 0) { /* * Scan the instructions between the previous reloc and * this instruction for calls to static functions. Very * platform specific! */ endaddr_ = rel->address; if ((r = scan_statics(calld))) return r; /* -1 or 1 */ startaddr_ = endaddr_ + bfd_get_reloc_size(rel->howto); reloc_++; return (setup_calldata(sec, rel->address, sym->name, calld) ? 1/* have calldata */ : -1/* something is wrong */); } } g_free(relocs_); relocs_ = 0; if (endaddr_ < sec->raw_size()) { endaddr_ = sec->raw_size(); if ((r = scan_statics(calld))) return r; /* -1 or 1 */ } } return 0; /* end of scan */ } #endif /*HAVE_LIBBFD && COV_I386 */ /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/Makefile.in0000644000175000017500000014572711612762303012426 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.74 2010-05-09 05:37:14 gnb Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_1) tggcov$(EXEEXT) $(am__EXEEXT_2) EXTRA_PROGRAMS = ggcov$(EXEEXT) ggcov-webdb$(EXEEXT) noinst_PROGRAMS = bbdump$(EXEEXT) filetest$(EXEEXT) \ mangletest$(EXEEXT) newbbgdump$(EXEEXT) phptest$(EXEEXT) \ popttest$(EXEEXT) toktest$(EXEEXT) estringtest$(EXEEXT) \ hashtabletest$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libcommon_a_AR = $(AR) $(ARFLAGS) libcommon_a_LIBADD = am_libcommon_a_OBJECTS = demangle.$(OBJEXT) common.$(OBJEXT) \ fakepopt.$(OBJEXT) estring.$(OBJEXT) tok.$(OBJEXT) \ cached_string.$(OBJEXT) filename.$(OBJEXT) hashtable.$(OBJEXT) \ mvc.$(OBJEXT) cpp_parser.$(OBJEXT) scenegen.$(OBJEXT) libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) libcov_a_AR = $(AR) $(ARFLAGS) libcov_a_LIBADD = am_libcov_a_OBJECTS = covio.$(OBJEXT) cov_specific.$(OBJEXT) \ cov_bfd.$(OBJEXT) cov_file.$(OBJEXT) cov_suppression.$(OBJEXT) \ cov_line.$(OBJEXT) cov_function.$(OBJEXT) cov_block.$(OBJEXT) \ cov_calliter.$(OBJEXT) cov_arc.$(OBJEXT) \ cov_callgraph.$(OBJEXT) cov_scope.$(OBJEXT) cov.$(OBJEXT) \ report.$(OBJEXT) diagram.$(OBJEXT) lego_diagram.$(OBJEXT) \ callgraph_diagram.$(OBJEXT) flow_diagram.$(OBJEXT) libcov_a_OBJECTS = $(am_libcov_a_OBJECTS) am__EXEEXT_1 = @GUIPROG@ am__EXEEXT_2 = @WEBPROG@ am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_bbdump_OBJECTS = bbdump.$(OBJEXT) bbdump_OBJECTS = $(am_bbdump_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = libcov.a libcommon.a $(am__DEPENDENCIES_1) bbdump_DEPENDENCIES = $(am__DEPENDENCIES_2) am_estringtest_OBJECTS = estringtest.$(OBJEXT) estringtest_OBJECTS = $(am_estringtest_OBJECTS) estringtest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_filetest_OBJECTS = filetest.$(OBJEXT) filetest_OBJECTS = $(am_filetest_OBJECTS) filetest_DEPENDENCIES = $(am__DEPENDENCIES_2) am__objects_1 = ui.$(OBJEXT) uix.$(OBJEXT) gnbstackedbar.$(OBJEXT) \ confsection.$(OBJEXT) prefs.$(OBJEXT) window.$(OBJEXT) \ sourcewin.$(OBJEXT) summarywin.$(OBJEXT) callswin.$(OBJEXT) \ callgraphwin.$(OBJEXT) functionswin.$(OBJEXT) \ reportwin.$(OBJEXT) fileswin.$(OBJEXT) prefswin.$(OBJEXT) \ canvas_scenegen.$(OBJEXT) canvas_function_popup.$(OBJEXT) \ diagwin.$(OBJEXT) utils.$(OBJEXT) help.$(OBJEXT) \ ggcov.$(OBJEXT) am__objects_2 = cov_stab32.$(OBJEXT) cov_i386.$(OBJEXT) \ cov_dwarf2.$(OBJEXT) cov_elf.$(OBJEXT) am_ggcov_OBJECTS = $(am__objects_1) $(am__objects_2) \ glade_callbacks.$(OBJEXT) ggcov_OBJECTS = $(am_ggcov_OBJECTS) ggcov_DEPENDENCIES = libcov.a libcommon.a $(am__DEPENDENCIES_1) am__objects_3 = ggcov_webdb-cov_stab32.$(OBJEXT) \ ggcov_webdb-cov_i386.$(OBJEXT) \ ggcov_webdb-cov_dwarf2.$(OBJEXT) ggcov_webdb-cov_elf.$(OBJEXT) am_ggcov_webdb_OBJECTS = ggcov_webdb-ggcov-webdb.$(OBJEXT) \ ggcov_webdb-php_serializer.$(OBJEXT) \ ggcov_webdb-php_scenegen.$(OBJEXT) $(am__objects_3) ggcov_webdb_OBJECTS = $(am_ggcov_webdb_OBJECTS) ggcov_webdb_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) am_hashtabletest_OBJECTS = hashtabletest.$(OBJEXT) hashtabletest_OBJECTS = $(am_hashtabletest_OBJECTS) hashtabletest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_mangletest_OBJECTS = mangletest.$(OBJEXT) mangletest_OBJECTS = $(am_mangletest_OBJECTS) mangletest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_newbbgdump_OBJECTS = newbbgdump.$(OBJEXT) newbbgdump_OBJECTS = $(am_newbbgdump_OBJECTS) newbbgdump_DEPENDENCIES = $(am__DEPENDENCIES_2) am_phptest_OBJECTS = phptest.$(OBJEXT) php_serializer.$(OBJEXT) phptest_OBJECTS = $(am_phptest_OBJECTS) phptest_DEPENDENCIES = $(am__DEPENDENCIES_2) am_popttest_OBJECTS = popttest.$(OBJEXT) popttest_OBJECTS = $(am_popttest_OBJECTS) popttest_DEPENDENCIES = $(am__DEPENDENCIES_1) am_tggcov_OBJECTS = tggcov.$(OBJEXT) check_scenegen.$(OBJEXT) \ $(am__objects_2) tggcov_OBJECTS = $(am_tggcov_OBJECTS) tggcov_DEPENDENCIES = $(am__DEPENDENCIES_2) am_toktest_OBJECTS = toktest.$(OBJEXT) toktest_OBJECTS = $(am_toktest_OBJECTS) toktest_DEPENDENCIES = $(am__DEPENDENCIES_2) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libcommon_a_SOURCES) $(libcov_a_SOURCES) $(bbdump_SOURCES) \ $(estringtest_SOURCES) $(filetest_SOURCES) $(ggcov_SOURCES) \ $(ggcov_webdb_SOURCES) $(hashtabletest_SOURCES) \ $(mangletest_SOURCES) $(newbbgdump_SOURCES) $(phptest_SOURCES) \ $(popttest_SOURCES) $(tggcov_SOURCES) $(toktest_SOURCES) DIST_SOURCES = $(libcommon_a_SOURCES) $(libcov_a_SOURCES) \ $(bbdump_SOURCES) $(estringtest_SOURCES) $(filetest_SOURCES) \ $(ggcov_SOURCES) $(ggcov_webdb_SOURCES) \ $(hashtabletest_SOURCES) $(mangletest_SOURCES) \ $(newbbgdump_SOURCES) $(phptest_SOURCES) $(popttest_SOURCES) \ $(tggcov_SOURCES) $(toktest_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = libiberty libggcov noinst_LIBRARIES = libcommon.a libcov.a libcommon_a_SOURCES = \ demangle.h demangle.c \ common.h common.c \ fakepopt.h fakepopt.c \ estring.H estring.C string_var.H tok.H tok.C \ cached_string.H cached_string.C \ filename.h filename.c \ list.H \ hashtable.H hashtable.C \ ptrarray.H \ mvc.h mvc.c \ cpp_parser.H cpp_parser.C \ scenegen.H scenegen.C \ geometry.H libcov_a_SOURCES = \ covio.H covio.C \ cov_specific.H cov_specific.C \ cov_bfd.H cov_bfd.C \ cov_file.H cov_file.C \ cov_suppression.H cov_suppression.C \ cov_line.H cov_line.C \ cov_function.H cov_function.C \ cov_block.H cov_block.C \ cov_calliter.H cov_calliter.C \ cov_arc.H cov_arc.C \ cov_callgraph.H cov_callgraph.C \ cov_scope.H cov_scope.C \ cov_types.H cov.H cov.C \ report.H report.C \ diagram.H diagram.C colors.h \ lego_diagram.H lego_diagram.C \ callgraph_diagram.H callgraph_diagram.C \ flow_diagram.H flow_diagram.C # This is a sad hack to work around the problem where some # objects need to be unconditionally linked instead of pulled # in from libcov.a on demand. LIBCOV_STATIC_SOURCES = \ cov_stab32.C cov_i386.C cov_dwarf2.C cov_elf.C @GUI_FALSE@BASEINCLUDES = $(GGCOV_CLI_CFLAGS) @GUI_TRUE@BASEINCLUDES = $(GGCOV_GUI_CFLAGS) gui_SOURCES = uicommon.h ui.h ui.c uix.h uix.c \ gnbstackedbar.h gnbstackedbar.c \ confsection.H confsection.C \ prefs.H prefs.C \ window.H window.C \ sourcewin.H sourcewin.C \ summarywin.H summarywin.C \ callswin.H callswin.C \ callgraphwin.H callgraphwin.C \ functionswin.H functionswin.C \ reportwin.H reportwin.C \ fileswin.H fileswin.C \ prefswin.H prefswin.C \ canvas_scenegen.H canvas_scenegen.C \ canvas_function_popup.H canvas_function_popup.C \ diagwin.H diagwin.C \ utils.H utils.C \ help.c ggcov.c ggcov_SOURCES = $(gui_SOURCES) $(LIBCOV_STATIC_SOURCES) glade_callbacks.c INCLUDES = $(BASEINCLUDES) -DPKGDATADIR="\"$(pkgdatadir)\"" \ -DPREFIX="\"$(prefix)\"" -DDATADIR="\"$(datadir)\"" \ -DLIBDIR="\"$(libdir)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" \ -DDEBUG=$(DEBUG) -DUI_DEBUG=$(UI_DEBUG) \ $(CPU_DEFINES) $(OS_DEFINES) ggcov_LDADD = libcov.a libcommon.a $(GGCOV_GUI_LIBS) CLI_LIBS = libcov.a libcommon.a $(GGCOV_CLI_LIBS) tggcov_SOURCES = tggcov.c \ check_scenegen.H check_scenegen.C \ $(LIBCOV_STATIC_SOURCES) tggcov_LDADD = $(CLI_LIBS) ggcov_webdb_SOURCES = \ ggcov-webdb.c \ php_serializer.H php_serializer.C \ php_scenegen.H php_scenegen.C \ $(LIBCOV_STATIC_SOURCES) ggcov_webdb_CPPFLAGS = $(DB_CPPFLAGS) ggcov_webdb_LDADD = $(CLI_LIBS) $(DB_LIBS) @DEBUG_FALSE@DEBUG = 0 # Note this is an automake conditional *not* a gmake conditional @DEBUG_TRUE@DEBUG = 1 UI_DEBUG = 0 EXTRA_DIST = gencallbacks.pl EXTRA_CLEAN = licence.c glade_callbacks.c bbdump_SOURCES = bbdump.c bbdump_LDADD = $(CLI_LIBS) filetest_SOURCES = filetest.c filetest_LDADD = $(CLI_LIBS) mangletest_SOURCES = mangletest.c mangletest_LDADD = $(CLI_LIBS) newbbgdump_SOURCES = newbbgdump.c newbbgdump_LDADD = $(CLI_LIBS) phptest_SOURCES = phptest.C php_serializer.C phptest_LDADD = $(CLI_LIBS) popttest_SOURCES = popttest.c popttest_LDADD = $(GGCOV_CLI_LIBS) toktest_SOURCES = toktest.c toktest_LDADD = $(CLI_LIBS) estringtest_SOURCES = estringtest.c estringtest_LDADD = $(CLI_LIBS) hashtabletest_SOURCES = hashtabletest.c hashtabletest_LDADD = $(CLI_LIBS) COVFLAGS = -fprofile-arcs -ftest-coverage all: all-recursive .SUFFIXES: .SUFFIXES: .C .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) -rm -f libcommon.a $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) $(RANLIB) libcommon.a libcov.a: $(libcov_a_OBJECTS) $(libcov_a_DEPENDENCIES) -rm -f libcov.a $(libcov_a_AR) libcov.a $(libcov_a_OBJECTS) $(libcov_a_LIBADD) $(RANLIB) libcov.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done bbdump$(EXEEXT): $(bbdump_OBJECTS) $(bbdump_DEPENDENCIES) @rm -f bbdump$(EXEEXT) $(LINK) $(bbdump_LDFLAGS) $(bbdump_OBJECTS) $(bbdump_LDADD) $(LIBS) estringtest$(EXEEXT): $(estringtest_OBJECTS) $(estringtest_DEPENDENCIES) @rm -f estringtest$(EXEEXT) $(LINK) $(estringtest_LDFLAGS) $(estringtest_OBJECTS) $(estringtest_LDADD) $(LIBS) filetest$(EXEEXT): $(filetest_OBJECTS) $(filetest_DEPENDENCIES) @rm -f filetest$(EXEEXT) $(LINK) $(filetest_LDFLAGS) $(filetest_OBJECTS) $(filetest_LDADD) $(LIBS) ggcov$(EXEEXT): $(ggcov_OBJECTS) $(ggcov_DEPENDENCIES) @rm -f ggcov$(EXEEXT) $(CXXLINK) $(ggcov_LDFLAGS) $(ggcov_OBJECTS) $(ggcov_LDADD) $(LIBS) ggcov-webdb$(EXEEXT): $(ggcov_webdb_OBJECTS) $(ggcov_webdb_DEPENDENCIES) @rm -f ggcov-webdb$(EXEEXT) $(CXXLINK) $(ggcov_webdb_LDFLAGS) $(ggcov_webdb_OBJECTS) $(ggcov_webdb_LDADD) $(LIBS) hashtabletest$(EXEEXT): $(hashtabletest_OBJECTS) $(hashtabletest_DEPENDENCIES) @rm -f hashtabletest$(EXEEXT) $(LINK) $(hashtabletest_LDFLAGS) $(hashtabletest_OBJECTS) $(hashtabletest_LDADD) $(LIBS) mangletest$(EXEEXT): $(mangletest_OBJECTS) $(mangletest_DEPENDENCIES) @rm -f mangletest$(EXEEXT) $(LINK) $(mangletest_LDFLAGS) $(mangletest_OBJECTS) $(mangletest_LDADD) $(LIBS) newbbgdump$(EXEEXT): $(newbbgdump_OBJECTS) $(newbbgdump_DEPENDENCIES) @rm -f newbbgdump$(EXEEXT) $(LINK) $(newbbgdump_LDFLAGS) $(newbbgdump_OBJECTS) $(newbbgdump_LDADD) $(LIBS) phptest$(EXEEXT): $(phptest_OBJECTS) $(phptest_DEPENDENCIES) @rm -f phptest$(EXEEXT) $(CXXLINK) $(phptest_LDFLAGS) $(phptest_OBJECTS) $(phptest_LDADD) $(LIBS) popttest$(EXEEXT): $(popttest_OBJECTS) $(popttest_DEPENDENCIES) @rm -f popttest$(EXEEXT) $(LINK) $(popttest_LDFLAGS) $(popttest_OBJECTS) $(popttest_LDADD) $(LIBS) tggcov$(EXEEXT): $(tggcov_OBJECTS) $(tggcov_DEPENDENCIES) @rm -f tggcov$(EXEEXT) $(CXXLINK) $(tggcov_LDFLAGS) $(tggcov_OBJECTS) $(tggcov_LDADD) $(LIBS) toktest$(EXEEXT): $(toktest_OBJECTS) $(toktest_DEPENDENCIES) @rm -f toktest$(EXEEXT) $(LINK) $(toktest_LDFLAGS) $(toktest_OBJECTS) $(toktest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbdump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cached_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callgraph_diagram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callgraphwin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callswin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas_function_popup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas_scenegen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_scenegen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/confsection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_arc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_bfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_block.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_callgraph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_calliter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_dwarf2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_elf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_function.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_i386.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_line.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_scope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_specific.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_stab32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cov_suppression.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/covio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpp_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demangle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diagwin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/estringtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileswin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filetest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flow_diagram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functionswin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-cov_dwarf2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-cov_elf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-cov_i386.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-cov_stab32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-ggcov-webdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-php_scenegen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggcov_webdb-php_serializer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glade_callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnbstackedbar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashtable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashtabletest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lego_diagram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mangletest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newbbgdump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/php_serializer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phptest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popttest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefswin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/report.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reportwin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scenegen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sourcewin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/summarywin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tggcov.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tok.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toktest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@ .C.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .C.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .C.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< ggcov_webdb-php_serializer.o: php_serializer.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-php_serializer.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo" -c -o ggcov_webdb-php_serializer.o `test -f 'php_serializer.C' || echo '$(srcdir)/'`php_serializer.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo" "$(DEPDIR)/ggcov_webdb-php_serializer.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='php_serializer.C' object='ggcov_webdb-php_serializer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-php_serializer.o `test -f 'php_serializer.C' || echo '$(srcdir)/'`php_serializer.C ggcov_webdb-php_serializer.obj: php_serializer.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-php_serializer.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo" -c -o ggcov_webdb-php_serializer.obj `if test -f 'php_serializer.C'; then $(CYGPATH_W) 'php_serializer.C'; else $(CYGPATH_W) '$(srcdir)/php_serializer.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo" "$(DEPDIR)/ggcov_webdb-php_serializer.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-php_serializer.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='php_serializer.C' object='ggcov_webdb-php_serializer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-php_serializer.obj `if test -f 'php_serializer.C'; then $(CYGPATH_W) 'php_serializer.C'; else $(CYGPATH_W) '$(srcdir)/php_serializer.C'; fi` ggcov_webdb-php_scenegen.o: php_scenegen.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-php_scenegen.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo" -c -o ggcov_webdb-php_scenegen.o `test -f 'php_scenegen.C' || echo '$(srcdir)/'`php_scenegen.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo" "$(DEPDIR)/ggcov_webdb-php_scenegen.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='php_scenegen.C' object='ggcov_webdb-php_scenegen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-php_scenegen.o `test -f 'php_scenegen.C' || echo '$(srcdir)/'`php_scenegen.C ggcov_webdb-php_scenegen.obj: php_scenegen.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-php_scenegen.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo" -c -o ggcov_webdb-php_scenegen.obj `if test -f 'php_scenegen.C'; then $(CYGPATH_W) 'php_scenegen.C'; else $(CYGPATH_W) '$(srcdir)/php_scenegen.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo" "$(DEPDIR)/ggcov_webdb-php_scenegen.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-php_scenegen.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='php_scenegen.C' object='ggcov_webdb-php_scenegen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-php_scenegen.obj `if test -f 'php_scenegen.C'; then $(CYGPATH_W) 'php_scenegen.C'; else $(CYGPATH_W) '$(srcdir)/php_scenegen.C'; fi` ggcov_webdb-cov_stab32.o: cov_stab32.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_stab32.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo" -c -o ggcov_webdb-cov_stab32.o `test -f 'cov_stab32.C' || echo '$(srcdir)/'`cov_stab32.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo" "$(DEPDIR)/ggcov_webdb-cov_stab32.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_stab32.C' object='ggcov_webdb-cov_stab32.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_stab32.o `test -f 'cov_stab32.C' || echo '$(srcdir)/'`cov_stab32.C ggcov_webdb-cov_stab32.obj: cov_stab32.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_stab32.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo" -c -o ggcov_webdb-cov_stab32.obj `if test -f 'cov_stab32.C'; then $(CYGPATH_W) 'cov_stab32.C'; else $(CYGPATH_W) '$(srcdir)/cov_stab32.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo" "$(DEPDIR)/ggcov_webdb-cov_stab32.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_stab32.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_stab32.C' object='ggcov_webdb-cov_stab32.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_stab32.obj `if test -f 'cov_stab32.C'; then $(CYGPATH_W) 'cov_stab32.C'; else $(CYGPATH_W) '$(srcdir)/cov_stab32.C'; fi` ggcov_webdb-cov_i386.o: cov_i386.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_i386.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo" -c -o ggcov_webdb-cov_i386.o `test -f 'cov_i386.C' || echo '$(srcdir)/'`cov_i386.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo" "$(DEPDIR)/ggcov_webdb-cov_i386.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_i386.C' object='ggcov_webdb-cov_i386.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_i386.o `test -f 'cov_i386.C' || echo '$(srcdir)/'`cov_i386.C ggcov_webdb-cov_i386.obj: cov_i386.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_i386.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo" -c -o ggcov_webdb-cov_i386.obj `if test -f 'cov_i386.C'; then $(CYGPATH_W) 'cov_i386.C'; else $(CYGPATH_W) '$(srcdir)/cov_i386.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo" "$(DEPDIR)/ggcov_webdb-cov_i386.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_i386.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_i386.C' object='ggcov_webdb-cov_i386.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_i386.obj `if test -f 'cov_i386.C'; then $(CYGPATH_W) 'cov_i386.C'; else $(CYGPATH_W) '$(srcdir)/cov_i386.C'; fi` ggcov_webdb-cov_dwarf2.o: cov_dwarf2.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_dwarf2.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo" -c -o ggcov_webdb-cov_dwarf2.o `test -f 'cov_dwarf2.C' || echo '$(srcdir)/'`cov_dwarf2.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo" "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_dwarf2.C' object='ggcov_webdb-cov_dwarf2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_dwarf2.o `test -f 'cov_dwarf2.C' || echo '$(srcdir)/'`cov_dwarf2.C ggcov_webdb-cov_dwarf2.obj: cov_dwarf2.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_dwarf2.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo" -c -o ggcov_webdb-cov_dwarf2.obj `if test -f 'cov_dwarf2.C'; then $(CYGPATH_W) 'cov_dwarf2.C'; else $(CYGPATH_W) '$(srcdir)/cov_dwarf2.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo" "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_dwarf2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_dwarf2.C' object='ggcov_webdb-cov_dwarf2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_dwarf2.obj `if test -f 'cov_dwarf2.C'; then $(CYGPATH_W) 'cov_dwarf2.C'; else $(CYGPATH_W) '$(srcdir)/cov_dwarf2.C'; fi` ggcov_webdb-cov_elf.o: cov_elf.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_elf.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo" -c -o ggcov_webdb-cov_elf.o `test -f 'cov_elf.C' || echo '$(srcdir)/'`cov_elf.C; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo" "$(DEPDIR)/ggcov_webdb-cov_elf.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_elf.C' object='ggcov_webdb-cov_elf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_elf.o `test -f 'cov_elf.C' || echo '$(srcdir)/'`cov_elf.C ggcov_webdb-cov_elf.obj: cov_elf.C @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ggcov_webdb-cov_elf.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo" -c -o ggcov_webdb-cov_elf.obj `if test -f 'cov_elf.C'; then $(CYGPATH_W) 'cov_elf.C'; else $(CYGPATH_W) '$(srcdir)/cov_elf.C'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo" "$(DEPDIR)/ggcov_webdb-cov_elf.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-cov_elf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cov_elf.C' object='ggcov_webdb-cov_elf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ggcov_webdb-cov_elf.obj `if test -f 'cov_elf.C'; then $(CYGPATH_W) 'cov_elf.C'; else $(CYGPATH_W) '$(srcdir)/cov_elf.C'; fi` .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< ggcov_webdb-ggcov-webdb.o: ggcov-webdb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ggcov_webdb-ggcov-webdb.o -MD -MP -MF "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo" -c -o ggcov_webdb-ggcov-webdb.o `test -f 'ggcov-webdb.c' || echo '$(srcdir)/'`ggcov-webdb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo" "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ggcov-webdb.c' object='ggcov_webdb-ggcov-webdb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ggcov_webdb-ggcov-webdb.o `test -f 'ggcov-webdb.c' || echo '$(srcdir)/'`ggcov-webdb.c ggcov_webdb-ggcov-webdb.obj: ggcov-webdb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ggcov_webdb-ggcov-webdb.obj -MD -MP -MF "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo" -c -o ggcov_webdb-ggcov-webdb.obj `if test -f 'ggcov-webdb.c'; then $(CYGPATH_W) 'ggcov-webdb.c'; else $(CYGPATH_W) '$(srcdir)/ggcov-webdb.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo" "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Po"; else rm -f "$(DEPDIR)/ggcov_webdb-ggcov-webdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ggcov-webdb.c' object='ggcov_webdb-ggcov-webdb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ggcov_webdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ggcov_webdb-ggcov-webdb.obj `if test -f 'ggcov-webdb.c'; then $(CYGPATH_W) 'ggcov-webdb.c'; else $(CYGPATH_W) '$(srcdir)/ggcov-webdb.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 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; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ 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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-recursive \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # licence.c contains the GPL text in C syntax. This # avoids having to install the COPYING file just to # provide the Licence window. help.o: licence.c licence.c: $(top_srcdir)/COPYING sed \ -e 's/ //g' \ -e 's/\\/\\\\/g' \ -e 's/"/\\"/g' \ -e 's/^\(.*\)$$/"\1\\n"/' \ < $(top_srcdir)/COPYING > $@ # glade_callbacks.c is automatically generated to provide mappings # of names to function pointers for functions marked with GLADE_CALLBACK, # which are used as either signal handlers or custom widget create # functions in the glade file. This means we don't need to use the # --export-dynamic linker flag anymore. glade_callbacks.c: $(gui_SOURCES) perl gencallbacks.pl $(gui_SOURCES) > $@ || ($(RM) $@ ; exit 1) coverage: covered-all covered-all: $(MAKE) CFLAGS="$(CFLAGS) $(COVFLAGS)" CXXFLAGS="$(CXXFLAGS) $(COVFLAGS)" all # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/src/utils.C0000644000175000017500000000447211453570563011624 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "utils.H" #include "estring.H" CVSID("$Id: utils.C,v 1.2 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void populate_function_combo( GtkCombo *combo, const list_t *list, gboolean add_all_item, const cov_function_t **currentp) { list_iterator_t iter; estring label; static const char all_functions[] = N_("All Functions"); ui_combo_clear(combo); /* stupid glade2 */ if (add_all_item) ui_combo_add_data(combo, _(all_functions), 0); for (iter = list->first() ; iter != (cov_function_t *)0 ; ++iter) { cov_function_t *fn = *iter; if (currentp != 0 && *currentp == 0) *currentp = fn; label.truncate(); label.append_string(fn->name()); /* see if we need to present some more scope to uniquify the name */ list_iterator_t niter = iter.peek_next(); list_iterator_t piter = iter.peek_prev(); if ((niter != (cov_function_t *)0 && !strcmp((*niter)->name(), fn->name())) || (piter != (cov_function_t *)0 && !strcmp((*piter)->name(), fn->name()))) { label.append_string(" ("); label.append_string(fn->file()->minimal_name()); label.append_string(")"); } ui_combo_add_data(combo, label.data(), fn); } if (currentp != 0) ui_combo_set_current_data(combo, (gpointer)(*currentp)); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/canvas_scenegen.H0000644000175000017500000000406311557262605013607 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_canvas_scenegen_H_ #define _ggcov_canvas_scenegen_H_ 1 #include "common.h" #include "uicommon.h" #include "scenegen.H" #include class canvas_scenegen_t : public scenegen_t { public: canvas_scenegen_t(GnomeCanvas *); ~canvas_scenegen_t(); void noborder(); void border(unsigned int rgb); void nofill(); void fill(unsigned int rgb); void box(double x, double y, double w, double h); void textbox(double x, double y, double w, double h, const char *text); void polyline_begin(gboolean arrow); void polyline_point(double x, double y); void polyline_end(gboolean arrow); private: inline const char *fill_color() const { return (fill_flag_ ? fill_buf_ : (const char *)0); } inline const char *border_color() const { return (border_flag_ ? border_buf_ : (const char *)0); } void handle_object(GnomeCanvasItem*); GnomeCanvas *canvas_; GnomeCanvasGroup *root_; gboolean fill_flag_; char fill_buf_[8]; gboolean border_flag_; char border_buf_[8]; /* state for polylines */ gboolean first_arrow_flag_; GnomeCanvasPoints points_; unsigned int points_size_; }; #endif /* _ggcov_canvas_scenegen_H_ */ ggcov-0.8.4/src/colors.h0000644000175000017500000000304411453570563012024 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_colors_H_ #define _ggcov_colors_H_ 1 #include "common.h" /* * Default colours as RGB tuples. These are the only colours * used for the web database and printing from tggcov, but just * the default colours for ggcov. */ #define COLOR_FG_COVERED 0x00, 0xc0, 0x00 #define COLOR_BG_COVERED 0x80, 0xd0, 0x80 #define COLOR_FG_PARTCOVERED 0xa0, 0xa0, 0x00 #define COLOR_BG_PARTCOVERED 0xd0, 0xd0, 0x80 #define COLOR_FG_UNCOVERED 0xc0, 0x00, 0x00 #define COLOR_BG_UNCOVERED 0xd0, 0x80, 0x80 #define COLOR_FG_UNINSTRUMENTED 0x00, 0x00, 0x00 #define COLOR_BG_UNINSTRUMENTED 0xa0, 0xa0, 0xa0 #define COLOR_FG_SUPPRESSED 0x00, 0x00, 0x80 #define COLOR_BG_SUPPRESSED 0x80, 0x80, 0xd0 #endif /* _ggcov_colors_H_ */ ggcov-0.8.4/src/libggcov/0000777000175000017500000000000011613000473012213 500000000000000ggcov-0.8.4/src/libggcov/intercept.c0000644000175000017500000001262311561777115014314 00000000000000#include #include #include #include #include #include #include #include #include /* * Sadly, as this is a standalone library designed to be dynamically * linked into 3rd party programs, we cannot use any of the ggcov debug * or memory infrastructure and have to replicate pale shadows of it. */ #undef DEBUG static void _fatal(const char *msg) __attribute__((noreturn)); static void _fatal(const char *msg) { fprintf(stderr, "libggcov: cannot get real open() " "call address, exiting\n"); fflush(stderr); /* we were probably called from an onexit handler, * so avoid recursing by using _exit() not exit() */ _exit(1); } static void * _xmalloc(size_t s) { void *p = malloc(s); if (!p) _fatal("libggcov: out of memory\n"); return p; } #if DEBUG static const struct { const char *name; int mask; int value; } flagdesc[] = { { "O_RDONLY", O_ACCMODE, O_RDONLY }, { "O_WRONLY", O_ACCMODE, O_WRONLY }, { "O_RDWR", O_ACCMODE, O_RDWR }, { "O_CREAT", O_CREAT, O_CREAT }, { "O_EXCL", O_EXCL, O_EXCL }, #ifdef O_NOCTTY { "O_NOCTTY", O_NOCTTY, O_NOCTTY }, #endif { "O_TRUNC", O_TRUNC, O_TRUNC }, { "O_APPEND", O_APPEND, O_APPEND }, { "O_NONBLOCK", O_NONBLOCK, O_NONBLOCK }, #ifdef O_NDELAY { "O_NDELAY", O_NDELAY, O_NDELAY }, #endif { "O_SYNC", O_SYNC, O_SYNC }, #ifdef O_FSYNC { "O_FSYNC", O_FSYNC, O_FSYNC }, #endif #ifdef O_ASYNC { "O_ASYNC", O_ASYNC, O_ASYNC }, #endif #ifdef O_DIRECTORY { "O_DIRECTORY", O_DIRECTORY, O_DIRECTORY }, #endif #ifdef O_NOFOLLOW { "O_NOFOLLOW", O_NOFOLLOW, O_NOFOLLOW }, #endif #ifdef O_CLOEXEC { "O_CLOEXEC", O_CLOEXEC, O_CLOEXEC }, #endif #ifdef O_DIRECT { "O_DIRECT", O_DIRECT, O_DIRECT }, #endif #ifdef O_NOATIME { "O_NOATIME", O_NOATIME, O_NOATIME }, #endif #ifdef O_DSYNC { "O_DSYNC", O_DSYNC, O_DSYNC }, #endif #ifdef O_RSYNC { "O_RSYNC", O_RSYNC, O_RSYNC }, #endif #ifdef O_LARGEFILE { "O_LARGEFILE", O_LARGEFILE, O_LARGEFILE }, #endif { 0, 0, 0 }, }; static char * describe_flags(int flags, char *buf, size_t maxlen) { char *p = buf; char *end = buf + maxlen - 1; int len; int i; for (i = 0 ; flags && p < end && flagdesc[i].name ; i++) { if ((flags & flagdesc[i].mask) == flagdesc[i].value) { flags &= ~flagdesc[i].mask; len = strlen(flagdesc[i].name); if (p + len + 1 >= end) break; if (p > buf) *p++ = '|'; strcpy(p, flagdesc[i].name); p += len; } } if (p < end && (flags || p == buf)) { if (p > buf) *p++ = '|'; sprintf(buf, "0x%x", flags); } return buf; } #endif /* Linux-specific tweak to call the real open() */ static int real_open(const char *filename, int flags, int mode) { static int (*func)(const char *, int, int) = 0; if (!func) { func = (int (*)(const char *, int, int))dlsym(RTLD_NEXT, "open"); if (!func) _fatal("libggcov: cannot get real open() " "call address, exiting\n"); } return func(filename, flags, mode); } /* Note: argument not const so we can cheat and write * into the path buffer */ static int mkpath(char *path, mode_t mode) { char *p; struct stat sb; for (p = path ; ; *p++ = '/') { while (*p == '/') p++; /* skip any leading / */ while (*p && *p != '/') p++; /* skip the path component */ if (!*p) return 0; /* last component is filename */ *p = '\0'; #if DEBUG fprintf(stderr, "--> mkpath: \"%s\"\n", path); #endif if (stat(path, &sb) == 0) { /* already exists and we can stat() it */ if (S_ISDIR(sb.st_mode)) continue; /* already a directory */ /* not a directory...fail */ errno = ENOTDIR; return -1; } else if (errno != ENOENT) return -1; #if DEBUG fprintf(stderr, "--> mkdir\n"); #endif if (mkdir(path, mode) < 0) { if (errno == EEXIST) continue; return -1; } } } int open(const char *filename, int flags, ...) { va_list args; mode_t mode = 0; int fd; int len; char *freeme = 0; int r; mode_t old_umask = 0, new_umask = 0022; if ((flags & O_CREAT)) { va_start(args, flags); mode = va_arg(args, mode_t); va_end(args); } /* Possibly redirect the filename */ len = strlen(filename); if (*filename == '/' && len > 5 && !strcmp(filename+len-5, ".gcda")) { static const char *prefix; static int prefix_len = -1; if (prefix_len < 0) { prefix = getenv("_GGCOV_GCDA_PREFIX"); prefix_len = (prefix ? strlen(prefix) : 0); if (prefix) fprintf(stderr, "libggcov: look for .gcda files under %s\n", prefix); } if (prefix) { freeme = (char *)_xmalloc(prefix_len + len + 1); strcpy(freeme, prefix); strcat(freeme, filename); filename = freeme; if ((mode & O_ACCMODE) != O_RDONLY) { /* note: ensure other others have read permission * to both the directories and files we create */ r = mkpath(freeme, 0755); if (r < 0) return r; mode |= 0444; old_umask = umask(new_umask); } } } /* Call the real libc open() call */ fd = real_open(filename, flags, mode); #if DEBUG { char flagbuf[256]; fprintf(stderr, "----> open(\"%s\", %s, %o) = %d\n", filename, describe_flags(flags, flagbuf, sizeof(flagbuf)), mode, fd); } #endif if (old_umask != new_umask) umask(old_umask); free(freeme); return fd; } ggcov-0.8.4/src/libggcov/Makefile.in0000644000175000017500000004221211612762303014203 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/libggcov DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" pkglibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(pkglib_LTLIBRARIES) libggcov_la_DEPENDENCIES = am_libggcov_la_OBJECTS = intercept.lo libggcov_la_OBJECTS = $(am_libggcov_la_OBJECTS) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libggcov_la_SOURCES) DIST_SOURCES = $(libggcov_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ pkglib_LTLIBRARIES = libggcov.la libggcov_la_SOURCES = intercept.c libggcov_la_LIBADD = -ldl bin_SCRIPTS = ggcov-run CLEANFILES = ggcov-run EXTRA_DIST = ggcov-run.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libggcov/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libggcov/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)" @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \ else :; fi; \ done uninstall-pkglibLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \ done clean-pkglibLTLIBRARIES: -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libggcov.la: $(libggcov_la_OBJECTS) $(libggcov_la_DEPENDENCIES) $(LINK) -rpath $(pkglibdir) $(libggcov_la_LDFLAGS) $(libggcov_la_OBJECTS) $(libggcov_la_LIBADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intercept.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) 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; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(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; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi 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; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binSCRIPTS install-pkglibLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am \ uninstall-pkglibLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binSCRIPTS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-pkglibLTLIBRARIES \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-info-am \ uninstall-pkglibLTLIBRARIES # Can't do this at configure time, as @libdir@ is defined in # terms of ${exec_prefix} which we don't have. We need a full # expansion, and the easiest way to do that is at make time. ggcov-run: ggcov-run.in sed -e 's|@pkglibdir@|$(pkglibdir)|g' <$< >$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/src/libggcov/Makefile.am0000644000175000017500000000234411561777115014206 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # pkglib_LTLIBRARIES= libggcov.la libggcov_la_SOURCES= intercept.c libggcov_la_LIBADD= -ldl bin_SCRIPTS = ggcov-run # Can't do this at configure time, as @libdir@ is defined in # terms of ${exec_prefix} which we don't have. We need a full # expansion, and the easiest way to do that is at make time. ggcov-run: ggcov-run.in sed -e 's|@pkglibdir@|$(pkglibdir)|g' <$< >$@ CLEANFILES= ggcov-run EXTRA_DIST= ggcov-run.in ggcov-0.8.4/src/libggcov/ggcov-run.in0000755000175000017500000000277211561777115014421 00000000000000#!/bin/bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # need_preload=no function usage() { echo "Usage: ggcov-run [options] program args..." 1>&2 echo "options are:" 1>&2 echo " --gcda-prefix=DIR Write .gcda files to the tree under DIR" 1>&2 exit 1 } function set_gcda_prefix() { export _GGCOV_GCDA_PREFIX="$1" need_preload=yes } # parse args done=no while [ $# -gt 0 ]; do case "$1" in --) shift ; done=yes ;; --gcda-prefix=*) set_gcda_prefix ${1#*=} ;; --gcda-prefix|-p) set_gcda_prefix $2 ; shift ;; -*) usage ;; *) done=yes ;; esac [ $done = yes ] && break shift done if [ $need_preload = yes ] ; then export LD_PRELOAD="@pkglibdir@/libggcov.so" fi exec "$@" ggcov-0.8.4/src/window.H0000644000175000017500000000350011453570563011767 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_window_H_ #define _ggcov_window_H_ 1 #include "ui.h" GLADE_CALLBACK void on_window_close_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_window_exit_activate(GtkWidget *w, gpointer data); class window_t { protected: window_t(); public: virtual ~window_t(); virtual void show(); GtkWidget *get_window() const { return window_; } protected: virtual void populate(); static void files_changed(void *, unsigned int, void *); static window_t *from_widget(GtkWidget *); virtual void grey_items(); void attach(GtkWidget *); void set_window(GtkWidget *); void set_title(const char *); GtkWidget *window_; boolean deleting_:1; /* handle possible GUI recursion crap */ boolean shown_:1; /* has been shown()n at least once */ friend void on_window_close_activate(GtkWidget *w, gpointer data); friend void on_window_exit_activate(GtkWidget *w, gpointer data); }; #endif /* _ggcov_window_H_ */ ggcov-0.8.4/src/callswin.H0000644000175000017500000000621711453570563012304 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_callswin_H_ #define _ggcov_callswin_H_ 1 #include "window.H" #include "cov.H" GLADE_CALLBACK void on_calls_call_from_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_call_to_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_line_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_arc_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_count_check_activate(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_from_function_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_to_function_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_from_function_view_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_calls_to_function_view_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK gboolean on_calls_clist_button_press_event(GtkWidget *w, GdkEvent *event, gpointer data); class callswin_t : public window_t { public: callswin_t(); ~callswin_t(); private: void populate(); void update(); void update_for_func(cov_function_t *from_fn, cov_function_t *to_fn); static callswin_t *from_widget(GtkWidget *w) { return (callswin_t *)window_t::from_widget(w); } GtkWidget *from_function_combo_; GtkWidget *from_function_view_; GtkWidget *to_function_combo_; GtkWidget *to_function_view_; GtkWidget *clist_; #if GTK2 GtkListStore *store_; #endif list_t *functions_; friend void on_calls_call_from_check_activate(GtkWidget *w, gpointer data); friend void on_calls_call_to_check_activate(GtkWidget *w, gpointer data); friend void on_calls_line_check_activate(GtkWidget *w, gpointer data); friend void on_calls_arc_check_activate(GtkWidget *w, gpointer data); friend void on_calls_count_check_activate(GtkWidget *w, gpointer data); friend void on_calls_from_function_entry_changed(GtkWidget *w, gpointer data); friend void on_calls_to_function_entry_changed(GtkWidget *w, gpointer data); friend void on_calls_from_function_view_clicked(GtkWidget *w, gpointer data); friend void on_calls_to_function_view_clicked(GtkWidget *w, gpointer data); friend gboolean on_calls_clist_button_press_event(GtkWidget *w, GdkEvent *event, gpointer data); }; #endif /* _ggcov_callswin_H_ */ ggcov-0.8.4/src/canvas_scenegen.C0000644000175000017500000001106411557262605013601 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "canvas_scenegen.H" #include "ui.h" #include "canvas_function_popup.H" CVSID("$Id: canvas_scenegen.C,v 1.4 2010-05-09 05:37:14 gnb Exp $"); #define RGB_TO_STR(b, rgb) \ snprintf((b), sizeof((b)), "#%02x%02x%02x", \ ((rgb)>>16)&0xff, ((rgb)>>8)&0xff, (rgb)&0xff) /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ canvas_scenegen_t::canvas_scenegen_t(GnomeCanvas *can) { canvas_ = can; root_ = gnome_canvas_root(canvas_); points_.coords = (double *)0; points_.num_points = 0; points_.ref_count = 1; points_size_ = 0; } canvas_scenegen_t::~canvas_scenegen_t() { if (points_.coords != 0) g_free(points_.coords); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_scenegen_t::noborder() { border_flag_ = FALSE; } void canvas_scenegen_t::border(unsigned int rgb) { border_flag_ = TRUE; RGB_TO_STR(border_buf_, rgb); } void canvas_scenegen_t::nofill() { fill_flag_ = FALSE; } void canvas_scenegen_t::fill(unsigned int rgb) { fill_flag_ = TRUE; RGB_TO_STR(fill_buf_, rgb); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_scenegen_t::handle_object(GnomeCanvasItem *item) { cov_function_t *fn; if ((fn = get_function()) != 0) { canvas_function_popup_t *fpop = new canvas_function_popup_t(item, fn); fpop->set_foreground(border_color()); fpop->set_background(fill_color()); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_scenegen_t::box(double x, double y, double w, double h) { GnomeCanvasItem *item; item = gnome_canvas_item_new(root_, GNOME_TYPE_CANVAS_RECT, "x1", x, "y1", y, "x2", x+w, "y2", y+h, "fill_color", fill_color(), "outline_color",border_color(), #if GTK2 "width_pixels", (border_flag_ ? 1 : 0), #endif (char *)0); handle_object(item); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_scenegen_t::textbox( double x, double y, double w, double h, const char *text) { GnomeCanvasItem *item; item = gnome_canvas_item_new(root_, GNOME_TYPE_CANVAS_TEXT, "text", text, "font", "fixed", "fill_color", border_color(), "x", x, "y", y, "clip", TRUE, "clip_width", w, "clip_height", h, "anchor", GTK_ANCHOR_NORTH_WEST, (char *)0); handle_object(item); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void canvas_scenegen_t::polyline_begin(gboolean arrow) { first_arrow_flag_ = arrow; points_.num_points = 0; } void canvas_scenegen_t::polyline_point(double x, double y) { unsigned int newsize = 2 * sizeof(double) * (points_.num_points+1); if (newsize > points_size_) { /* round newsize up to a 256-byte boundary to reduce allocations */ newsize = (newsize + 0xff) & ~0xff; /* TODO: use a new gnb_xrealloc */ points_.coords = (double *)g_realloc(points_.coords, newsize); points_size_ = newsize; } double *p = points_.coords + 2*points_.num_points; p[0] = x; p[1] = y; points_.num_points++; } void canvas_scenegen_t::polyline_end(gboolean arrow) { GnomeCanvasItem *item; if (!points_.num_points) return; item = gnome_canvas_item_new(root_, GNOME_TYPE_CANVAS_LINE, "points", &points_, "first_arrowhead", first_arrow_flag_, "last_arrowhead", arrow, "arrow_shape_a", arrow_size_ * arrow_shape_[0], "arrow_shape_b", arrow_size_ * arrow_shape_[1], "arrow_shape_c", arrow_size_ * arrow_shape_[2], "fill_color", fill_color(), /* setting width_pixels screws up the arrow heads !?!? */ (char *)0); handle_object(item); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/callgraphwin.H0000644000175000017500000000536511557262605013146 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_callgraphwin_H_ #define _ggcov_callgraphwin_H_ 1 #include "window.H" #include "cov.H" GLADE_CALLBACK void on_callgraph_function_entry_changed(GtkWidget *w, gpointer data); GLADE_CALLBACK void on_callgraph_function_view_clicked(GtkWidget *w, gpointer data); GLADE_CALLBACK gboolean on_callgraph_ancestors_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data); GLADE_CALLBACK gboolean on_callgraph_descendants_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data); class callgraphwin_t : public window_t { public: callgraphwin_t(); ~callgraphwin_t(); void set_node(cov_callnode_t *); private: void populate_function_combo(GtkCombo *combo); void populate(); #if !GTK2 static void init_clist(GtkCList *clist, int (*sortfn)(GtkCList *, const void*, const void*)); #else static void init_tree_view(GtkTreeView *tv); #endif static void update_clist(GtkWidget *clist, GList *arcs, gboolean isin); static void on_callgraph_show(GtkWidget *w, gpointer data); void update(); static callgraphwin_t *from_widget(GtkWidget *w) { return (callgraphwin_t *)window_t::from_widget(w); } cov_callnode_t *callnode_; GtkWidget *function_combo_; GtkWidget *function_view_; GtkWidget *ancestors_clist_; GtkWidget *descendants_clist_; #if GTK2 GtkListStore *ancestors_store_; GtkListStore *descendants_store_; #endif GtkWidget *hpaned_; friend void on_callgraph_function_entry_changed(GtkWidget *w, gpointer data); friend void on_callgraph_function_view_clicked(GtkWidget *w, gpointer data); friend gboolean on_callgraph_ancestors_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data); friend gboolean on_callgraph_descendants_clist_button_press_event( GtkWidget *w, GdkEvent *event, gpointer data); }; #endif /* _ggcov_callgraphwin_H_ */ ggcov-0.8.4/src/confsection.C0000644000175000017500000001543711453570563013001 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2002-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #ifndef HAVE_LIBGCONF #define HAVE_LIBGCONF 0 #endif #if HAVE_LIBGCONF #include #else #include #endif #include "confsection.H" #include "estring.H" CVSID("$Id: confsection.C,v 1.11 2010-05-09 05:37:14 gnb Exp $"); hashtable_t *confsection_t::all_; static const char filename[] = "ggcov"; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ confsection_t::confsection_t(const char *secname) : secname_(secname) { if (all_ == 0) all_ = new hashtable_t; all_->insert(secname_, this); } confsection_t::~confsection_t() { #if 0 #else assert(0); #endif } confsection_t * confsection_t::get(const char *name) { confsection_t *cs; if (all_ == 0 || (cs = all_->lookup(name)) == 0) cs = new confsection_t(name); return cs; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * confsection_t::make_key(const char *name) const { #if HAVE_LIBGCONF return g_strconcat("/apps/", filename, "/", secname_.data(), "/", name, (char *)0); #else assert(strchr(name, '/') == 0); return g_strconcat(filename, "/", secname_.data(), "/", name, (char *)0); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ char * confsection_t::get_string(const char *name, const char *deflt) { char *val; string_var key = make_key(name); #if HAVE_LIBGCONF GConfValue *gcv = gconf_client_get(gconf_client_get_default(), key, (GError **)0); if (gcv == 0) { val = (deflt == 0 ? 0 : g_strdup(deflt)); } else { val = g_strdup(gconf_value_get_string(gcv)); gconf_value_free(gcv); } #else gboolean defaulted = FALSE; val = gnome_config_get_string_with_default(key.data(), &defaulted); if (defaulted) val = (deflt == 0 ? 0 : g_strdup(deflt)); #endif return val; } void confsection_t::set_string(const char *name, const char *value) { string_var key = make_key(name); #if HAVE_LIBGCONF gconf_client_set_string(gconf_client_get_default(), key.data(), value, (GError **)0); #else gnome_config_set_string(key.data(), value); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int confsection_t::get_enum(const char *name, const confenum_t *tbl, int deflt) { string_var val = get_string(name, 0); if (val == (char *)0) return deflt; for ( ; tbl->string != 0 ; tbl++) { if (!strcasecmp(tbl->string, val)) return tbl->value; } if (isdigit(val.data()[0])) { char *end = 0; int ival = (int)strtol(val, &end, 0); if (end != 0 && end != val && *end == '\0') return ival; } return deflt; } void confsection_t::set_enum(const char *name, const confenum_t *tbl, int value) { char buf[32]; for ( ; tbl->string != 0 ; tbl++) { if (value == tbl->value) { set_string(name, tbl->string); return; } } snprintf(buf, sizeof(buf), "%d", value); set_string(name, buf); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ gboolean confsection_t::get_bool(const char *name, gboolean deflt) { gboolean val; string_var key = make_key(name); #if HAVE_LIBGCONF GConfValue *gcv = gconf_client_get(gconf_client_get_default(), key, (GError **)0); if (gcv == 0) { val = deflt; } else { val = gconf_value_get_bool(gcv); gconf_value_free(gcv); } #else gboolean defaulted = FALSE; val = gnome_config_get_bool_with_default(key.data(), &defaulted); if (defaulted) val = deflt; #endif return val; } void confsection_t::set_bool(const char *name, gboolean value) { string_var key = make_key(name); #if HAVE_LIBGCONF gconf_client_set_bool(gconf_client_get_default(), key, value, (GError **)0); #else gnome_config_set_bool(key.data(), value); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ int confsection_t::get_int(const char *name, int deflt) { int val; string_var key = make_key(name); #if HAVE_LIBGCONF GConfValue *gcv = gconf_client_get(gconf_client_get_default(), key, (GError **)0); if (gcv == 0) { val = deflt; } else { val = gconf_value_get_int(gcv); gconf_value_free(gcv); } #else gboolean defaulted = FALSE; val = gnome_config_get_int_with_default(key.data(), &defaulted); if (defaulted) val = deflt; #endif return val; } void confsection_t::set_int(const char *name, int value) { string_var key = make_key(name); #if HAVE_LIBGCONF gconf_client_set_int(gconf_client_get_default(), key, value, (GError **)0); #else gnome_config_set_int(key.data(), value); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ float confsection_t::get_float(const char *name, float deflt) { float val; string_var key = make_key(name); #if HAVE_LIBGCONF GConfValue *gcv = gconf_client_get(gconf_client_get_default(), key, (GError **)0); if (gcv == 0) { val = deflt; } else { val = gconf_value_get_float(gcv); gconf_value_free(gcv); } #else gboolean defaulted = FALSE; val = gnome_config_get_float_with_default(key.data(), &defaulted); if (defaulted) val = deflt; #endif return val; } void confsection_t::set_float(const char *name, float value) { string_var key = make_key(name); #if HAVE_LIBGCONF gconf_client_set_float(gconf_client_get_default(), key, value, (GError **)0); #else gnome_config_set_float(key.data(), value); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void confsection_t::sync() { #if !HAVE_LIBGCONF gnome_config_sync_file((char *)filename); #endif } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/demangle.h0000644000175000017500000000246211453570563012302 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _demangle_h_ #define _demangle_h_ 1 #include "common.h" /* * Given a symbol from an object file, return a new string which * is a normalised C++ demangled symbol name. */ char *demangle(const char *symbol); /* * Given the unmangled symbol from a .bb file, return a new string * which is the symbol normalised so that it will match the result * of demangling the symbol from an object file. */ char *normalise_mangled(const char *symbol); #endif /* _demangle_h_ */ ggcov-0.8.4/src/diagram.C0000644000175000017500000000406111557262605012062 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "diagram.H" #include "colors.h" CVSID("$Id: diagram.C,v 1.2 2010-05-09 05:37:15 gnb Exp $"); /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ diagram_t::diagram_t() { fg_rgb_by_status_[cov::COVERED] = RGB(COLOR_FG_COVERED); fg_rgb_by_status_[cov::PARTCOVERED] = RGB(COLOR_FG_PARTCOVERED); fg_rgb_by_status_[cov::UNCOVERED] = RGB(COLOR_FG_UNCOVERED); fg_rgb_by_status_[cov::UNINSTRUMENTED] = RGB(COLOR_FG_UNINSTRUMENTED); fg_rgb_by_status_[cov::SUPPRESSED] = RGB(COLOR_FG_SUPPRESSED); bg_rgb_by_status_[cov::COVERED] = RGB(COLOR_BG_COVERED); bg_rgb_by_status_[cov::PARTCOVERED] = RGB(COLOR_BG_PARTCOVERED); bg_rgb_by_status_[cov::UNCOVERED] = RGB(COLOR_BG_UNCOVERED); bg_rgb_by_status_[cov::UNINSTRUMENTED] = RGB(COLOR_BG_UNINSTRUMENTED); bg_rgb_by_status_[cov::SUPPRESSED] = RGB(COLOR_BG_SUPPRESSED); } diagram_t::~diagram_t() { } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void diagram_t::set_fg(cov::status_t st, unsigned int rgb) { fg_rgb_by_status_[st] = rgb; } void diagram_t::set_bg(cov::status_t st, unsigned int rgb) { bg_rgb_by_status_[st] = rgb; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/cov_suppression.H0000644000175000017500000000341611453570563013727 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_cov_suppression_H_ #define _ggcov_cov_suppression_H_ 1 #include "common.h" #include "hashtable.H" #include "string_var.H" struct cov_suppression_t { enum type_t { IFDEF, /* lines inside #if word_ */ COMMENT_LINE, /* line with a comment containing word_ */ COMMENT_RANGE, /* lines between a comment containing word_ * and a comment containing word2_ */ NUM_TYPES }; string_var word_; string_var word2_; enum type_t type_; cov_suppression_t(const char *w, type_t t) : word_(w), type_(t) { } static cov_suppression_t *add(const char *w, type_t t); static cov_suppression_t *find(const char *w, type_t t); static void foreach(type_t t, void (*f)(const char *, cov_suppression_t *, void *), void *closure); static unsigned int count(); static hashtable_t *all_[NUM_TYPES]; }; #endif /* _ggcov_cov_suppression_H_ */ ggcov-0.8.4/src/gencallbacks.pl0000644000175000017500000000721211453570563013321 00000000000000#!/usr/bin/perl # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2006 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: gencallbacks.pl,v 1.3 2010-05-09 05:37:15 gnb Exp $ # # # # Generate a C data structure which maps names to function pointers # for all the GLADE_CALLBACKS in the given C source files. # # Usage: ./gencallbacks.pl *.[cC] > callbacks.c # my $debug = 0; my @functions; sub balanced_parentheses($) { my $str = shift; my $lefts = $str; $lefts =~ s/[^(]//g; my $rights = $str; $rights =~ s/[^)]//g; print STDERR "balanced_parentheses: lefts=\"$lefts\" rights=\"$rights\"\n" if ($debug > 1); return (length($lefts) == length($rights)); } sub scan_file($) { my $filename = shift; open FH, "<$filename" or die "Can't open $filename for reading"; my $state = 0; my $return_type; my $function; my $arguments; while () { chomp; s/\s+$//; print STDERR "[$state] $_\n" if ($debug > 1); if ($state == 1) { ($function, $arguments) = m/^([a-z_][a-z0-9_]*)(\(.*)$/; if (defined($function)) { print STDERR "Found: \"$function\"\n" if ($debug); } # collapse whitespace in args $arguments =~ s/\s+/ /g; # check for end of arguments if (balanced_parentheses($arguments)) { $state = 0; # finished push(@functions, { return_type => $return_type, name => $function, arguments => $arguments, filename => $filename}); } else { $state = 2; # keep scanning lines for args } } elsif ($state == 2) { # collapse whitespace s/^\s+//; s/\s+/ /g; # append to the arguments string my $sep = ' '; $sep = '' if ($arguments =~ m/\($/); $arguments .= $sep . $_; # check for end of arguments if (balanced_parentheses($arguments)) { $state = 0; # finished push(@functions, { return_type => $return_type, name => $function, arguments => $arguments, filename => $filename}); } } elsif (m/^GLADE_CALLBACK/) { s/^GLADE_CALLBACK\s+//; $return_type = $_; $state = 1; next; } } close FH; } sub dump_functions() { print "/* generated by gencallbacks.pl, do not edit */\n"; print "#include \"ui.h\"\n"; # generate extern declarations foreach my $fn (@functions) { print "/* $fn->{filename} */\n"; print "GLADE_CALLBACK $fn->{return_type} $fn->{name}$fn->{arguments};\n"; } # generate namelist data structure print "ui_named_callback_t ui_callbacks[] =\n{\n"; foreach my $fn (@functions) { print " {\"$fn->{name}\", (GCallback) $fn->{name}},\n"; } print " {0,0}\n"; print "};\n"; } foreach my $filename (@ARGV) { if ($filename =~ m/\.[Cc]$/) { print STDERR "Scanning $filename\n" if ($debug); scan_file($filename); } else { print STDERR "Skipping $filename\n" if ($debug); } } @functions = sort { $a->{name} cmp $b->{name} } @functions; dump_functions(); ggcov-0.8.4/src/check_scenegen.H0000644000175000017500000000375511453570563013420 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_check_scenegen_H_ #define _ggcov_check_scenegen_H_ 1 #include "common.h" #include "scenegen.H" #include "geometry.H" class check_scenegen_t : public scenegen_t { public: check_scenegen_t(); ~check_scenegen_t(); void noborder(); void border(unsigned int rgb); void nofill(); void fill(unsigned int rgb); void box(double x, double y, double w, double h); void textbox(double x, double y, double w, double h, const char *text); void polyline_begin(gboolean arrow); void polyline_point(double x, double y); void polyline_end(gboolean arrow); gboolean check(); void object(cov_function_t *); private: struct box_t { string_var name_; dbounds_t bbox_; }; struct polyline_t { int npoints_; double *points_; dbounds_t bbox_; }; gboolean check_box_intersections(); /* state for boxes */ string_var name_; /* state for polylines */ double *points_; unsigned int npoints_; unsigned int points_size_; dbounds_t bbox_; /* stored geometry */ list_t boxes_; list_t polylines_; }; #endif /* _ggcov_check_scenegen_H_ */ ggcov-0.8.4/src/estringtest.c0000644000175000017500000004373211565735440013102 00000000000000#include "filename.h" #include "estring.H" const char *argv0; extern int end; int verbose = 0; static int is_heap(const void *x) { return (x > (void *)&end); } static inline void __check(int res, const char *expr, const char *file, int line) { if (verbose) fprintf(stderr, "%s:%d: checking %s\n", file, line, expr); if (!res) { fprintf(stderr, "%s:%d: check FAILED: %s\n", file, line, expr); abort(); } } #define check(expr) __check(!!(expr), #expr, __FILE__, __LINE__) static inline void subtest(const char *desc) { if (verbose) fprintf(stderr, "=== %s ===\n", desc); } void test_ctors(void) { subtest("default c'tor"); { estring e; check(e.length() == 0); check(e.data() == 0); } subtest("const string c'tor"); { static const char x[] = "hello"; estring e(x); check(e.length() == 5); check(!strcmp(e.data(), x)); check(e.data()[5] == '\0'); check(strlen(e.data()) == 5); check(e.data() != x); // argument must be copied check(is_heap(e.data())); } subtest("const string c'tor with null"); { estring e((const char *)0); check(e.length() == 0); check(e.data() == 0); } subtest("non-const string c'tor"); { char *x = strdup("abra cadabra"); estring e(x); check(e.length() == 12); check(!strcmp(e.data(), x)); check(strlen(e.data()) == 12); check(e.data() == x); // argument must be taken over } subtest("non-const string c'tor with null"); { estring e((char *)0); check(e.length() == 0); check(e.data() == 0); } subtest("const string and length c'tor"); { static const char x[] = "world"; estring e(x, 3); check(e.length() == 3); check(!strncmp(e.data(), x, 3)); check(e.data()[3] == '\0'); check(strlen(e.data()) == 3); check(e.data() != x); // argument must be copied check(is_heap(e.data())); } subtest("const string and length c'tor with null"); { estring e((const char *)0, 27); check(e.length() == 0); check(e.data() == 0); } subtest("non-const string and length c'tor"); { char *x = strdup("foonly quux"); estring e(x, 6); check(e.length() == 6); check(!strncmp(e.data(), x, 6)); check(e.data()[6] == '\0'); check(strlen(e.data()) == 6); check(e.data() == x); // argument must be taken over } subtest("non-const string and length c'tor"); { estring e((char *)0, 27); check(e.length() == 0); check(e.data() == 0); } } static void test_assignment() { subtest("assignment by const string"); { static const char x[] = "sign for abs"; estring e; check(e.length() == 0); check(e.data() == 0); e = x; check(e.length() == 12); check(e.data() != 0); check(e.data() != x); check(is_heap(e.data())); check(strlen(e.data()) == 12); check(!strcmp(e.data(), x)); } subtest("re-assignment by const string"); { static const char x1[] = "won't let you"; static const char x2[] = "smother it"; static const char x3[] = "I will be singing"; estring e(x1); check(e.length() == 13); check(e.data() != 0); check(e.data() != x1); check(is_heap(e.data())); check(strlen(e.data()) == 13); check(!strcmp(e.data(), x1)); e = x2; // non-expanding re-assignment check(e.length() == 10); check(e.data() != 0); check(e.data() != x2); check(is_heap(e.data())); check(strlen(e.data()) == 10); check(!strcmp(e.data(), x2)); e = x3; // non-expanding re-assignment check(e.length() == 17); check(e.data() != 0); check(e.data() != x3); check(is_heap(e.data())); check(strlen(e.data()) == 17); check(!strcmp(e.data(), x3)); e = (const char *)0; check(e.length() == 0); check(e.data() == 0); } subtest("assignment by non-const string"); { char *x = g_strdup("time is running out"); estring e; check(e.length() == 0); check(e.data() == 0); e = x; check(e.length() == 19); check(e.data() != 0); check(e.data() == x); check(is_heap(e.data())); check(strlen(e.data()) == 19); check(!strcmp(e.data(), "time is running out")); } subtest("re-assignment by non-const string"); { char *x1 = g_strdup("I won't stand"); char *x2 = g_strdup("in your way"); char *x3 = g_strdup("as you scream as you shout"); estring e(x1); check(e.length() == 13); check(e.data() != 0); check(e.data() == x1); check(is_heap(e.data())); check(strlen(e.data()) == 13); check(!strcmp(e.data(), "I won't stand")); e = x2; // non-expanding re-assignment check(e.length() == 11); check(e.data() != 0); check(e.data() == x2); check(is_heap(e.data())); check(strlen(e.data()) == 11); check(!strcmp(e.data(), "in your way")); e = x3; // non-expanding re-assignment check(e.length() == 26); check(e.data() != 0); check(e.data() == x3); check(is_heap(e.data())); check(strlen(e.data()) == 26); check(!strcmp(e.data(), "as you scream as you shout")); e = (char *)0; check(e.length() == 0); check(e.data() == 0); } } static void test_cast() { subtest("const cast operator"); { char *x = g_strdup("our time is now"); const char *p; estring e(x); check(e.length() == 15); check(e.data() != 0); check(is_heap(e.data())); check(e.data() == x); check(strlen(e.data()) == 15); check(!strcmp(e.data(), "our time is now")); p = e; check(e.length() == 15); check(e.data() != 0); check(is_heap(e.data())); check(e.data() == x); check(strlen(e.data()) == 15); check(!strcmp(e.data(), "our time is now")); check(p != 0); check(is_heap(p)); check(p == x); check(p == e.data()); check(strlen(p) == 15); check(!strcmp(p, "our time is now")); } } static void test_take() { subtest("take"); { char *x = g_strdup("our lives have just begun"); char *p; estring e(x); check(e.length() == 25); check(e.data() != 0); check(is_heap(e.data())); check(e.data() == x); check(strlen(e.data()) == 25); check(!strcmp(e.data(), "our lives have just begun")); p = e.take(); check(e.length() == 0); check(e.data() == 0); check(p != 0); check(is_heap(p)); check(p == x); check(strlen(p) == 25); check(!strcmp(p, "our lives have just begun")); g_free(p); } } static void call_append_vprintf(estring &e, const char *fmt, ...) { va_list args; va_start(args, fmt); e.append_vprintf(fmt, args); va_end(args); } static void test_append() { subtest("append_string"); { estring e; check(e.length() == 0); check(e.data() == 0); e.append_string(0); check(e.length() == 0); check(e.data() == 0); e.append_string(""); check(e.length() == 0); check(e.data() == 0); e.append_string("foo"); check(e.length() == 3); check(e.data() != 0); check(strlen(e.data()) == 3); check(!strcmp(e.data(), "foo")); check(is_heap(e.data())); e.append_string(" bar"); check(e.length() == 7); check(e.data() != 0); check(strlen(e.data()) == 7); check(!strcmp(e.data(), "foo bar")); check(is_heap(e.data())); } subtest("append_char"); { estring e; check(e.length() == 0); check(e.data() == 0); e.append_char('b'); check(e.length() == 1); check(e.data() != 0); check(strlen(e.data()) == 1); check(!strcmp(e.data(), "b")); check(is_heap(e.data())); e.append_char('a'); check(e.length() == 2); check(e.data() != 0); check(strlen(e.data()) == 2); check(!strcmp(e.data(), "ba")); check(is_heap(e.data())); e.append_char('z'); check(e.length() == 3); check(e.data() != 0); check(strlen(e.data()) == 3); check(!strcmp(e.data(), "baz")); check(is_heap(e.data())); } subtest("append_chars"); { static const char x[] = "quux foonly"; estring e; check(e.length() == 0); check(e.data() == 0); e.append_chars(x, 4); check(e.length() == 4); check(e.data() != 0); check(strlen(e.data()) == 4); check(!strcmp(e.data(), "quux")); check(is_heap(e.data())); e.append_chars(x+4, 7); check(e.length() == 11); check(e.data() != 0); check(strlen(e.data()) == 11); check(!strcmp(e.data(), "quux foonly")); check(is_heap(e.data())); } subtest("append_printf"); { estring e; check(e.length() == 0); check(e.data() == 0); e.append_printf("%sw", "co"); check(e.length() == 3); check(e.data() != 0); check(strlen(e.data()) == 3); check(!strcmp(e.data(), "cow")); check(is_heap(e.data())); e.append_printf(",%x", 0xbeef); check(e.length() == 8); check(e.data() != 0); check(strlen(e.data()) == 8); check(!strcmp(e.data(), "cow,beef")); check(is_heap(e.data())); } subtest("append_vprintf"); { estring e; check(e.length() == 0); check(e.data() == 0); call_append_vprintf(e, "%sw", "co"); check(e.length() == 3); check(e.data() != 0); check(strlen(e.data()) == 3); check(!strcmp(e.data(), "cow")); check(is_heap(e.data())); call_append_vprintf(e, ",%x", 0xbeef); check(e.length() == 8); check(e.data() != 0); check(strlen(e.data()) == 8); check(!strcmp(e.data(), "cow,beef")); check(is_heap(e.data())); } } static void test_replace() { subtest("replace_string"); { static const char x[] = "I look pretty good but my heels are high"; estring e(x); check(e.length() == 40); check(!strcmp(e.data(), x)); check(e.data()[40] == '\0'); check(strlen(e.data()) == 40); check(e.data() != x); // argument must be copied check(is_heap(e.data())); // replace some chars from the middle e.replace_string(7, 6, "real"); check(e.length() == 38); check(!strcmp(e.data(), "I look real good but my heels are high")); check(e.data()[38] == '\0'); check(strlen(e.data()) == 38); // remove some chars from the middle e.replace_string(12, 5, (const char *)0); check(e.length() == 33); check(!strcmp(e.data(), "I look real but my heels are high")); check(e.data()[33] == '\0'); check(strlen(e.data()) == 33); // replace some chars at the start e.replace_string(0, 6, "I'm"); check(e.length() == 30); check(!strcmp(e.data(), "I'm real but my heels are high")); check(e.data()[30] == '\0'); check(strlen(e.data()) == 30); // replace some chars at the end e.replace_string(26, 4, "low"); check(e.length() == 29); check(!strcmp(e.data(), "I'm real but my heels are low")); check(e.data()[29] == '\0'); check(strlen(e.data()) == 29); // replace and expand some chars at the start e.replace_string(0, 3, "Meesa"); check(e.length() == 31); check(!strcmp(e.data(), "Meesa real but my heels are low")); check(e.data()[31] == '\0'); check(strlen(e.data()) == 31); // replace and expand some chars at the end e.replace_string(28, 3, "fantastic"); check(e.length() == 37); check(!strcmp(e.data(), "Meesa real but my heels are fantastic")); check(e.data()[37] == '\0'); check(strlen(e.data()) == 37); } #if 0 replace_char replace_chars replace_vprintf replace_printf #endif } static void test_remove() { subtest("remove"); { static const char x[] = "love removal machine"; estring e(x); const char *p; check(e.length() == 20); check(!strcmp(e.data(), x)); check(e.data()[20] == '\0'); check(strlen(e.data()) == 20); check(e.data() != x); // argument must be copied check(is_heap(e.data())); p = e.data(); // remove some chars from the middle e.remove(7, 3); check(e.length() == 17); check(e.data() == p); // not been reallocated check(!strcmp(e.data(), "love real machine")); check(e.data()[17] == '\0'); check(strlen(e.data()) == 17); // remove a single char e.remove(4, 1); check(e.length() == 16); check(e.data() == p); // not been reallocated check(!strcmp(e.data(), "lovereal machine")); check(e.data()[16] == '\0'); check(strlen(e.data()) == 16); // remove no chars at all e.remove(4, 0); check(e.length() == 16); check(e.data() == p); // not been reallocated check(!strcmp(e.data(), "lovereal machine")); check(e.data()[16] == '\0'); check(strlen(e.data()) == 16); // remove first 4 chars e.remove(0, 4); check(e.length() == 12); check(e.data() == p); // not been reallocated check(!strcmp(e.data(), "real machine")); check(e.data()[12] == '\0'); check(strlen(e.data()) == 12); // remove last 3 chars e.remove(9, 3); check(e.length() == 9); check(e.data() == p); // not been reallocated check(!strcmp(e.data(), "real mach")); check(e.data()[9] == '\0'); check(strlen(e.data()) == 9); // remove all remaining chars e.remove(0, 9); check(e.length() == 0); check(e.data() == p); // not been reallocated check(e.data()[0] == '\0'); check(strlen(e.data()) == 0); } } static void test_truncate() { subtest("truncate of zero length"); { estring e; check(e.length() == 0); check(e.data() == 0); e.truncate(); check(e.length() == 0); check(e.data() == 0); } subtest("truncate of nonzero length"); { static const char x[] = "shake like jello"; estring e(x); check(e.length() == 16); check(e.data() != 0); check(strlen(e.data()) == 16); e.truncate(); check(e.length() == 0); check(e.data() != 0); check(strlen(e.data()) == 0); } subtest("truncate_to of zero length to zero"); { estring e; check(e.length() == 0); check(e.data() == 0); e.truncate_to(0); check(e.length() == 0); check(e.data() == 0); } subtest("truncate_to of zero length to non-zero, expanding"); { static const char zero[] = {0,0,0}; estring e; check(e.length() == 0); check(e.data() == 0); e.truncate_to(3); check(e.length() == 3); check(e.data() != 0); check(is_heap(e.data())); check(!memcmp(e.data(), zero, 3)); } subtest("truncate_to of non-zero length to zero"); { static const char x[] = "hand me the mike"; estring e(x); check(e.length() == 16); check(e.data() != 0); check(strlen(e.data()) == 16); e.truncate_to(0); check(e.length() == 0); check(e.data() != 0); check(strlen(e.data()) == 0); } subtest("truncate_to of non-zero length to non-zero, truncating"); { static const char x[] = "and watch me rip it up"; estring e(x); check(e.length() == 22); check(e.data() != 0); e.truncate_to(9); check(e.length() == 9); check(e.data() != 0); check(is_heap(e.data())); check(strlen(e.data()) == 9); check(!strcmp(e.data(), "and watch")); } subtest("truncate_to of non-zero length to non-zero, expanding"); { static const char x[] = "the house is a-rockin'"; static const char zero[] = {0,0,0,0,0}; estring e(x); check(e.length() == 22); check(e.data() != 0); e.truncate_to(27); check(e.length() == 27); check(e.data() != 0); check(is_heap(e.data())); check(strlen(e.data()) == 22); check(!strcmp(e.data(), x)); check(!memcmp(e.data()+22, zero, 5)); } } static void test_chomp() { subtest("chomp empty string"); { estring e; check(e.length() == 0); check(e.data() == 0); e.chomp(); check(e.length() == 0); check(e.data() == 0); } subtest("chomp just a single newline"); { static const char x[] = "\n"; estring e(x); check(e.length() == 1); check(e.data() != 0); e.chomp(); check(e.length() == 0); check(e.data() != 0); check(strlen(e.data()) == 0); } subtest("chomp single newline"); { static const char x[] = "I beg to differ\n"; estring e(x); check(e.length() == 16); check(e.data() != 0); e.chomp(); check(e.length() == 15); check(e.data() != 0); check(strlen(e.data()) == 15); check(!strncmp(e.data(), x, 15)); } subtest("chomp multiple newlines"); { static const char x[] = "I have no belief\n\n\n\n"; estring e(x); check(e.length() == 20); check(e.data() != 0); e.chomp(); check(e.length() == 16); check(e.data() != 0); check(strlen(e.data()) == 16); check(!strncmp(e.data(), x, 16)); } subtest("chomp just multiple whitespace"); { static const char x[] = "\r \r\t \t"; estring e(x); check(e.length() == 7); check(e.data() != 0); e.chomp(); check(e.length() == 0); check(e.data() != 0); check(strlen(e.data()) == 0); } subtest("chomp multiple whitespace"); { static const char x[] = "walking contradiction \t \r\n \t"; estring e(x); check(e.length() == 29); check(e.data() != 0); e.chomp(); check(e.length() == 21); check(e.data() != 0); check(strlen(e.data()) == 21); check(!strncmp(e.data(), x, 21)); } } static void test_trim_nuls() { subtest("trim_nuls, empty string"); { estring e; check(e.length() == 0); check(e.data() == 0); e.trim_nuls(); check(e.length() == 0); check(e.data() == 0); } subtest("trim_nuls, non-empty string"); { const char x[] = "trapped beneath my piano"; estring e(x); check(e.length() == 24); check(!strcmp(e.data(), x)); check(e.data()[24] == '\0'); check(strlen(e.data()) == 24); check(e.data() != x); // argument must be copied check(is_heap(e.data())); e.trim_nuls(); check(e.length() == 24); check(!strcmp(e.data(), x)); check(e.data()[24] == '\0'); check(strlen(e.data()) == 24); check(e.data() != x); // argument must be copied check(is_heap(e.data())); } subtest("trim_nuls, non-empty string with trailing nuls"); { char *x = (char *)calloc(33, 1); strcpy(x, "scares the"); estring e(x, 32); check(e.length() == 32); check(e.data() == x); // argument must be taken over check(!strcmp(e.data(), "scares the")); check(strlen(e.data()) == 10); e.trim_nuls(); check(e.length() == 10); check(e.data() == x); // argument must be taken over check(!strcmp(e.data(), "scares the")); check(strlen(e.data()) == 10); } } static void test_find() { subtest("find"); { estring e("the quick brown fox jumped over the lazy dog"); check(e.find_char('t') == 0); check(e.find_char('q') == 4); check(e.find_char('X') == -1); check(e.find_last_char('t') == 32); check(e.find_last_char('q') == 4); check(e.find_last_char('X') == -1); check(e.find_string("the") == 0); check(e.find_string("quick") == 4); check(e.find_string("Xanadu") == -1); check(e.find_last_string("the") == 32); check(e.find_last_string("quick") == 4); check(e.find_last_string("Xanadu") == -1); } } int main(int argc, char **argv) { argv0 = file_basename_c(argv[0]); if (argc > 1 && !strcmp(argv[1], "--verbose")) verbose++; test_ctors(); test_assignment(); test_cast(); test_take(); test_append(); test_replace(); // TODO: // replace_all // // insert_string // insert_char // insert_chars // insert_vprintf // insert_printf // test_remove(); test_truncate(); test_chomp(); test_trim_nuls(); test_find(); return 0; } ggcov-0.8.4/src/cached_string.H0000644000175000017500000000526711453570563013271 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _cached_string_H_ #define _cached_string_H_ #include "common.h" #include "hashtable.H" /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ // // Class cached_string, like string_var, is a smart pointer for // handling storage of strings. The difference is that cached_string // uses a global hashtable of constant strings, in order to share // storage for strings which would otherwise have many separate // copies. // class cached_string { private: static const char *get(const char *); static const char *lookup(const char *); static hashtable_t *all_; const char *data_; public: // default ctor cached_string() : data_(0) { } // const initialisation ctor cached_string(const char *s) { data_ = get(s); } // non-const initialisation ctor cached_string(char *s) { data_ = get(s); g_free(s); } // copy c'tor cached_string(const cached_string &o) { data_ = o.data_; } // dtor ~cached_string() { } const char *data() const { return data_; } operator const char *() const { return data_; } // assignment operators const char *operator=(const char *s) { return data_ = get(s); } const char *operator=(char *s) { data_ = get(s); g_free(s); return data_; } // equality operator int operator==(const char *s) { return (data_ == lookup(s)); } unsigned int length() const { return (data_ == 0 ? 0 : strlen(data_)); } // take() is pretty superfluous but it might // make converting string_var code easier. char *take() { char *d = (data_ == 0 ? 0 : g_strdup(data_)); data_ = 0; return d; } }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #endif /* _cached_string_H_ */ ggcov-0.8.4/src/Makefile.am0000644000175000017500000001235611561777115012416 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.74 2010-05-09 05:37:14 gnb Exp $ # SUBDIRS= libiberty libggcov noinst_LIBRARIES= libcommon.a libcov.a libcommon_a_SOURCES= \ demangle.h demangle.c \ common.h common.c \ fakepopt.h fakepopt.c \ estring.H estring.C string_var.H tok.H tok.C \ cached_string.H cached_string.C \ filename.h filename.c \ list.H \ hashtable.H hashtable.C \ ptrarray.H \ mvc.h mvc.c \ cpp_parser.H cpp_parser.C \ scenegen.H scenegen.C \ geometry.H libcov_a_SOURCES= \ covio.H covio.C \ cov_specific.H cov_specific.C \ cov_bfd.H cov_bfd.C \ cov_file.H cov_file.C \ cov_suppression.H cov_suppression.C \ cov_line.H cov_line.C \ cov_function.H cov_function.C \ cov_block.H cov_block.C \ cov_calliter.H cov_calliter.C \ cov_arc.H cov_arc.C \ cov_callgraph.H cov_callgraph.C \ cov_scope.H cov_scope.C \ cov_types.H cov.H cov.C \ report.H report.C \ diagram.H diagram.C colors.h \ lego_diagram.H lego_diagram.C \ callgraph_diagram.H callgraph_diagram.C \ flow_diagram.H flow_diagram.C # This is a sad hack to work around the problem where some # objects need to be unconditionally linked instead of pulled # in from libcov.a on demand. LIBCOV_STATIC_SOURCES= \ cov_stab32.C cov_i386.C cov_dwarf2.C cov_elf.C if GUI BASEINCLUDES= $(GGCOV_GUI_CFLAGS) else BASEINCLUDES= $(GGCOV_CLI_CFLAGS) endif bin_PROGRAMS= $(GUIPROG) tggcov $(WEBPROG) EXTRA_PROGRAMS= ggcov ggcov-webdb gui_SOURCES= uicommon.h ui.h ui.c uix.h uix.c \ gnbstackedbar.h gnbstackedbar.c \ confsection.H confsection.C \ prefs.H prefs.C \ window.H window.C \ sourcewin.H sourcewin.C \ summarywin.H summarywin.C \ callswin.H callswin.C \ callgraphwin.H callgraphwin.C \ functionswin.H functionswin.C \ reportwin.H reportwin.C \ fileswin.H fileswin.C \ prefswin.H prefswin.C \ canvas_scenegen.H canvas_scenegen.C \ canvas_function_popup.H canvas_function_popup.C \ diagwin.H diagwin.C \ utils.H utils.C \ help.c ggcov.c ggcov_SOURCES= $(gui_SOURCES) $(LIBCOV_STATIC_SOURCES) glade_callbacks.c INCLUDES= $(BASEINCLUDES) -DPKGDATADIR="\"$(pkgdatadir)\"" \ -DPREFIX="\"$(prefix)\"" -DDATADIR="\"$(datadir)\"" \ -DLIBDIR="\"$(libdir)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" \ -DDEBUG=$(DEBUG) -DUI_DEBUG=$(UI_DEBUG) \ $(CPU_DEFINES) $(OS_DEFINES) ggcov_LDADD= libcov.a libcommon.a $(GGCOV_GUI_LIBS) CLI_LIBS= libcov.a libcommon.a $(GGCOV_CLI_LIBS) tggcov_SOURCES= tggcov.c \ check_scenegen.H check_scenegen.C \ $(LIBCOV_STATIC_SOURCES) tggcov_LDADD= $(CLI_LIBS) ggcov_webdb_SOURCES= \ ggcov-webdb.c \ php_serializer.H php_serializer.C \ php_scenegen.H php_scenegen.C \ $(LIBCOV_STATIC_SOURCES) ggcov_webdb_CPPFLAGS= $(DB_CPPFLAGS) ggcov_webdb_LDADD= $(CLI_LIBS) $(DB_LIBS) # Note this is an automake conditional *not* a gmake conditional if DEBUG DEBUG=1 else DEBUG=0 endif UI_DEBUG=0 # licence.c contains the GPL text in C syntax. This # avoids having to install the COPYING file just to # provide the Licence window. help.o: licence.c licence.c: $(top_srcdir)/COPYING sed \ -e 's/ //g' \ -e 's/\\/\\\\/g' \ -e 's/"/\\"/g' \ -e 's/^\(.*\)$$/"\1\\n"/' \ < $(top_srcdir)/COPYING > $@ # glade_callbacks.c is automatically generated to provide mappings # of names to function pointers for functions marked with GLADE_CALLBACK, # which are used as either signal handlers or custom widget create # functions in the glade file. This means we don't need to use the # --export-dynamic linker flag anymore. glade_callbacks.c: $(gui_SOURCES) perl gencallbacks.pl $(gui_SOURCES) > $@ || ($(RM) $@ ; exit 1) EXTRA_DIST= gencallbacks.pl EXTRA_CLEAN= licence.c glade_callbacks.c noinst_PROGRAMS= bbdump filetest mangletest \ newbbgdump phptest popttest \ toktest estringtest hashtabletest bbdump_SOURCES= bbdump.c bbdump_LDADD= $(CLI_LIBS) filetest_SOURCES= filetest.c filetest_LDADD= $(CLI_LIBS) mangletest_SOURCES= mangletest.c mangletest_LDADD= $(CLI_LIBS) newbbgdump_SOURCES= newbbgdump.c newbbgdump_LDADD= $(CLI_LIBS) phptest_SOURCES= phptest.C php_serializer.C phptest_LDADD= $(CLI_LIBS) popttest_SOURCES= popttest.c popttest_LDADD= $(GGCOV_CLI_LIBS) toktest_SOURCES= toktest.c toktest_LDADD= $(CLI_LIBS) estringtest_SOURCES= estringtest.c estringtest_LDADD= $(CLI_LIBS) hashtabletest_SOURCES= hashtabletest.c hashtabletest_LDADD= $(CLI_LIBS) COVFLAGS= -fprofile-arcs -ftest-coverage coverage: covered-all covered-all: $(MAKE) CFLAGS="$(CFLAGS) $(COVFLAGS)" CXXFLAGS="$(CXXFLAGS) $(COVFLAGS)" all ggcov-0.8.4/src/string_var.H0000644000175000017500000000553211453570563012645 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _string_var_H_ #define _string_var_H_ #include "common.h" /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ // // Class string_var is a convenient way of holding a newly // allocated string (as returned from various utility functions) // and freeing the string when it's no longer needed (i.e. // when the string_var goes out of scope). String_var also // has small storage requirements; it's just a pointer to // the string. If you want to do useful manipulations on // strings such as expanding them and replacing characters // in the middle, use class estring. // // The design of string_var is loosely based on OMG Corba's // class of the same name. // class string_var { private: char *data_; public: // default ctor string_var() : data_(0) { } // const initialisation ctor string_var(const char *s) { data_ = (s == 0 ? 0 : g_strdup(s)); } // non-const initialisation ctor string_var(char *s) : data_(s) { } // copy c'tor string_var(const string_var &o) { data_ = (o.data_ == 0 ? 0 : g_strdup(o.data_)); } // dtor ~string_var() { if (data_ != 0) { g_free(data_); data_ = 0; } } const char *data() const { return data_; } operator const char *() const { return data_; } // assignment operators const char *operator=(const char *s) { if (data_ != 0) g_free(data_); return data_ = (s == 0 ? 0 : g_strdup(s)); } const char *operator=(char *s) { if (data_ != 0) g_free(data_); return data_ = s; } // equality operator int operator==(const char *s) { return !strcmp((data_ == 0 ? "" : data_), (s == 0 ? "" : s)); } unsigned int length() const { return (data_ == 0 ? 0 : strlen(data_)); } char *take() { char *d = data_; data_ = 0; return d; } }; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #endif /* _string_var_H_ */ ggcov-0.8.4/src/uix.h0000644000175000017500000000236111453570563011331 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2003 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ggcov_uix_h_ #define _ggcov_uix_h_ 1 #include "common.h" #include GdkFont *uix_fixed_width_font(GdkFont *oldfont); /* * These functions return width and height suitable for * allocating screen space, i.e. overall font characteristics * rather than sizes tied to particular chars or strings. */ int uix_font_width(GdkFont *); int uix_font_height(GdkFont *); #endif /* _ggcov_uix_h_ */ ggcov-0.8.4/src/summarywin.C0000644000175000017500000004102511557262605012672 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2001-2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "summarywin.H" #include "sourcewin.H" #include "utils.H" #include "filename.h" #include "cov.H" #include "estring.H" #include "prefs.H" #include "uix.h" #include "gnbstackedbar.h" CVSID("$Id: summarywin.C,v 1.22 2010-05-09 05:37:15 gnb Exp $"); list_t summarywin_t::instances_; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ summarywin_t::summarywin_t() { GladeXML *xml; /* load the interface & connect signals */ xml = ui_load_tree("summary"); set_window(glade_xml_get_widget(xml, "summary")); scope_radio_[SU_OVERALL] = glade_xml_get_widget(xml, "summary_overall_radio"); scope_radio_[SU_FILENAME] = glade_xml_get_widget(xml, "summary_filename_radio"); scope_radio_[SU_FUNCTION] = glade_xml_get_widget(xml, "summary_function_radio"); scope_radio_[SU_RANGE] = glade_xml_get_widget(xml, "summary_range_radio"); filename_combo_ = glade_xml_get_widget(xml, "summary_filename_combo"); filename_view_ = glade_xml_get_widget(xml, "summary_filename_view"); function_combo_ = glade_xml_get_widget(xml, "summary_function_combo"); function_view_ = glade_xml_get_widget(xml, "summary_function_view"); range_combo_ = glade_xml_get_widget(xml, "summary_range_combo"); range_start_spin_ = glade_xml_get_widget(xml, "summary_range_start_spin"); range_end_spin_ = glade_xml_get_widget(xml, "summary_range_end_spin"); range_view_ = glade_xml_get_widget(xml, "summary_range_view"); lines_label_ = glade_xml_get_widget(xml, "summary_lines_label"); lines_pc_label_ = glade_xml_get_widget(xml, "summary_lines_pc_label"); lines_bar_ = glade_xml_get_widget(xml, "summary_lines_bar"); functions_label_ = glade_xml_get_widget(xml, "summary_functions_label"); functions_pc_label_ = glade_xml_get_widget(xml, "summary_functions_pc_label"); functions_bar_ = glade_xml_get_widget(xml, "summary_functions_bar"); calls_label_ = glade_xml_get_widget(xml, "summary_calls_label"); calls_pc_label_ = glade_xml_get_widget(xml, "summary_calls_pc_label"); calls_bar_ = glade_xml_get_widget(xml, "summary_calls_bar"); branches_label_ = glade_xml_get_widget(xml, "summary_branches_label"); branches_pc_label_ = glade_xml_get_widget(xml, "summary_branches_pc_label"); branches_bar_ = glade_xml_get_widget(xml, "summary_branches_bar"); blocks_label_ = glade_xml_get_widget(xml, "summary_blocks_label"); blocks_pc_label_ = glade_xml_get_widget(xml, "summary_blocks_pc_label"); blocks_bar_ = glade_xml_get_widget(xml, "summary_blocks_bar"); ui_register_windows_menu(ui_get_dummy_menu(xml, "summary_windows_dummy")); /* NUM_STATUS-2 to ignore SUPPRESSED,UNINSTRUMENTED */ gnb_stacked_bar_set_num_metrics(GNB_STACKED_BAR(lines_bar_), cov::NUM_STATUS-2); gnb_stacked_bar_set_metric_colors(GNB_STACKED_BAR(lines_bar_), (const GdkColor **)foregrounds_by_status); gnb_stacked_bar_set_num_metrics(GNB_STACKED_BAR(calls_bar_), cov::NUM_STATUS-2); gnb_stacked_bar_set_metric_colors(GNB_STACKED_BAR(calls_bar_), (const GdkColor **)foregrounds_by_status); gnb_stacked_bar_set_num_metrics(GNB_STACKED_BAR(functions_bar_), cov::NUM_STATUS-2); gnb_stacked_bar_set_metric_colors(GNB_STACKED_BAR(functions_bar_), (const GdkColor **)foregrounds_by_status); gnb_stacked_bar_set_num_metrics(GNB_STACKED_BAR(branches_bar_), cov::NUM_STATUS-2); gnb_stacked_bar_set_metric_colors(GNB_STACKED_BAR(branches_bar_), (const GdkColor **)foregrounds_by_status); gnb_stacked_bar_set_num_metrics(GNB_STACKED_BAR(blocks_bar_), cov::NUM_STATUS-2); gnb_stacked_bar_set_metric_colors(GNB_STACKED_BAR(blocks_bar_), (const GdkColor **)foregrounds_by_status); instances_.append(this); } summarywin_t::~summarywin_t() { instances_.remove(this); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ summarywin_t * summarywin_t::instance() { summarywin_t *sw = 0; if (prefs.reuse_summwin) sw = instances_.head(); if (sw == 0) sw = new summarywin_t; return sw; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void summarywin_t::show_overall() { summarywin_t *sw = instance(); sw->scope_ = SU_OVERALL; if (sw->shown_) sw->update(); sw->show(); } void summarywin_t::show_file(const cov_file_t *f) { summarywin_t *sw = instance(); sw->scope_ = SU_FILENAME; sw->file_ = f; if (sw->shown_) sw->update(); sw->show(); } void summarywin_t::show_function(const cov_function_t *fn) { summarywin_t *sw = instance(); sw->scope_ = SU_FUNCTION; sw->function_ = fn; if (sw->shown_) sw->update(); sw->show(); } void summarywin_t::show_lines( const char *filename, unsigned long start, unsigned long end) { summarywin_t *sw; cov_file_t *f; if ((f = cov_file_t::find(filename)) == 0) return; sw = instance(); sw->scope_ = SU_RANGE; sw->file_ = f; sw->start_ = start; sw->end_ = end; if (sw->shown_) sw->update(); sw->show(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void summarywin_t::populate_filename_combo(GtkCombo *combo) { list_iterator_t iter; ui_combo_clear(GTK_COMBO(combo)); /* stupid glade2 */ for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; if (file_ == 0) file_ = f; ui_combo_add_data(combo, f->minimal_name(), (gpointer)f); } ui_combo_set_current_data(combo, (gpointer)file_); } void summarywin_t::populate_function_combo(GtkCombo *combo) { list_t *list; list = cov_function_t::list_all(); ::populate_function_combo(combo, list, /*add_all_item*/FALSE, &function_); list->remove_all(); delete list; } void summarywin_t::populate() { dprintf0(D_SUMMARYWIN, "summarywin_t::populate\n"); populating_ = TRUE; /* suppress combo entry callbacks */ populate_filename_combo(GTK_COMBO(filename_combo_)); populate_function_combo(GTK_COMBO(function_combo_)); populate_filename_combo(GTK_COMBO(range_combo_)); populating_ = FALSE; update(); spin_update(); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void summarywin_t::spin_update() { GtkAdjustment *adj; unsigned long lastline; assert(file_ != 0); lastline = file_->num_lines(); dprintf2(D_SUMMARYWIN, "summarywin_t::spin_update: %s[1-%lu]\n", file_->minimal_name(), lastline); adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(range_start_spin_)); adj->lower = 1; adj->upper = lastline; gtk_adjustment_changed(adj); adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(range_end_spin_)); adj->lower = 1; adj->upper = lastline; gtk_adjustment_changed(adj); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ void summarywin_t::grey_items() { gtk_widget_set_sensitive(filename_combo_, (scope_ == SU_FILENAME)); gtk_widget_set_sensitive(filename_view_, (scope_ == SU_FILENAME)); gtk_widget_set_sensitive(function_combo_, (scope_ == SU_FUNCTION)); gtk_widget_set_sensitive(function_view_, (scope_ == SU_FUNCTION)); gtk_widget_set_sensitive(range_combo_, (scope_ == SU_RANGE)); gtk_widget_set_sensitive(range_start_spin_, (scope_ == SU_RANGE)); gtk_widget_set_sensitive(range_end_spin_, (scope_ == SU_RANGE)); gtk_widget_set_sensitive(range_view_, (scope_ == SU_RANGE)); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static inline unsigned long total(const unsigned long *values) { return values[cov::COVERED] + values[cov::PARTCOVERED] + values[cov::UNCOVERED]; } static void set_label_values( GtkWidget *label, GtkWidget *pclabel, const unsigned long *values) { unsigned long numerator, denominator; char buf[128]; char pcbuf[128]; numerator = values[cov::COVERED] + values[cov::PARTCOVERED]; denominator = total(values); if (denominator == 0) { snprintf(buf, sizeof(buf), "0/0"); pcbuf[0] = '\0'; } else if (values[cov::PARTCOVERED] == 0) { snprintf(buf, sizeof(buf), "%ld/%ld", numerator, denominator); snprintf(pcbuf, sizeof(pcbuf), "%.1f%%", (double)numerator * 100.0 / (double)denominator); } else { snprintf(buf, sizeof(buf), "%ld+%ld/%ld", values[cov::COVERED], values[cov::PARTCOVERED], denominator); snprintf(pcbuf, sizeof(pcbuf), "%.1f+%.1f%%", (double)values[cov::COVERED] * 100.0 / (double)denominator, (double)values[cov::PARTCOVERED] * 100.0 / (double)denominator); } gtk_label_set_text(GTK_LABEL(label), buf); gtk_label_set_text(GTK_LABEL(pclabel), pcbuf); } static void set_bar_values(GtkWidget *sbar, const unsigned long *values) { if (total(values) == 0) { gtk_widget_hide(sbar); } else { gtk_widget_show(sbar); gnb_stacked_bar_set_metric_values(GNB_STACKED_BAR(sbar), values); } } void summarywin_t::update() { cov_scope_t *sc = 0; const cov_stats_t *stats; dprintf0(D_SUMMARYWIN, "summarywin_t::update\n"); grey_items(); populating_ = TRUE; assert(file_ != 0); ui_combo_set_current_data(GTK_COMBO(filename_combo_), (gpointer)file_); ui_combo_set_current_data(GTK_COMBO(range_combo_), (gpointer)file_); assert(function_ != 0); ui_combo_set_current_data(GTK_COMBO(function_combo_), (gpointer)function_); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(scope_radio_[scope_]), TRUE); if (start_ > 0) gtk_spin_button_set_value(GTK_SPIN_BUTTON(range_start_spin_), (gfloat)start_); if (end_ > 0) gtk_spin_button_set_value(GTK_SPIN_BUTTON(range_end_spin_), (gfloat)end_); populating_ = FALSE; switch (scope_) { case SU_OVERALL: sc = new cov_overall_scope_t; break; case SU_FILENAME: assert(file_ != 0); sc = new cov_file_scope_t(file_); break; case SU_FUNCTION: assert(function_ != 0); sc = new cov_function_scope_t(function_); break; case SU_RANGE: assert(file_ != 0); dprintf3(D_SUMMARYWIN, "summarywin_update: SU_RANGE %s %lu-%lu\n", file_->minimal_name(), start_, end_); sc = new cov_range_scope_t(file_, start_, end_); break; case SU_NSCOPES: break; } assert(sc != 0); set_title(sc->describe()); stats = sc->get_stats(); if (stats == 0) { static const cov_stats_t empty; stats = ∅ } set_label_values(lines_label_, lines_pc_label_, stats->lines_by_status()); set_bar_values(lines_bar_, stats->lines_by_status()); set_label_values(functions_label_, functions_pc_label_, stats->functions_by_status()); set_bar_values(functions_bar_, stats->functions_by_status()); set_label_values(calls_label_, calls_pc_label_, stats->calls_by_status()); set_bar_values(calls_bar_, stats->calls_by_status()); set_label_values(branches_label_, branches_pc_label_, stats->branches_by_status()); set_bar_values(branches_bar_, stats->branches_by_status()); set_label_values(blocks_label_, blocks_pc_label_, stats->blocks_by_status()); set_bar_values(blocks_bar_, stats->blocks_by_status()); delete sc; } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ GLADE_CALLBACK void on_summary_overall_radio_toggled(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; sw->scope_ = summarywin_t::SU_OVERALL; sw->update(); } GLADE_CALLBACK void on_summary_filename_radio_toggled(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; sw->scope_ = summarywin_t::SU_FILENAME; sw->update(); } GLADE_CALLBACK void on_summary_filename_entry_changed(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); cov_file_t *f; if (sw->populating_ || !sw->shown_) return; assert(sw->scope_ == summarywin_t::SU_FILENAME); f = (cov_file_t *)ui_combo_get_current_data( GTK_COMBO(sw->filename_combo_)); if (f != 0) { /* stupid gtk2 */ sw->file_ = f; sw->update(); } } GLADE_CALLBACK void on_summary_filename_view_clicked(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); assert(sw->scope_ == summarywin_t::SU_FILENAME); assert(sw->file_ != 0); assert(!sw->populating_); sourcewin_t::show_file(sw->file_); } GLADE_CALLBACK void on_summary_function_radio_toggled(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; sw->scope_ = summarywin_t::SU_FUNCTION; sw->update(); } GLADE_CALLBACK void on_summary_function_entry_changed(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); cov_function_t *fn; if (sw->populating_ || !sw->shown_) return; assert(sw->scope_ == summarywin_t::SU_FUNCTION); fn = (cov_function_t *)ui_combo_get_current_data( GTK_COMBO(sw->function_combo_)); if (fn != 0) { /* stupid gtk2 */ sw->function_ = fn; sw->update(); } } GLADE_CALLBACK void on_summary_function_view_clicked(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); assert(sw->scope_ == summarywin_t::SU_FUNCTION); assert(sw->function_ != 0); assert(!sw->populating_); sourcewin_t::show_function(sw->function_); } GLADE_CALLBACK void on_summary_range_radio_toggled(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; sw->scope_ = summarywin_t::SU_RANGE; sw->update(); } GLADE_CALLBACK void on_summary_range_entry_changed(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); cov_file_t *f; if (sw->populating_ || !sw->shown_) return; assert(sw->scope_ == summarywin_t::SU_RANGE); f = (cov_file_t *)ui_combo_get_current_data( GTK_COMBO(sw->range_combo_)); if (f != 0) { /* stupid gtk2 */ sw->file_ = f; sw->spin_update(); sw->update(); } } GLADE_CALLBACK void on_summary_range_start_spin_changed(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; assert(sw->scope_ == summarywin_t::SU_RANGE); sw->start_ = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(sw->range_start_spin_)); sw->update(); } GLADE_CALLBACK void on_summary_range_end_spin_changed(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); if (sw->populating_ || !sw->shown_) return; assert(sw->scope_ == summarywin_t::SU_RANGE); sw->end_ = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(sw->range_end_spin_)); sw->update(); } GLADE_CALLBACK void on_summary_range_view_clicked(GtkWidget *w, gpointer data) { summarywin_t *sw = summarywin_t::from_widget(w); assert(sw->scope_ == summarywin_t::SU_RANGE); assert(sw->file_ != 0); assert(!sw->populating_); sourcewin_t::show_lines(sw->file_->name(), sw->start_, sw->end_); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ /*END*/ ggcov-0.8.4/src/ggcov-webdb.c0000644000175000017500000006626111557262605012716 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "common.h" #include "cov.H" #include "filename.h" #include "estring.H" #include "tok.H" #include "php_serializer.H" #include "report.H" #include "php_scenegen.H" #include "callgraph_diagram.H" #include "lego_diagram.H" #include "fakepopt.h" #include CVSID("$Id: ggcov-webdb.c,v 1.11 2010-05-09 05:37:15 gnb Exp $"); #define V(major,minor,patch) ((major)*10000+(minor)*1000+(patch)) #define DB_VERSION_CODE V(DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH) /* * The transaction argument to DB->open was added in 4.1.25. * As ggcov doesn't use transactions this define allows us * to compile with older DB versions (some distros still * ship db3.3.x as the default DB version). */ #if DB_VERSION_CODE < V(4,1,25) #define OPEN_TXN #else #define OPEN_TXN (DB_TXN *)0, #endif char *argv0; static GList *files; /* incoming specification from commandline */ static char *dump_mode = NULL; static char *output_tarball = "ggcov.webdb.tgz"; static hashtable_t *file_index; static hashtable_t *function_index; static hashtable_t *callnode_index; static list_t *all_functions; /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ inline DBT *dbt(char *data, unsigned int length) { #define MAX_DBTS 2 static DBT bufs[MAX_DBTS]; static int count = 0; DBT *d = &bufs[(count++) % MAX_DBTS]; memset(d, 0, sizeof(*d)); d->data = data; d->size = length; return d; #undef MAX_DBTS } inline DBT *dbt(const estring &e) { return dbt((char *)e.data(), e.length()); } inline DBT *dbt(php_serializer_t &ser) { return dbt(ser.data()); } inline DBT *dbt(const char *s) { return dbt((char *)s, (s == 0 ? 0 : strlen(s))); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static inline unsigned int ftag(const cov_file_t *f) { return *file_index->lookup((void *)f); } static inline unsigned int fntag(const cov_function_t *fn) { return *function_index->lookup((void *)fn); } static inline unsigned int cntag(const cov_callnode_t *cn) { return *callnode_index->lookup((void *)cn); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static inline const char * get_tmpdir(void) { char *v = getenv("TMPDIR"); return (v == 0 ? "/tmp" : v); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ #ifdef __GNUC__ static int systemf(const char *fmt, ...) __attribute__(( format(printf,1,2) )); #endif static int systemf(const char *fmt, ...) { estring cmd; va_list args; va_start(args, fmt); cmd.append_vprintf(fmt, args); va_end(args); dprintf1(D_WEB, "Running \"%s\"\n", cmd.data()); return system(cmd.data()); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void save_file_lines(DB *db, cov_file_t *f) { php_serializer_t ser; unsigned int lineno; int ret; char blocks_buf[64]; // PHP-serialise the line array ser.begin_array(f->num_lines()); for (lineno = 1 ; lineno <= f->num_lines() ; lineno++) { cov_line_t *ln = f->nth_line(lineno); ser.integer(lineno); ser.begin_array(3); ser.next_key(); ser.integer(ln->status()); ser.next_key(); ser.integer(ln->count()); ln->format_blocks(blocks_buf, sizeof(blocks_buf)-1); ser.next_key(); ser.string(blocks_buf); ser.end_array(); } ser.end_array(); // Store the serialised line array string_var key = g_strdup_printf("FL%u", ftag(f)); if ((ret = db->put(db, 0, dbt(key), dbt(ser), 0))) { db->err(db, ret, "save_filename_index"); exit(1); } } static void save_lines(DB *db) { list_iterator_t iter; for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) save_file_lines(db, *iter); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void build_filename_index(void) { list_iterator_t iter; unsigned int n = 0; // Build the filename index file_index = new hashtable_t; for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; file_index->insert((void *)f, new unsigned int(++n)); } } static void save_filename_index(DB *db) { php_serializer_t ser; list_iterator_t iter; int ret; // PHP-serialise the filename index. ser.begin_array(file_index->size()); for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; ser.string(f->minimal_name()); ser.integer(ftag(f)); } ser.end_array(); // Store the serialised filename index if ((ret = db->put(db, 0, dbt("FI"), dbt(ser), 0))) { db->err(db, ret, "save_filename_index"); exit(1); } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ // like cov_function_t::list_all() but includes suppressed // functions as well. TODO: is that a good idea? static list_t * really_list_all_functions(void) { list_t *all = new list_t; list_iterator_t iter; for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; unsigned int fnidx; for (fnidx = 0 ; fnidx < f->num_functions() ; fnidx++) { cov_function_t *fn = f->nth_function(fnidx); all->append(fn); } } all->sort(cov_function_t::compare); return all; } static void build_global_function_index(void) { list_iterator_t iter; unsigned int n = 0; all_functions = really_list_all_functions(); function_index = new hashtable_t; for (iter = all_functions->first() ; iter != (cov_function_t *)0 ; ++iter) { cov_function_t *fn = *iter; function_index->insert((void *)fn, new unsigned int(++n)); } } static gboolean unique_remove_one(const char *key, list_t *value, void *closure) { value->remove_all(); delete value; return TRUE; } static void save_global_function_index(DB *db) { php_serializer_t ser; hashtable_t > *unique; list_t keys; list_iterator_t fniter; list_iterator_t kiter; int ret; // Uniquify the function names unique = new hashtable_t >; for (fniter = all_functions->first() ; fniter != (cov_function_t *)0 ; ++fniter) { cov_function_t *fn = *fniter; if (fn->is_suppressed()) continue; list_t *list = unique->lookup(fn->name()); if (list == 0) { list = new list_t; unique->insert(fn->name(), list); } list->append(fn); } // PHP-serialise the function index unique->keys(&keys); ser.begin_array(unique->size()); for (kiter = keys.first() ; kiter != (const char *)0 ; ++kiter) { const char *fname = *kiter; list_t *list = unique->lookup(fname); ser.string(fname); ser.begin_array(list->length()); for (fniter = list->first() ; fniter != (cov_function_t *)0 ; ++fniter) { cov_function_t *fn = *fniter; ser.string(fn->file()->minimal_name()); ser.integer(fntag(fn)); } ser.end_array(); } ser.end_array(); // Store the serialised function list if ((ret = db->put(db, 0, dbt("UI"), dbt(ser), 0))) { db->err(db, ret, "save_global_function_index"); exit(1); } unique->foreach_remove(unique_remove_one, 0); delete unique; } static void save_global_function_list(DB *db) { php_serializer_t ser; list_iterator_t iter; estring label; unsigned int n = 0; int ret; for (iter = all_functions->first() ; iter != (cov_function_t *)0 ; ++iter) { cov_function_t *fn = *iter; if (fn->is_suppressed()) continue; n++; } // PHP-serialise the function list ser.begin_array(n); for (iter = all_functions->first() ; iter != (cov_function_t *)0 ; ++iter) { cov_function_t *fn = *iter; if (fn->is_suppressed()) continue; label.truncate(); label.append_string(fn->name()); /* see if we need to present some more scope to uniquify the name */ list_iterator_t niter = iter.peek_next(); list_iterator_t piter = iter.peek_prev(); if ((niter != (cov_function_t *)0 && !strcmp((*niter)->name(), fn->name())) || (piter != (cov_function_t *)0 && !strcmp((*piter)->name(), fn->name()))) { label.append_string(" ["); label.append_string(fn->file()->minimal_name()); label.append_string("]"); } ser.string(label); ser.string(fn->file()->minimal_name()); } ser.end_array(); // Store the serialised function list if ((ret = db->put(db, 0, dbt("UL"), dbt(ser), 0))) { db->err(db, ret, "save_global_function_list"); exit(1); } } static void save_file_function_indexes(DB *db) { list_iterator_t iter; for (iter = cov_file_t::first() ; iter != (cov_file_t *)0 ; ++iter) { cov_file_t *f = *iter; unsigned int fnidx; php_serializer_t ser; int ret; ser.begin_array(f->num_functions()); for (fnidx = 0 ; fnidx < f->num_functions() ; fnidx++) { cov_function_t *fn = f->nth_function(fnidx); ser.string(fn->name()); ser.integer(fntag(fn)); } ser.end_array(); // Store the serialised function index string_var key = g_strdup_printf("FUI%u", ftag(f)); if ((ret = db->put(db, 0, dbt(key), dbt(ser), 0))) { db->err(db, ret, "save_file_function_indexes"); exit(1); } } } static inline void serlineno(php_serializer_t *ser, const cov_location_t *loc) { ser->integer(loc == 0 ? 0UL : loc->lineno); } static void save_functions(DB *db) { list_iterator_t iter; for (iter = all_functions->first() ; iter != (cov_function_t *)0 ; ++iter) { cov_function_t *fn = *iter; php_serializer_t ser; int ret; ser.begin_array(5); ser.next_key(); ser.string(fn->name()); ser.next_key(); ser.integer(fn->status()); ser.next_key(); ser.string(fn->file()->minimal_name()); ser.next_key(); serlineno(&ser, fn->get_first_location()); ser.next_key(); serlineno(&ser, fn->get_last_location()); ser.end_array(); // Store the function data string_var key = g_strdup_printf("U%u", fntag(fn)); if ((ret = db->put(db, 0, dbt(key), dbt(ser), 0))) { db->err(db, ret, "save_functions"); exit(1); } } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void serialise_ulong_array( php_serializer_t *ser, unsigned int n, const unsigned long *p) { unsigned int i; ser->begin_array(n); for (i = 0 ; i < n ; i++) { ser->next_key(); ser->integer(p[i]); } ser->end_array(); } static void save_one_summary_f(DB *db, cov_scope_t *sc, const char *key) { php_serializer_t ser; const cov_stats_t *stats = sc->get_stats(); int ret; // PHP-serialise the scope's stats ser.begin_array(5); ser.next_key(); serialise_ulong_array(&ser, cov::NUM_STATUS, stats->blocks_by_status()); ser.next_key(); serialise_ulong_array(&ser, cov::NUM_STATUS, stats->lines_by_status()); ser.next_key(); serialise_ulong_array(&ser, cov::NUM_STATUS, stats->functions_by_status()); ser.next_key(); serialise_ulong_array(&ser, cov::NUM_STATUS, stats->calls_by_status()); ser.next_key(); serialise_ulong_array(&ser, cov::NUM_STATUS, stats->branches_by_status()); ser.end_array(); if ((ret = db->put(db, 0, dbt(key), dbt(ser), 0))) { db->err(db, ret, "save_one_summary_f"); exit(1); } } static void save_summaries(DB *db) { cov_scope_t *sc; // Save an overall scope object sc = new cov_overall_scope_t; save_one_summary_f(db, sc, "OS"); delete sc; // Save a file scope object for each file list_iterator_t fiter; for (fiter = cov_file_t::first() ; fiter != (cov_file_t *)0 ; ++fiter) { cov_file_t *f = *fiter; sc = new cov_file_scope_t(f); string_var key = g_strdup_printf("FS%u", ftag(f)); save_one_summary_f(db, sc, key); delete sc; } // Save a function scope object for each function list_iterator_t fniter; for (fniter = all_functions->first() ; fniter != (cov_function_t *)0 ; ++fniter) { cov_function_t *fn = *fniter; sc = new cov_function_scope_t(fn); string_var key = g_strdup_printf("US%u", fntag(fn)); save_one_summary_f(db, sc, key); delete sc; } } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void add_callnode_to_index(cov_callnode_t *cn, void *closure) { unsigned int *np = (unsigned int *)closure; callnode_index->insert((void *)cn, new unsigned int(++(*np))); } static void build_callnode_index(void) { unsigned int n = 0; callnode_index = new hashtable_t; cov_callnode_t::foreach(add_callnode_to_index, &n); } /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/ static void add_callnode(cov_callnode_t *cn, void *closure) { list_t *list = (list_t *)closure; list->append(cn); } static int compare_node_by_name(const cov_callnode_t *cn1, const cov_callnode_t *cn2) { return strcmp(cn1->name, cn2->name); } static void save_callnode_index(DB *db) { list_t all; list_iterator_t iter; php_serializer_t ser; int ret; // Sort the callnode index, for the node Any Function\n"; foreach ($node_index as $cn => $id) { $sel = ($cn == $this->from_func_ ? ' selected' : ''); echo " $cn\n"; } ?> To Function: From To Count from_func_ == COV_ANY) { foreach ($node_index as $cn => $id) { $this->render_calls($cn, $id, $this->to_func_); } } else if ($this->from_func_ !== null) { $this->render_calls($this->from_func_, $this->from_id_, $this->to_func_); } ?> ggcov-0.8.4/php/lib/dviewport.php0000644000175000017500000000661311453570563013661 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: dviewport.php,v 1.2 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_dviewport_page extends cov_page { var $env_; var $width_; var $height_; var $zoom_; var $panx_; var $pany_; var $format_; function cov_dviewport_page($e) { $this->env_ = $e; } function get_integer($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::integer($get[$name])) $x = (int)$get[$name]; else $x = $def; return $x; } function get_floating($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::floating($get[$name])) $x = (double)$get[$name]; else $x = $def; return $x; } function parse_args($get) { $cb = $this->env_->cb_; $this->width_ = $this->get_integer($get, 'w', 64); $this->height_ = $this->get_integer($get, 'h', 64); $this->zoom_ = $this->get_floating($get, 'z', 1.0); $this->panx_ = $this->get_floating($get, 'px', 0.0); $this->pany_ = $this->get_floating($get, 'py', 0.0); // We get passed the diagram name in 'd' but for now // we ignore it. It will be useful later to generate // a thumbnail to use as the viewport background. if (function_exists('imagegif')) $this->format_ = 'gif'; else if (function_exists('imagepng')) $this->format_ = 'png'; else $cb->fatal("Can't find any image format output function"); } function content_type() { return "image/$this->format_"; } function title() { return "Diagram Viewport"; // never seen } function render() { $cb = $this->env_->cb_; $img = imagecreate($this->width_, $this->height_); // allocate colours $cwhite = imagecolorallocate($img, 0xff, 0xff, 0xff); $cblack = imagecolorallocate($img, 0x00, 0x00, 0x00); $cpurple = imagecolorallocate($img, 0x7d, 0x7d, 0x94); // fill with white imagefilledrectangle($img, 0, 0, $this->width_-1, $this->height_-1, $cwhite); // draw a purple rectangle to represent the viewport $x = ($this->width_-2) * $this->panx_ + 1; $y = ($this->height_-2) * $this->pany_ + 1; $w = ($this->width_-2) / $this->zoom_; $h = ($this->height_-2) / $this->zoom_; imagefilledrectangle($img, $x, $y, $x+$w, $y+$h, $cpurple); // draw a black border; do this last to avoid having to clip imagerectangle($img, 0, 0, $this->width_-1, $this->height_-1, $cblack); header("Content-type: image/$this->format_"); switch ($this->format_) { case 'gif': imagegif($img); break; case 'png': imagepng($img); break; } imagedestroy($img); } } ?> ggcov-0.8.4/php/lib/functions.php0000644000175000017500000000637511453570563013653 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: functions.php,v 1.4 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_functions_page extends cov_page { var $percent_flag_ = true; function cov_functions_page($e) { $this->env_ = $e; } function parse_args($get) { // Nothing to see here, move along } function title() { return 'Functions'; } function format_label($values) { $numerator = $values[COV_COVERED] + $values[COV_PARTCOVERED]; $denominator = $numerator + $values[COV_UNCOVERED]; if ($denominator == 0) { return ''; } else if ($values[COV_PARTCOVERED] == 0) { if ($this->percent_flag_) return sprintf('%.1f%%', $numerator * 100.0 / $denominator); else return sprintf('%lu/%lu', $numerator, $denominator); } else { if ($this->percent_flag_) return sprintf('%.1f+%.1f%%', $values[COV_COVERED] * 100.0 / $denominator, $values[COV_PARTCOVERED] * 100.0 / $denominator); else return sprintf('%lu+%lu/%lu', $values[COV_COVERED], $values[COV_PARTCOVERED], $denominator); } } function render() { $cb = $this->env_->cb_; $func_index = $this->env_->global_function_index(); ?> $file_list) { foreach ($file_list as $file => $func_id) { $stats = $this->env_->fetch("US$func_id"); $blocks_label = $this->format_label($stats[0]); $blocks_color = cov::color_by_status(cov::status_by_values($stats[0])); $lines_label = $this->format_label($stats[1]); $lines_color = cov::color_by_status(cov::status_by_values($stats[1])); $calls_label = $this->format_label($stats[3]); $calls_color = cov::color_by_status(cov::status_by_values($stats[3])); $branches_label = $this->format_label($stats[4]); $branches_color = cov::color_by_status(cov::status_by_values($stats[4])); $url = $this->env_->curl('source.php', 'function', $func, 'file', $file); echo << HTML; } } echo << HTML; } } ?> ggcov-0.8.4/php/lib/diagram.php0000644000175000017500000001604611453570563013243 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: diagram.php,v 1.7 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; define('MIN_IMAGE_SIZE', 64); define('MAX_IMAGE_SIZE', 1024); define('ZOOM_FACTOR', 1.5); define('MIN_ZOOM', 1.0); define('MAX_ZOOM', pow(ZOOM_FACTOR,6)); define('PAN_STEP', 0.25); function image_limit($x) { if ($x > MAX_IMAGE_SIZE) $x = MAX_IMAGE_SIZE; if ($x < MIN_IMAGE_SIZE) $x = MIN_IMAGE_SIZE; return $x; } function zoom_limit($z) { if ($z > MAX_ZOOM) $z = MAX_ZOOM; if ($z < MIN_ZOOM) $z = MIN_ZOOM; return $z; } function pan_limit($x, $w) { if ($x + $w > 1.0) $x = 1.0 - $w; if ($x < 0.0) $x = 0.0; return $x; } class cov_diagram_page extends cov_page { var $env_; var $diagram_ = null; var $title_; var $width_; var $height_; var $zoom_; var $panx_; var $pany_; function cov_diagram_page($e) { $this->env_ = $e; } function get_integer($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::integer($get[$name])) $x = (int)$get[$name]; else $x = $def; return $x; } function get_floating($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::floating($get[$name])) $x = (double)$get[$name]; else $x = $def; return $x; } function parse_args($get) { $cb = $this->env_->cb_; $diagram_index = $this->env_->diagram_index(); $this->width_ = image_limit($this->get_integer($get, 'w', 450)); $this->height_ = image_limit($this->get_integer($get, 'h', 450)); $this->zoom_ = zoom_limit($this->get_floating($get, 'z', 1.0)); $this->panx_ = pan_limit($this->get_floating($get, 'px', 0.0), 0.0); $this->pany_ = pan_limit($this->get_floating($get, 'py', 0.0), 0.0); if (array_key_exists('d', $get)) { $d = $get['d']; if (!array_key_exists($d, $diagram_index)) $cb->fatal("Invalid diagram"); $diag = $diagram_index[$d]; } else { foreach ($diagram_index as $d => $diag) { break; } } $this->diagram_ = $d; $this->title_ = $diag[1]; } function title() { return "$this->title_"; } function render() { $cb = $this->env_->cb_; // $file_index = $this->env_->file_index(); // $func_list = $this->env_->global_function_list(); $pan_step = PAN_STEP / $this->zoom_; $self = basename($_SERVER['PHP_SELF']); $durl = $this->env_->url('drender.php', 'd', $this->diagram_, 'w', $this->width_, 'h', $this->height_, 'z', $this->zoom_, 'px', $this->panx_, 'py', $this->pany_); $saurl = $this->env_->url($self, 'd', $this->diagram_, 'w', $this->width_, 'h', $this->height_, 'z', 1, 'px', 0, 'py', 0); $ziurl = $this->env_->url($self, 'd', $this->diagram_, 'w', $this->width_, 'h', $this->height_, 'z', zoom_limit($this->zoom_ * ZOOM_FACTOR), 'px', $this->panx_, 'py', $this->pany_); $zourl = $this->env_->url($self, 'd', $this->diagram_, 'w', $this->width_, 'h', $this->height_, 'z', zoom_limit($this->zoom_ / ZOOM_FACTOR), 'px', $this->panx_, 'py', $this->pany_); $purls = array(); $zw = 1.0 / $this->zoom_; for ($i = 0 ; $i < 9 ; $i++) { $dx = (($i % 3) - 1) * $pan_step; $dy = ((int)($i / 3) - 1) * $pan_step; $purls[$i] = $this->env_->url($self, 'd', $this->diagram_, 'w', $this->width_, 'h', $this->height_, 'z', $this->zoom_, 'px', sprintf('%f', pan_limit($this->panx_+$dx, $zw)), 'py', sprintf('%f', pan_limit($this->pany_+$dy, $zw))); } $vpw = 64; $vph = 64; $vpurl = $this->env_->url('dviewport.php', 'd', $this->diagram_, 'w', $vpw, 'h', $vph, 'z', $this->zoom_, 'px', $this->panx_, 'py', $this->pany_); ?>
Blocks Lines Calls Branches Function
$blocks_label $lines_label $calls_label $branches_label $func
diagram
Zoom In
Zoom Out
Show All
 
Pan Up&Left Pan Up Pan Up&Right
Pan Left Pan Right
Pan Down&Left Pan Down Pan Down&Right
 
viewport
ggcov-0.8.4/php/lib/drender.php0000644000175000017500000001455311453570563013263 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: drender.php,v 1.2 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; define('CODE_COLOR', 1); define('CODE_RECTANGLE', 2); define('CODE_TEXT', 3); define('CODE_POLYLINE', 4); define('CODE_POLYGON', 5); class cov_drender_page extends cov_page { var $env_; var $width_; var $height_; var $zoom_; var $panx_; var $pany_; var $format_; var $scene_; function cov_drender_page($e) { $this->env_ = $e; } function get_integer($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::integer($get[$name])) $x = (int)$get[$name]; else $x = $def; return $x; } function get_floating($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::floating($get[$name])) $x = (double)$get[$name]; else $x = $def; return $x; } function parse_args($get) { $cb = $this->env_->cb_; $diagram_index = $this->env_->diagram_index(); $this->width_ = $this->get_integer($get, 'w', 500); $this->height_ = $this->get_integer($get, 'h', 500); $this->zoom_ = $this->get_floating($get, 'z', 1.0); $this->panx_ = $this->get_floating($get, 'px', 0.0); $this->pany_ = $this->get_floating($get, 'py', 0.0); if (array_key_exists('d', $get)) { $d = $get['d']; if (!array_key_exists($d, $diagram_index)) $cb->fatal("Invalid diagram"); $diag = $diagram_index[$d]; } else { $diag = reset($diagram_index); } $this->scene_ = $this->env_->fetch("G$diag[0]"); if (function_exists('imagegif')) $this->format_ = 'gif'; else if (function_exists('imagepng')) $this->format_ = 'png'; else $cb->fatal("Can't find any image format output function"); } function content_type() { return "image/$this->format_"; } function title() { return "Diagram Render"; // never seen } // // Render an arrowhead whose point is at `to' and which // lies along the line from `from' to `to'. Unfortunately // all this maths needs to be done in image space so it // can't be done in ggcov-webdb. // function arrowhead($img, $fromx, $fromy, $tox, $toy, $size, $color) { $c = array(); // Calculate the arrowhead geometry $c[0] = $tox; $c[1] = $toy; // calculate and normalise the vector along the arrowhead to the point $nx = $tox - $fromx; $ny = $toy - $fromy; $d = sqrt($nx*$nx + $ny*$ny); $nx /= $d; $ny /= $d; // rotate the arrowhead vector to get the base normal $bnx = -$ny; $bny = $nx; // calculate the centre of the arrowhead base $bcx = $tox - $size * $nx; $bcy = $toy - $size * $ny; // calculate the arrowhead barb points $size /= 4.0; $c[2] = $bcx + $size * $bnx; $c[3] = $bcy + $size * $bny; $c[4] = $bcx - $size * $bnx; $c[5] = $bcy - $size * $bny; imagefilledpolygon($img, $c, 3, $color); } function render() { global $cov_rgb; $cb = $this->env_->cb_; $img = imagecreate($this->width_, $this->height_); // fill image with white $c = imagecolorallocate($img, 0xff, 0xff, 0xff); imagefilledrectangle($img, 0, 0, $this->width_-1, $this->height_-1, $c); $colormap = array(); $bounds = end($this->scene_); $sx = $this->zoom_ * ($this->width_-1) / $bounds[3]; $ox = (-$sx) * ($this->panx_ * $bounds[3] + $bounds[1]); $sy = $this->zoom_ * ($this->height_-1) / $bounds[4]; $oy = (-$sy) * ($this->pany_ * $bounds[4] + $bounds[2]); foreach ($this->scene_ as $elem) { switch ($elem[0]) { case CODE_COLOR: $colormap[$elem[1]] = imagecolorallocate($img, $elem[2], $elem[3], $elem[4]); break; case CODE_RECTANGLE: if ($elem[5] !== null) imagefilledrectangle($img, $sx * $elem[1] + $ox, $sy * $elem[2] + $oy, $sx * $elem[3] + $ox, $sy * $elem[4] + $oy, $colormap[$elem[5]]); if ($elem[6] !== null) imagerectangle($img, $sx * $elem[1] + $ox, $sy * $elem[2] + $oy, $sx * $elem[3] + $ox, $sy * $elem[4] + $oy, $colormap[$elem[6]]); break; case CODE_TEXT: $font = 3; $lines = split("\n", $elem[3]); $y = $sy * $elem[2] + $oy; $dy = imagefontheight($font)+4; $c = $colormap[$elem[4]]; foreach ($lines as $line) { imagestring($img, $font, $sx * $elem[1] + $ox, $y, $line, $c); $y += $dy; } break; case CODE_POLYLINE: $coords = array(); foreach ($elem[1] as $k => $v) { if ($k % 2 == 0) $coords[] = $sx * $v + $ox; else $coords[] = $sy * $v + $oy; } $ncoords = count($coords); $c = $colormap[$elem[4]]; for ($i = 0 ; $i < $ncoords-2 ; $i += 2) imageline($img, $coords[$i], $coords[$i+1], $coords[$i+2], $coords[$i+3], $c); if ($elem[2] !== null) cov_drender_page::arrowhead($img, $coords[2], $coords[3], $coords[0], $coords[1], $sx * $elem[2], $c); if ($elem[3] !== null) cov_drender_page::arrowhead($img, $coords[$ncoords-4], $coords[$ncoords-3], $coords[$ncoords-2], $coords[$ncoords-1], $sx * $elem[3], $c); break; case CODE_POLYGON: $coords = array(); foreach ($elem[1] as $k => $v) { if ($k % 2 == 0) $coords[] = $sx * $v + $ox; else $coords[] = $sy * $v + $oy; } if ($elem[2] !== null) imagefilledpolygon($img, $coords, count($coords)/2, $colormap[$elem[2]]); if ($elem[3] !== null) imagepolygon($img, $coords, count($coords)/2, $colormap[$elem[3]]); break; } } header("Content-type: image/$this->format_"); switch ($this->format_) { case 'gif': imagegif($img); break; case 'png': imagepng($img); break; } imagedestroy($img); } } ?> ggcov-0.8.4/php/lib/summary.php0000644000175000017500000001771511453570563013340 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: summary.php,v 1.10 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_summary_page extends cov_page { var $env_; var $scope_ = null; var $file_name_ = null; var $function_ = null; var $func_file_name_ = null; var $stats_ = null; var $description_ = null; function cov_summary_page($e) { $this->env_ = $e; } function parse_args($get) { $cb = $this->env_->cb_; $file_index = $this->env_->file_index(); $func_list = $this->env_->global_function_list(); if (!empty($get['viewfile'])) { if (!array_key_exists('file', $get)) $cb->fatal("No file name given"); $url = $this->env_->credirect('source.php', 'file', $get['file']); } else if (!empty($get['viewfunc'])) { if (!array_key_exists('function', $get)) $cb->fatal("No function name given"); $a = preg_split('/:/', $get['function']); if (count($a) != 2) $cb->fatal("Bad format for function name"); $url = $this->env_->credirect('source.php', 'function', $a[0], 'file', $a[1]); } // setup some defaults $this->scope_ = 'overall'; foreach ($file_index as $f => $v) break; $this->file_name_ = $f; foreach ($func_list as $fn => $f) break; $this->function_ = preg_replace('/\[.*$/', '', $fn); $this->func_file_name_ = $f; // get scope from args if (array_key_exists('scope', $get)) { $this->scope_ = $get['scope']; if (!cov_valid::scope($this->scope_)) $cb->fatal("Invalid scope"); } // verify scope and get further variables from args switch ($this->scope_) { case 'overall': $this->stats_ = $this->env_->fetch('OS'); $this->description_ = 'Overall'; break; case 'file': if (!array_key_exists('file', $get)) $cb->fatal("No file name given"); $this->file_name_ = $get['file']; if (!cov_valid::filename($this->file_name_)) $cb->fatal("Invalid file name"); if (!array_key_exists($this->file_name_, $file_index)) $cb->fatal("Unknown file"); $file_id = $file_index[$this->file_name_]; $this->stats_ = $this->env_->fetch("FS$file_id"); $this->description_ = "File $this->file_name_"; break; case 'function': if (!array_key_exists('function', $get)) $cb->fatal("No function name given"); $a = preg_split('/:/', $get['function']); $this->function_ = $a[0]; if (!cov_valid::funcname($this->function_)) $cb->fatal("Invalid function"); if (count($a) > 1) { // optional filename, to disambiguate $this->func_file_name_ = $a[1]; } else { if (!array_key_exists($this->function_, $func_list)) $cb->fatal("Function unknown or ambiguous (try specifying filename too)"); $this->func_file_name_ = $func_list[$this->function_]; } if (!cov_valid::filename($this->func_file_name_)) $cb->fatal("Invalid file name"); if (!array_key_exists($this->func_file_name_, $file_index)) $cb->fatal("Unknown file"); $label = $this->function_ . ' [' . $this->func_file_name_ . ']'; if (!array_key_exists($this->function_, $func_list) && !array_key_exists($label, $func_list)) $cb->fatal("Function unknown"); $file_id = $file_index[$this->func_file_name_]; $file_function_index = $this->env_->fetch("FUI$file_id"); $func_id = $file_function_index[$this->function_]; $this->stats_ = $this->env_->fetch("US$func_id"); $this->description_ = "Function $this->function_"; break; case 'range': // TODO default: $cb->fatal("Unknown scope"); } } function title() { return "Summary: $this->description_"; } function render_value_row($label, $values) { $numerator = $values[COV_COVERED] + $values[COV_PARTCOVERED]; $denominator = $numerator + $values[COV_UNCOVERED]; if ($denominator == 0) { $frac = '0/0'; $pc = ''; } else if ($values[COV_PARTCOVERED] == 0) { $frac = sprintf('%lu/%lu', $numerator, $denominator); $pc = sprintf('%.1f%%', $numerator * 100.0 / $denominator); } else { $frac = sprintf('%lu+%lu/%lu', $values[COV_COVERED], $values[COV_PARTCOVERED], $denominator); $pc = sprintf('%.1f+%.1f%%', $values[COV_COVERED] * 100.0 / $denominator, $values[COV_PARTCOVERED] * 100.0 / $denominator); } $w = 150; $h = 20; $url = $this->env_->url('covbar.php', 'w', $w, 'h', $h, 'c', $values[COV_COVERED], 'pc', $values[COV_PARTCOVERED], 'uc', $values[COV_UNCOVERED]); echo << $label    $frac    $pc    bargraph HTML; } function render() { $cb = $this->env_->cb_; $file_index = $this->env_->file_index(); $func_list = $this->env_->global_function_list(); $self = basename($_SERVER['PHP_SELF']); ?>
render_state_to_form(' '); ?> scope_ == 'overall' ? ' checked' : ''); ?>>Overall
scope_ == 'file' ? ' checked' : ''); ?>>Filename
scope_ == 'function' ? ' checked' : ''); ?>>Function
render_value_row('Lines', $this->stats_[1]); $this->render_value_row('Functions', $this->stats_[2]); $this->render_value_row('Calls', $this->stats_[3]); $this->render_value_row('Branches', $this->stats_[4]); $this->render_value_row('Blocks', $this->stats_[0]); ?>
ggcov-0.8.4/php/lib/files.php0000644000175000017500000000662111453570563012737 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: files.php,v 1.4 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_files_page extends cov_page { var $percent_flag_ = true; function cov_files_page($e) { $this->env_ = $e; } function parse_args($get) { // Nothing to see here, move along } function title() { return 'Files'; } function format_label($values) { $numerator = $values[COV_COVERED] + $values[COV_PARTCOVERED]; $denominator = $numerator + $values[COV_UNCOVERED]; if ($denominator == 0) { return ''; } else if ($values[COV_PARTCOVERED] == 0) { if ($this->percent_flag_) return sprintf('%.1f%%', $numerator * 100.0 / $denominator); else return sprintf('%lu/%lu', $numerator, $denominator); } else { if ($this->percent_flag_) return sprintf('%.1f+%.1f%%', $values[COV_COVERED] * 100.0 / $denominator, $values[COV_PARTCOVERED] * 100.0 / $denominator); else return sprintf('%lu+%lu/%lu', $values[COV_COVERED], $values[COV_PARTCOVERED], $denominator); } } function render() { $cb = $this->env_->cb_; $file_index = $this->env_->file_index(); ?> $file_id) { $stats = $this->env_->fetch("FS$file_id"); $blocks_label = $this->format_label($stats[0]); $blocks_color = cov::color_by_status(cov::status_by_values($stats[0])); $lines_label = $this->format_label($stats[1]); $lines_color = cov::color_by_status(cov::status_by_values($stats[1])); $functions_label = $this->format_label($stats[2]); $functions_color = cov::color_by_status(cov::status_by_values($stats[2])); $calls_label = $this->format_label($stats[3]); $calls_color = cov::color_by_status(cov::status_by_values($stats[3])); $branches_label = $this->format_label($stats[4]); $branches_color = cov::color_by_status(cov::status_by_values($stats[4])); $url = $this->env_->curl('source.php', 'file', $file_name); echo << HTML; } echo << HTML; } } ?> ggcov-0.8.4/php/lib/Makefile.in0000644000175000017500000003142211612762300013153 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.8 2010-05-09 05:37:14 gnb Exp $ # # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: phpdirs.am,v 1.3 2010-05-09 05:37:14 gnb Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../phpdirs.am $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in subdir = php/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(myincludedir)" myincludeDATA_INSTALL = $(INSTALL_DATA) DATA = $(myinclude_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @WEB_TRUE@phpdir = $(pkgdatadir)/php @WEB_TRUE@phpincludedir = $(phpdir)/include @WEB_TRUE@phpwwwdir = $(phpdir)/www @WEB_TRUE@ggcovtestdir = $(localstatedir)/ggcov/tests LIB_PHP = cov.php covbar.php \ source.php summary.php files.php \ reports.php functions.php calls.php \ callbutterfly.php diagram.php drender.php \ dviewport.php @WEB_TRUE@myincludedir = $(phpincludedir)/ggcov/lib @WEB_TRUE@myinclude_DATA = $(LIB_PHP) EXTRA_DIST = $(LIB_PHP) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../phpdirs.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu php/lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu php/lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-myincludeDATA: $(myinclude_DATA) @$(NORMAL_INSTALL) test -z "$(myincludedir)" || $(mkdir_p) "$(DESTDIR)$(myincludedir)" @list='$(myinclude_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(myincludeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(myincludedir)/$$f'"; \ $(myincludeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(myincludedir)/$$f"; \ done uninstall-myincludeDATA: @$(NORMAL_UNINSTALL) @list='$(myinclude_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(myincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(myincludedir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(myincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-myincludeDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-myincludeDATA .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-myincludeDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am \ uninstall-myincludeDATA # vim: ft=make sw=8 sts=8: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/php/lib/reports.php0000644000175000017500000000461411453570563013333 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: reports.php,v 1.4 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_reports_page extends cov_page { var $name_ = null; var $id_ = null; var $label_ = null; function cov_reports_page($e) { $this->env_ = $e; } function parse_args($get) { $cb = $this->env_->cb_; if (array_key_exists('report', $get)) { $this->name_ = $get['report']; if (!cov_valid::report($this->name_)) $cb->fatal("Invalid report name"); $report_index = $this->env_->report_index(); if (!array_key_exists($this->name_, $report_index)) $cb->fatal("Unknown report"); $report_data = $report_index[$this->name_]; $this->id_ = $report_data[0]; $this->label_ = $report_data[1]; } } function title() { if ($this->id_ === null) return 'Reports: choose a report'; else return "Reports: $this->label_"; } function render() { $cb = $this->env_->cb_; $report_index = $this->env_->report_index(); if ($this->id_ === null) { // No report, list all the reports and let the user choose one echo "
Filename Blocks Lines Functions Calls Branches
$file_name $blocks_label $lines_label $functions_label $calls_label $branches_label
\n"; foreach ($report_index as $report_name => $report_data) { $label = $report_data[1]; $url = $this->env_->url('reports.php', 'report', $report_name); echo " \n"; } echo "
$label
\n"; } else { // A report was specified, fetch and display its data echo "
\n" . $this->env_->fetch("R$this->id_") . "\n
\n"; } } } ?> ggcov-0.8.4/php/lib/Makefile.am0000644000175000017500000000226211453570563013155 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.8 2010-05-09 05:37:14 gnb Exp $ # include $(srcdir)/../phpdirs.am LIB_PHP= cov.php covbar.php \ source.php summary.php files.php \ reports.php functions.php calls.php \ callbutterfly.php diagram.php drender.php \ dviewport.php if WEB myincludedir= $(phpincludedir)/ggcov/lib myinclude_DATA= $(LIB_PHP) endif EXTRA_DIST= $(LIB_PHP) ggcov-0.8.4/php/lib/callbutterfly.php0000644000175000017500000000670711453570563014516 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: callbutterfly.php,v 1.5 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_callbutterfly_page extends cov_page { var $env_; var $node_name_ = null; var $node_data_ = null; function cov_callbutterfly_page($e) { $this->env_ = $e; } function parse_args($get) { $cb = $this->env_->cb_; $node_index = $this->env_->callnode_index(); // get scope from args $this->node_name_ = null; if (array_key_exists('node', $get)) { $this->node_name_ = $get['node']; if (!cov_valid::callnode($this->node_name_)) $cb->fatal("Invalid callnode"); if (!array_key_exists($this->node_name_, $node_index)) $cb->fatal("Unknown node"); $node_id = $node_index[$this->node_name_]; $this->node_data_ = $this->env_->fetch("N$node_id"); } } function title() { if ($this->node_name_ === null) return 'Call Butterfly: choose a node'; else return "Call Butterfly: $this->node_name_"; } function render_arcs($arcs) { $self = basename($_SERVER['PHP_SELF']); echo << Count Function HTML; $totcount = 0; foreach ($arcs as $ca) $totcount += $ca[2]; foreach ($arcs as $ca) { $name = $ca[0]; // TODO: don't need $ca[1] the peer id $count = $ca[2]; $url = $this->env_->url($self, 'node', $name); echo " $count/$totcount$name\n"; } echo "\n"; } function render() { $cb = $this->env_->cb_; $node_index = $this->env_->callnode_index(); $self = basename($_SERVER['PHP_SELF']); ?>
Function: render_state_to_form(' '); ?>
Called from node_data_) $this->render_arcs($this->node_data_[2]); ?> Calls to node_data_) $this->render_arcs($this->node_data_[3]); ?>
ggcov-0.8.4/php/lib/cov.php0000644000175000017500000001566511453570563012434 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: cov.php,v 1.9 2010-05-09 05:37:14 gnb Exp $ // // Status defines define('COV_COVERED', 0); define('COV_PARTCOVERED', 1); define('COV_UNCOVERED', 2); define('COV_UNINSTRUMENTED', 3); define('COV_SUPPRESSED', 4); $cov_rgb = array( array(0,192,0), array(160,160,0), array(192,0,0), array(0,0,0), array(0,0,192)); class cov_callbacks { function fatal($msg) { echo "

$msg

\n"; exit; } function url_base($base) { return $base; } function add_state($query) { return $query; } } class cov { var $db_ = false; // db resource var $cb_; // cov_callbacks ref var $base_directory_; // string var $file_index_; // array var $global_function_list_; // array var $global_function_index_; // array var $callnode_index_; // array var $report_index_; // array var $diagram_index_; // array function cov($cb) { if ($cb === null) $cb = new cov_callbacks; $this->cb_ = $cb; } function attach($dir) { $this->base_directory_ = $dir; } function detach() { if ($this->db_ !== false) { dba_close($this->db_); $this->db_ = false; } } // static method to check for existance of an openable webdb function database_exists($dir) { return file_exists($dir . '/ggcov.webdb'); } function fetch($key) { if ($this->db_ === false) { $webdb_file = $this->base_directory_ . '/ggcov.webdb'; $this->db_ = dba_open($webdb_file, 'rd', 'db4', 0); if ($this->db_ === false) $this->cb_->fatal("Couldn't open $webdb_file"); } $s = dba_fetch($key, $this->db_); if ($s === false) $this->cb_->fatal("Couldn't find key \"$key\""); return unserialize($s); } function file_index() { if ($this->file_index_ === null) $this->file_index_ = $this->fetch('FI'); return $this->file_index_; } function global_function_list() { if ($this->global_function_list_ === null) $this->global_function_list_ = $this->fetch('UL'); return $this->global_function_list_; } function global_function_index() { if ($this->global_function_index_ === null) $this->global_function_index_ = $this->fetch('UI'); return $this->global_function_index_; } function callnode_index() { if ($this->callnode_index_ === null) $this->callnode_index_ = $this->fetch('NI'); return $this->callnode_index_; } function report_index() { if ($this->report_index_ === null) $this->report_index_ = $this->fetch('RI'); return $this->report_index_; } function diagram_index() { if ($this->diagram_index_ === null) $this->diagram_index_ = $this->fetch('GI'); return $this->diagram_index_; } function _url($args, $g) { $u = $this->cb_->url_base($args[0]); for ($i = 1 ; $i < count($args) ; $i+=2) { $k = $args[$i]; $v = $args[$i+1]; $g[$k] = $v; } $g = $this->cb_->add_state($g); if (count($g)) { $c = '?'; foreach ($g as $k => $v) { $u = $u . $c . $k . '=' . urlencode($v); $c = '&'; } } return $u; } function url() { return htmlentities($this->_url(func_get_args(), $_GET)); } function curl() { return htmlentities($this->_url(func_get_args(), array())); } function credirect() { header('Location: ' . $this->_url(func_get_args(), array())); exit; } function color_by_status($st) { global $cov_rgb; $rgb = $cov_rgb[$st]; return sprintf('#%02x%02x%02x', $rgb[0], $rgb[1], $rgb[2]); } function status_by_values($values) { $numerator = $values[COV_COVERED] + $values[COV_PARTCOVERED]; $denominator = $numerator + $values[COV_UNCOVERED]; if ($denominator == 0) $st = COV_UNINSTRUMENTED; else if ($numerator == 0) $st = COV_UNCOVERED; else if ($values[COV_COVERED] == $denominator) $st = COV_COVERED; else $st = COV_PARTCOVERED; return $st; } function status_by_stats($stats) { return cov::status_by_values($stats[0]); } // Factory method to create and return a page object // best suited for the given URL. function create_page($url) { $url = basename($url); $url = preg_replace('/\?.*$/', '', $url); $map = array( 'callbutterfly.php' => 'cov_callbutterfly_page', 'callgraph.php' => 'cov_callgraph_page', 'calls.php' => 'cov_calls_page', 'covbar.php' => 'cov_covbar_page', 'files.php' => 'cov_files_page', 'functions.php' => 'cov_functions_page', 'reports.php' => 'cov_reports_page', 'source.php' => 'cov_source_page', 'summary.php' => 'cov_summary_page', 'diagram.php' => 'cov_diagram_page', 'drender.php' => 'cov_drender_page', 'dviewport.php' => 'cov_dviewport_page' ); if (!array_key_exists($url, $map)) $this->cb_->fatal("create_page: unknown url"); $classname = $map[$url]; require_once "ggcov/lib/$url"; return new $classname($this); } } class cov_page { function content_type() { return 'text/html'; } function render_state_to_form($prefix) { $state = $this->env_->cb_->add_state(array()); foreach ($state as $k => $v) { $v = htmlentities($v); echo "$prefix\n"; } } } // Class whose static methods provide input filtering and validation class cov_valid { function integer($s) { return preg_match('/^[0-9]+$/', $s); } function floating($s) { return preg_match('/^[0-9.]+$/', $s); } function callnode($s) { return preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $s); } function funcname($s) { return (preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $s) || preg_match('/^[a-zA-Z_][a-zA-Z_0-9]* \[[a-zA-Z0-9_.\/-]+\]$/', $s)); } function report($s) { return preg_match('/^[a-z_]+$/', $s); } function filename($s) { // Note, we don't check for naughty stuff like "../" here // because each use of a filename goes through the file index return preg_match('/^[a-zA-Z0-9_.\/-]+$/', $s); } function scope($s) { return preg_match('/^(overall|file|function)$/', $s); } } ?> ggcov-0.8.4/php/lib/covbar.php0000644000175000017500000000555411453570563013115 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: covbar.php,v 1.5 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_covbar_page extends cov_page { var $env_; var $width_; var $height_; var $values_; var $format_; function cov_covbar_page($e) { $this->env_ = $e; } function get_number($get, $name, $def) { if (array_key_exists($name, $get) && cov_valid::integer($get[$name])) { $x = (int)$get[$name]; if ($x < 0) $x = $def; } else $x = $def; return $x; } function parse_args($get) { $cb = $this->env_->cb_; $this->width_ = $this->get_number($get, 'w', 150); $this->height_ = $this->get_number($get, 'h', 25); $this->values_ = array(); $this->values_[COV_COVERED] = $this->get_number($get, 'c', 0); $this->values_[COV_PARTCOVERED] = $this->get_number($get, 'pc', 0); $this->values_[COV_UNCOVERED] = $this->get_number($get, 'uc', 0); if (function_exists('imagegif')) $this->format_ = 'gif'; else if (function_exists('imagepng')) $this->format_ = 'png'; else $cb->fatal("Can't find any image format output function"); } function content_type() { return 'image/gif'; } function title() { return null; } function render() { global $cov_rgb; $cb = $this->env_->cb_; $img = imagecreate($this->width_, $this->height_); $total = array_sum($this->values_); if ($total == 0) { $col = imagecolorallocate($img, 0, 0, 0); imagecolortransparent($img, $col); } else { $x = 0; foreach (array(COV_COVERED, COV_PARTCOVERED, COV_UNCOVERED) as $status) { $w = $this->width_ * $this->values_[$status] / $total; if (!$w) continue; $rgb = $cov_rgb[$status]; $col = imagecolorallocate($img, $rgb[0], $rgb[1], $rgb[2]); imagefilledrectangle($img, $x, 0, $x+$w, $this->height_, $col); $x += $w; } } header("Content-type: image/$this->format_"); switch ($this->format_) { case 'gif': imagegif($img); break; case 'png': imagepng($img); break; } imagedestroy($img); } } ?> ggcov-0.8.4/php/lib/source.php0000644000175000017500000001156411453570563013137 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: source.php,v 1.4 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; class cov_source_page extends cov_page { var $env_; var $file_name_ = null; var $file_id_ = null; var $function_ = null; var $start_line_ = 0; var $end_line_ = 0; function cov_source_page($e) { $this->env_ = $e; } function parse_args($get) { $cb = $this->env_->cb_; $file_index = $this->env_->file_index(); if (array_key_exists('function', $get)) { $this->function_ = $get['function']; if (!cov_valid::funcname($this->function_)) $cb->fatal("Invalid function"); if (array_key_exists('file', $get)) { // optional filename to disambiguate $this->file_name_ = $get['file']; if (!cov_valid::filename($this->file_name_)) $cb->fatal("Invalid file name"); if (!array_key_exists($this->file_name_, $file_index)) $cb->fatal("Unknown file"); $this->file_id_ = $file_index[$this->file_name_]; $function_index = $this->env_->fetch("FUI$this->file_id_"); if (!array_key_exists($this->function_, $function_index)) $cb->fatal("Unknown function"); $func_id = $function_index[$this->function_]; $func_data = $this->env_->fetch("U$func_id"); } else { // only the function name, it better be unambiguous $function_index = $this->env_->fetch("UI"); if (!array_key_exists($this->function_, $function_index)) $cb->fatal("Unknown function"); $func_id = reset($function_index[$this->function_]); $func_data = $this->env_->fetch("U$func_id"); $this->file_id_ = $file_index[$func_data[2]]; } $this->start_line_ = $func_data[3] - 2; $this->end_line_ = $func_data[4] + 2; } else if (array_key_exists('file', $get)) { // TODO: input filtering $this->file_name_ = $get['file']; if (!array_key_exists($this->file_name_, $file_index)) $cb->fatal("Unknown file"); $this->file_id_ = $file_index[$this->file_name_]; } } function title() { if ($this->file_name_ == null) { return 'Source: Choose A File'; } else { if ($this->function_ != null) return "Source: function $this->function_"; else return "Source: file $this->file_name_"; } } function render() { $cb = $this->env_->cb_; $file_index = $this->env_->file_index(); if ($this->file_name_ == null) { // // No filename given in the URL; display all // the files and let the user choose one. // echo "\n"; foreach ($file_index as $file_name => $file_id) { $url = $this->env_->url('source.php', 'file', $file_name); echo " \n"; } echo "
$file_name
\n"; } else { $lines = $this->env_->fetch("FL$this->file_id_"); $fp = fopen($this->env_->base_directory_ . '/' . $this->file_name_, 'r'); if ($fp == false) $cb->fatal("Can't open source file"); echo << Line Count Blocks Text HTML; $lineno = 0; while ($s = fgets($fp, 1024)) { $text = htmlentities(rtrim($s)); $lineno++; if ($lineno < $this->start_line_ || ($this->end_line_ != 0 && $lineno > $this->end_line_)) continue; if (array_key_exists($lineno, $lines)) { $ln = $lines[$lineno]; $status = $ln[0]; $count = $ln[1]; $blocks = $ln[2]; } else { $status = COV_UNINSTRUMENTED; $count = ''; $blocks = ''; } $color = cov::color_by_status($status); switch ($status) { case COV_UNCOVERED: $count = '####'; break; case COV_UNINSTRUMENTED: case COV_SUPPRESSED: $count = ''; $blocks = ''; break; } echo << $lineno $count $blocks $text HTML; } echo " \n"; } } } ?> ggcov-0.8.4/php/basic/0000777000175000017500000000000011613000475011502 500000000000000ggcov-0.8.4/php/basic/calls.php0000644000175000017500000000170411453570563013243 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: calls.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/show-all.gif0000644000175000017500000000105511453570563013650 00000000000000GIF89a¥!%%%***---111222333444<< // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: dviewport.php,v 1.2 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/pan-r.gif0000644000175000017500000000021611453570563013135 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,-ŒɰœTpNXmÃY?yØ9äy¤¤¢[˱pi¹â*Žq®Ó·ÿã%BŒ;ggcov-0.8.4/php/basic/functions.php0000644000175000017500000000171011453570563014152 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: functions.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/diagram.php0000644000175000017500000000170611453570563013553 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: diagram.php,v 1.2 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/drender.php0000644000175000017500000000170611453570563013572 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: drender.php,v 1.2 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/summary.php0000644000175000017500000000170611453570563013644 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: summary.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/pan-ur.gif0000644000175000017500000000021411453570563013320 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,+Œ©Ëí£œ´Ú‹1ؼóç…$vQ¹I¨Zž+ˆŽNœÎžaÂ5¾ÛJo‘1 ;ggcov-0.8.4/php/basic/pan-l.gif0000644000175000017500000000021711453570563013130 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,.Œ€Ë Ú"zPFZíÂYÞi`(`irWª®ìc½p|zSk'X¾Q|OÊÍ~[;ggcov-0.8.4/php/basic/pan-u.gif0000644000175000017500000000021311453570563013135 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,*Œ€Ëßâ›qÍ[ÝÅrïæ…V(j¤x¦ —™Pë*pðÍõŒçúÎ÷þ(;ggcov-0.8.4/php/basic/zoom-out.gif0000644000175000017500000000066511453570563013721 00000000000000GIF89a¥2! "!!"$$&%%&../77888888:88;::;==@>>@@@@@@DDDDFFFKKN__caabbbbrrrww{xxxxx|~~‚}}”€€€†††††‰††Š’’–˜˜˜£££©©­ªª­«««´´¸¶¶¶ººº¿¿¿ÈÈÌÒÒÖÚÚÚÜÜàÝÝàÞÞáîîîîîñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!þ3Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ?,›ÀŸpH,ȤrÉl:0Ld` ”žEA£Š¹HV(z¬Œ V8/–'F“| ž•rrrb?‚ƒ‚?N.„ƒ?!N#J ,N%I&X G- (c /D& c? (¬)®'!—B¸º®E)ÇÃÄCÆÇÊD̬ÏCÇÂÓÀרBÉÛÞßàMA;ggcov-0.8.4/php/basic/pan-dr.gif0000644000175000017500000000022111453570563013275 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,0Œɺ ^;1¢:iµag·…R&†ŸVŽ_ª’é –0˹ôJ×ðÎ÷þ ‡Ä¢ñP;ggcov-0.8.4/php/basic/pan-ul.gif0000644000175000017500000000021211453570563013310 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,)Œ©Ëí£œ´Ú‹s¼ûî|"ðŒdrQ*±«[¦d,Ó³H#g¬¨(T;ggcov-0.8.4/php/basic/files.php0000644000175000017500000000170411453570563013247 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: files.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/pan-dl.gif0000644000175000017500000000022111453570563013267 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,0Œ€Ë º^cšjgÀgç…ZV#Yž¨§®\[šj,t=ÝxË÷þ ‡Ä¢Q;ggcov-0.8.4/php/basic/Makefile.in0000644000175000017500000003354511612762300013476 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.13 2010-05-09 05:37:14 gnb Exp $ # # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: phpdirs.am,v 1.3 2010-05-09 05:37:14 gnb Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../phpdirs.am $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in subdir = php/basic ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(myincludedir)" "$(DESTDIR)$(phpwwwdir)" myincludeDATA_INSTALL = $(INSTALL_DATA) phpwwwDATA_INSTALL = $(INSTALL_DATA) DATA = $(myinclude_DATA) $(phpwww_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @WEB_TRUE@phpdir = $(pkgdatadir)/php @WEB_TRUE@phpincludedir = $(phpdir)/include @WEB_TRUE@phpwwwdir = $(phpdir)/www @WEB_TRUE@ggcovtestdir = $(localstatedir)/ggcov/tests LIB_PHP = basic.php PAGE_PHP = basic.css ../../ui/ggcov64.gif \ tests.php summary.php covbar.php files.php \ reports.php functions.php calls.php \ callbutterfly.php source.php diagram.php \ drender.php dviewport.php \ pan-ul.gif pan-u.gif pan-ur.gif \ pan-l.gif pan-c.gif pan-r.gif \ pan-dl.gif pan-d.gif pan-dr.gif \ zoom-in.gif zoom-out.gif show-all.gif \ favicon.ico valid-html40.gif @WEB_TRUE@myincludedir = $(phpincludedir)/ggcov/basic @WEB_TRUE@myinclude_DATA = $(LIB_PHP) @WEB_TRUE@phpwww_DATA = $(PAGE_PHP) EXTRA_DIST = $(LIB_PHP) $(PAGE_PHP) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../phpdirs.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu php/basic/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu php/basic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-myincludeDATA: $(myinclude_DATA) @$(NORMAL_INSTALL) test -z "$(myincludedir)" || $(mkdir_p) "$(DESTDIR)$(myincludedir)" @list='$(myinclude_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(myincludeDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(myincludedir)/$$f'"; \ $(myincludeDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(myincludedir)/$$f"; \ done uninstall-myincludeDATA: @$(NORMAL_UNINSTALL) @list='$(myinclude_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(myincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(myincludedir)/$$f"; \ done install-phpwwwDATA: $(phpwww_DATA) @$(NORMAL_INSTALL) test -z "$(phpwwwdir)" || $(mkdir_p) "$(DESTDIR)$(phpwwwdir)" @list='$(phpwww_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(phpwwwDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(phpwwwdir)/$$f'"; \ $(phpwwwDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(phpwwwdir)/$$f"; \ done uninstall-phpwwwDATA: @$(NORMAL_UNINSTALL) @list='$(phpwww_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(phpwwwdir)/$$f'"; \ rm -f "$(DESTDIR)$(phpwwwdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. $(distdir)/../../ui @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(myincludedir)" "$(DESTDIR)$(phpwwwdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-myincludeDATA install-phpwwwDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-myincludeDATA \ uninstall-phpwwwDATA .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-myincludeDATA \ install-phpwwwDATA install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-myincludeDATA uninstall-phpwwwDATA # vim: ft=make sw=8 sts=8: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/php/basic/reports.php0000644000175000017500000000170611453570563013645 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: reports.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/basic.css0000644000175000017500000000313711453570563013231 00000000000000/* * ggcov - A GTK frontend for exploring gcov coverage data * Copyright (c) 2005 Greg Banks * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: basic.css,v 1.2 2010-05-09 05:37:14 gnb Exp $ */ td { font: 10pt verdana,arial,helvetica,sans-serif; } td.nav_header { text-align: center; background: #7d7d94; color: #ffffff; font: 16pt bold verdana,arial,helvetica,sans-serif; } td.nav_menu { text-align: center; background: #7d7d94; color: #ffffff; font: 10pt bold verdana,arial,helvetica,sans-serif; } td.nav_menu a { color: #ffffff; } td.nav_footer { text-align: right; background: #7d7d94; color: #ffffff; font: 8pt verdana,arial,helvetica,sans-serif; } td.nav_footer a { color: #ffffff; } td.basic { font: 10pt verdana,arial,helvetica,sans-serif; } td.source { font: 9pt lucidatypewriter,lucidasanstypewriter,courier,monospace; white-space: pre; } ggcov-0.8.4/php/basic/valid-html40.gif0000644000175000017500000000161211453570563014326 00000000000000GIF89aXôÿÿÿ333999JJJfff„„„™™™ÌÌÌ™f3¥Œf{sf{f3ç½cÿÌfÌ™3½œJúÿÿ1ŒµZ{µÖçc¥ÆZœ½{­J”½f™„µÖçï÷½½Æ™3f!ù,Xÿà!Ždižhª®l)½ïÌtmßxîì|ïÿÀ`ð‘€ÅrÈ$RÈl:wD£D¦¬VŸØ,´h¤Z¿8ÂkŒãô¸^—Ó3Ûí‚ï6ßçÃ|{‚{ „<{€ …t\0^xwz|;~€cŒnž; žŒŽ=u‘434·¸35•iŒ€—¤<Œdˤ¦?©G3¯¶®3·Ý·ÖŸ Â=ƒ‚ÆhÈ;~˜¥ÐÒÛ4Õ4,h°Àÿ 8 ø@ À§ç’} Ö®^2@Ÿ–Õ{öHЬf¨+á ®jÿ¡ÐáŒ:Dtg‰Ý:‹î2²i/ƒŸdD›Bë¤5'1Ì‚% µ’|̃®&Nœ‰º·1#"<¨¢±Í€ ¶VnÓk%€—h™ËäAذúÎÆÚÇj jÖ¨iÈàÊ@0¹tû‹^IµZ Ü€aZ¥6L°%«ƒ$BÌa4]Æ{4rpå¿þõ£¶™ˆ}4XÔ‡À$FÝø±m·Ì"XCàlÐ@è]†o馟W7aZWm[guåÇoÙü&€ð a{Hͽ;lñHcÉ—ÂgÿÍðCÀM÷ƒt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.13 2010-05-09 05:37:14 gnb Exp $ # include $(srcdir)/../phpdirs.am LIB_PHP= basic.php PAGE_PHP= basic.css ../../ui/ggcov64.gif \ tests.php summary.php covbar.php files.php \ reports.php functions.php calls.php \ callbutterfly.php source.php diagram.php \ drender.php dviewport.php \ pan-ul.gif pan-u.gif pan-ur.gif \ pan-l.gif pan-c.gif pan-r.gif \ pan-dl.gif pan-d.gif pan-dr.gif \ zoom-in.gif zoom-out.gif show-all.gif \ favicon.ico valid-html40.gif if WEB myincludedir= $(phpincludedir)/ggcov/basic myinclude_DATA= $(LIB_PHP) phpwww_DATA= $(PAGE_PHP) endif EXTRA_DIST= $(LIB_PHP) $(PAGE_PHP) ggcov-0.8.4/php/basic/callbutterfly.php0000644000175000017500000000171411453570563015022 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: callbutterfly.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/favicon.ico0000644000175000017500000000047611453570563013562 00000000000000(( ƒnnJ>;üÿþ„ƒ<54fWZp_a\MP’}}íéë°¡£ÿý÷¦—™SFB‰xw¸¸""ŸÈŒù"""¿ˆˆˆ€Ë"+¨ˆˆˆ…c²/ˆˆˆˆqFò˜ˆˆˆ€‰øˆˆˆ„DˆÈˆˆˆt@ˆŒˆˆˆ€ÕXˆˆˆ€ÑˆˆˆÈ X‡ØˆˆŒøvˆˆˆˆ˜ˆˆfˆˆ‰/HˆˆWˆˆò+6ˆŽÞˆŠ²"ºVTXˆû"""œàŒù""ggcov-0.8.4/php/basic/zoom-in.gif0000644000175000017500000000067611453570563013522 00000000000000GIF89a¥2! "!!"$$&%%&../77888888:88;::;==@>>@@@@@@DDDDFFFKKN__caabbbbrrrww{xxxxx|~~‚}}”€€€†††††‰††Š’’–˜˜˜£££©©­ªª­«««´´¸¶¶¶ººº¿¿¿ÈÈÌÒÒÖÚÚÚÜÜàÝÝàÞÞáîîîîîñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!þ3Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ?,¤ÀŸpH,ȤrÉl:0Ld` ”žEA£Š¹HV(z¬Œ V8 7›áÅòÄhˆðáKðŒ¨ðqC'N1?p‰‰?N.ˆŠ‹!N#€D ,N%šB&X Cy?- (c /D& c? (µ)·'!BÁ÷E)ÐÌÍCÏÐÓDÕµØCÐËÜÉàáBÒäçèéMA;ggcov-0.8.4/php/basic/covbar.php0000644000175000017500000000170511453570563013422 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: covbar.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/source.php0000644000175000017500000000170511453570563013446 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: source.php,v 1.3 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; basic_page(); ?> ggcov-0.8.4/php/basic/tests.php0000644000175000017500000000273511453570563013314 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: tests.php,v 1.4 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/basic/basic.php'; $list = basic_list_tests(); if (count($list) == 0) { basic_header('No Tests Available'); echo << No test data is available. Please consult the ggcov documentation for instructions on how to add test data to ggcov web.

HTML; } else { basic_header('Choose a Test'); echo "\n"; foreach($list as $test) { $url = 'summary.php?test=' . urlencode($test); echo " \n"; } echo "
$test
\n"; } basic_footer(); ?> ggcov-0.8.4/php/basic/pan-d.gif0000644000175000017500000000020711453570563013117 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,&Œ©Ëí£œ´*€±Ì:r°qa¶|æ ¢ê¡šIK^m³:§'ŽÈ;ggcov-0.8.4/php/basic/pan-c.gif0000644000175000017500000000016211453570563013116 00000000000000GIF89a€}}”}}”!þ4Copyright (c) 2005 Greg Banks. All Rights Reserved.!ù ,Œ©Ëí£œ´Ú‹³Þ¼{W;ggcov-0.8.4/php/basic/basic.php0000644000175000017500000001166711453570563013237 00000000000000 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $Id: basic.php,v 1.12 2010-05-09 05:37:14 gnb Exp $ // require_once 'ggcov/lib/cov.php'; function basic_test_dir() { static $test_dir = null; if ($test_dir === null) { $test_dir = getenv('GGCOV_TEST_DIR'); if (!$test_dir) $test_dir = '/var/ggcov/tests'; } return $test_dir; } function basic_valid_test($t) { return (preg_match('/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/', $t) && cov::database_exists(basic_test_dir() . '/' . $t)); } function basic_test() { static $test = null; if ($test === null) { if (array_key_exists('test', $_GET)) { $test = $_GET['test']; if (!basic_valid_test($test)) cov_callbacks::fatal("Invalid test"); } if ($test === null) { $t = getenv('GGCOV_DEFAULT_TEST'); if ($t && basic_valid_test($t)) $test = $t; } if ($test === null && file_exists(basic_test_dir())) { $d = opendir(basic_test_dir()); if ($d) { while (($test = readdir($d)) && !basic_valid_test($test)) ; closedir($d); } } } return $test; } function basic_list_tests() { $list = array(); if (file_exists(basic_test_dir()) && $d = opendir(basic_test_dir())) { while ($test = readdir($d)) { if (basic_valid_test($test)) $list[] = $test; } closedir($d); sort($list); } return $list; } class basic_cov_callbacks extends cov_callbacks { function add_state($query) { $test = basic_test(); if ($test) $query['test'] = $test; return $query; } } function basic_cov() { $cov = new cov(new basic_cov_callbacks); $test = basic_test(); if (!$test) { // No default test, so redirect to tests.php which will at // least tell the user what needs to be done to add a test. $cov->credirect('tests.php'); } $cov->attach(basic_test_dir() . '/' . $test); return $cov; } function basic_url($base) { $test = basic_test(); if ($test) { $base .= (strchr($base,'?') == null ? '?' : '&'); $base .= 'test=' . urlencode($test); } return htmlentities($base); } function basic_header($title) { ?> <?php echo $title; ?>
create_page($_SERVER['PHP_SELF']); $page->parse_args($_GET); if ($page->content_type() == 'text/html') basic_header($page->title()); $page->render(); $cov->detach(); if ($page->content_type() == 'text/html') basic_footer(); } ?> ggcov-0.8.4/acinclude.m40000644000175000017500000000271011453570563011753 00000000000000dnl dnl This file is included along with aclocal.m4 when building configure.in dnl dnl ggcov - A GTK frontend for exploring gcov coverage data dnl Copyright (c) 2003 Greg Banks dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA dnl dnl $Id: acinclude.m4,v 1.4 2010-05-09 05:37:14 gnb Exp $ dnl dnl For gcc, ensure that the given flags are in $CFLAGS AC_DEFUN([AC_GCC_ADD_CFLAGS],[ if test "x$GCC" = "xyes"; then AC_MSG_CHECKING([for additional gcc flags]) CEXTRAWARNFLAGS= for flag in `cat < 2 July 2003. ggcov-0.8.4/test/0000777000175000017500000000000011613000502010600 500000000000000ggcov-0.8.4/test/filter-callgraph.pl0000644000175000017500000000272311453570563014322 00000000000000#!/usr/bin/perl use strict; use warnings; my @nodes; my $this; my $state = 0; my $nsys; my $napp; my %usable; my $debug = 0; sub is_system { my $filename = shift; return 1 if ($filename =~ m/^\/usr\/include\//); return 0; } while () { chomp; s/block \d+/block NNN/; s/^base .*/base PPP/; my ($type, $name) = m/^(callnode|function)\s+(\S+)/; $state = 1 if ($name); if ($state == 0) { # parsing prolog print $_ . "\n"; } elsif ($state == 1) { # parsing functions and callnodes if ($name) { if ($this && $this->{type} eq 'function') { print "YYY $this->{name} nsys=$nsys napp=$napp\n" if ($debug); $usable{$this->{name}} = ($nsys + $napp == 0 || $napp > 0); } $this = { type => $type, name => $name, lines => [], }; $usable{$name} = 1 if (!defined($usable{$name})); push(@nodes, $this); $nsys = $napp = 0; } push(@{$this->{lines}}, $_); my ($filename) = m/^\s+location\s+([^:]+)/; if ($filename) { if (is_system($filename)) { print "is_system($filename) = 1\n" if ($debug); $nsys++; } else { print "is_system($filename) = 0\n" if ($debug); $napp++; } } } } foreach my $n (@nodes) { print "XXX type=\"$n->{type}\" name=\"$n->{name}\" usable=" . ($usable{$n->{name}} ? 'yes' : 'no') . " {\n" if ($debug); map { print $_ . "\n" } @{$n->{lines}} if ($usable{$n->{name}}); print "XXX }\n" if ($debug); } ggcov-0.8.4/test/test014/0000777000175000017500000000000011613000500012002 500000000000000ggcov-0.8.4/test/test014/runtest0000755000175000017500000000136411613000500013354 00000000000000#!/usr/bin/env bash . ../common.sh CLEAN_FILES="$CLEAN_FILES bar baz" init "code in C shared libraries linked by absolute searchable names" subdir_push bar/fnarp need_files bar.c bar.h compile_c -fpic bar.c link_shlib bar bar.o subdir_pop subdir_push baz need_files baz.c baz.h compile_c -fpic baz.c link_shlib baz baz.o subdir_pop compile_c -Ibar/fnarp -Ibaz foo.c add_shlib bar/fnarp/bar add_shlib -abs baz/baz link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c subdir_push bar/fnarp run_gcov bar.c run_tggcov bar.c compare_lines bar.c compare_counts bar.c subdir_pop subdir_push baz run_gcov baz.c run_tggcov baz.c compare_lines baz.c compare_counts baz.c subdir_pop ggcov-0.8.4/test/test014/xbaz.c0000644000175000017500000000065511613000500013034 00000000000000#include /* C(-) */ #include /* C(-) */ #include "baz.h" /* C(-) */ /* C(-) */ void function_two(int x) { printf(" function_two\n"); /* C(3) */ if (!x) /* C(3) */ exit(0); /* C(1) */ } /* C(-) */ void function_three(int x) { printf(" function_three\n"); /* C(2) */ if (!x) /* C(2) */ exit(0); /* C(1) */ } ggcov-0.8.4/test/test014/xbar.c0000644000175000017500000000041311613000500013014 00000000000000#include /* C(-) */ #include /* C(-) */ #include "bar.h" /* C(-) */ /* C(-) */ void function_one(int x) { printf(" function_one\n"); /* C(4) */ if (!x) /* C(4) */ exit(0); /* C(1) */ } ggcov-0.8.4/test/test014/xbar.h0000644000175000017500000000013211613000500013017 00000000000000#ifndef _bar_h_ #define _bar_h_ 1 extern void function_one(int x); #endif /* _bar_h_ */ ggcov-0.8.4/test/test014/xbaz.h0000644000175000017500000000017511613000500013036 00000000000000#ifndef _baz_h_ #define _baz_h_ 1 extern void function_two(int x); extern void function_three(int x); #endif /* _baz_h_ */ ggcov-0.8.4/test/test014/manifest0000644000175000017500000000164311613000500013453 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c xbar.c xbar.h xbaz.c xbaz.h README ggcov-0.8.4/test/test014/README0000644000175000017500000000012511613000500012574 00000000000000 Simple test based on test002 but with most of the code moved into a shared library. ggcov-0.8.4/test/test014/foo.c0000644000175000017500000000066011613000500012647 00000000000000#include /* C(-) */ #include /* C(-) */ #include "bar.h" /* C(-) */ #include "baz.h" /* C(-) */ /* C(-) */ int main(int argc, char **argv) { int x; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ function_one(--x); function_two(--x) ; function_three(--x); /* C(4) */ x += 4; /* C(1) */ return 0; /* C(1) */ } ggcov-0.8.4/test/test021/0000777000175000017500000000000011613000501012001 500000000000000ggcov-0.8.4/test/test021/runtest0000644000175000017500000000122411613000501013343 00000000000000#!/usr/bin/env bash . ../common.sh init "unit test for libpopt / fakepopt.c" while read args ; do echo "+ $top_builddir/src/popttest $args" if vcapdo $TMP1 $top_builddir/src/popttest $args ; then ( echo "===popttest $args" ; cat $TMP1 ) >> $TMP2 cat $TMP1 pass else fail "popttest $args" fi done < # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest popttest.expected ggcov-0.8.4/test/test021/popttest.expected0000644000175000017500000000375311613000501015332 00000000000000===popttest boolopt=0 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= ===popttest -b boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= ===popttest --bool boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= ===popttest -b -b boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= ===popttest -b -S boolopt=1 spoolopt=1 stringopt="before" ropeopt="BEFORE" files= ===popttest --bool --spool boolopt=1 spoolopt=1 stringopt="before" ropeopt="BEFORE" files= ===popttest -bS boolopt=1 spoolopt=1 stringopt="before" ropeopt="BEFORE" files= ===popttest -s popttest:no value at or near -s ===popttest -s FOO boolopt=0 spoolopt=0 stringopt="FOO" ropeopt="BEFORE" files= ===popttest --string FOO boolopt=0 spoolopt=0 stringopt="FOO" ropeopt="BEFORE" files= ===popttest --string=FOO boolopt=0 spoolopt=0 stringopt="FOO" ropeopt="BEFORE" files= ===popttest -b -S -s FOO boolopt=1 spoolopt=1 stringopt="FOO" ropeopt="BEFORE" files= ===popttest -bS -s FOO boolopt=1 spoolopt=1 stringopt="FOO" ropeopt="BEFORE" files= ===popttest -bSSb -s FOO boolopt=1 spoolopt=1 stringopt="FOO" ropeopt="BEFORE" files= ===popttest -bSSb -s FOO -R BAR boolopt=1 spoolopt=1 stringopt="FOO" ropeopt="BAR" files= ===popttest -bSSb -sR FOO BAR boolopt=1 spoolopt=1 stringopt="FOO" ropeopt="BAR" files= ===popttest --string FOO --rope BAR boolopt=0 spoolopt=0 stringopt="FOO" ropeopt="BAR" files= ===popttest --fmeh popttest:bad option at or near --fmeh ===popttest -z popttest:bad option at or near -z ===popttest -R popttest:no value at or near -R ===popttest foo boolopt=0 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= "foo" ===popttest foo bar boolopt=0 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= "foo" "bar" ===popttest -b foo bar boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= "foo" "bar" ===popttest -b -- foo boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= "foo" ===popttest -b -- -R foo boolopt=1 spoolopt=0 stringopt="before" ropeopt="BEFORE" files= "-R" "foo" ggcov-0.8.4/test/runtest0000755000175000017500000000547211453570563012203 00000000000000#!/usr/bin/env bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2004-2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: runtest,v 1.9 2010-05-09 05:37:15 gnb Exp $ # TESTS= SUPPRESS= GIVEN=no SHELL=bash usage () { echo "Usage: runtest [test...]" exit 1 } istest () { test -d "$1" -a -f "$1/runtest" } addtest () { GIVEN=yes if istest $1 ; then TESTS="$TESTS $1" else echo "$0: warning: no such test \"$1\"" fi } issuppressed () { local t for t in $SUPPRESS ; do [ $t = $1 ] && return 0 done return 1 } addsuppress () { if istest $1 ; then SUPPRESS="$SUPPRESS $1" else echo "$0: warning: no such test \"$1\"" fi } while [ $# -gt 0 ] ; do case "$1" in test???) addtest $1 ;; [0-9]|[0-9][0-9]|[0-9][0-9][0-9]) addtest test`printf %03d $1` ;; \!test???) addsuppress ${1#!} ;; \![0-9]|\![0-9][0-9]|\![0-9][0-9][0-9]) addsuppress test`printf %03d ${1#!}` ;; -*) echo "Unknown option \"$1\"" usage ;; *) usage ;; esac shift done if [ $GIVEN = no ] ; then TESTS=`ls test[0-9][0-9][0-9]/runtest 2>/dev/null | sed -e 's|/runtest||g'` fi T2= for t in $TESTS ; do issuppressed $t || T2="$T2 $t" done TESTS="$T2" # echo TESTS=\"$TESTS\" # exit 1 echo "Running tests" ( echo "hostname: \"`hostname`\"" echo "date: \"`date +%Y%m%dT%H%M%S`\"" echo "uname -s: \"`uname -s`\"" echo "uname -m: \"`uname -m`\"" echo "uname -r: \"`uname -r`\"" for f in /etc/*-release _dummy ; do [ $f = _dummy ] || echo "head -1 $f: \"`head -1 $f 2>/dev/null`\"" done echo "which gcc: \"`which gcc`\"" echo "gcc --version: \"`gcc --version | head -1`\"" echo "which g++: \"`which g++`\"" echo "g++ --version: \"`g++ --version | head -1`\"" ) NPASS=0 for t in $TESTS ; do # echo -n $t ( # echo "==== $t start" cd $t $SHELL runtest ) if [ $? = 0 ]; then NPASS=`expr $NPASS + 1` fi NRUN=`expr $NRUN + 1` done echo "Total: $NPASS/$NRUN tests passed" if [ $NPASS -lt $NRUN ] ; then exit 1 else exit 0 fi ggcov-0.8.4/test/test029/0000777000175000017500000000000011613000502012012 500000000000000ggcov-0.8.4/test/test029/runtest0000755000175000017500000000072311613000502013362 00000000000000#!/usr/bin/env bash . ../common.sh init "Multiple file-scope functions of the same name" compile_c foo.c compile_c bar.c compile_c baz.c compile_c quux.c link foo foo.o bar.o baz.o quux.o run foo bar run foo bar quux run foo bar quux quux bar run_gcov foo.c run_tggcov foo.c compare_counts foo.c run_gcov bar.c run_tggcov bar.c compare_counts bar.c run_gcov baz.c run_tggcov baz.c compare_counts baz.c run_gcov quux.c run_tggcov quux.c compare_counts quux.c ggcov-0.8.4/test/test029/foo.h0000644000175000017500000000026311613000502012663 00000000000000#ifndef _FOO_H_ #define _FOO_H_ 1 struct foo { int (*munge)(int); }; struct foo *bar_new(void); struct foo *baz_new(void); struct foo *quux_new(void); #endif /* _FOO_H_ */ ggcov-0.8.4/test/test029/baz.c0000644000175000017500000000034211613000502012645 00000000000000#include "foo.h" static int munge(int x) { x *= 2; /* C(0) */ return x; /* C(0) */ } struct foo * baz_new(void) { static struct foo f = { munge }; /* C(-) */ return &f; /* C(0) */ } ggcov-0.8.4/test/test029/manifest0000644000175000017500000000164011613000502013460 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c foo.h bar.c baz.c quux.c README ggcov-0.8.4/test/test029/bar.c0000644000175000017500000000034211613000502012635 00000000000000#include "foo.h" static int munge(int x) { /* C(4) */ x += 42; /* C(4) */ return x; /* C(4) */ } struct foo * bar_new(void) { static struct foo f = { munge }; /* C(-) */ return &f; /* C(4) */ } ggcov-0.8.4/test/test029/README0000644000175000017500000000005711613000502012610 00000000000000Multiple file-scope functions of the same name ggcov-0.8.4/test/test029/quux.c0000644000175000017500000000034711613000502013100 00000000000000#include "foo.h" static int munge(int x) { x += (x>>2); /* C(3) */ return x; /* C(3) */ } struct foo * quux_new(void) { static struct foo f = { munge }; /* C(-) */ return &f; /* C(3) */ } ggcov-0.8.4/test/test029/foo.c0000644000175000017500000000170111613000502012654 00000000000000#include /* C(-) */ #include /* C(-) */ #include "foo.h" /* C(-) */ static struct foo * foo_factory(const char *name) { /* C(7) */ if (!strcmp(name, "bar")) /* C(7) */ return bar_new(); /* C(4) */ if (!strcmp(name, "baz")) /* C(3) */ return baz_new(); /* C(0) */ if (!strcmp(name, "quux")) /* C(3) */ return quux_new(); /* C(3) */ return 0; /* C(0) */ } int main(int argc, char **argv) { /* C(3) */ int x = 42; /* C(3) */ int i; /* C(-) */ struct foo *f; /* C(-) */ /* C(-) */ for (i = 1 ; i < argc ; i++) /* C(10) */ { /* C(-) */ f = foo_factory(argv[i]); /* C(7) */ if (f) /* C(7) */ { /* C(-) */ x = f->munge(x); /* C(7) */ printf("%s -> %d\n", argv[i], x);/* C(7) */ } /* C(-) */ } /* C(-) */ return 0; /* C(3) */ } ggcov-0.8.4/test/test020/0000777000175000017500000000000011613000501012000 500000000000000ggcov-0.8.4/test/test020/runtest0000644000175000017500000000310111613000501013336 00000000000000#!/usr/bin/env bash . ../common.sh init "unit test for filename.c" POST_CLEAN_FILES="$POST_CLEAN_FILES $TD2" builddir=`cd $top_builddir/src ; /bin/pwd` TD1=/tmp TD2=$TD1/test.$USER TD3=$TD2/dir3 TD4=$TD3/dir4 vdo mkdir -p $TD4 || fatal "Can't mkdir $TD4" vdo cd $TD4 || fatal "Can't cd to $TD4" while read fn a1 a2 ; do if vdo $builddir/filetest $fn $a1 $a2 ; then pass ; else fail "$fn($a1) != $a2" ; fi done << EOT make_absolute /foo/bar /foo/bar make_absolute /foo /foo make_absolute / / make_absolute foo $TD4/foo make_absolute foo/bar $TD4/foo/bar make_absolute . $TD4 make_absolute ./foo $TD4/foo make_absolute ./foo/bar $TD4/foo/bar make_absolute ./foo/./bar $TD4/foo/bar make_absolute ./././foo/./bar $TD4/foo/bar make_absolute .. $TD3 make_absolute ../foo $TD3/foo make_absolute ../foo/bar $TD3/foo/bar make_absolute ../../foo $TD2/foo make_absolute ../../../foo/bar $TD1/foo/bar make_absolute ./../.././../foo/bar $TD1/foo/bar normalise /foo/bar /foo/bar normalise //foo////bar /foo/bar normalise / / normalise foo foo normalise ./foo foo normalise ./././foo foo normalise ./foo/./ foo normalise foo/bar foo/bar normalise foo////bar foo/bar normalise ./foo foo normalise ./foo/bar foo/bar normalise ./foo///bar foo/bar normalise .//foo/bar foo/bar normalise ././././foo/bar foo/bar normalise . . normalise ../foo ../foo normalise ../foo/bar ../foo/bar normalise ../foo//bar ../foo/bar normalise foo/.. . normalise foo///.. . normalise foo/../bar/.. . normalise foo//.././bar/.//.. . normalise ../../../foo/bar ../../../foo/bar normalise ./../.././../foo/bar ../../../foo/bar EOT ggcov-0.8.4/test/test020/manifest0000644000175000017500000000157211613000501013452 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2006 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.2 2010-05-09 05:37:15 gnb Exp $ # runtest ggcov-0.8.4/test/test016/0000777000175000017500000000000011613000501012005 500000000000000ggcov-0.8.4/test/test016/runtest0000644000175000017500000000047111613000501013352 00000000000000#!/usr/bin/env bash . ../common.sh init "suppression of lines by magical comment" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 23 423 subtest 1 run_tggcov -N foo.c compare_file foo.c compare_counts foo.c subtest 2 run_tggcov -Y BAZ -Z FOO,BAR -N foo.c compare_file foo.c compare_counts foo.c ggcov-0.8.4/test/test016/manifest0000644000175000017500000000160711613000501013456 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test016/README0000644000175000017500000000006711613000501012604 00000000000000Like test011, but tests suppression by magical comment ggcov-0.8.4/test/test016/foo.c0000644000175000017500000000232411613000501012651 00000000000000#include /* C(-) */ #include /* C(-) */ /* single line comment in the middle of nowhere */ int function_one(int x); /* multiple line * comment in * the middle * of nowhere */ /* first *//*and*/ /* second */ /* comments*/ int function_two(int x) { return function_one(x>>1); } /* FOO */ int unused_function_FOO1(int x) { x += 24; x -= 56; return x; } /*BAR*/ int function_three(int x) { x += 4; x -= 5; x++; return x>>1; } /*crud*//* FOO *//*random crap*/ int unused_function_FOO2(int x) { x += 24; // BAR/*FULOUS*/ x -= 56; return x; } /*BAR*/ int function_one(int x) { if (x & 1) x += function_two(x); else x += function_three(x); return x; } int unused_function_BAZ(int x) // BAZ { // BAZ x += 24; // BAZ x -= 56; // BAZ return x; // BAZ } // BAZ int main(int argc, char **argv) { int x, y; int i; for (i = 1 ; i < argc ; i++) { x = atoi(argv[i]); y = function_one(x); // FOO if (x == 42 && x == 31415926) { unused_function_FOO1(x); unused_function_FOO2(x); } // BAR printf("%d -> %d\n", x, y); } return 0; } ggcov-0.8.4/test/test015/0000777000175000017500000000000011613000501012004 500000000000000ggcov-0.8.4/test/test015/a002.graph0000644000175000017500000000054211613000500013405 00000000000000# # Binary tree of depth 5. Just as simple as a001 but a few more nodes. # # $Id: a002.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a ba bb ba baa bab bb bba bbb baa baaa baab bab baba babb bba bbaa bbab bbb bbba bbbb baaa baaaa baaab baab baaba baabb baba babaa babab babb babba babbb bbaa bbaaa bbaab bbab bbaba bbabb bbba bbbaa bbbab bbbb bbbba bbbbb ggcov-0.8.4/test/test015/a014.graph0000644000175000017500000000040511613000501013407 00000000000000# # False roots, with intermediate nodes # This is similar to a layout that happens naturally in gcml2. # # $Id: a014.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aaa aaaa aaab aab aaba aabb aba abaa abab abb abba abbb c ca ca abbb ggcov-0.8.4/test/test015/a007.graph0000644000175000017500000000020411613000501013406 00000000000000# # Tree, depth 2, strong asymmetry # # $Id: a007.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # A B C B D E F G H I J K L M N O C P Q ggcov-0.8.4/test/test015/runtest0000644000175000017500000000111711613000500013346 00000000000000#!/usr/bin/env bash . ../common.sh CLEAN_FILES="$CLEAN_FILES *f.c *m.c" init "callgraph diagram layout" SUBTESTS="$@" if [ -z "$SUBTESTS" ] ; then SUBTESTS=$(ls $srcdir/*.graph | sed -e 's|^.*/\(.*\)\.graph$|\1|') fi for st in $SUBTESTS ; do subtest $st perl $(_srcfile graphgen.pl) $(_srcfile $st.graph) ${st}f.c ${st}m.c \ || fatal "Can't generate source from graph $st.graph" compile_c ${st}f.c compile_c ${st}m.c link $st ${st}f.o ${st}m.o run $st run_gcov ${st}f.c run_tggcov ${st}f.c compare_lines ${st}f.c run_tggcov -G ${st}f.c done ggcov-0.8.4/test/test015/a003.graph0000644000175000017500000000023011613000500013400 00000000000000# # Graph based on a binary tree of depth 3 but with sharing of a leaf node # # $Id: a003.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # A B C B D E C E F ggcov-0.8.4/test/test015/graphgen.pl0000644000175000017500000000426711613000500014060 00000000000000#!/usr/bin/perl # # $Id: graphgen.pl,v 1.2 2006-08-04 12:36:05 gnb Exp $ # use strict; my %nodes; my $nodeid = 0; my $infile = @ARGV[0]; my $fnfile = @ARGV[1]; my $mainfile = @ARGV[2]; sub getnode($) { my $name = $_[0]; my $n = $nodes{$name}; if ($n == undef) { $n = { name => $name, id => $nodeid, outarcs => [], inarcs => [] }; $nodes{$name} = $n; $nodeid++; } return $n; } sub funcname($) { my $n = $_[0]; return "fn_$n->{name}"; } open INFILE, "<$infile" or die "Can't open $infile"; while () { next if m/^#/; # skip comments my @tokens = split(/\s+/, $_); my $lhs = getnode(shift(@tokens)); foreach my $t (@tokens) { my $rhs = getnode($t); # printf "/* %d<%s> -> %d<%s> */\n", # $lhs->{id}, # $lhs->{name}, # $rhs->{id}, # $rhs->{name}; push(@{$lhs->{outarcs}}, $rhs); push(@{$rhs->{inarcs}}, $lhs); } } open OUT, ">$fnfile" or die "Can't open $fnfile"; foreach my $name (sort keys %nodes) { my $n = $nodes{$name}; printf OUT "int %s(int);\n", funcname($n); } printf OUT "\n"; foreach my $name (sort keys %nodes) { my $n = $nodes{$name}; printf OUT "int\n"; printf OUT "%s(int x)\n", funcname($n); printf OUT "{\n"; if (scalar(@{$n->{outarcs}})) { printf OUT " static int visited = 0;\n"; printf OUT " if (!visited++)\n"; printf OUT " {\n"; foreach my $c (@{$n->{outarcs}}) { printf OUT " x += %s(x);\n", funcname($c); } printf OUT " }\n"; } printf OUT " x += %d;\n", $n->{id}+1; printf OUT " return x;\n"; printf OUT "}\n"; printf OUT "\n"; } open OUT, ">$mainfile" or die "Can't open $mainfile"; foreach my $name (sort keys %nodes) { my $n = $nodes{$name}; next if (scalar(@{$n->{inarcs}}) > 0); printf OUT "extern int %s(int);\n", funcname($n); } printf OUT "\n"; printf OUT "int\n"; printf OUT "main(int argc, char **argv)\n"; printf OUT "{\n"; printf OUT " int x = 0;\n"; foreach my $name (sort keys %nodes) { my $n = $nodes{$name}; next if (scalar(@{$n->{inarcs}}) > 0); printf OUT " x += %s(x);\n", funcname($n); } printf OUT " return 0;\n"; printf OUT "}\n"; ggcov-0.8.4/test/test015/a015.graph0000644000175000017500000000043411613000501013412 00000000000000# # Generalisation of false roots: connected body nodes which # appear at too high a rank in the rank assignment pass. # # $Id: a015.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab ac aa aaa aab ab aba abb ac aabb abab abbb aaa aaaa aaab aab aaba aabb aba abaa abab abb abba abbb ggcov-0.8.4/test/test015/a005.graph0000644000175000017500000000047311613000501013414 00000000000000# # Based on a binary tree of depth 5, but sharing and asymmetry added # # $Id: a005.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a ba bb ba baa ccc bb ccc bbb baa baaa baab ccc ccca cccb bbb bbba bbbb baaa baaaa baaab baab baaba baabb ccca cccaa cccab cccac cccad cccae cccb cccba bbba bbbaa bbbab bbbb bbbba bbbbb ggcov-0.8.4/test/test015/a018.graph0000644000175000017500000000053511613000501013417 00000000000000# # False roots, with intermediate node and direct leaf which # is shared with other nodes, which leaves an empty rank # after pushing down nodes # This is similar to a layout that happens naturally in gcml2. # # $Id: a018.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa aa aaa aaa aaaa aaaa aaaaa b ba ba baaa baab baac # c ca cb # ca abbb # d cb ggcov-0.8.4/test/test015/a008.graph0000644000175000017500000000027111613000501013413 00000000000000# # Simple graph based on binary tree depth 3 but with a loop # from a node to its parent # # $Id: a008.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aab aa ggcov-0.8.4/test/test015/a010.graph0000644000175000017500000000031011613000501013376 00000000000000# # Simple graph based on binary tree depth 3 but with a loop # from a node to another on the same rank # # $Id: a010.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aab abb ggcov-0.8.4/test/test015/manifest0000644000175000017500000000212311613000500013446 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest graphgen.pl README a001.graph a002.graph a003.graph a004.graph a005.graph a006.graph a007.graph a008.graph a009.graph a010.graph a011.graph a012.graph a013.graph a014.graph a015.graph a016.graph a017.graph a018.graph ggcov-0.8.4/test/test015/a013.graph0000644000175000017500000000034611613000501013412 00000000000000# # False roots # This is similar to a layout that happens naturally in gcml2. # # $Id: a013.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aaa aaaa aaab aab aaba aabb aba abaa abab abb abba abbb c abbb ggcov-0.8.4/test/test015/a009.graph0000644000175000017500000000026611613000501013420 00000000000000# # Simple graph based on binary tree depth 3 but with a loop # from a node to itself # # $Id: a009.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aab aab ggcov-0.8.4/test/test015/a016.graph0000644000175000017500000000043011613000501013407 00000000000000# # False roots, with intermediate node and direct leaf. # This is similar to a layout that happens naturally in gcml2. # # $Id: a016.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aaa aaaa aaab aab aaba aabb aba abaa abab abb abba abbb c ca cb ca abbb ggcov-0.8.4/test/test015/a011.graph0000644000175000017500000000061711613000501013411 00000000000000# # Lots of roots and a large reverse branch factor near the leaves. # This is similar to a layout that happens naturally in gcml2. # # $Id: a011.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aaa aaaa aaaa aaaaa aaaab ab aba abb abc abd abe abf abg abh abi abj abk abl abm abn abo aba mm abb mm abc mm abd mm abe mm abf mm abg mm abh mm abi mm abj mm abk mm abl mm abm mm abn mm abo mm ggcov-0.8.4/test/test015/README0000644000175000017500000000016311613000500012577 00000000000000 Multiple subtests for exercising callgraph diagrams, using C code generated to create particular graph patterns. ggcov-0.8.4/test/test015/a006.graph0000644000175000017500000000027311613000501013413 00000000000000# # Graph based on a binary tree of depth 4 but with narrowing # # $Id: a006.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a ba bb ba baa bab bb bba bbb baa cccc bab cccc bba dddd bbb dddd ggcov-0.8.4/test/test015/a001.graph0000644000175000017500000000021311613000500013377 00000000000000# # Binary tree of depth 3. This is a trivial case. # $Id: a001.graph,v 1.1 2006-01-29 00:42:56 gnb Exp $ # a aa ab aa aaa aab ab aba abb ggcov-0.8.4/test/test015/a012.graph0000644000175000017500000000037211613000501013410 00000000000000# # Multiple-node loop connected leafwards but not rootwards. # This is similar to a layout that happens naturally in gcml2. # # $Id: a012.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa aa aaa aab aaa aaaa aaab aab aaba aabb c cd ce cd c aabb ce c ggcov-0.8.4/test/test015/a004.graph0000644000175000017500000000031611613000500013406 00000000000000# # Graph based on a binary tree of depth 4 but with sharing of a body node # # $Id: a004.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a ba bb ba baa ccc bb ccc bbb baa baaa baab ccc ccca cccb bbb bbba bbbb ggcov-0.8.4/test/test015/a017.graph0000644000175000017500000000050011613000501013406 00000000000000# # False roots, with intermediate node and direct leaf which # is shared with other nodes. # This is similar to a layout that happens naturally in gcml2. # # $Id: a017.graph,v 1.1 2006-01-29 00:42:57 gnb Exp $ # a aa ab aa aaa aab ab aba abb aaa aaaa aaab aab aaba aabb aba abaa abab abb abba abbb c ca cb ca abbb d cb ggcov-0.8.4/test/common.sh0000644000175000017500000002636611612776323012401 00000000000000#!/bin/bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2004-2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: common.sh,v 1.32 2010-05-09 05:37:15 gnb Exp $ # # Common shell functions for all the test directories # top_builddir=../.. top_srcdir=${top_srcdir:-../..} builddir=. srcdir=${srcdir:-.} _VALGRIND= VALGRIND="valgrind --tool=memcheck --num-callers=16 --leak-check=yes" CC="gcc" CWARNFLAGS="-Wall" CCOVFLAGS="-g --coverage" CDEFINES= CXX="c++" CXXWARNFLAGS="-Wall" CXXCOVFLAGS="-g --coverage" CXXDEFINES= LDLIBS= CXXLINK=no TGGCOV_ANNOTATE_FORMAT=auto TGGCOV_FLAGS= TEST=$(cd $(dirname $0) ; basename $(pwd)) SUBTEST= TESTBASEDIR=`/bin/pwd` # # `RESULT' tracks the running result for the whole test. Values are: # "" no `pass' or `fail' calls, indeterminate # PASS at least one `pass' and no `fail' calls # FAIL at least one `fail' call # ERROR something went wrong with the test, exiting immediately # RESULT= LOG=log if [ -n "$RPLATFORM" ]; then PLATFORM="$RPLATFORM" CANNED=yes else PLATFORM=$(sh $top_srcdir/test/platform.sh) CANNED=no fi TMP1=/tmp/ggcov-test-$$a TMP2=/tmp/ggcov-test-$$b /bin/rm -f $TMP1 $TMP2 trap "_cleanup ; _result ERROR signal caught ; return 1" 1 11 13 15 trap "_cleanup ; _resonexit" 0 POST_CLEAN_FILES="$TMP1 $TMP2" _cleanup () { cd $TESTBASEDIR for f in $POST_CLEAN_FILES ; do [ -e $f ] && /bin/rm -fr $f done } _resmsg () { local res="$1" shift echo "$res: ($TEST$SUBTEST) $*" [ -n "$LOG" ] && echo "$res: ($TEST$SUBTEST) $*" 1>&3 } _result () { local res="$1" shift # log any result which isn't a PASS and its message if [ $res != PASS ]; then _resmsg $res $* fi # update $RESULT case "$RESULT:$res" in :*) RESULT=$res ;; # first result of any kind, just take it *:PASS) ;; # PASS doesn't change any other result FAIL:ERROR) ;; # ERRORs after a FAIL are probably flow-on *) RESULT=$res ;; # otherwise, take the new result esac } _resonexit () { case "$RESULT" in "") _resmsg ERROR "no test code exists here" ;; PASS) SUBTEST= _resmsg PASS $DESCRIPTION ;; esac [ $RESULT = PASS ] || exit 1; } pass () { _result PASS } fail () { _result FAIL $* } fatal () { _result ERROR $* [ $RESULT = ERROR ] && exit 1 } while [ $# -gt 0 ]; do case "$1" in -D) TGGCOV_FLAGS="$TGGCOV_FLAGS $1 $2" shift ;; --debug=*) TGGCOV_FLAGS="$TGGCOV_FLAGS $1" ;; --no-log) LOG= ;; --valgrind) _VALGRIND="$VALGRIND" ;; *) echo "Unknown option: $1" 1>&2 exit 1 ;; esac shift done if [ $CANNED = yes ]; then exec 3>/dev/null elif [ -n "$LOG" ]; then [ -f $LOG ] && mv -f $LOG $LOG.old # save old stdout as fd 3, then redirect stdout and stderr to log exec 3>&1 >$LOG 2>&1 fi vdo () { echo "+ $@" eval "$@" } vncdo () { if [ $CANNED = yes ]; then echo "[skipping] $@" else echo "+ $@" eval "$@" fi } vcapdo () { local OUTFILE=$1 shift echo "+ $@" eval "$@" > $OUTFILE 2>&1 } vcmd () { echo "==$*" } CLEAN_FILES="*.o *.S *.exe *.bb *.bbg *.gcno *.da *.gcda *.bp *.out *.gcov *.tggcov *.filt" init () { if [ $CANNED = yes ]; then vcmd "init[canned] $*" else vcmd "init $*" for f in $CLEAN_FILES ; do [ -e $f ] && vdo /bin/rm -fr $f done vdo ls -AFC fi DESCRIPTION="$*" _DSTACK=$(/bin/pwd) _DDOWN= _DDOWNSTACK= _DUP= _DUPSTACK= } subdir_push () { local subdir="$1" if [ $CANNED = yes ]; then vcmd "subdir_push[canned] $subdir" [ -d "$subdir" ] || fatal "$subdir: No such directory" else vcmd "subdir_push $subdir" if [ ! -d "$subdir" ] ; then vdo mkdir -p "$subdir" fi fi vdo cd "$subdir" _DDOWN="${_DDOWN:+$_DDOWN/}$subdir" _DDOWNSTACK="$_DDOWN:$_DDOWNSTACK" _DUP=$(echo $subdir | sed -e 's:[^/]\+:..:g')/$_DUP _DSTACK=$(/bin/pwd)":$_DSTACK" _DUPSTACK="$_DUP:$_DUPSTACK" } subdir_pop () { local dir vcmd "subdir_pop" _DSTACK=$(echo "$_DSTACK" | sed -e 's|[^:]*:||') dir=$(echo "$_DSTACK" | sed -e 's|:*||') _DUPSTACK=$(echo "$_DUPSTACK" | sed -e 's|[^:]*:||') _DUP=$(echo "$_DUPSTACK" | sed -e 's|:*||') _DDOWNSTACK=$(echo "$_DDOWNSTACK" | sed -e 's|[^:]*:||') _DDOWN=$(echo "$_DDOWNSTACK" | sed -e 's|:*||') vdo cd $dir || fatal "$dir: No such directory" } # Return a path to a file in $srcdir. Used where the # pathname doesn't matter, e.g. *.expected files _srcfile () { case "$srcdir" in .) echo $_DUP$1 ;; /*) echo "$srcdir/$1" ;; *) echo $_DUP$srcdir/$1 ;; esac } # Ensure the given files exist at the given paths relative to # the current directory, if necessary linking them from $srcdir # Used where the pathname matters, e.g. C source files. need_files () { if [ $CANNED == yes ]; then vcmd "need_files[canned] $*" else vcmd "need_files $*" if [ $srcdir != "." -o -n "$_DDOWN" ]; then for path in $* ; do local d=$(dirname $path) local f=$(basename $path) if [ ! -d $d ]; then vdo mkdir -p $d || fatal "Can't build directory $d" fi if [ ! -e $path ]; then vdo ln $(_srcfile ${_DDOWN:+x}$f) $path || fatal "Can't link source file to $path" fi done fi fi } compile_c () { local cfile= local cflags="$CWARNFLAGS $CCOVFLAGS $CDEFINES" vcmd "compile_c $*" while [ $# -gt 0 ] ; do case "$1" in -d*|-f*|-m*|-I*|-D*) cflags="$cflags $1" ;; -*) fatal "compile_c: unknown flag \"$1\"" ;; *) [ -n "$cfile" ] && fatal "compile_c: too many cfiles given" cfile="$1" ;; esac shift done [ -z "$cfile" ] && fatal "compile_c: no cfile given" vncdo $CC $cflags -c $cfile || fatal "can't compile $cfile" } compile_cxx () { local cfile= local cflags="$CXXWARNFLAGS $CXXCOVFLAGS $CXXDEFINES" vcmd "compile_cxx $*" while [ $# -gt 0 ] ; do case "$1" in -d*|-f*|-m*|-I*|-D*) cflags="$cflags $1" ;; -*) fatal "compile_cxx: unknown flag \"$1\"" ;; *) [ -n "$cfile" ] && fatal "compile_cxx: too many cfiles given" cfile="$1" ;; esac shift done [ -z "$cfile" ] && fatal "compile_cxx: no cfile given" CXXLINK=yes vncdo $CXX $cflags -c $cfile || fatal "can't compile $cfile" } link () { vcmd "link $*" local AOUT="$1.exe" shift case "$CXXLINK" in yes) vncdo $CXX $CXXCOVFLAGS -o "$AOUT" "$@" $LDLIBS || fatal "can't link $AOUT" ;; no) vncdo $CC $CCOVFLAGS -o "$AOUT" "$@" $LDLIBS || fatal "can't link $AOUT" ;; esac if [ -n "$LDLIBS" ]; then vdo ldd $AOUT vdo readelf --dynamic $AOUT fi } _dso_filename () { echo "lib$(basename $1).so.1" } _dso_filename2 () { echo "lib$(basename $1).so" } link_shlib () { vcmd "link_shlib $*" local DSO=$(_dso_filename "$1") local DSO2=$(_dso_filename2 "$1") shift case "$CXXLINK" in yes) vncdo $CXX $CXXCOVFLAGS -shared -o "$DSO" "$@" || fatal "can't link $DSO" ;; no) vncdo $CC $CCOVFLAGS -shared -o "$DSO" "$@" || fatal "can't link $DSO" ;; esac ln -s "$DSO" "$DSO2" } add_shlib () { local absflag=no local dso local dir local file vcmd "add_shlib $*" while [ $# -gt 0 ] ; do case "$1" in -abs) absflag=yes ;; -*) fatal "add_shlib: unknown flag \"$1\"" ;; *) [ -n "$dso" ] && fatal "add_shlib: too many dsos given" dso="$(/bin/pwd)/$1" ;; esac shift done [ -z "$dso" ] && fatal "add_shlib: no dso given" dir=$(dirname $dso) file=$(_dso_filename $dso) dso=$(basename $dso) if [ $absflag = yes ] ; then LDLIBS="$LDLIBS -Wl,-rpath,$dir $dir/$file" else LDLIBS="$LDLIBS -Wl,-rpath,$dir -L$dir -l$dso" fi } run () { vcmd "run $*" local AOUT="./$1.exe" shift vncdo $AOUT "$@" || fail "Can't run generated test program" } subtest () { vcmd "subtest $*" SUBTEST=".$1" } _gcov_file () { echo $1$SUBTEST.gcov } _tggcov_file () { echo $1$SUBTEST.tggcov } _subtest_file () { local base=${1%.*} local ext=${1##*.} echo $base$SUBTEST.$ext } _subtestize_files () { if [ -n "$SUBTEST" ] ; then for f in $* ; do [ -f $f ] && vdo mv $f $(_subtest_file $f) done fi } run_gcov () { vcmd "run_gcov $*" local SRC="$1" if [ $CANNED = yes ]; then echo "[skipping] gcov -b $SRC" return fi if vcapdo $TMP1 gcov -b $SRC ; then cat $TMP1 GCOV_FILES=$(sed -n \ -e 's|^Creating[ \t][ \t]*\([^ \t]*\.gcov\)\.$|\1|p' \ -e 's|^.*:creating[ \t][ \t]*.\([^ \t]*\.gcov\).$|\1|p' \ < $TMP1) [ -z "$GCOV_FILES" ] && fatal "no output files from gcov" _subtestize_files $GCOV_FILES else cat $TMP1 fatal "gcov failed" fi } _tggcov_Nflag () { local gcovfile=$(_gcov_file $1) if [ -f $gcovfile ]; then egrep '^[ \t]+(-|[0-9]+):[ \t]+[01]:' $gcovfile >/dev/null && echo "-N" fi } run_tggcov () { vcmd "run_tggcov $*" local SRC= local mode="-a" local flags="$TGGCOV_FLAGS" local nflag= local pwd=$(/bin/pwd) while [ $# -gt 0 ] ; do case "$1" in -a|-G) mode="$1" ;; -N) nflag="$1" ;; -P) flags="$flags $1" ;; -D|-X|-Y|-Z) flags="$flags $1 $2" ; shift ;; -*) fatal "run_tggcov: unknown option \"$1\"" ;; *) SRC="$SRC $1" ;; esac shift done [ -z "$SRC" ] && fatal "run_tggcov: no source files given" [ -z "$nflag" ] && nflag=$(_tggcov_Nflag $SRC) if vcapdo $TMP1 $_VALGRIND $top_builddir/${_DUP}src/tggcov $mode $nflag $flags $SRC ; then cat $TMP1 if [ x$mode = "x-a" ] ; then TGGCOV_FILES=$(sed -n -e 's:^Writing[ \t][ \t]*'$pwd'/\([^ \t]*\.tggcov\)$:\1:p' < $TMP1) [ -z "$TGGCOV_FILES" ] && fatal "no output files from tggcov" _subtestize_files $TGGCOV_FILES fi pass else cat $TMP1 fatal "tggcov failed, see log or re-run with -D all,verbose --no-log" fi } _filter () { local filter=$1 local infile=$2 local outfile=${3:-$2.filt} local starg="${SUBTEST:+--subtest=${SUBTEST#.}}" vdo "perl $top_srcdir/${_DUP}test/filter-$filter.pl $starg < $infile > $outfile" || fatal "Can't apply filter \"$filter\" to $infile" } _diff () { vdo diff -u $1 $2 && pass || fail "$1 differs from $2" } _compare_filtered () { _filter $1 $2 _filter $1 $3 _diff $2.filt $3.filt } compare_lines () { vcmd "compare_lines $*" _compare_filtered expected $(_gcov_file $1) $(_tggcov_file $1) } compare_counts () { vcmd "compare_counts $*" local TF=$(_tggcov_file $1) _filter expected $1 $TF.ex _filter expected $TF _diff $TF.ex $TF.filt } compare_callgraph () { vcmd "compare_callgraph $*" _compare_filtered callgraph $(_srcfile callgraph$SUBTEST.expected) $(_tggcov_file callgraph) } ggcov-0.8.4/test/test002/0000777000175000017500000000000011613000477012014 500000000000000ggcov-0.8.4/test/test002/runtest0000755000175000017500000000036011613000477013361 00000000000000#!/usr/bin/env bash . ../common.sh init "simple C test with early exit()s not from main()" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c ggcov-0.8.4/test/test002/manifest0000644000175000017500000000160711613000477013465 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test002/README0000644000175000017500000000004611613000477012610 00000000000000 Simple test featuring early exit()s. ggcov-0.8.4/test/test002/foo.c0000644000175000017500000000152511613000477012662 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ void function_one(int x) { printf(" function_one\n"); /* C(4) */ if (!x) /* C(4) */ exit(0); /* C(1) */ } /* C(-) */ void function_two(int x) { printf(" function_two\n"); /* C(3) */ if (!x) /* C(3) */ exit(0); /* C(1) */ } /* C(-) */ void function_three(int x) { printf(" function_three\n"); /* C(2) */ if (!x) /* C(2) */ exit(0); /* C(1) */ } /* C(-) */ int main(int argc, char **argv) { int x; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ function_one(--x); function_two(--x) ; function_three(--x); /* C(4) */ x += 4; /* C(1) */ return 0; /* C(1) */ } ggcov-0.8.4/test/test005/0000777000175000017500000000000011613000477012017 500000000000000ggcov-0.8.4/test/test005/runtest0000755000175000017500000000112411613000477013363 00000000000000#!/usr/bin/env bash . ../common.sh init "nonlocal flow control using C++ exceptions" compile_cxx foo.C link foo foo.o subtest 1 run foo 1 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C subtest 2 run foo 2 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C subtest 3 run foo 3 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C subtest 42 run foo 42 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C subtest -1 run foo -1 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C ggcov-0.8.4/test/test005/foo.C0000644000175000017500000000273011613000477012624 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ struct foo_ex { int code; const char *message; foo_ex(int c, const char *m) : code(c), message(m) { } }; /* C(-) */ static void do_some_detailed_stuff(int x) throw(foo_ex) { printf("Got argument %d\n", x); /* C(1,1) C(2,2) C(3,3) C(4,42) C(5,-1) */ if (x == 42) /* C(1,1) C(2,2) C(3,3) C(4,42) C(5,-1) */ throw foo_ex(x, "argument insufficiently meaningless"); /* C(0,1) C(0,2) C(0,3) C(1,42) C(1,-1) */ if (x < 0) /* C(1,1) C(2,2) C(3,3) C(3,42) C(4,-1) */ throw foo_ex(x, "argument insufficiently positive"); /* C(0,1) C(0,2) C(0,3) C(0,42) C(1,-1) */ if (!(x & 1)) /* C(1,1) C(2,2) C(3,3) C(3,42) C(3,-1) */ throw foo_ex(x, "argument insufficiently odd"); /* C(0,1) C(1,2) C(1,3) C(1,42) C(1,-1) */ printf("I like this argument!\n"); /* C(1,1) C(1,2) C(2,3) C(2,42) C(2,-1) */ } /* C(-) */ void do_stuff(int x) { try { do_some_detailed_stuff(x); /* C(1,1) C(2,2) C(3,3) C(4,42) C(5,-1) */ } catch (foo_ex ex) { printf("Caught exception: %d \"%s\"\n", ex.code, ex.message); /* C(0,1) C(1,2) C(1,3) C(2,42) C(3,-1) */ } } /* C(-) */ int main(int argc, char **argv) { int i; for (i = 1 ; i < argc ; i++) { do_stuff(atoi(argv[i])); /* C(1,1) C(2,2) C(3,3) C(4,42) C(5,-1) */ } return 0; /* C(1,1) C(2,2) C(3,3) C(4,42) C(5,-1) */ } ggcov-0.8.4/test/test005/manifest0000644000175000017500000000160711613000477013470 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.C README ggcov-0.8.4/test/test005/README0000644000175000017500000000007411613000477012614 00000000000000 Tests non-local flow control transfer via C++ exceptions. ggcov-0.8.4/test/list-manifest.sh0000644000175000017500000000175611453570563013665 00000000000000#!/bin/sh # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2006 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: list-manifest.sh,v 1.3 2010-05-09 05:37:15 gnb Exp $ # for f in test???/manifest ; do echo $f d=`dirname $f` sed -e '/^#/d' -e "s:^:$d/:" < $f done ggcov-0.8.4/test/test022/0000777000175000017500000000000011613000501012002 500000000000000ggcov-0.8.4/test/test022/runtest0000644000175000017500000000220511613000501013344 00000000000000#!/usr/bin/env bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2006 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: runtest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # . ../common.sh init "unit test for class php_serializer" if vcapdo $TMP1 $top_builddir/src/phptest ; then cat $TMP1 pass else fail "phpttest $args" fi if vdo diff -u $TMP1 phptest.expected ; then pass ; else fail "expected output differs" ; fi ggcov-0.8.4/test/test022/phptest.expected0000644000175000017500000000033511613000501015131 00000000000000test0: i:42; test1: s:6:"foobar"; test2: a:2:{i:0;i:37;i:1;s:5:"smurf";} test3: a:2:{i:0;i:25;i:1;s:7:"fnoogle";} test4: a:3:{i:0;i:25;i:1;a:2:{i:0;i:12;i:1;a:1:{i:0;i:123;}}i:2;s:5:"fnarp";} test5: d:3.141593; test6: N; ggcov-0.8.4/test/test022/manifest0000644000175000017500000000160711613000501013453 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2006 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 06:12:12 gnb Exp $ # runtest phptest.expected ggcov-0.8.4/test/filter-coverage.pl0000644000175000017500000000303711453570563014157 00000000000000#!/usr/bin/perl use strict; use warnings; my $in_decls = 0; while (<>) { next if m/^(call|branch|function)/; next if m/^ -: 0:/; my ($count, $lineno, $text) = m/^( *[#0-9-]*):( *[0-9]*):(.*)$/; my $zap = 0; if ($text =~ m/^\s*}/) { # ignore lonely closing brace $zap = 1; } elsif ($text =~ m/^{/) { # ignore lonely opening brace for a function $in_decls = 1; $zap = 1; } elsif ($text =~ m/^\s+{/) { # ignore all other lonely opening brace $zap = 1; } elsif ($text =~ m/^\s*for\s*\(.*;.*;.*\)\s*$/) # elsif ($text =~ m/^\s*for/) { # entire for loop on a line...the gcov algorithm # changed historically and ggcov uses the old crappy # algorithm, so just ignore these lines $zap = 1; } elsif ($text =~ m/^\s*catch\s*\(.*\)\s*$/) { # catch statement; gcc 4.1 + gcov seem to account catch # statements differently than tggcov. Our test code is # organised so that the catch block code is on sepearate # lines so the count for the catch statement itself is # redundant. # TODO: need to work out why in detail. # TODO: test the case where the catch statement and its # block are all on the same line. $zap = 1; } elsif ($text =~ m/^\s*$/) { $in_decls = 0; } elsif ($in_decls && $text =~ m/^[^={}()]*$/) { # ignore lines after the opening brace for a function # until the first empty line, if they contain only # variable declarations. $zap = 1; } $count = " ." if ($zap); print "$count:$lineno:$text\n"; } ggcov-0.8.4/test/test010/0000777000175000017500000000000011613000500011776 500000000000000ggcov-0.8.4/test/test010/runtest0000755000175000017500000000043111613000500013342 00000000000000#!/usr/bin/env bash . ../common.sh init "inclusion of .c source files into other .c files" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c compare_lines bar.c compare_counts bar.c ggcov-0.8.4/test/test010/manifest0000644000175000017500000000161511613000500013446 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c bar.c README ggcov-0.8.4/test/test010/bar.c0000644000175000017500000000077111613000500012627 00000000000000/* this file is #included into foo.c */ /* C(-) */ void function_one(int x) { printf(" function_one\n"); /* C(4) */ if (!x) /* C(4) */ exit(0); /* C(1) */ } /* C(-) */ void function_two(int x) { printf(" function_two\n"); /* C(3) */ if (!x) /* C(3) */ exit(0); /* C(1) */ } /* C(-) */ void function_three(int x) { printf(" function_three\n"); /* C(2) */ if (!x) /* C(2) */ exit(0); /* C(1) */ } /* C(-) */ /* C(-) */ ggcov-0.8.4/test/test010/README0000644000175000017500000000007411613000500012573 00000000000000 Testing inclusion of .c source files into other .c files. ggcov-0.8.4/test/test010/foo.c0000644000175000017500000000063111613000500012641 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ #include "bar.c" /* C(-) */ /* C(-) */ int main(int argc, char **argv) { int x; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ function_one(--x); function_two(--x) ; function_three(--x); /* C(4) */ x += 4; /* C(1) */ return 0; /* C(1) */ } ggcov-0.8.4/test/test004/0000777000175000017500000000000011613000477012016 500000000000000ggcov-0.8.4/test/test004/runtest0000755000175000017500000000034411613000477013365 00000000000000#!/usr/bin/env bash . ../common.sh init "simple C++ line coverage test" compile_cxx foo.cc link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_gcov foo.cc run_tggcov foo.cc compare_lines foo.cc compare_counts foo.cc ggcov-0.8.4/test/test004/manifest0000644000175000017500000000161011613000477013461 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.cc README ggcov-0.8.4/test/test004/foo.cc0000644000175000017500000000246411613000477013032 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ class foo { private: void (*log_function_)(unsigned, const char *, ...); public: void function_one(int); void function_two(int); void function_three(int); void (*set_log_function(void (*)(unsigned, const char *, ...)))(unsigned, const char *, ...); }; /* C(-) */ void foo::function_one(int x) { printf(" function_one\n"); /* C(4) */ if (!x) /* C(4) */ exit(0); /* C(1) */ } /* C(-) */ void foo::function_two(int x) { printf(" function_two\n"); /* C(3) */ if (!x) /* C(3) */ exit(0); /* C(1) */ } /* C(-) */ void foo::function_three(int x) { printf(" function_three\n"); /* C(2) */ if (!x) /* C(2) */ exit(0); /* C(1) */ } /* C(-) */ void (*foo::set_log_function(void (*func)(unsigned, const char *, ...)))(unsigned, const char *, ...) { void (*oldfunc)(unsigned, const char *, ...) = log_function_; log_function_ = func; return oldfunc; } /* C(-) */ int main(int argc, char **argv) { int x; foo f; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ f.function_one(--x); f.function_two(--x) ; f.function_three(--x); /* C(4) */ x += 4; /* C(1) */ return 0; /* C(1) */ } ggcov-0.8.4/test/test004/README0000644000175000017500000000003011613000477012603 00000000000000 Simple test using C++. ggcov-0.8.4/test/test013/0000777000175000017500000000000011613000500012001 500000000000000ggcov-0.8.4/test/test013/runtest0000755000175000017500000000035211613000500013347 00000000000000#!/usr/bin/env bash . ../common.sh init "C with early exit()s from a nonfinal block" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c ggcov-0.8.4/test/test013/manifest0000644000175000017500000000160711613000500013452 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test013/README0000644000175000017500000000024211613000500012573 00000000000000 Simple test featuring early exit()s like test002 but with an unconditional line following each exit() call instead of them being the last block in the function. ggcov-0.8.4/test/test013/foo.c0000644000175000017500000000164611613000500012653 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ void function_one(int x) { printf(" function_one\n"); /* C(4) */ if (!x) /* C(4) */ exit(0); /* C(1) */ printf(" ...ends\n"); /* C(3) */ } /* C(-) */ void function_two(int x) { printf(" function_two\n"); /* C(3) */ if (!x) /* C(3) */ exit(0); /* C(1) */ printf(" ...ends\n"); /* C(2) */ } /* C(-) */ void function_three(int x) { printf(" function_three\n"); /* C(2) */ if (!x) /* C(2) */ exit(0); /* C(1) */ printf(" ...ends\n"); /* C(1) */ } /* C(-) */ int main(int argc, char **argv) { int x; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ function_one(--x); /* C(4) */ function_two(--x); /* C(3) */ function_three(--x); /* C(2) */ x += 4; /* C(1) */ return 0; /* C(1) */ } ggcov-0.8.4/test/test009/0000777000175000017500000000000011613000500012006 500000000000000ggcov-0.8.4/test/test009/runtest0000755000175000017500000000054311613000477013373 00000000000000#!/usr/bin/env bash . ../common.sh init "assignment of locations to C++ inline functions defined in headers" compile_cxx foo.C link foo foo.o run foo 1 run foo 2 run foo 3 run foo 42 run foo 5 run_gcov foo.C run_tggcov foo.C compare_lines foo.C compare_counts foo.C compare_lines odd.h compare_counts odd.h compare_lines even.h compare_counts odd.h ggcov-0.8.4/test/test009/foo.C0000644000175000017500000000120311613000477012622 00000000000000#include /* C(-) */ #include /* C(-) */ #include "odd.h" /* C(-) */ #include "even.h" /* C(-) */ /* C(-) */ int do_stuff(int x) { if (x & 1) /* C(5) */ x = do_odd_stuff(x); /* C(3) */ else x = do_even_stuff(x); /* C(2) */ x += 1; /* C(5) */ return x; /* C(5) */ } /* C(-) */ int main(int argc, char **argv) { int i; int x; for (i = 1 ; i < argc ; i++) { x = atoi(argv[i]); /* C(5) */ x = do_stuff(x); /* C(5) */ if (x & 1) /* C(5) */ return 1; /* C(0) */ } return 0; /* C(5) */ } ggcov-0.8.4/test/test009/even.h0000644000175000017500000000010711613000477013043 00000000000000 inline int do_even_stuff(int x) { return x/2; /* C(2) */ } ggcov-0.8.4/test/test009/manifest0000644000175000017500000000163311613000477013473 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.2 2010-05-09 05:37:15 gnb Exp $ # runtest foo.C even.h odd.h subdir/even.h ggcov-0.8.4/test/test009/odd.h0000644000175000017500000000011511613000477012653 00000000000000 static inline int do_odd_stuff(int x) { return x+42; /* C(3) */ } ggcov-0.8.4/test/test009/subdir/0000777000175000017500000000000011613000500013276 500000000000000ggcov-0.8.4/test/test009/subdir/even.h0000644000175000017500000000006511613000500014321 00000000000000 inline int do_even_stuff(int x) { return x/2; } ggcov-0.8.4/test/Makefile.in0000644000175000017500000003135211612762305012604 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.12 2010-05-09 05:37:15 gnb Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = common.sh platform.sh runtest list-manifest.sh \ filter-callgraph.pl filter-coverage.pl filter-expected.pl TESTS = runtest TESTS_ENVIRONMENT = sh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool dist-hook distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am dist-hook: @for file in `sh list-manifest.sh` ; do \ mkdir -p `dirname $(distdir)/$$file` ;\ cp $(srcdir)/$$file $(distdir)/$$file ;\ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/test/test023/0000777000175000017500000000000011613000501012003 500000000000000ggcov-0.8.4/test/test023/runtest0000644000175000017500000000202011613000501013340 00000000000000#!/usr/bin/env bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2010 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: runtest,v 1.2 2010-05-09 05:37:15 gnb Exp $ # . ../common.sh init "estring unit test" if vdo $top_builddir/src/estringtest --verbose ; then pass else fail "estringtest $args" fi ggcov-0.8.4/test/test023/manifest0000644000175000017500000000156611613000501013460 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2010 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.2 2010-05-09 05:37:15 gnb Exp $ # runtest ggcov-0.8.4/test/Makefile.am0000644000175000017500000000226011521523750012565 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.12 2010-05-09 05:37:15 gnb Exp $ # EXTRA_DIST= common.sh platform.sh runtest list-manifest.sh \ filter-callgraph.pl filter-coverage.pl filter-expected.pl TESTS= runtest TESTS_ENVIRONMENT= sh dist-hook: @for file in `sh list-manifest.sh` ; do \ mkdir -p `dirname $(distdir)/$$file` ;\ cp $(srcdir)/$$file $(distdir)/$$file ;\ done ggcov-0.8.4/test/test027/0000777000175000017500000000000011613000502012010 500000000000000ggcov-0.8.4/test/test027/runtest0000644000175000017500000000174111613000502013356 00000000000000#!/usr/bin/env bash # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # . ../common.sh init "hashtable unit test" if vdo $top_builddir/src/hashtabletest --verbose ; then pass else fail "hashtabletest $args" fi ggcov-0.8.4/test/test027/manifest0000644000175000017500000000156611613000502013465 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2010 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.2 2010-05-09 05:37:15 gnb Exp $ # runtest ggcov-0.8.4/test/test011/0000777000175000017500000000000011613000500011777 500000000000000ggcov-0.8.4/test/test011/runtest0000755000175000017500000000041311613000500013343 00000000000000#!/usr/bin/env bash . ../common.sh init "suppression of lines by ifdef" compile_c -DFOO -DQUUX foo.c link foo foo.o run foo 1 run foo 2 run foo 23 423 subtest 1 run_tggcov -N foo.c compare_counts foo.c subtest 2 run_tggcov -X FOO -N foo.c compare_counts foo.c ggcov-0.8.4/test/test011/manifest0000644000175000017500000000160711613000500013450 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test011/README0000644000175000017500000000014411613000500012572 00000000000000This directory tests scanning of source files for conditional variables to implement the -X option. ggcov-0.8.4/test/test011/foo.c0000644000175000017500000000371011613000500012643 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ int function_one(int x); /* C(-) */ /* C(-) */ int function_two(int x) { return function_one(x>>1); /* C(7) */ } /* C(-) */ int function_three(int x) { x += 4; /* C(4) */ x -= 5; /* C(4) */ x++; /* C(4) */ return x>>1; /* C(4) */ } /* C(-) */ int function_one(int x) { if (x & 1) /* C(11) */ x += function_two(x); /* C(7) */ else x += function_three(x); /* C(4) */ return x; /* C(11) */ } /* C(-) */ #ifdef FOO int unused_function_FOO(int x) { x += 24; /* C(0,1) C(-,2) */ x -= 56; /* C(0,1) C(-,2) */ return x; /* C(0,1) C(-,2) */ } #endif /* C(-) */ # if BAR int unused_function_BAR(int x) { x += 24; /* C(-) */ x -= 56; /* C(-) */ return x; /* C(-) */ } #endif/* BAR */ /* C(-) */ # if defined(BAZ) int unused_function_BAZ(int x) { x += 24; /* C(-) */ x -= 56; /* C(-) */ return x; /* C(-) */ } #else /*!BAZ*/ int unused_function_notBAZ(int x) { x += 24; /* C(0) */ x -= 56; /* C(0) */ return x; /* C(0) */ } #endif /*BAZ*/ /* C(-) */ # if /*comm/*ent1*/\ defined(/* comm//ent2 */QUUX) && \ !defined(FOONLY)/*comment3*/ int unused_function_QUUX(int x) { x += 24; /* C(0) */ x -= 56; /* C(0) */ return x; /* C(0) */ } #endif /* C(-) */ #ifndef FARNSWORTH int unused_function_notFARNSWORTH(int x) { x += 24; /* C(0) */ x -= 56; /* C(0) */ return x; /* C(0) */ } #endif /* C(-) */ int main(int argc, char **argv) { int x, y; int i; for (i = 1 ; i < argc ; i++) { x = atoi(argv[i]); /* C(4) */ y = function_one(x); /* C(4) */ #ifdef FOO if (x == 42 && x == 31415926) /* C(4,1) C(-,2) */ unused_function_FOO(x); /* C(0,1) C(-,2) */ #endif printf("%d -> %d\n", x, y); /* C(4) */ } return 0; /* C(3) */ } ggcov-0.8.4/test/platform.sh0000755000175000017500000000412311453570563012724 00000000000000#!/bin/sh # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2004 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: platform.sh,v 1.4 2010-05-09 05:37:15 gnb Exp $ # tolower1 () { tr '[:upper:]' '[:lower:]' } tolower2 () { tr 'A-Z' 'a-z' } X=`echo FOo | tolower1` if [ "$X" = "foo" ]; then tolower=tolower1 else X=`echo FOo | tolower2` if [ "$X" = "foo" ]; then tolower=tolower2 else echo "platform.sh: no functional tr program" 1>&2 exit 1 fi fi NAME=`uname -s | $tolower` ARCH=`uname -m | $tolower` REV=`uname -r | $tolower` VENDOR=unknown get_linux_distro () { if [ -f /etc/redhat-release ]; then # Format for RH 7,8.9: # Red Hat Linux release 9 (Shrike) # Format for Fedora Core 1: # Fedora Core release 1 (Yarrow) sed \ -e 's|.*Red[ \t]*Hat[ \t]\+Linux|rh|' \ -e 's|.*Fedora[ \t]\+Core|fc|' \ -e 's|release[ \t]\+\([^ \t]\+\).*|\1|g' \ < /etc/redhat-release else echo unknown unknown fi } case "$NAME" in linux) set `get_linux_distro` VENDOR=$1 REV=$2 ;; irix64) NAME=irix ;; sunos) case "$REV" in 5.*) NAME=solaris REV=`echo $REV | sed -e s'/^5\.//'` ;; esac VENDOR=sun ;; esac case "$ARCH" in i[3-9]86) ARCH=i386 ;; IP[1-9]|IP[1-9][0-9]) ARCH=mips ;; sun4[cmu]) ARCH=sparc ;; esac REV=`echo "$REV" | sed -e 's|-.*||' -e 's|\.||g'` echo ${ARCH}-${VENDOR}-${NAME}-${REV} ggcov-0.8.4/test/test006/0000777000175000017500000000000011613000477012020 500000000000000ggcov-0.8.4/test/test006/runtest0000755000175000017500000000033311613000477013365 00000000000000#!/usr/bin/env bash . ../common.sh init "accumulation of counts in fork()ed children" compile_c foo.c link foo foo.o run foo 1 2 run foo 3 4 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c ggcov-0.8.4/test/test006/manifest0000644000175000017500000000160711613000477013471 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test006/README0000644000175000017500000000002411613000477012610 00000000000000 Tests fork()ing. ggcov-0.8.4/test/test006/foo.c0000644000175000017500000000430711613000477012667 00000000000000#include /* C(-) */ #include /* C(-) */ #include /* C(-) */ #include /* C(-) */ #include /* C(-) */ /* C(-) */ const char *me = "parent"; /* C(-) */ /* C(-) */ void function_three(int x) { printf("%s: function_three\n", me); /* C(2) */ } /* C(-) */ void function_two(int x) { printf("%s: function_two\n", me); /* C(3) */ if (--x) /* C(3) */ function_three(x); /* C(2) */ } /* C(-) */ void function_one(int x) { printf("%s: function_one\n", me); /* C(4) */ if (--x) /* C(4) */ function_two(x); /* C(3) */ } /* C(-) */ void do_stuff(const char *arg) { int x; x = atoi(arg); /* C(4) */ function_one(x); /* C(4) */ } /* C(-) */ pid_t start_child(const char *arg) { pid_t pid; pid = fork(); /* C(2) */ if (pid < 0) /* C(4) */ { perror("fork"); /* C(0) */ exit(0); /* C(0) */ } else if (pid == 0) /* C(4) */ { /* child */ me = "child"; /* C(2) */ do_stuff(arg); /* C(2) */ exit(0); /* C(2) */ } else { /* parent */ return pid; /* C(2) */ } } /* C(-) */ int wait_for_child(pid_t pid) { int status; pid_t r; for (;;) { fprintf(stderr, "%s: waiting for child\n", me); if ((r = waitpid(pid, &status, 0)) < 0) { if (errno == EINTR) continue; perror("waitpid"); exit(1); } if (r != pid) { fprintf(stderr, "Unexpected pid returned b waitpid(): %d expecting %d\n", (int)r, (int)pid); continue; } if (WIFEXITED(status)) { fprintf(stderr, "%s: child exited with status %d\n", me, WEXITSTATUS(status)); return WEXITSTATUS(status); } if (WIFSIGNALED(status)) { fprintf(stderr, "%s: child died with signal %d\n", me, WTERMSIG(status)); return 128+WTERMSIG(status); } } /* NOTREACHED */ } /* C(-) */ int main(int argc, char **argv) { pid_t pid; pid = start_child(argv[1]); /* C(2) */ do_stuff(argv[2]); /* C(2) */ wait_for_child(pid); /* C(2) */ return 0; /* C(2) */ } ggcov-0.8.4/test/test007/0000777000175000017500000000000011613000477012021 500000000000000ggcov-0.8.4/test/test007/runtest0000755000175000017500000000031411613000477013365 00000000000000#!/usr/bin/env bash . ../common.sh init "nonlocal flow control using C setjmp/longjmp" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 3 run foo 4 run_tggcov -N foo.c compare_counts foo.c ggcov-0.8.4/test/test007/manifest0000644000175000017500000000160711613000477013472 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test007/README0000644000175000017500000000010211613000477012606 00000000000000 Tests non-local flow control transfer via C setjmp()/longjmp(). ggcov-0.8.4/test/test007/foo.c0000644000175000017500000000242211613000477012664 00000000000000#include /* C(-) */ #include /* C(-) */ #include /* C(-) */ /* C(-) */ static jmp_buf jb; /* C(-) */ /* C(-) */ void function_one(int x) { printf(" function_one begins\n"); /* C(4) */ if (!x) /* C(4) */ longjmp(jb, 1); /* C(1) */ printf(" ...ends\n"); /* C(3) */ } /* C(-) */ void function_two(int x) { printf(" function_two begins\n"); /* C(3) */ if (!x) /* C(3) */ longjmp(jb, 2); /* C(1) */ printf(" ...ends\n"); /* C(2) */ } /* C(-) */ void function_three(int x) { printf(" function_three begins\n"); /* C(2) */ if (!x) /* C(2) */ longjmp(jb, 3); /* C(1) */ printf(" ...ends\n"); /* C(1) */ } /* C(-) */ int main(int argc, char **argv) { int x; printf("foo running\n"); /* C(4) */ x = atoi(argv[1]); /* C(4) */ if (!setjmp(jb)) { function_one(--x); /* C(4) */ function_two(--x); /* C(3) */ function_three(--x); /* C(2) */ printf("function completed\n"); /* C(1) */ } else { printf("long jump triggered\n"); /* C(3) */ } x += 4; /* C(4) */ return 0; /* C(4) */ } ggcov-0.8.4/test/test008/0000777000175000017500000000000011613000477012022 500000000000000ggcov-0.8.4/test/test008/runtest0000755000175000017500000000105011613000477013364 00000000000000#!/usr/bin/env bash . ../common.sh init "multiple blocks per line using C for() loop" compile_c foo.c link foo foo.o subtest 0 run foo 0 12 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c subtest 1 run foo 1 12L32 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c subtest 3 run foo 3 12L32L32L32 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c subtest 10 run foo 10 12L32L32L32L32L32L32L32L32L32L32 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c ggcov-0.8.4/test/test008/manifest0000644000175000017500000000160711613000477013473 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test008/README0000644000175000017500000000012411613000477012613 00000000000000 Tests how the multiple blocks in a for(;;) statement on a single line are counted. ggcov-0.8.4/test/test008/foo.c0000644000175000017500000000204111613000477012662 00000000000000#include /* C(-) */ #include /* C(-) */ #include /* C(-) */ /* C(-) */ char blocktrace[1024]; /* C(-) */ char *bp = blocktrace; /* C(-) */ /* C(-) */ int main(int argc, char **argv) { int N; int i; printf("foo running\n"); /* C(1,0) C(2,1) C(3,3) C(4,10) */ N = atoi(argv[1]); /* C(1,0) C(2,1) C(3,3) C(4,10) */ for (*bp++ = '1', i = 0 ; *bp++ = '2', i < N ; *bp++ = '3', i++) { /* C(1,0) C(3,1) C(7,3) C(18,10) */ printf("loop: %d\n", i); /* C(0,0) C(1,1) C(4,3) C(14,10) */ *bp++ = 'L'; /* C(0,0) C(1,1) C(4,3) C(14,10) */ } printf("blocktrace[] = \"%s\"\n", blocktrace); /* C(1,0) C(2,1) C(3,3) C(4,10) */ if (argc > 1) { printf("expected blocktrace[] = \"%s\"\n", argv[2]); if (strcmp(blocktrace, argv[2])) { fprintf(stderr, "%s: blocktrace mismatch: got \"%s\" expected \"%s\"\n", argv[0], blocktrace, argv[2]); return 1; } } return 0; /* C(1,0) C(2,1) C(3,3) C(4,10) */ } ggcov-0.8.4/test/filter-expected.pl0000644000175000017500000000661211453570563014167 00000000000000#!/usr/bin/perl # # Input: on stdin, either a source file (e.g. foo.c) # or a tggcov or gcov output file (e.g. foo.c.tggcov) # Output: on stdout, a filtered gcov output file # Options: # --subtest=ST specifies the (string) name of a subtest, default "" # # Each line of the input may end in a comment of the following forms: # # /* C(n) */ the expected count for this line # is n where n >= 0 # /* C(-) */ this line should be uninstrumented (or # suppressed, which is not distinguished # from uninstrumented in tggcov). # /* C(n,ST) */ like C(n) but only for the given subtest ST. # # No comment implies that we don't care about the # line's coverage count. # # When reading a gcov file, the count emitted will be the # gcov file's count if the line contains a C() comment, # otherwise "." meaning "don't care". # # When reading a source file, the count emitted will be the # count specified in the comment if the line contains a # C() comment, otherwise "." meaning "don't care". # use strict; use warnings; my $debug = 0; my $lineno = 0; my $subtest; my $gcov_mode; foreach (@ARGV) { if (m/^--debug$/) { $debug++; } elsif (m/^--subtest=(.*)$/) { $subtest = $1; } else { die "Unknown option $_"; } } while () { print STDERR "> $_" if ($debug); chomp; if (!defined($gcov_mode)) { # detect whether the input is already a {tg,}gcov output $gcov_mode = 0; $gcov_mode = 1 if (m/^ -: [01]:/); print STDERR "gcov_mode=$gcov_mode\n" if ($debug); } my $line; my $count; my $new_count; if ($gcov_mode) { my $rem; ($count, $line, $rem) = m/^([ #0-9-]{9}:)([ 0-9]{5}:)(.*)$/; next unless defined($rem); next if ($line eq ' 0:'); $_ = $rem; } else { $lineno++; $line = sprintf("%5d:", $lineno); } # split the line into leading text, a magical comment, # and trailing text, any of which can be the empty string. my $leading; my ($comment, $trailing) = m/(\/\* [^*\/]+ \*\/)(\s*)$/; if (defined($comment)) { $leading = $`; } else { $leading = $_; $comment = ""; $trailing = ""; } print STDERR "leading=\"$leading\" comment=\"$comment\" trailing=\"$trailing\"\n" if ($debug); # parse any comment that may be present if ($comment ne '') { my $s = $comment; $s =~ s/^\/\* //; $s =~ s/ \*\/$//; foreach my $w (split(/\s+/,$s)) { my ($fn, $args) = ($w =~ m/^([A-Za-z]+)\(([^)]+)\)$/); next unless defined($args); print STDERR "word=\"$w\" fn=\"$fn\" args=\"$args\"\n" if ($debug); my @argv = split(/,/, $args); if ($fn eq 'C') { if (defined($subtest) && scalar(@argv) > 1 && $subtest ne $argv[1]) { print STDERR "failed subtest filter, skipping\n" if ($debug); next; } die "got subtest filter but no subtest specified" if (scalar(@argv) > 1 && !defined($subtest)); $argv[0] = '#####' if ($argv[0] eq '0'); $new_count = sprintf("%9s:", $argv[0]); print STDERR "new_count=\"$new_count\"\n" if ($debug); } } } # resolve which count to emit if ($gcov_mode) { # don't match (undef) lines without a magic C() comment */ $new_count = (defined($new_count) ? $count : undef); } $new_count = ' .:' unless defined($new_count); print STDERR "new_count=\"$new_count\"\n" if ($debug); print $new_count . $line . $leading . $comment . $trailing . "\n"; } ggcov-0.8.4/test/test001/0000777000175000017500000000000011613000477012013 500000000000000ggcov-0.8.4/test/test001/runtest0000755000175000017500000000032611613000476013361 00000000000000#!/usr/bin/env bash . ../common.sh init "simple C line coverage test" compile_c foo.c link foo foo.o run foo 1 run foo 2 run foo 23 423 run_gcov foo.c run_tggcov foo.c compare_lines foo.c compare_counts foo.c ggcov-0.8.4/test/test001/manifest0000644000175000017500000000160711613000476013463 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c README ggcov-0.8.4/test/test001/README0000644000175000017500000000002011613000477012577 00000000000000 A simple test. ggcov-0.8.4/test/test001/foo.c0000644000175000017500000000213611613000476012657 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ int function_one(int x); /* C(-) */ /* C(-) */ int function_two(int x) { return function_one(x>>1); /* C(7) */ } /* C(-) */ int function_three(int x) { x += 4; /* C(4) */ x -= 5; /* C(4) */ x++; /* C(4) */ return x>>1; /* C(4) */ } /* C(-) */ int function_one(int x) { if (x & 1) /* C(11) */ x += function_two(x); /* C(7) */ else x += function_three(x); /* C(4) */ return x; /* C(11) */ } /* C(-) */ int unused_function(int x) { x += 24; /* C(0) */ x -= 56; /* C(0) */ return x; /* C(0) */ } /* C(-) */ int main(int argc, char **argv) { int x, y; int i; for (i = 1 ; i < argc ; i++) { x = atoi(argv[i]); /* C(4) */ if (x == 42) /* C(4) */ unused_function(x); /* C(0) */ y = function_one(x); /* C(4) */ printf("%d -> %d\n", x, y); /* C(4) */ } return 0; /* C(3) */ } ggcov-0.8.4/test/test030/0000777000175000017500000000000011613000502012002 500000000000000ggcov-0.8.4/test/test030/runtest0000755000175000017500000000161011613000502013346 00000000000000#!/usr/bin/env bash . ../common.sh init "compiledir with yacc" ( echo "#line 1 \"./bar.y\"" ; cat bar.y ) > bar.c compile_c bar.c compile_c foo.c link foo foo.o bar.o run foo 1 run foo 2 run foo 23 423 run_gcov bar.y # All the actual source lines are in bar.y and bar.c is # just an intermediate file left over from the build # process. Thus, tggcov should produce an annotation # file only for bar.y and never for bar.c, and this # should be true regardless of which of bar.c and bar.y # appear on the commandline or their order. tggcov_check1() { rm -f bar.*.tggcov* run_tggcov "$@" echo "Files: " ; ls -tr1 bar* [ -f bar.y.tggcov ] || fail "no bar.y.tggcov produced" [ ! -f bar.c.tggcov ] || fail "bar.c.tggcov mistakenly produced" } tggcov_check1 bar.y # tggcov_check1 bar.c tggcov_check1 bar.c bar.y tggcov_check1 bar.y bar.c compare_lines bar.y compare_counts bar.y ggcov-0.8.4/test/test030/bar.y0000644000175000017500000000077711613000502012667 00000000000000int function_one(int x); /* C(-) */ /* C(-) */ int function_two(int x) { return function_one(x>>1); /* C(7) */ } /* C(-) */ int function_three(int x) { x += 4; /* C(4) */ x -= 5; /* C(4) */ x++; /* C(4) */ return x>>1; /* C(4) */ } /* C(-) */ int function_one(int x) { if (x & 1) /* C(11) */ x += function_two(x); /* C(7) */ else x += function_three(x); /* C(4) */ return x; /* C(11) */ } ggcov-0.8.4/test/test030/manifest0000644000175000017500000000161511613000502013452 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2005 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: manifest,v 1.3 2010-05-09 05:37:15 gnb Exp $ # runtest foo.c bar.y README ggcov-0.8.4/test/test030/README0000644000175000017500000000006111613000502012573 00000000000000Calculating compiledir with compiled yacc output ggcov-0.8.4/test/test030/foo.c0000644000175000017500000000114111613000502012642 00000000000000#include /* C(-) */ #include /* C(-) */ /* C(-) */ int function_one(int x); /* C(-) */ int unused_function(int x) { x += 24; /* C(0) */ x -= 56; /* C(0) */ return x; /* C(0) */ } /* C(-) */ int main(int argc, char **argv) { int x, y; int i; for (i = 1 ; i < argc ; i++) { x = atoi(argv[i]); /* C(4) */ if (x == 42) /* C(4) */ unused_function(x); /* C(0) */ y = function_one(x); /* C(4) */ printf("%d -> %d\n", x, y); /* C(4) */ } return 0; /* C(3) */ } ggcov-0.8.4/doc/0000777000175000017500000000000011613000475010377 500000000000000ggcov-0.8.4/doc/ggcov-webdb.10000644000175000017500000002030411453570563012576 00000000000000.\" .\" ggcov - A GTK frontend for exploring gcov coverage data .\" Copyright (c) 2005 Greg Banks .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .\" $Id: ggcov-webdb.1,v 1.4 2010-05-09 05:37:14 gnb Exp $ .\" .TH GGCOV-WEBDB "1" "May 2005" "GGCOV" "Greg Banks" .SH NAME ggcov\-webdb \- generate intermediate database for ggcov web interface .SH SYNOPSIS \fBggcov\-webdb\fP [[\fB\-r\fP] \fIdirectory\fP|\fIfile\fP] ... .SH DESCRIPTION .PP \fBGgcov\-webdb\fP generates an intermediate database and tree of source files from a development directory, in the form of a tarball. The files in this tarball are later used by the \fBggcov\fP PHP pages to present test coverage data to WWW browsers. .PP Test coverage data is produced by C and C++ programs compiled with \fIgcc \-fprofile-arcs \-ftest-coverage\fP. So the combination of \fBggcov\-webdb\fP and the \fBggcov\fP PHP pages is basically a WWW replacement for the \fBgcov\fP program that comes with \fBgcc\fP. .PP The intermediate database approach is used to handle the common case where the development machine and the web server machine are separate. The database contains coverage data in an indexed, platform\-independent, PHP\-friendly form. Because the database format is platform\-independant the PHP pages can be deployed on web servers of a different architecture to the development machines. In fact the \fBggcov\fP web pages support any web server that meets the following criteria: .TP \(bu supports PHP version 4.3 or later, and .TP \(bu provides the \fBdba\fP extension with the \fBdb4\fP provider (which \fBggcov\fP uses to read the intermediate database), and .TP \(bu provides the \fBgd\fP extension (which \fBggcov\fP uses to generate the bargraphs on the Summary page). .PP The \fIsourceforge.net\fP project web server is an example of such a server. .PP \fBGgcov-webdb\fP produces a gzipped tarball containing the intermediate database itself and copies of all the source files which are mentioned in the database. This is all the information that the \fBggcov\fP web pages need, in one bundle which is convenient to copy from the development machine to the web server. Usually this tarball would be extracted into a subdirectory of \fI/var/ggcov/tests/\fP on the web server. .PP Arguments are used to specify how to find coverage data files. The arguments can combinations of: .IP \fIdirectory\fP The directory is scanned for source files, which are handled as if they had been specified on the commandline (except that missing coverage data files are silently ignored). If the \fB\-r\fP flag is in effect, sub\-directories are scanned recursively. Multiple directories can be specified and are scanned in the order given. .IP \fIexecutable\fP The executable file is scanned for debugging records which contain source file names, and each source file which exists is handled as if it had been specified on the command line (except that missing coverage data files are silently ignored). Any shared libraries on which the executable depends are also scanned. Multiple executables can be specified and are scanned in the order given. This feature is only available on some platforms (for example, i386\-linux). .IP \fIsource-file\fP Is any regular file ending in one of the file extensions \fI.c\fP, \fI.cc\fP, \fI.cxx\fP, \fI.cpp\fP, or \fI.C\fP. Source files are matched to their corresponding coverage data files (\fI.gcno\fP and \fI.gcda\fP files, or \fI.bb\fP, \fI.bbg\fP, and \fI.da\fP files with older compilers) and object files by searching for a file of the same basename and the appropriate extension first in the same directory as the source file and then in all the directories specified on the command line (in the order they were specified). .SH OPTIONS .TP \fB\-f\fP \fItest.tgz\fP, \fB\-\-output\-file\fP=\fItest.tgz\fP Generate output to filename \fItest.tgz\fP instead of the default \fBggcov.webdb.tgz\fP. The special filename \fB-\fP can be used to generate output to stdout. .TP \fB\-o\fP \fIdir\fP, \fB\-\-object\-directory\fP=\fIdir\fP Add the directory \fIdir\fP to the search path for object files and coverage data files. .TP \fB\-r\fP, \fB\-\-recursive\fP When a directory is specified on the command line, search for coverage data files recursively in all child directories. .TP \fB\-X\fP \fIsymbols\fP, \fB\-\-suppress\-ifdef=\fP\fIsymbols\fP Do not include in statistics or summaries, code inside C pre-processor directives which depend on any of the given \fIsymbols\fP. One or more symbols may be given, separated by commas or whitespace. \fBGgcov\-webdb\fP understands the following subset of the C pre-processor command set: .IP \(bu \fI#if SYMBOL\fP .br \(bu \fI#if defined(SYMBOL)\fP .br \(bu \fI#ifdef SYMBOL\fP .br \(bu \fI#ifndef SYMBOL\fP .br \(bu \fI#else\fP .br \(bu \fI#endif\fP .br .IP For example, \fB-X DEBUG\fP will suppress the \fIfprintf()\fP call in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; #ifdef DEBUG fprintf(stderr, "my_function: x=%u\\n", x); #endif return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Y\fP \fIwords\fP, \fB\-\-suppress\-comment=\fP\fIwords\fP Do not include in statistics or summaries, code on lines which also contains a single-line comment comprising only one of the given \fIwords\fP. One or more symbols may be given, separated by commas or whitespace. For example, specifying \fB-Y IGNOREME\fP will suppress the \fIassert()\fP in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; assert(x >= 42); /* IGNOREME */ return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Z\fP \fIstartword,endword,...\fP .TP \fB\-\-suppress\-comment-between=\fP\fIstartword,endword,...\fP Do not include in statistics or summaries, code on lines between those containing a single-line comment comprising only \fIstartword\fP and the next single-line comment comprising only \fIendword\fP. Two or more symbols may be given, in pairs, separated by commas or whitespace. For example, \fB-Z STARTIGNORE,ENDIGNORE\fP will suppress the entire function in this code: .IP .nf /* STARTIGNORE */ unsigned int my_function(unsigned int x) { x += 42; return x; } // ENDIGNORE .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .SH EXAMPLES .PP Generate intermediate database for all the available source in the executable \fBa.out\fP (on some platforms only), and install as test \fBfoo\fP in the default tests location. .IP .B mkdir /var/ggcov/tests/foo .br .B ggcov\-webdb -f - a.out | .br .B " " (cd /var/ggcov/tests/foo ; tar \-xzf \- ) .br .PP Generate intermediate database for all the C source in the current directory. .IP .B ggcov\-webdb *.c .PP Generate intermediate database for all the C source in one directory where the object files and test coverage data files are in different directories: .IP .B ggcov\-webdb /foo/obj/ /foo/cov\-data/ /foo/src/ .SH AUTHOR Written by Greg Banks .IR . .SH COPYRIGHT ggcov is Copyright \(co 2001\-2005 Greg Banks \fI\fP. .br This is free software; see the COPYING file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ggcov-0.8.4/doc/HOWTO.web0000644000175000017500000000770011453570563011732 00000000000000How To Install and Configure the Ggcov Web Pages ================================================ The ggcov web pages are a set of PHP code which generate a small set of interconnected interactive HTML pages which allow a user to explore test code coverage data using a standard Web browser. Browser Compatibility --------------------- The ggcov PHP pages are compliant HTML4 and (currently) use no Javascript. They have only been tested on the Mozilla Firefox browser, but are designed to be browser agnostic and should work in any standards- compliant browser. I don't know whether they will work in MSIE. Server Compatibility -------------------- The ggcov PHP pages require a web server which * supports PHP version 4.3 or later, and * provides the dba extension with the db4 provider (which ggcov uses to read the intermediate database), and * provides the gd extension (which ggcov uses to generate the bargraphs on the Summary page). The intermediate database format is designed to be platform- independant so that the web server can be a different platform to the development machine. The pages are intended to be compatible with both PHP 4.3 and PHP 5. The pages have been tested using PHP 4.3.9 and Apache 2.0 on an i386 Linux machine. Installing, If You Control the Web Server ----------------------------------------- If you control the web server, i.e. you have the ability to install software, installation should be easy. 1. install the ggcov-web RPM, e.g. www# rpm -Uvh ggcov-web-fc3-0.4-1.i386.rpm 2. copy the file /usr/share/doc/ggcov-web-VERSION/ggcov.conf into the /etc/httpd/conf.d/ directory (Apache 2) or insert the contents into httpd.conf (Apache 1.3). 3. restart the web server, e.g. www# service httpd restart 4. install one or more tests in subdirectories of /var/ggcov/web/tests/, e.g. dev$ ggcov-webdb *.c dev$ scp ggcov.webdb.tgz root@www:/tmp web# cd /var/ggcov/web/tests web# mkdir foo ; cd foo web# tar -xzf /tmp/ggcov.webdb.tgz 5. point your browser at http://yourserver.com/ggcov/ Note that the web pages do not need write permission for any files in the test directories; the test data is completely read-only. Installing, If You Don't Control the Web Server ----------------------------------------------- This technique works when you don't control the web server but you do have a shell account and control over some subset of the web site. It assumes that .htaccess files have been enabled. For the purposes of this example let's assume you are a developer on a sourceforge.net project called "foobar"; the prompt "shell$" means commands you run on shell.sourceforge.net and the prompt "dev$" means commands you run on your development machine. 1. from the ggcov build directory, install the PHP files into a directory you own which is outside the directory visible to the web server, e.g. shell$ cd software/ggcov-0.4/ shell$ cd php ; make phpdir=/home/groups/f/fo/foobar/php install 2. the subset of those files which need to be seen by the web server are located in the $phpdir/www/ directory, so move, copy or link those into the directory the web server sees, e.g. shell$ cd /home/groups/f/fo/foobar/ shell$ mv php/www htdocs/ggcov 3. configure the PHP include path and the ggcov test directory by adding a .htaccess file, e.g. shell$ cd /home/groups/f/fo/foobar/ shell$ cat > htdocs/ggcov/.htaccess : Abbrev Number: 1 (DW_TAG_compile_unit) DW_AT_stmt_list : 0 DW_AT_high_pc : 0x8048880 134514816 DW_AT_low_pc : 0x80486c0 134514368 DW_AT_name : (indirect string, offset: 0x321): foo.c DW_AT_comp_dir : (indirect string, offset: 0x62c): /home/gnb/proj/ggcov/ggcov-dev/test/test002 DW_AT_producer : (indirect string, offset: 0xa70): GNU C 3.3.2 20031022 (Red Hat Linux 3.3.2-1) DW_AT_language : 1 (ANSI C) [...] The interesting abbrev is DW_TAG_compile_unit, which has the filename and directory for the compilation unit. .debug_line Contains line numbering information. Like everything else in DWARF this appears to be amazingly complex; a state machine is fed opcodes to generate the line numbering information, rather than just encoding it. The section comprises multiple concatenated parts each of which starts with a LineInfo struct. typedef struct { unsigned char li_length [4]; unsigned char li_version [2]; unsigned char li_prologue_length [4]; unsigned char li_min_insn_length [1]; unsigned char li_default_is_stmt [1]; unsigned char li_line_base [1]; unsigned char li_line_range [1]; unsigned char li_opcode_base [1]; } DWARF2_External_LineInfo; The li_length field contains the length in bytes of the part, starting the byte *after* the length itself, and including the remainder of the LineInfo structure and all the other information following it. This appears to be designed to allow skipping through multiple of these structures without completely parsing them (which is GOOD!) while still preserving simple concatenation semantics in the linker. The last field li_opcode_base defines the number of different opcodes used...and the LineInfo structure is immediately followed by that many opcode lengths, each an unsigned byte. Then we get the directory table, which is simply a number of abutted nul-terminated strings followed by a nul byte to mark the end of the table. Indexes into this table are used by the following file name table. The filename table comprises a number of tuples (name, dir, time, size). The name field is a nul-terminated string, the other fields are variable length encoded unsigned integers. The dir field is a 1-based index into the directory table (0 seems to mean "empty"). A nul byte marks the end of the file table. After this is a sequence of opcodes which when fed through the right state machine will generate the mappings between addresses and lines. .debug_str Contains strings for the other sections to point into. The DW_FORM_strp form is an offset into this section. The strings are abutted and nul- teminated. Here's me picking apart a binary dump of an actual executable's .debug_line section. foo: file format elf32-i386 Contents of section .debug_line: 0000 6e010000 DWARF2_External_LineInfo{ length = 366 0200 version = 2 3801 0000 prologue length = 312 01 min_insn_length = 1 01 default_is_stmt = 1 fb line_base = -5 0e line_range = 14 0a opcode_base = 10 } 000f 00 opcode arg lengths 0010 01010101 00000001 directory[0]="/usr/lib/gcc-lib/i386-redhat-linux/3.3.2" 2f757372 2f6c6962 ......../usr/lib 0020 2f676363 2d6c6962 2f693338 362d7265 /gcc-lib/i386-re 0030 64686174 2d6c696e 75782f33 2e332e32 dhat-linux/3.3.2 0040 2f696e63 6c756465 00 directory[1]="/usr/include/bits" 2f7573 722f696e /include./usr/in 0050 636c7564 652f6269 747300 directory[2]="/usr/include" 2f 7573722f clude/bits./usr/ 0060 696e636c 75646500 directory[3]="/usr/include/sys" 2f757372 2f696e63 include./usr/inc 0070 6c756465 2f737973 00 00 end of directory table 666f 6f2e6300 [0]name="foo.c" dir=0 time=0 size=0 0080 000000 73 74646465 662e6800 010000 [1]name="stddef.h" dir=1 time=0 size=0 02 74 [2]name="types.h" dir=2 time=0 size=0 0090 79706573 2e680002 0000 7374 64696f2e [3]name="stdio.h" dir=3 time=0 size=0 00a0 68000300 00 776368 61722e68 00030000 [4]name="wchar.h" dir=3 time=0 size=0 00b0 5f475f63 6f6e6669 672e6800 03000067 _G_config.h....g 00c0 636f6e76 2e680003 00007374 64617267 conv.h....stdarg 00d0 2e680001 00006c69 62696f2e 68000300 .h....libio.h... 00e0 00737464 6c69622e 68000300 00747970 .stdlib.h....typ 00f0 65732e68 00040000 74696d65 2e680003 es.h....time.h.. 0100 00007369 67736574 2e680002 00007365 ..sigset.h....se 0110 6c656374 2e680004 00007469 6d652e68 lect.h....time.h 0120 00020000 73636865 642e6800 02000070 ....sched.h....p 0130 74687265 61647479 7065732e 68000200 threadtypes.h... 0140 00 00 end of filename table. 0005 02c08604 08 146408 aa640864 ..........d..d.d 0150 e56408b8 640864e5 6408b864 0864e508 .d..d.d.d..d.d.. 0160 ba08b808 56026010 653a2b08 63020200 ....V.`.e:+.c... 0170 0101 .. ggcov-0.8.4/doc/ggcov.10000644000175000017500000001647711561777115011537 00000000000000.\" .\" ggcov - A GTK frontend for exploring gcov coverage data .\" Copyright (c) 2003-2004 Greg Banks .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .\" $Id: ggcov.1,v 1.7 2010-05-09 05:37:14 gnb Exp $ .\" .TH GGCOV "1" "May 2005" "GGCOV" "Greg Banks" .SH NAME ggcov \- a GNOME frontend for exploring gcov coverage data .SH SYNOPSIS \fBggcov\fP [\fIGNOME options\fP] [[\fB\-r\fP] \fIdirectory\fP|\fIfile\fP] ... .SH DESCRIPTION .PP \fBGgcov\fP is a GTK+ GUI for exploring test coverage data produced by C and C++ programs compiled with \fIgcc \-fprofile-arcs \-ftest-coverage\fP. So it's basically a GUI replacement for the \fBgcov\fP program that comes with \fBgcc\fP. .PP \fBGgcov\fP understands all the standard GTK+ and GNOME options, such as \fB\-display\fP and \fB\-disable\-crash\-dialog\fP. All other arguments are used to specify how to find coverage data files. The arguments can combinations of: .IP \fIdirectory\fP The directory is scanned for source files, which are handled as if they had been specified on the commandline (except that missing coverage data files are silently ignored). If the \fB\-r\fP flag is in effect, sub\-directories are scanned recursively. Multiple directories can be specified and are scanned in the order given. .IP \fIexecutable\fP The executable file is scanned for debugging records which contain source file names, and each source file which exists is handled as if it had been specified on the command line (except that missing coverage data files are silently ignored). Any shared libraries on which the executable depends are also scanned. Multiple executables can be specified and are scanned in the order given. This feature is only available on some platforms (for example, i386-linux). .IP \fIsource-file\fP Is any regular file ending in one of the file extensions \fI.c\fP, \fI.cc\fP, \fI.cxx\fP, \fI.cpp\fP, or \fI.C\fP. Source files are matched to their corresponding coverage data files (\fI.gcno\fP and \fI.gcda\fP files, or \fI.bb\fP, \fI.bbg\fP, and \fI.da\fP files with older compilers) and object files by searching for a file of the same basename and the appropriate extension first in the same directory as the source file and then in all the directories specified on the command line (in the order they were specified). .PP If no arguments are given, \fBggcov\fP shows a file selection dialog so you can select one directory, executable, or source file. .PP Directories, executables, or source files can also be added after \fBggcov\fP is started by dragging and dropping them from a GNOME Nautilus window onto any \fBggcov\fP window. .SH OPTIONS .TP \fB\-o\fP \fIdir\fP, \fB\-\-object\-directory\fP=\fIdir\fP Add the directory \fIdir\fP to the search path for object files and coverage data files. .TP \fB-p\fP \fIdir\fP, \fB\-\-gcda\-prefix\fP=\fIdir\fP Look for runtime coverage data files (\fI.gcda\fP files) underneath the directory \fIdir\fP instead of next to the corresponding \fI.c\fP files. See the example in the \fBggcov-run\fP(1) manpage. .TP \fB\-r\fP, \fB\-\-recursive\fP When a directory is specified on the command line, search for coverage data files recursively in all child directories. .TP \fB\-w\fP \fIwindows\fP, \fB\-\-initial\-windows\fP=\fIwindows\fP Open the named windows when \fBggcov\fP starts. Window names are \fIsummary\fP, \fIfiles\fP, \fIfunctions\fP, \fIcalls\fP, \fIcallbutterfly\fP, \fIcallgraph\fP, \fIlego\fP, \fIsource\fP, and \fIreports\fP. The default window is \fIsummary\fP. .TP \fB\-X\fP \fIsymbols\fP, \fB\-\-suppress\-ifdef=\fP\fIsymbols\fP Do not include in statistics or summaries, code inside C pre-processor directives which depend on any of the given \fIsymbols\fP. One or more symbols may be given, separated by commas or whitespace. \fBGgcov\fP understands the following subset of the C pre-processor command set: .IP \(bu \fI#if SYMBOL\fP .br \(bu \fI#if defined(SYMBOL)\fP .br \(bu \fI#ifdef SYMBOL\fP .br \(bu \fI#ifndef SYMBOL\fP .br \(bu \fI#else\fP .br \(bu \fI#endif\fP .br .IP For example, \fB-X DEBUG\fP will suppress the \fIfprintf()\fP call in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; #ifdef DEBUG fprintf(stderr, "my_function: x=%u\\n", x); #endif return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Y\fP \fIwords\fP, \fB\-\-suppress\-comment=\fP\fIwords\fP Do not include in statistics or summaries, code on lines which also contains a single-line comment comprising only one of the given \fIwords\fP. One or more symbols may be given, separated by commas or whitespace. For example, specifying \fB-Y IGNOREME\fP will suppress the \fIassert()\fP in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; assert(x >= 42); /* IGNOREME */ return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Z\fP \fIstartword,endword,...\fP .TP \fB\-\-suppress\-comment-between=\fP\fIstartword,endword,...\fP Do not include in statistics or summaries, code on lines between those containing a single-line comment comprising only \fIstartword\fP and the next single-line comment comprising only \fIendword\fP. Two or more symbols may be given, in pairs, separated by commas or whitespace. For example, \fB-Z STARTIGNORE,ENDIGNORE\fP will suppress the entire function in this code: .IP .nf /* STARTIGNORE */ unsigned int my_function(unsigned int x) { x += 42; return x; } // ENDIGNORE .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .SH EXAMPLES .PP View coverage data for all the available source in an executable (on some platforms only): .IP .B ggcov a.out .PP View coverage data for all the C source in the current directory, suppressing code which depends on the symbols \fBDEBUG\fP or \fBTEST\fP: .IP .B ggcov -X DEBUG,TEST *.c .PP View coverage data for all the C source in one directory where the object files and test coverage data files are in different directories: .IP .B ggcov /foo/obj/ /foo/cov\-data/ /foo/src/ .SH AUTHOR Written by Greg Banks .IR . .SH COPYRIGHT ggcov is Copyright \(co 2001\-2005 Greg Banks \fI\fP. .br This is free software; see the COPYING file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO .PP \fBggcov-run\fP(1). ggcov-0.8.4/doc/Makefile.in0000644000175000017500000003032011612762277012374 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.7 2010-05-09 05:37:14 gnb Exp $ # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU_DEFINES = @CPU_DEFINES@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DB_CPPFLAGS = @DB_CPPFLAGS@ DB_LIBS = @DB_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCONF = @GCONF@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_FALSE = @GCONF_FALSE@ GCONF_LIBS = @GCONF_LIBS@ GCONF_TRUE = @GCONF_TRUE@ GGCOV_CLI_CFLAGS = @GGCOV_CLI_CFLAGS@ GGCOV_CLI_LIBS = @GGCOV_CLI_LIBS@ GGCOV_GLADE_FILE = @GGCOV_GLADE_FILE@ GGCOV_GUI_CFLAGS = @GGCOV_GUI_CFLAGS@ GGCOV_GUI_LIBS = @GGCOV_GUI_LIBS@ GREP = @GREP@ GUIPROG = @GUIPROG@ GUI_FALSE = @GUI_FALSE@ GUI_TRUE = @GUI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OS_DEFINES = @OS_DEFINES@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ REDHAT_FALSE = @REDHAT_FALSE@ REDHAT_TRUE = @REDHAT_TRUE@ RPM_SPEC_CONFIGURE_ARGS = @RPM_SPEC_CONFIGURE_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WEBPROG = @WEBPROG@ WEB_FALSE = @WEB_FALSE@ WEB_TRUE = @WEB_TRUE@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @GUI_TRUE@GUI_MANS = ggcov.1 @WEB_TRUE@WEB_MANS = ggcov-webdb.1 man_MANS = $(GUI_MANS) $(WEB_MANS) \ git-history-coverage.1 ggcov-run.1 EXTRA_DIST = bbg-file-format.txt dbus-decode-gcov.txt \ dwarf-file-format.txt HOWTO.web ggcov.1 \ ggcov-webdb.1 git-history-coverage.1 \ ggcov-run.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-man1 \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am uninstall-man \ uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ggcov-0.8.4/doc/ggcov-run.10000644000175000017500000001136511561777115012330 00000000000000.\" .\" ggcov - A GTK frontend for exploring gcov coverage data .\" Copyright (c) 2003-2011 Greg Banks .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .TH GGCOV-RUN "1" "May 2011" "GGCOV" "Greg Banks" .SH NAME ggcov-run \- run an instrumented test program .SH SYNOPSIS \fBggcov-run\fP [\fIoptions\fP] [\fB--\fP] \fIprogram\fP \fIargs...\fP .SH DESCRIPTION .PP \fBGgcov-run\fP can be used to run a test program, instrumented using \fBgcc --coverage\fP when built, under certain conditions. It's use is entirely optional, as the default behaviour of the gcc instrumention is designed to be useful under most conditions. .PP \fBGgcov-run\fP takes as arguments a program and it's arguments, and runs the program with some behavioural modifications (in the manner of \fBstrace\fP). If given no options, the program is run without any modifications. .SH GCDA FILE LOCATIONS .PP One problem with the default behaviour of the gcc instrumentation involves the locations of coverage data. Instrumented test programs will read, modify and re-write \fI.gcda\fP files when the program exits. The locations of those files are chosen by the compiler at compile time; the files will be placed in the build directory next to the corresponding \fI.c\fP file. The compiler saves this information in the \fI\.o\fP file. For example, if you compile the file \fIfoo.c\fP in the directory \fI/home/me/software/quux\fP, then the pathname \fI/home/me/software/quux/foo.gcda\fP is hardcoded in the test program. Of course, programs that examine coverage data, like \fBggcov\fP, look for the \fI.gcda\fP files there. .PP For many test applications this works just fine. Problems arise however when the instrumented program needs to be run on another machine, or as another userid, or the build directory is volatile, or in any other test scenario where the build directory either does not exist or is not writable by the running test program. In these cases, you need to do some ad-hoc file moving before and after testing in order to get the \fI.gcda\fP files in the right location on the right machine with the right permissions. .PP A better approach is to use \fBggcov-run\fP with the \fB--gcda-prefix\fP option. This option takes as a value a directory which is prepended to the pathname of each \fI.gcda\fP file the test program accesses. So, continuing the above example, running the test program like this: .PP .EX me$ ggcov-run --gcda-prefix=/tmp/gcda ./testprogram test-args... .EE .PP will result in a \fI.gcda\fP file being written to \fI/tmp/gcda/home/me/software/quux/foo.gcda\fP. The directory tree will be automatically created as the \fI.gcda\fP files are written, and the file and directory permissions will allow read access for all users. .PP Note that \fBggcov\fP also has a \fB--gcda-prefix\fP option which can be used to search for \fI.gcda\fP files in locations other than the build directory. In our example: .PP .EX me$ cd /home/me/software/quux me$ ggcov --gcda-prefix=/tmp/gcda -r . .EE .SH OPTIONS .TP \fB-p\fP \fIdir\fP, \fB\-\-gcda\-prefix\fP=\fIdir\fP Cause the test program, and any child processes it runs, to redirect any absolute filename ending in \fI.gcda\fP to a filename underneath the directory \fIdir\fP. .SH CAVEATS .PP \fBGgcov-run\fP uses a shared library shim and the \fILD_PRELOAD\fP feature of the runtime linker to intercept certain library calls by the instrumented program. For very good security reasons, \fILD_PRELOAD\fP is disabled for setuid or setgid programs. So if your test program relies on setuid behaviour, \fBggcov-run\fP will not work. One possible workaround is to use \fBsudo\fP or \fBsu\fP to change userid before using \fBggcov-run\fP, like this: .PP .EX me$ sudo -u otheruser ggcov-run --gcda-prefix=/foo ./testprogram .EE .SH AUTHOR Written by Greg Banks .IR . .SH COPYRIGHT ggcov is Copyright \(co 2001\-2011 Greg Banks \fI\fP. .br This is free software; see the COPYING file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO .PP \fBggcov-run\fP(1). ggcov-0.8.4/doc/Makefile.am0000644000175000017500000000224311612762024012354 00000000000000# # ggcov - A GTK frontend for exploring gcov coverage data # Copyright (c) 2001-2011 Greg Banks # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: Makefile.am,v 1.7 2010-05-09 05:37:14 gnb Exp $ # if GUI GUI_MANS= ggcov.1 endif if WEB WEB_MANS= ggcov-webdb.1 endif man_MANS= $(GUI_MANS) $(WEB_MANS) \ git-history-coverage.1 ggcov-run.1 EXTRA_DIST= bbg-file-format.txt dbus-decode-gcov.txt \ dwarf-file-format.txt HOWTO.web ggcov.1 \ ggcov-webdb.1 git-history-coverage.1 \ ggcov-run.1 ggcov-0.8.4/doc/bbg-file-format.txt0000644000175000017500000002661711453570563014041 00000000000000 File format of .bbg file ------------------------ Old Format ---------- Derived from source code of gcc/gcov.c (CVS snapshot 20001120) LUINT32 is a little-endian 32 bit unsigned integer LUINT64 is a little-endian 64 bit unsigned integer { LUINT32 num_blocks LUINT32 num_arcs { LUINT32 num_arcs_per_block { LUINT32 dest LUINT32 flags { on_tree = (1<<0), fake = (1<<1), fall_through = (1<<2) } } [num_arcs_per_block] } [num_blocks] LUINT32 seperator = 0x80000001 }[*] Read LUINT32s from the .da file in this order: (ignoring the first LUINT64 which is a count of the LUINT64s following) foreach function in .bbg file foreach block in function->blocks foreach arcs in block->outarcs where !arc->on_tree LUINT64 arc_count New Format ---------- This format is used in gcc 3.3 and apparently in SuSE's gcc 3.2. The following is from gcc/gcc/gcov-io.h (cvs 20030615). Note that unlike the old format the new format is reasonably well documented, even if only in a C comment. /* File format for coverage information Copyright (C) 1996, 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. Contributed by Bob Manson <manson@cygnus.com>. Completely remangled by Nathan Sidwell <nathan@codesourcery.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* As a special exception, if you link this library with other files, some of which are compiled with GCC, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Coverage information is held in two files. A basic block graph file, which is generated by the compiler, and a counter file, which is generated by the program under test. Both files use a similar structure. We do not attempt to make these files backwards compatible with previous versions, as you only need coverage information when developing a program. We do hold version information, so that mismatches can be detected, and we use a format that allows tools to skip information they do not understand or are not interested in. Numbers are recorded in big endian unsigned binary form. Either in 32 or 64 bits. Strings are stored with a length count and NUL terminator, and 0 to 3 bytes of zero padding up to the next 4 byte boundary. Zero length and NULL strings are simply stored as a length of zero (they have no trailing NUL or padding). int32: byte3 byte2 byte1 byte0 int64: byte7 byte6 byte5 byte4 byte3 byte2 byte1 byte0 string: int32:0 | int32:length char* char:0 padding padding: | char:0 | char:0 char:0 | char:0 char:0 char:0 item: int32 | int64 | string The basic format of the files is file : int32:magic int32:version record* The magic ident is different for the bbg and the counter files. The version is the same for both files and is derived from gcc's version number. Although the ident and version are formally 32 bit numbers, they are derived from 4 character ASCII strings. The version number consists of the single character major version number, a two character minor version number (leading zero for versions less than 10), and a single character indicating the status of the release. That will be 'e' experimental, 'p' prerelease and 'r' for release. Because, by good fortune, these are in alphabetical order, string collating can be used to compare version strings, and because numbers are stored big endian, numeric comparison can be used when it is read as a 32 bit value. Be aware that the 'e' designation will (naturally) be unstable and might be incompatible with itself. For gcc 3.4 experimental, it would be '304e' (0x33303465). When the major version reaches 10, the letters A-Z will be used. Assuming minor increments releases every 6 months, we have to make a major increment every 50 years. Assuming major increments releases every 5 years, we're ok for the next 155 years -- good enough for me. A record has a tag, length and variable amount of data. record: header data header: int32:tag int32:length data: item* Records are not nested, but there is a record hierarchy. Tag numbers reflect this hierarchy. Tags are unique across bbg and da files. Some record types have a varying amount of data. The LENGTH is usually used to determine how much data. The tag value is split into 4 8-bit fields, one for each of four possible levels. The most significant is allocated first. Unused levels are zero. Active levels are odd-valued, so that the LSB of the level is one. A sub-level incorporates the values of its superlevels. This formatting allows you to determine the tag heirarchy, without understanding the tags themselves, and is similar to the standard section numbering used in technical documents. Level values [1..3f] are used for common tags, values [41..9f] for the graph file and [a1..ff] for the counter file. The basic block graph file contains the following records bbg: unit function-graph* unit: header int32:checksum string:source function-graph: announce_function basic_blocks {arcs | lines}* announce_function: header int32:ident int32:checksum string:name string:source int32:lineno basic_block: header int32:flags* arcs: header int32:block_no arc* arc: int32:dest_block int32:flags lines: header int32:block_no line* int32:0 string:NULL line: int32:line_no | int32:0 string:filename The BASIC_BLOCK record holds per-bb flags. The number of blocks can be inferred from its data length. There is one ARCS record per basic block. The number of arcs from a bb is implicit from the data length. It enumerates the destination bb and per-arc flags. There is one LINES record per basic block, it enumerates the source lines which belong to that basic block. Source file names are introduced by a line number of 0, following lines are from the new source file. The initial source file for the function is NULL, but the current source file should be remembered from one LINES record to the next. The end of a block is indicated by an empty filename - this does not reset the current source file. Note there is no ordering of the ARCS and LINES records: they may be in any order, interleaved in any manner. The current filename follows the order the LINES records are stored in the file, *not* the ordering of the blocks they are for. The data file contains the following records. da: {unit function-data* summary:object summary:program*}* unit: header int32:checksum function-data: announce_function arc_counts announce_function: header int32:ident int32:checksum arc_counts: header int64:count* summary: int32:checksum {count-summary}GCOV_COUNTERS count-summary: int32:num int32:runs int64:sum int64:max int64:sum_max The ANNOUNCE_FUNCTION record is the same as that in the BBG file, but without the source location. The ARC_COUNTS gives the counter values for those arcs that are instrumented. The SUMMARY records give information about the whole object file and about the whole program. The checksum is used for whole program summaries, and disambiguates different programs which include the same instrumented object file. There may be several program summaries, each with a unique checksum. The object summary's checkum is zero. Note that the da file might contain information from several runs concatenated, or the data might be merged. This file is included by both the compiler, gcov tools and the runtime support library libgcov. IN_LIBGCOV and IN_GCOV are used to distinguish which case is which. If IN_LIBGCOV is nonzero, libgcov is being built. If IN_GCOV is nonzero, the gcov tools are being built. Otherwise the compiler is being built. IN_GCOV may be positive or negative. If positive, we are compiling a tool that requires additional functions (see the code for knowledge of what those functions are). */ #define GCOV_TAG_FUNCTION ((gcov_unsigned_t)0x01000000) #define GCOV_TAG_BLOCKS ((gcov_unsigned_t)0x01410000) #define GCOV_TAG_ARCS ((gcov_unsigned_t)0x01430000) #define GCOV_TAG_LINES ((gcov_unsigned_t)0x01450000) #define GCOV_TAG_COUNTER_BASE ((gcov_unsigned_t)0x01a10000) #define GCOV_TAG_OBJECT_SUMMARY ((gcov_unsigned_t)0xa1000000) #define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000) Experiment shows that a .bbg file at version '303p' is structured slightly differently from the description above, and is (in BNF): bbgfile ::= function-record* function-record ::= function-chunk blocks-chunk arcs-chunk* lines-chunk* function-chunk ::= chunk-header(GCOV_TAG_FUNCTION) function-name checksum function-name ::= string checksum ::= u32 blocks-chunk ::= chunk-header(GCOV_TAG_BLOCKS) block-flags* block-flags ::= u32 # one u32 of flags per block, so number of blocks is chunk-length/4 arcs-chunk ::= chunk-header(GCOV_TAG_ARCS) src-block arc* arc ::= dest-block arc-flags src-block ::= u32 # block number of source of arc dest-block ::= u32 # block number of destination of arc arc-flags ::= u32 # appears to be the same 3 flags we know & love lines-chunk ::= chunk-header(GCOV_TAG_LINES) chunk-header ::= chunk-tag chunk-length chunk-tag ::= u32 chunk-length ::= u32 The only difference to the format described in the comment is that the GCOV_TAG_FUNCTION chunk is {name,checksum} instead of {ident,checksum,name,source,lineno}. Yet Another New Format ---------------------- The format changed again in gcc 3.4.2 as shipped in Fedora Core 3. The differences are much more minor, so are described here as changes relative the "New Format" above. Once again, derived from a large C comment in gcov-io.h from gcc-3.4.2-20041018. * 32b numbers are stored in machine endianness. was bigendian. * 64b numbers are stored as the low 32b then the high 32b, each 32b stored in machine endianness. was bigendian. * String length is in 4-byte units. was bytes. * The file is now file : int32:magic int32:version int32:stamp record* note the new 32b timestamp: The stamp value is used to synchronize note and data files and to synchronize merging within a data file. It need not be an absolute time stamp, merely a ticker that increments fast enough and cycles slow enough to distinguish different compile/run/compile cycles. Also, the magic is used to determine the endianness of the file. * In records, the length is now in 4B units. * All higher level structures have the same syntax and semantics. ggcov-0.8.4/doc/dbus-decode-gcov.txt0000644000175000017500000000247211453570563014207 00000000000000 DBus has a coverage-report.txt target in its Makefile.am which calls decode-gcov with the --report option, which generates to stdout a report of the following form: * summary of stats for all files Summary (%s) ======= %g%% blocks executed (%d of %d) (ignored %d blocks of test-only/debug-only code) %g%% functions executed (%d of %d) %g%% functions completely executed (%d of %d) (ignored %d functions of test-only/debug-only code) %g%% lines executed (%d of %d) %g%% lines completely executed (%d of %d) (ignored %d lines of test-only/debug-only code) * summary of stats per directory * summary of untested functions Untested functions in %s ======= %s ... * summary of poorly tested functions (for each file, list of functions which have nonsuppressed blocks, have at least some coverage, but are covered less than the global average). Below average functions in %s ======= %s (%d%%) ... * N untested blocks by function (for each file, a list of all functions which have uncovered blocks, sorted in decreasing order of number of uncovered blocks). Incomplete functions in %s ======= %s (%d/%d untested blocks) ... It has a hardcoded hack which calculates separate stats for code inside #if DBUS_BUILD_TESTS by scanning for #if/#endif. ggcov-0.8.4/doc/git-history-coverage.10000644000175000017500000000632711612711545014466 00000000000000.\" .\" ggcov - A GTK frontend for exploring gcov coverage data .\" Copyright (c) 2003-2011 Greg Banks .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .TH GIT-HISTORY-COVERAGE "1" "Feb 2011" "GGCOV" "Greg Banks" .SH NAME git-history-coverage \- summarise test coverage for recent git commits .SH SYNOPSIS \fBgit-history-coverage\fP [\fIoptions\fP] \fIrev-list\fP .SH DESCRIPTION .PP \fBGit-history-coverage\fP extracts test coverage data produced by C and C++ programs compiled with \fIgcc \-\-coverage\fP, and correlates it to git commits, printing a coverage summary which shows how well tested recent code changes have been. This is useful for nightly builds and Continuous Integration systems such as Jenkins. .PP For the output of \fBgit-history-coverage\fP to make any sense, the coverage data must be generated by running code which corresponds to the last commit in the range specified by \fIrev-list\fP. .PP When used without any options, \fBgit-history-coverage\fP prints three summaries. .TP .B overall A summary of all the commits specified by \fIrev-list\fP. .TP .B by author A summary split up by each author represented in the set of commits specified by \fIrev-list\fP. .TP .B by commit A summary for each individual commit in the set of commits specified by \fIrev-list\fP. .PP For each of these summaries, \fBgit-history-coverage\fP prints statistics showing how many lines of code were in the commits, how many lines represent executable code (as opposed to comments, test code, or infrastructure like Makefiles), and how many lines were actually executed in tests. .SH OPTIONS .TP \fB\-\-summary\-overall\fP Print the \fBoverall\fP summary (with no options, all three summaries are printed). .TP \fB\-\-summary\-by\-author\fP Print the \fBby author\fP summary (with no options, all three summaries are printed). .TP \fB\-\-summary\-by\-commit\fP Print the \fBby commit\fP summary (with no options, all three summaries are printed). .TP \fB\-\-gcda\-prefix\fP=\fIdir\fP Look for \fI.gcda\fP files underneath the directory \fIdir\fP. This option is used to read runtime coverage information written when a test program is run using the same \fP--gcda-prefix\fP option to \fBggcov-run\fP. .SH AUTHOR Written by Greg Banks .IR . .SH COPYRIGHT ggcov is Copyright \(co 2001\-2011 Greg Banks \fI\fP. .br This is free software; see the COPYING file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO .PP \fBggcov-run\fP(1). ggcov-0.8.4/INSTALL0000644000175000017500000002243211455722470010614 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ggcov-0.8.4/config.sub0000755000175000017500000010115311455722470011544 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ggcov-0.8.4/configure0000755000175000017500000237277611612762272011516 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 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. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits 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 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 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. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done 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+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. 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. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $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 # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir 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' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/ggcov.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS RPM_SPEC_CONFIGURE_ARGS REDHAT_FALSE REDHAT_TRUE OS_DEFINES CPU_DEFINES GCONF GCONF_FALSE GCONF_TRUE GGCOV_GLADE_FILE GGCOV_CLI_LIBS GGCOV_CLI_CFLAGS GCONF_LIBS GCONF_CFLAGS GGCOV_GUI_LIBS GGCOV_GUI_CFLAGS PKG_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX WEBPROG WEB_FALSE WEB_TRUE DB_LIBS DB_CPPFLAGS GUIPROG GUI_FALSE GUI_TRUE DEBUG_FALSE DEBUG_TRUE MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED 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 host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W 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_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock enable_maintainer_mode enable_debug enable_gui enable_web with_bfd ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG GGCOV_GUI_CFLAGS GGCOV_GUI_LIBS GCONF_CFLAGS GCONF_LIBS GGCOV_CLI_CFLAGS GGCOV_CLI_LIBS' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. 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_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 ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. 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_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- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. 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_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_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. 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_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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) 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 && { $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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi 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 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $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 fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- 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 .` || { $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" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. 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 } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $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" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', 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/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi 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-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=no] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-debug Turn on debugging code --disable-gui Do not build the GUI --disable-web Do not build the WWW interface Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --without-bfd Don't use BFD library (callgraphs will not work) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility GGCOV_GUI_CFLAGS C compiler flags for GGCOV_GUI, overriding pkg-config GGCOV_GUI_LIBS linker flags for GGCOV_GUI, overriding pkg-config GCONF_CFLAGS C compiler flags for GCONF, overriding pkg-config GCONF_LIBS linker flags for GCONF, overriding pkg-config GGCOV_CLI_CFLAGS C compiler flags for GGCOV_CLI, overriding pkg-config GGCOV_CLI_LIBS linker flags for GGCOV_CLI, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? 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" || { 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. 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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 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 exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_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 done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $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 && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi 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 { $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 done 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 { $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 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $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) { $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 # 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=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $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 ac_ext=c 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 am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $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 # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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. # 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 $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else 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 INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $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. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $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 # 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 conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $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". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $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 test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $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 $. # By default was `s,x,x', remove it if useless. 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` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $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 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $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 $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { $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 # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=ggcov VERSION=0.8.4 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" case `pwd` in *\ * | *\ *) { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6' macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $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 # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { $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. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c 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 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else CC="$ac_cv_prog_CC" fi 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi fi fi 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 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files 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. { $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 | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $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' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. 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 | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $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 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (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. { $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 if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $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 { { $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 $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; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } 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. { $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; } { $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $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 # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. 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 | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $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 $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; }; }; } fi rm -f conftest$ac_cv_exeext { $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 { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $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 | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $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 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $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 { $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 $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $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 if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $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 $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c 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 depcc="$CC" am_compiler_list= { $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 $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $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 test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed $as_unset ac_script || ac_script= if test -z "$SED"; then ac_path_SED_found=false # 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 do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $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" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $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 $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 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. # 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 $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" $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` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS 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 else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $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 $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 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 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. # 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 $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" $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` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS 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 else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # 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 fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $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" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_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 # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $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_DUMPBIN+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_DUMPBIN="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:4357: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:4360: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:4363: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&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 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:$LINENO: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $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_OBJDUMP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OBJDUMP="objdump" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $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 OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_AR="${ac_tool_prefix}ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:$LINENO: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $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_AR+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_AR="ar" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $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 AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:$LINENO: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5569 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; 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" { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then $as_echo_n "(cached) " >&6 else ac_ext=c 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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_cc_needs_belf=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c 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 fi { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } 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 ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $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_DSYMUTIL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_DSYMUTIL="dsymutil" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $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_NMEDIT+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_NMEDIT="nmedit" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $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_LIPO+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_LIPO="lipo" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $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_OTOOL+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OTOOL="otool" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $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_OTOOL64+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_OTOOL64="otool64" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_cv_ld_exported_symbols_list=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c 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 { $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 $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" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $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 # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $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 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c 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 { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $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 { $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 #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. 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=`$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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do 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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; 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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; 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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi enable_dlopen=no enable_win32_dll=no # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; 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. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:$LINENO: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:$LINENO: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7420: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7424: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7759: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7763: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7864: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7868: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7919: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat >conftest.$ac_ext <<_ACEOF int foo(void) {} _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 $as_echo_n "checking for shl_load... " >&6; } if test "${ac_cv_func_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 $as_echo "$ac_cv_func_shl_load" >&6; } if test "x$ac_cv_func_shl_load" = x""yes; then lt_cv_dlopen="shl_load" else { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_shl_load=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 $as_echo_n "checking for dlopen... " >&6; } if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 $as_echo "$ac_cv_func_dlopen" >&6; } if test "x$ac_cv_func_dlopen" = x""yes; then lt_cv_dlopen="dlopen" else { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dl_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_svld_dlopen=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_dld_dld_link=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10732 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10828 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c 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 CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $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 else USE_MAINTAINER_MODE=no fi { $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='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE RPM_SPEC_CONFIGURE_ARGS= { $as_echo "$as_me:$LINENO: checking whether to enable debugging code" >&5 $as_echo_n "checking whether to enable debugging code... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; case "${enableval}" in yes|no) debug=${enableval} ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;} { (exit 1); exit 1; }; } ;; esac else debug=no fi { $as_echo "$as_me:$LINENO: result: $debug" >&5 $as_echo "$debug" >&6; } if test x$debug = xyes; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi { $as_echo "$as_me:$LINENO: checking whether to enable the GUI" >&5 $as_echo_n "checking whether to enable the GUI... " >&6; } # Check whether --enable-gui was given. if test "${enable_gui+set}" = set; then enableval=$enable_gui; case "${enableval}" in yes|no) gui=${enableval} ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-gui" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-gui" >&2;} { (exit 1); exit 1; }; } ;; esac else gui=yes fi { $as_echo "$as_me:$LINENO: result: $gui" >&5 $as_echo "$gui" >&6; } if test x$gui = xyes; then GUI_TRUE= GUI_FALSE='#' else GUI_TRUE='#' GUI_FALSE= fi if test x$gui = xyes ; then GUIPROG=ggcov else GUIPROG= RPM_SPEC_CONFIGURE_ARGS="$RPM_SPEC_CONFIGURE_ARGS --disable-gui" fi DB_LIB_db42="db-4.2" DB_CPPFLAGS_db42="-I/usr/include/db42" DB_LDFLAGS_db42="" DB_LIB_db41="db-4.1" DB_CPPFLAGS_db41="-I/usr/include/db41" DB_LDFLAGS_db41="" DB_LIB_plain="db" DB_CPPFLAGS_plain="" DB_LDFLAGS_plain="" DB_FLAVORS="db42 db41 plain" found=no web=yes for flavor in $DB_FLAVORS ; do { $as_echo "$as_me:$LINENO: Looking for Berkeley DB flavor $flavor" >&5 $as_echo "$as_me: Looking for Berkeley DB flavor $flavor" >&6;} eval "lib=\$DB_LIB_$flavor" eval "ldflags=\$DB_LDFLAGS_$flavor" eval "cppflags=\$DB_CPPFLAGS_$flavor" oldCPPFLAGS="$CPPFLAGS" oldLIBS="$LIBS" CPPFLAGS="$cppflags $CPPFLAGS" found=yes if test "${ac_cv_header_db_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for db.h" >&5 $as_echo_n "checking for db.h... " >&6; } if test "${ac_cv_header_db_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 $as_echo "$ac_cv_header_db_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking db.h usability" >&5 $as_echo_n "checking db.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking db.h presence" >&5 $as_echo_n "checking db.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $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: ) { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for db.h" >&5 $as_echo_n "checking for db.h... " >&6; } if test "${ac_cv_header_db_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_db_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 $as_echo "$ac_cv_header_db_h" >&6; } fi if test "x$ac_cv_header_db_h" = x""yes; then : else found=no fi as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_db_create" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for db_create in -l$lib" >&5 $as_echo_n "checking for db_create in -l$lib... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lib $ldflags $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char db_create (); int main () { return db_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_Lib=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=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 ac_res=`eval 'as_val=${'$as_ac_Lib'} $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_Lib'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_LIB$lib" | $as_tr_cpp` 1 _ACEOF LIBS="-l$lib $LIBS" else found=no fi CPPFLAGS="$oldCPPFLAGS" LIBS="$oldLIBS" test $found = yes && break done if test $found = yes ; then DB_CPPFLAGS="$cppflags" DB_LIBS="-l$lib $ldflags" else { $as_echo "$as_me:$LINENO: Cannot find db.h" >&5 $as_echo "$as_me: Cannot find db.h" >&disabling web interface;} web=no fi { $as_echo "$as_me:$LINENO: checking whether to enable the WWW interface" >&5 $as_echo_n "checking whether to enable the WWW interface... " >&6; } # Check whether --enable-web was given. if test "${enable_web+set}" = set; then enableval=$enable_web; case "${enableval}" in no) web=no ;; yes) ;; *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-web" >&5 $as_echo "$as_me: error: bad value ${enableval} for --enable-web" >&2;} { (exit 1); exit 1; }; } ;; esac fi { $as_echo "$as_me:$LINENO: result: $web" >&5 $as_echo "$web" >&6; } if test x$web = xyes; then WEB_TRUE= WEB_FALSE='#' else WEB_TRUE='#' WEB_FALSE= fi if test x$web = xyes ; then WEBPROG=ggcov-webdb else WEBPROG= RPM_SPEC_CONFIGURE_ARGS="$RPM_SPEC_CONFIGURE_ARGS --disable-web" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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. # 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 $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else 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 INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $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. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done ac_ext=c 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 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else CC="$ac_cv_prog_CC" fi 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi fi fi 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 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $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 { $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 $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $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 if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $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 $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c 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 depcc="$CC" am_compiler_list= { $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 $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $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 test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $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 { $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=`$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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $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.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF 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 # 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. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp 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 if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi fi fi fi # Provide some information about the compiler. $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $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 { $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 $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $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 if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c 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 depcc="$CXX" am_compiler_list= { $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 $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $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 test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp 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 if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi fi fi fi # Provide some information about the compiler. $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $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 { $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 $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $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 if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c 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 depcc="$CXX" am_compiler_list= { $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 $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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $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 test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp 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 { $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 $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $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 # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi ac_ext=c 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15521: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15525: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15620: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15624: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15672: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:15676: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then shlibpath_overrides_runpath=yes fi else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c 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 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 { $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 $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $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. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else RANLIB="$ac_cv_prog_RANLIB" fi if test x$debug = xyes ; then ## CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED=1 -DGLIB_DISABLE_DEPRECATED=1" echo "debug mode on" fi { $as_echo "$as_me:$LINENO: checking whether va_copy works" >&5 $as_echo_n "checking whether va_copy works... " >&6; } if test "$cross_compiling" = yes; then { { $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 test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static int baz(va_list args) { int x = 0; x |= strcmp(va_arg(args, const char *), "hello"); x |= strcmp(va_arg(args, const char *), "world"); return x; } static int bar(va_list args) { int x = 0; va_list args2; va_copy(args2, args); x |= baz(args); x |= baz(args2); return x; } static int foo(int a, ...) { int x; va_list args; va_start(args, a); x = bar(args); va_end(args); return x; } int main(int argc, char **argv) { return foo(42, "hello", "world"); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_VA_COPY 1 _ACEOF { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $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 ) { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } 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 # Check whether --with-bfd was given. if test "${with_bfd+set}" = set; then withval=$with_bfd; else with_bfd=yes fi if test $with_bfd = yes ; then Bstatic="-Wl,-Bstatic" bfd_libs="-lbfd -liberty" Bdynamic="-Wl,-Bdynamic" { $as_echo "$as_me:$LINENO: checking for GNU bfd library, static" >&5 $as_echo_n "checking for GNU bfd library, static... " >&6; } have_libbfd=no bfd_save_LIBS="$LIBS" LIBS="$LIBS $Bstatic $bfd_libs $Bdynamic" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_libbfd=yes cat >>confdefs.h <<\_ACEOF #define HAVE_LIBBFD 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$bfd_save_LIBS" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $have_libbfd" >&5 $as_echo "$have_libbfd" >&6; } if test $have_libbfd = no ; then { $as_echo "$as_me:$LINENO: checking for GNU bfd library, any" >&5 $as_echo_n "checking for GNU bfd library, any... " >&6; } have_libbfd=no bfd_save_LIBS="$LIBS" LIBS="$LIBS $bfd_libs" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then have_libbfd=yes cat >>confdefs.h <<\_ACEOF #define HAVE_LIBBFD 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$bfd_save_LIBS" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $have_libbfd" >&5 $as_echo "$have_libbfd" >&6; } fi { $as_echo "$as_me:$LINENO: checking name of raw size field in struct bfd_section" >&5 $as_echo_n "checking name of raw size field in struct bfd_section... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return (int)(&((asection *)0)->rawsize); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 cat >>confdefs.h <<\_ACEOF #define HAVE_BFD_ASECTION_RAWSIZE 1 _ACEOF { $as_echo "$as_me:$LINENO: result: rawsize" >&5 $as_echo "rawsize" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:$LINENO: result: _raw_size" >&5 $as_echo "_raw_size" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $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 $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $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 { $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 #define STDC_HEADERS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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_sys_wait_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in malloc.h sys/ioctl.h sys/time.h unistd.h memory.h do 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 { $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 $as_echo_n "(cached) " >&6 fi 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? { $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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $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: ) { $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:* ) { $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;} ;; esac { $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 $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi 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 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in signal.h sys/filio.h stdint.h elf.h do 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 { $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 $as_echo_n "(cached) " >&6 fi 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? { $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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $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 cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $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 { $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: ) { $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:* ) { $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;} ;; esac { $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 $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi 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 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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for pid_t" >&5 $as_echo_n "checking for pid_t... " >&6; } if test "${ac_cv_type_pid_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_pid_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((pid_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 $as_echo "$ac_cv_type_pid_t" >&6; } if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi if test "x$GCC" = "xyes"; then { $as_echo "$as_me:$LINENO: checking for additional gcc flags" >&5 $as_echo_n "checking for additional gcc flags... " >&6; } CEXTRAWARNFLAGS= for flag in `cat <&5 $as_echo "$CEXTRAWARNFLAGS" >&6; } fi if test "x$GCC" = "xyes"; then { $as_echo "$as_me:$LINENO: checking for additional gcc flags" >&5 $as_echo_n "checking for additional gcc flags... " >&6; } CEXTRAWARNFLAGS= for flag in `cat <&5 $as_echo "$CEXTRAWARNFLAGS" >&6; } fi 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 { $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 $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $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 $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $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 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # try gtk 2.0 have_gconf=no libpopt= if test x$gui = xyes ; then # gui enabled pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GGCOV_GUI" >&5 $as_echo_n "checking for GGCOV_GUI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_GUI_CFLAGS"; then pkg_cv_GGCOV_GUI_CFLAGS="$GGCOV_GUI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_GUI_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_GUI_LIBS"; then pkg_cv_GGCOV_GUI_LIBS="$GGCOV_GUI_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_GUI_LIBS=`$PKG_CONFIG --libs "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GGCOV_GUI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0"` else GGCOV_GUI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$GGCOV_GUI_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } gtk2=no elif test $pkg_failed = untried; then gtk2=no else GGCOV_GUI_CFLAGS=$pkg_cv_GGCOV_GUI_CFLAGS GGCOV_GUI_LIBS=$pkg_cv_GGCOV_GUI_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } gtk2=yes fi if test $gtk2 = yes ; then pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GCONF" >&5 $as_echo_n "checking for GCONF... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GCONF_CFLAGS"; then pkg_cv_GCONF_CFLAGS="$GCONF_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.4.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.4.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.4.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GCONF_LIBS"; then pkg_cv_GCONF_LIBS="$GCONF_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0 >= 2.4.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0 >= 2.4.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.4.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0 >= 2.4.0"` else GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.4.0"` fi # Put the nasty error message in config.log where it belongs echo "$GCONF_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (gconf-2.0 >= 2.4.0) were not met: $GCONF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (gconf-2.0 >= 2.4.0) were not met: $GCONF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $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: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GCONF_CFLAGS and GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS GCONF_LIBS=$pkg_cv_GCONF_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } have_gconf=yes fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GGCOV_CLI" >&5 $as_echo_n "checking for GGCOV_CLI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_CLI_CFLAGS"; then pkg_cv_GGCOV_CLI_CFLAGS="$GGCOV_CLI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_CLI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_CLI_LIBS"; then pkg_cv_GGCOV_CLI_LIBS="$GGCOV_CLI_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_CLI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GGCOV_CLI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0"` else GGCOV_CLI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$GGCOV_CLI_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0) were not met: $GGCOV_CLI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GGCOV_CLI_CFLAGS and GGCOV_CLI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0) were not met: $GGCOV_CLI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GGCOV_CLI_CFLAGS and GGCOV_CLI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { $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: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GGCOV_CLI_CFLAGS and GGCOV_CLI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 $as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GGCOV_CLI_CFLAGS and GGCOV_CLI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else GGCOV_CLI_CFLAGS=$pkg_cv_GGCOV_CLI_CFLAGS GGCOV_CLI_LIBS=$pkg_cv_GGCOV_CLI_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi GGCOV_GUI_LIBS=`echo "$GGCOV_GUI_LIBS" | sed -e 's/-Wl,--export-dynamic//g'` GCONF_LIBS=`echo "$GCONF_LIBS" | sed -e 's/-Wl,--export-dynamic//g'` { $as_echo "$as_me:$LINENO: checking for gtk_text_buffer_select_range in -lgtk-x11-2.0" >&5 $as_echo_n "checking for gtk_text_buffer_select_range in -lgtk-x11-2.0... " >&6; } if test "${ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgtk-x11-2.0 $GGCOV_GUI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gtk_text_buffer_select_range (); int main () { return gtk_text_buffer_select_range (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range" >&5 $as_echo "$ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range" >&6; } if test "x$ac_cv_lib_gtk_x11_2_0_gtk_text_buffer_select_range" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GTK_TEXT_BUFFER_SELECT_RANGE 1 _ACEOF fi GGCOV_GLADE_FILE=ggcov-glade2.glade # gnome2 doesn't need popt, so it may or may not be present { $as_echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5 $as_echo_n "checking for poptGetContext in -lpopt... " >&6; } if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpopt $GGCOV_GUI_CFLAGS $GGCOV_GUI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char poptGetContext (); int main () { return poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_popt_poptGetContext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_popt_poptGetContext=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5 $as_echo "$ac_cv_lib_popt_poptGetContext" >&6; } if test "x$ac_cv_lib_popt_poptGetContext" = x""yes; then libpopt=" -lpopt" fi GGCOV_GUI_LIBS="$GGCOV_GUI_LIBS$libpopt" gprog=no { $as_echo "$as_me:$LINENO: checking for gnome_program_init in -lgnome" >&5 $as_echo_n "checking for gnome_program_init in -lgnome... " >&6; } if test "${ac_cv_lib_gnome_gnome_program_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnome $GGCOV_GUI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnome_program_init (); int main () { return gnome_program_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnome_gnome_program_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnome_gnome_program_init=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnome_gnome_program_init" >&5 $as_echo "$ac_cv_lib_gnome_gnome_program_init" >&6; } if test "x$ac_cv_lib_gnome_gnome_program_init" = x""yes; then gprog=yes fi if test $gprog = no ; then { $as_echo "$as_me:$LINENO: checking for gnome_program_init in -lgnome-2" >&5 $as_echo_n "checking for gnome_program_init in -lgnome-2... " >&6; } if test "${ac_cv_lib_gnome_2_gnome_program_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnome-2 $GGCOV_GUI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gnome_program_init (); int main () { return gnome_program_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gnome_2_gnome_program_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gnome_2_gnome_program_init=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gnome_2_gnome_program_init" >&5 $as_echo "$ac_cv_lib_gnome_2_gnome_program_init" >&6; } if test "x$ac_cv_lib_gnome_2_gnome_program_init" = x""yes; then gprog=yes fi fi if test $gprog = yes ; then cat >>confdefs.h <<\_ACEOF #define HAVE_GNOME_PROGRAM_INIT 1 _ACEOF fi else { { $as_echo "$as_me:$LINENO: error: ggcov requires the GNOME libraries, unless configured with --disable-gui" >&5 $as_echo "$as_me: error: ggcov requires the GNOME libraries, unless configured with --disable-gui" >&2;} { (exit 1); exit 1; }; } fi else # gui disabled pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GGCOV_CLI" >&5 $as_echo_n "checking for GGCOV_CLI... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_CLI_CFLAGS"; then pkg_cv_GGCOV_CLI_CFLAGS="$GGCOV_CLI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_CLI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GGCOV_CLI_LIBS"; then pkg_cv_GGCOV_CLI_LIBS="$GGCOV_CLI_LIBS" else if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGCOV_CLI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GGCOV_CLI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0"` else GGCOV_CLI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.0.0 libxml-2.0 >= 2.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$GGCOV_CLI_PKG_ERRORS" >&5 { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } glib2=no elif test $pkg_failed = untried; then glib2=no else GGCOV_CLI_CFLAGS=$pkg_cv_GGCOV_CLI_CFLAGS GGCOV_CLI_LIBS=$pkg_cv_GGCOV_CLI_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } glib2=yes fi if test $glib2 = no ; then { { $as_echo "$as_me:$LINENO: error: ggcov requires the glib library" >&5 $as_echo "$as_me: error: ggcov requires the glib library" >&2;} { (exit 1); exit 1; }; } fi # we're headless, so we have no idea whether libpopt is present { $as_echo "$as_me:$LINENO: checking for poptGetContext in -lpopt" >&5 $as_echo_n "checking for poptGetContext in -lpopt... " >&6; } if test "${ac_cv_lib_popt_poptGetContext+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpopt $GGCOV_CLI_CFLAGS $GGCOV_CLI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char poptGetContext (); int main () { return poptGetContext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_popt_poptGetContext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_popt_poptGetContext=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptGetContext" >&5 $as_echo "$ac_cv_lib_popt_poptGetContext" >&6; } if test "x$ac_cv_lib_popt_poptGetContext" = x""yes; then libpopt=" -lpopt" fi fi GGCOV_CLI_LIBS="$GGCOV_CLI_LIBS$libpopt" if test $have_gconf = yes ; then GCONF= cat >>confdefs.h <<\_ACEOF #define HAVE_LIBGCONF 1 _ACEOF else GCONF="#" fi if test $have_gconf = yes; then GCONF_TRUE= GCONF_FALSE='#' else GCONF_TRUE='#' GCONF_FALSE= fi { $as_echo "$as_me:$LINENO: checking for g_hash_table_iter_init in -lglib-2.0" >&5 $as_echo_n "checking for g_hash_table_iter_init in -lglib-2.0... " >&6; } if test "${ac_cv_lib_glib_2_0_g_hash_table_iter_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lglib-2.0 $GGCOV_CLI_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char g_hash_table_iter_init (); int main () { return g_hash_table_iter_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_glib_2_0_g_hash_table_iter_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_glib_2_0_g_hash_table_iter_init=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glib_2_0_g_hash_table_iter_init" >&5 $as_echo "$ac_cv_lib_glib_2_0_g_hash_table_iter_init" >&6; } if test "x$ac_cv_lib_glib_2_0_g_hash_table_iter_init" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_G_HASH_TABLE_ITER 1 _ACEOF fi if test "x$libpopt" != x ; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPOPT /**/ _ACEOF fi CXXFLAGS="$CFLAGS" CC="$CXX" { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking for cpu-specific defines" >&5 $as_echo_n "checking for cpu-specific defines... " >&6; } CPU_DEFINES= case "$host_cpu" in i?86|i86pc) CPU_DEFINES=-DCOV_I386 ;; esac { $as_echo "$as_me:$LINENO: result: $CPU_DEFINES" >&5 $as_echo "$CPU_DEFINES" >&6; } { $as_echo "$as_me:$LINENO: checking for OS-specific defines" >&5 $as_echo_n "checking for OS-specific defines... " >&6; } OS_DEFINES= is_linux=no is_redhat=no case "$host_os" in solaris*) OS_DEFINES=-DELF_TARGET_ALL ;; linux*) is_linux=yes ;; esac { $as_echo "$as_me:$LINENO: result: $OS_DEFINES" >&5 $as_echo "$OS_DEFINES" >&6; } if test x$is_linux = xyes ; then { $as_echo "$as_me:$LINENO: checking for Linux distro-specific defines" >&5 $as_echo_n "checking for Linux distro-specific defines... " >&6; } if test -f /etc/redhat-release ; then is_redhat=yes fi fi if test x$is_redhat = xyes; then REDHAT_TRUE= REDHAT_FALSE='#' else REDHAT_TRUE='#' REDHAT_FALSE= fi if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac 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 $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_type_signal=int else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:$LINENO: checking for wait3 that fills in rusage" >&5 $as_echo_n "checking for wait3 that fills in rusage... " >&6; } if test "${ac_cv_func_wait3_rusage+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_wait3_rusage=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include #include #include /* HP-UX has wait3 but does not fill in rusage at all. */ int main () { struct rusage r; int i; /* Use a field that we can force nonzero -- voluntary context switches. For systems like NeXT and OSF/1 that don't set it, also use the system CPU time. And page faults (I/O) for Linux. */ r.ru_nvcsw = 0; r.ru_stime.tv_sec = 0; r.ru_stime.tv_usec = 0; r.ru_majflt = r.ru_minflt = 0; switch (fork ()) { case 0: /* Child. */ sleep(1); /* Give up the CPU. */ _exit(0); break; case -1: /* What can we do? */ _exit(0); break; default: /* Parent. */ wait3(&i, 0, &r); /* Avoid "text file busy" from rm on fast HP-UX machines. */ sleep(2); return (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); } } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_wait3_rusage=yes else $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_func_wait3_rusage=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 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_wait3_rusage" >&5 $as_echo "$ac_cv_func_wait3_rusage" >&6; } if test $ac_cv_func_wait3_rusage = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WAIT3 1 _ACEOF fi for ac_func in putenv regcomp strchr do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $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_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in sincos do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval 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 $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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $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_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile src/Makefile src/libiberty/Makefile src/libggcov/Makefile scripts/Makefile ui/Makefile doc/Makefile php/Makefile php/lib/Makefile php/basic/Makefile ggcov.spec version.m4 test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_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 done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $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 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= 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=`$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" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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 "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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 "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GUI_TRUE}" && test -z "${GUI_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GUI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GUI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${WEB_TRUE}" && test -z "${WEB_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"WEB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"WEB\" 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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $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 "${GCONF_TRUE}" && test -z "${GCONF_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"GCONF\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"GCONF\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${REDHAT_TRUE}" && test -z "${REDHAT_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"REDHAT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_echo "$as_me: error: conditional \"REDHAT\" 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" { $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. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits 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 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 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. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $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 # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir 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' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _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" config_commands="$ac_config_commands" _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 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -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 Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 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." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF 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 case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift 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 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 { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $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. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 "\$@" fi _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 $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/libiberty/Makefile") CONFIG_FILES="$CONFIG_FILES src/libiberty/Makefile" ;; "src/libggcov/Makefile") CONFIG_FILES="$CONFIG_FILES src/libggcov/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "ui/Makefile") CONFIG_FILES="$CONFIG_FILES ui/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "php/Makefile") CONFIG_FILES="$CONFIG_FILES php/Makefile" ;; "php/lib/Makefile") CONFIG_FILES="$CONFIG_FILES php/lib/Makefile" ;; "php/basic/Makefile") CONFIG_FILES="$CONFIG_FILES php/basic/Makefile" ;; "ggcov.spec") CONFIG_FILES="$CONFIG_FILES ggcov.spec" ;; "version.m4") CONFIG_FILES="$CONFIG_FILES version.m4" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; *) { { $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 # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # 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 ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /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 . ./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 { { $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 ' >$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 = "" } { 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 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 # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi 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 ' >$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" 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*:*) { { $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;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $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 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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $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" \ || { { $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 ac_dir=`$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 || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. 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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _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= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $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 || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _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 || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " 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"; } && { $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 $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 \ || { { $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 # if test x"$ac_file" != x-; then { $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" \ || { { $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 $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 # Compute "$ac_file"'s index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in "$ac_file" | "$ac_file":* ) 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 || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :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 # 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. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /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 || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || 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" done done ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag { (exit 0); exit 0; } _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. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # 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 ggcov-0.8.4/ChangeLog0000644000175000017500000010731611612771635011344 00000000000000Sun Jul 24 13:59:04 2011 Greg Banks * Release 0.8.4 * Add the ggcov-run program, which can be used to run a test program in such a way that the runtime generated coverage data files are stored in a chosen location rather than being written to the source directory. Added corresponding --gcda-prefix option to ggcov, tggcov and git-history-coverage. This feature is useful for those testing scenarios where the source directory is not available or not writable. * Reorganise compiler version handling to make it easier to add support for new compiler versions, especially ones that are identical in behaviour to gcc 4.0 except for the reported version string. Also some code cleanliness improvements including const correctness and fixing compile warnings with newer versions of gcc. * Support for gcc 4.6, including: - gcc 4.6.x in Ubuntu Oneiric -- thanks to Jim Huang. - gcc 4.6(prelease) in Debian Wheezy. * Usability improvements: - tggcov will annotate yacc and lex input files - don't complain about source filename "" - fuzzy function solving is always enabled - disable "failed to reconcile calls" warning. - turn off compiledir warnings entirely - handle filename clashes with yacc-produced .c - detect more recent compiler millicode functions - handle un-normalised source filenames in .gcno - useful errors when detecting that data files were produced by an unrecognised compiler version. * Improve .gitignore -- thanks to Jim Huang. * Some improvements to utility classes * Better errors when tggcov fails in tests * Use --coverage option in testing. * Fix racy loop in test015 make check due to UMR Fri Apr 22 16:39:00 2011 Greg Banks * Release 0.8.3 * Handle gcc 4.5. * Work around Ubuntu libbfd b0rkages * Add a report which emits a Cobertura coverage.xml * Add git-history-coverage which reports coverage by git commit * Add -o option to tggcov * Silently treat missing .gcda files as zero counts * Automatically suppress some glibc inline functions * Split ggcov RPM packages into three. * Fix a really old bug with minimal_name() * Add hashtable_iter_t to iterate a hashtable * Provide a package: target in the top level * Don't link (t)ggcov against Sleepycat DB * Fix dist: target again * Modernise RPC spec file. * Use PKG_PROG_PKG_CONFIG in configure.in * Converted .cvsignore files to .gitignore * Use git to generate ChangeLog not CVS. Sun May 9 15:55:03 2010 Greg Banks * Release 0.8.2 * Support for gcc 4.4.1 (Ubuntu 9.10), patch from Ken McDonell. * Removed the ability to read files produced by gcc -db. This feature was always too fragile as it depended too closely on undocumented and volatile gcc internals. Removed test018 which exercised this feature and has been broken for some time. * Char* constness fixes from Ken McDonell. * Other minor compilation fixes. * Fixed a number of complaints from automake 1.11 about gmake specific features in Makefile.am files. * Update CVS ignore files. * Update my email address. * Update the release procedure document. * Fix wrong test name in test022 error message * Improve the existing estring unit test and add test023 to actually run it for "make check". Fri Jan 8 19:29:58 2010 Greg Banks * Release 0.8.1 * Support gcc 4.3 file formats. * Fix various compile warnings. * Make test 018 failure message clearer. Sun Jul 2 19:04:17 2006 Greg Banks * Release 0.8 * Significant improvements to the callgraph diagram layout algorithm, which now generates more visually pleasing results for a wider range of possible callgraphs. * When mousing over callgraph nodes in the gtk gui, show a popup containing the same information as the node box but actually large enough to be visible on nontrivial diagrams. * Add to the gtk gui a -w option to specify window(s) to open initially. * Support file format from gcc 3.4 on Mandrake 10.2. * Handle gcc 4.1.1 data file formats. * Handle file format from the gcc 4.0.3 in Ubuntu Dapper. * Patch by Jim Huang to support gcc 3.4 and gcc 4.1 on Ubuntu. * Automatically detect when ggcov is being run from it's source directory and adjust the libglade search path to find the uninstalled glade file first. This avoids the need to build with UI_DEBUG=1 in order to run ggcov before install. * Reduce memory usage in various ways, including keeping some strings uniquely in a hashtable, and using u64 instead of string for gcc4.0 function id. * Don't rely on the build system providing -Wl,--export-dynamic for libglade to work after the ggcov executable is stripped, instead use a Perl script to generate a C array which maps names to function pointers. This is needed for Ubuntu, and also makes the exe smaller. * Centralise the common parts of commandline option processing and interpretation in cov.C. Instead of one `recursive' flag in each source file containing a main(), there's now exactly one. * Combine "graph2win" and "legowin" into "diagwin" * Rationalise debug tokens. * Reorganise covio_t code. * Centralise the dbounds_t structure and some defines in a new header. Move various code from the callgraph diagram to methods of dbounds_t. * Add a scene generator which generates no output but performs various geometrical checks for poor diagram layout; particularly useful for objective testing of the callgraph diagram layout code. * Add a --dump-callgraph option to tggcov to dump the callgraph in an ASCII form suitable for checking in tests. * Add test 15, which exercises the callgraph diagram layout algorithm using a Perl script to generate C code from simple graph descriptions. * Running a runtest script with ENABLE_DB_FLAG in the enviroment will enable the -db gcc flag, generating a foo.c.12.bp file. * Add test018 which exercises the 12bp callgraph reading code. * Fix logic bug: when accounting coverage status of branches, branches cannot ever be partially covered. * Fixed compile warnings from gcc 4.1.1. * Don't complain about R_386_GOT32 relocs in i386 code. * Fix an invalid free in test018 (thanks to Jim Huang for the report) * Callgraph handles calls to functions with attribute(pure) * Improve filtering of line coverage results in test cases, to avoid spurious test failures due to differing algorithms for counting multi-block lines (the for(;;) problem) and for lone "catch" statements. Mon Sep 12 00:21:42 2005 Greg Banks * Release 0.7 * Handle the gcc 4.0.0 and Fedora Core 4 compiler file formats. * Add suppress by comment. New -Y commandline option allows suppressing source lines with a single-line comment containing the specified word. New -Z option suppresses a range of lines starting and ending with the given words. * Rejig block graph solving algorithm to handle calls to functions which return a different number of times than they're called, such as exit() or fork() or any function which might eventually call longjmp(). * Source files in /usr/include and /usr/lib are not counted towards the common path for source files. * Handle relative paths to source files in .gcno and .o files. * Handle compiling with version 3 of DB, found on some distros. * Handle calls to functions marked with attribute((pure)) gracefully. * Remove the unhelpful Arc column from the Calls window * Remove the long-redundant HAVE_BBG_FAKE_FLAG define and all the code that depended on it. * Fix compile warnings from gcc 4.0.0. * Fix memory buffer addressing bugs in the code to scan i386 object files for call graph information. * Fix assert failure when built against GTK2 library and the ^W accelerator to close a window is used before the File menu is manually shown. * Don't complain about R_386_GOT32 relocs in i386 code. * Fix a Free Memory Read found when trying coverage samba4 code. * Fix a corner case in the formatting of block lists. * Add --version options to tggcov and ggcov-webdb (ggcov itself already has this option via GNOME's popt table). * When built against recent libgnome, ggcov's --help output failed to describe the ggcov-specific options. Fix this by pushing the popt options table to gnome_program_init(). * Fix ambiguity in function's file scope on summary page. * Hyperlinks to source page use URLs cleaned of extraneous query strings. * Change the View links on the summary page to buttons, so they show the right page without clicking Update first. * Make web interface windows 100% wide. * Web interface handles missing or empty tests dir more gracefully. * Add --disable-web option to configure * Enforce --disable-gui more strictly * Remove a superfluous AC_ARG_PROGRAM, as AM_INIT calls it too. * Handle quirks of older automakes. * Loosen expected file comparison test to ignore line counts for function variable lines, to avoid pointless compiler variation in tests. * Convert test007 to use expected output rather than compare to gcov output, which miscounts the block which checks the return of setjmp(). * Add test016 to configure.in Sun Jun 19 17:09:27 2005 Greg Banks * Release 0.6 (big jump reflects lots of changes) * Ported to Fedora Core 3, SUSE Enterprise Linux 9. * Support new gcc 3.4 .bbg and .da format (actually 2 formats each, bigendian and littleendian). * First attempt at supporting the file format generated by gcc 3.3.3 on Mandrake 10.x. * Add a new window to ggcov to show a Lego diagram. * Added a simple PHP web interface for navigating coverage data * Add a second package ggcov-web and package all the web bits there. * Scan executables to find required shared libraries, and recursively scan shared libraries to find their required libraries, and scan all of those for coveraged source. * Added --solve-fuzzy flag to ggcov, tggcov and ggcov-webdb to ignore inconsistencies in arc counts on a per-function basis. Useful for samples from kernel coverage on multiprocessor machines. * Hide the Arc column in the Calls window by default, to match the initial state of the check menu item. * When scanning object files for calls, don't record magic calls to __cxa_throw() et al that g++ inserts. * In the Calls window, don't show calls from blocks that have no source associated with them; this hides the magic calls to __cxa_throw() et al that g++ inserts. * cov_arc_t::finalise() suppresses arcs which are calls to any of the g++ internal exception handling functions like __cxa_throw(). * Handle PIC code relocs when scanning objects to build the callgraph. * Grey out the View buttons on the Calls window when appropriate. * Package the tggcov executable * Small improvement to the formatting of block listings in the Source window. * Icon looks marginally prettier * Convert cov_function_t::list_all() to use the templated C++ list wrapper * Added status() method to cov_block_t, cov_arc_t, cov_function_t, cov_file_t. Calls calc_stats(). * portability: use /usr/bin/env to find bash for shell scripts * Abstract differences between GTK1 and GTK2 ways of setting tree/list column visibility into ui_list_set_column_visibility(). * Centralise two copies of nearly identical code to populate a combobox with names of functions. * Check for gnome_program_init() in -lgnome-2 as well as -lgnome. * Calculate the GUIPROG variable in configure instead of Makefile.am * Moved the status_t enum from class cov_line_t to a new global class cov. * Converted low-level cov file IO code to C++, mostly to enable run-time switching between bigendian and littleendian via C++ virtual functions, for the gcc 3.4 format. * Replace Lego and Callgraph windows with a unified Diagram window which uses the diagram_t abstraction. No user-visible differences. * Change from gnome_config_*() API to gconf, when detected by autoconf * Added a schema file for gconf. * ggcov.desktop no longer needs full path to icon * Drop -Wmissing-prototypes as gcc3.4 complains when given it in C++ mode * Added --without-bfd configure option to make life easier for the PLD guys. * Combine GTK1 and GTK2 functions for getting double-click data. * Check whether the old gtk1.2 automake macros exist before using them * Rationalised icon formats: PNG to install. XPM to #include * Detect the name of the raw size field in bfd's asection struct, as it changed. * Removed unnecessary #includes of covio.h * Also remove configure for the buildrpm --force option. * Make finalise() calls descend all the way to cov_arc_t level. * Use EXTRA_PROGRAMS so the source tarball builds properly * In tests, when comparing tggcov output vs expected, filter out line counts for the { and } lines at the start & end of functions. * Test code handles slightly different text output from gcov * Test feature: if $RPLATFORM is set when running tests, use all the compiled programs, .bbg and .da files from a remote platform. * runtest doesn't use a logfile anymore * Added --disable-gui configure option to allow for headless testing * Added test for coveraged code in shared libraries. * portability fixes to enable platform.sh to work on Solaris * Added support for using the standard automake "check" target. * reordered platform string to put version last * Add the test/ hierarchy to the source tarball. * Fix a memory leak in the scanning of object files. * Portability fix: on some platforms, getc() and ungetc() are macros. Rename member functions of cpp_parser_t to avoid trouble. * In configure, calculate variables CPU_DEFINES and OS_DEFINES to enable CPU-specific and OS-specific code respectively. Doesn't support cross-compile. * valgrind-run supports valgrind version 2. * Fix the dist: target yet again. * Fix bug where estring::truncate_to() could not handle a new length longer than the old length. * Fix bug where expanding an estring by a large amount fails to allocate enough space and overruns the buffer. * Add append_vprintf(), insert_vprintf() and replace_vprintf() to estring. * Fix UMR in estring const constructor. Sun Sep 26 20:48:49 2004 Greg Banks * Release 0.3 * Added a number of text reports to ggcov, tggcov. * Added -o option to ggcov, tggcov (same as gcov's -o option). * Summary window shows percentages of partially covered entities. * Split Summary window numeric display into separate columns for proportion and percentage, to get better visual alignment. * Added Blocks column to the Functions window. * Added Blocks and Functions columns to the Files window. * Added support for yet another .bbg/.bb/.da file format, this time emitted by gcc 3.3.2 in Fedora Core 1. * Source lines which depend on any of the cpp symbols in the suppression set, are suppressed. The -X commandline option * adds a cpp symbol to the suppression set. * Arcs from suppressed lines are suppressed; functions are suppressed if they contain no unsuppressed lines. * Suppressed source lines are shown in a different colour. * Reorganised BFD and platform-specific call scanning code. * Various minor bug fixes. * Checked in a bunch of tests which have been sitting around. Tue Nov 4 23:55:52 2003 Greg Banks * Release 0.2.2 * Added simple man page to document commandline usage. * Fixed bug where callgraph scanning found no calls ever. * Replaced most #ifdef DEBUG debugging prints with runtime prints. with commandline selection of debug features. Sun Aug 3 18:37:40 2003 Greg Banks * Release 0.2.1 * Fixed bug where stabs32 filename scanning code was never linked in, so ggcov couldn't be given an executable as an argument. * Added a warning when configure falls back from GNOME v2 to v1.2. * configure check for the popt library works on platforms where libpopt.so is not in /usr/lib but in the same nonstandard location as the GNOME libraries. * Removed acconfig.h. We can do without it on autoconf 2.13 and it makes autoconf 2.57 whine mightily. Tue Jul 22 21:43:30 2003 Greg Banks * Release 0.2 * Full support for all features in GTK2. * Removed the --enable-gtk2 configure option; uses GTK 2.0 if its installed and recent enough otherwise fallback to GTK 1.2. * Fixed colour coding of list rows in Files and Functions windows in gtk2. * Pushed ifdef code for dealing with GtkText in gtk 1.2 build versus GtkTextView in gtk 2.0, down into new ui_text_*() functions. Source and Licence windows use new ui_text_*() functions. No GTK2 ifdefs. * Fixed compile warning in GTK2 port. * Added GNOME .desktop file (thanks to Dag Wieers) and a 63x63 desktop icon. * ggcov handles file:// URLs on the command line so it can be invoked by dragging files or directories from Nautilus onto its GNOME desktop icon. * Default action if no files on commandline (e.g. user double-clicks the desktop icon) is to show the File->Open dialog and exit if files are selected (used to be the same as "ggcov ."). * User can load source, objects or directories into ggcov by dragging and dropping them from Nautilus. * Added File->Open dialog to allow user to select executables, source files or directories. Files can be loaded in multiple passes, e.g. from multiple invocations of the File->Open dialog. * Added MVC module. * Class cov_file_t provides an object to be listened to for MVC notifications of when the global set of files changes. * All windows are notified of changes to the global files set by having their populate() method called, which rebuilds the display from scratch. * Added support for building RPMs on RedHat 9. * Support for autoconf 2.57 (RH9). * Fixed library order bug which broke build on RH9. * Encode into the RPM filename the name of the Linux distro where built. * Only one of the two glade files is packaged into the RPM. * Used %configure in spec file. Required switching from overloading prefix to DESTDIR in %install stage. * Added ptrarray_t, a templated wrapper around glib's GPtrArray. * Converted most uses of GPtrArray to ptrarray_t. * Reorganised data structures. There is now a per-line class cov_line_t, an array of which is kept per-file. It contains the list of blocks for that line as well as caching the calculated count. * cov_file_t now created on demand for secondary files, e.g. header files with inline functions. * Fixed bug which failed an assert if user selected a range of uninstrumented lines in the Source window and used the Summarise Range command. * Fixed bugs with text window line selection in gtk2 port. * Removed spurious #ifdef which was always disabling the config file. * Made formatting in Source window a little less dependent on hardcoded column widths. * Removed last traces of the screenshot_mode option. * Fixed bug where Files window's populate() method didn't handle being called twice. * Added argv0 so test programs will link. Fri Jul 11 01:51:32 2003 Greg Banks * Release 0.1.8 * Fixed interpretation of relative filenames in .bb files. * Added assignment operators to class estring. * Fixed broken compile when libbfd missing. * When showing or hiding columns in the Source window, preserve the scroll position instead of flipping back to the start. Wed Jul 2 22:30:45 2003 Greg Banks * Release 0.1.7 * Fixed bug in detection of gcc 2.96 braindamage which spuriously triggered the error message on gcc 3.3. * Fixed bug where Source window wrap was disabled for the GTK2 build even when it didn't need to be. * Enabled the Source window File->Save As command for gtk2 build, which also removes some runtime warnings when the Source window is opened. * Captured the log output for a new GTK2 log domain. * Simplified log initialisation code. Wed Jul 2 22:30:45 2003 Greg Banks * Release 0.1.6 * Initial support for new gcc 3.3 bbg and da formats. * Make cov_file_t::read_bbg_function() more robust in the face of bad data (e.g. the new .bbg file format). * Added support for moving machine-specific code into subclasses of abstract generic classes, including a factory class. Moved the stab32 parsing code into a machine-specific subclass. * Updated strings to mention ggcov not cant. * Improved debugging prints. * Reorganised Makefile to build two archive libraries and link ggcov and test programs from there, rather than specifying all the source for every test program. * Added test program newbbgdump to dump the new gcc 3.3 bbg format. * Added test program tggcov to write coveraged like gcov, for automated comparison of basic block accounting. * Moved the summarise() debug code to cov.C:cov_dump(). * Fixed FMR while parsing arguments in gtk1.2 build. * Fixed unused variable warning in argument parsing. * Fixed compile bug in debug message in fileswin.C. * Fixed bug in declarations of describe() methods in subclasses of cov_scope_t which only showed up in high debug levels. * Strip '&' as well as '*' when normalising mangled .bbg names. Sat Jun 14 00:22:17 2003 Greg Banks * Release 0.1.5 * Autoconf detects presence of gtk_text_buffer_select_range() and handles its absence as gracefully as possible. * If libpopt is missing, supply our own trivial implementation. This allows only parse_args() to exist while handling building on systems with gtk2 and no libpopt. * Fixed a couple of bugs gtk2 in the Source window where selecting items from the Filename or function menus would SEGV. Sun Jun 8 16:23:01 2003 Greg Banks * Release 0.1.4 * Made ggcov more robust when faced with problems finding or loading data from object files; emits warning messages and keeps going rather than failing asserts. * Recognise file extensions .cc .cxx and .cpp as source code. * Added a wrapper for the C++ demangling code in libiberty and a function to normalise mangled names. * Demangle names from .o files, normalise mangled names from .bb files. * Ggcov doesn't use the "fake" arc flag from the .bbg data file anymore but detects call arcs using the arc's destination block. With a working gcc this makes no difference; with the braindead 2.96 ggcov can detect most rather than none of the call arcs. * Ggcov now detects broken data files written by braindead gcc 2.96, and emits a warning message and skips reading the object file. * Ggcov will search directories for source files recursively; disabled by default, enabled with the --recursive/-r option. * cov_file_t and related objects can be deleted, correctly & efficiently. Needed for directory scanning to be robust in the presence of source which isn't compiled, or is compiled but not linked. * Added hashtable_t templated wrapper for GHashTable, and replaced all uses of GHashTable with the wrapper. * Functions window can use a typesafe list now. * Replaced all uses of the strassign() & strdelete() macros with class string_var. * Fileswin uses tok_t tokenizer instead of strtok(). * Added operator to cast estring to const char*. * Minor de-crufting. * Created a cov_scope_t class which abstracts the scoped statistics summary. Moved the overall and range scope code from global functions into private members of derived classes of cov_scope_t. * Call Graph window uses scope objects instead of calling calc_stats(). * Added cov_compound_scope_t for aggregating multiple scopes, cached. * Files window and functions window use scope objects instead of calling calc_stats() methods and caching the results. * cov_file_t::calc_stats() and cov_function_t::calc_stats() are now private; they are only needed by the scope objects, which are friends. * Fixed bug where double-click in Files List window didn't work. * Fixed memleak in the Call Graph window. * Fixed argument parsing code. * Fixed memleak destroying cov_blocks during recursive source scan. * Fixed bug in debug output. * Fixed broken view menu checkboxes in gtk2 build. * Fixed many bugs with gtk2 port. Most windows now work passably rather than coredump when first shown. * Simplified coding of list & tree double-click handlers, also hides most of the gtk/gtk2 differences. Sat May 31 17:32:17 2003 Greg Banks * Release 0.1.3 * Fixed bug in string_var class which randomly broke data file loading. * Removed warnings in -DDEBUG build. Fri May 30 00:56:06 2003 Greg Banks * Release 0.1.2 * Added title column buttons to source window, and a View menu item to hide them. * Reimplemented Files window's tree mode; now shows accumulated statistics on directories. * Added a menu item to the Source window to save the source with the currently selected annotations. * All directories mentioned on the commandline are searched for all .bb .bbg .da and .o files, in the given order and always starting with the source file's own directory. This gives the functionality of "gcov -o". * Rewrote file_make_absolute() to normalise out "." and ".." from pathnames. * Removed a stray TAB from a GUI label. * Centralised the File->Close and File->Exit callbacks in class window_t. * Added string_var and tok_t classes for string manipulation. * Portability fixes. * Minor code cleanups. Mon Mar 17 14:54:46 2003 Greg Banks * Release 0.1.1 * Added a tree mode to Files window, which displays source files from multiple directories in a tree format. * When the Call Butterfly window is shown, initialise the hpaned widget so that both the Calls From and Calls To lists are visible. * Call Graph window shows whole graph when graph is nontrivial. Layout algorithm still sucks. * Hacked around bug with new argument parsing where gtk/gnome options are not stripped out before ggcov parses the arguments. * Fixed bug which lost list column header labels on recent gtk 1.2's. * Fixed bugs where Call Graph window would SEGV or loop when the coverage data contained function call loops. Tue Mar 11 13:54:45 2003 Greg Banks * Release 0.1 * Compile ggcov with the C++ compiler. * Converted cov.[ch] to C++, split up into multiple source files. * Added base class window_t and converted all the GUI windows to be derived classes of window_t. * Converted estring to C++. * Added C++ list_t<> templated wrapper for GList. * Added list_t::sort(). * Moved ggcov.c:read_gcov_directory() -> cov.c:cov_read_directory(). * In many different places the internals details of how cov_file_t's, cov_function_t's, and cov_block_t's are related was unnecessarily exposed. Added cov_file_num_functions(), cov_function_num_blocks(); enforced use of cov_file_nth_function() & cov_function_nth_block(). * Separated cov_callnode_t and cov_callarc_t into their own files and converted them to C++. * cov_get_count_by_location() returns a 4-way enum instead of of a boolean, indicating the coverage status of the line. One of the enum values indicates partially covered lines, i.e. multiple blocks appear on the line and not all of them are executed. * Renamed sourcewin_t::show_file() to show_filename() and added a new show_file() which takes a cov_file_t. Summarywin and fileswin use the new function. * Converted fileswin.C:file_rec_t to C++. * Provided global operator delete which provides no value except to shut up valgrind and Purify about mismatched frees. * C++ compiler noticed that mode_t is unsigned so returning -1 through it is a bug...so changed return type of file_mode() to int. * Converted sourcewin.C:sourcewin_hacky_rec_t to C++. * Removed the global filenames list and replaced with a list of cov_file_t's iterated by cov_file_t::first(). * Converted functionswin.C:func_rec_t to C++. * Extended file_change_extension() to allow the old extension to be specified as NULL which uses any existing extension. * Uses c99's uint64_t where available. * Centralised definitions of unsigned 32 & 64 bit ints. * Provided macros in covio.h for formatting covio_u{32,64}_t. * Added define COV_COUNT_MAX which is maximum value of a count_t. * Centralised 64-bit integer printf format strings. * Partial gtk2 port derived from code contributed by Havoc Pennington. * GNOME colour pickers disabled for gtk2. * Canvas-based call graph window disabled for gtk2. * Config file reading disabled for gtk2. * Removed useless --glade-path option. * Added cov_is_source_filename() to test whether a filename matches the known source file extensions. * Renamed cov_handle_c_file() -> cov_read_source_file(). * Added cov_read_object_file() which uses the .stab and .stabstr ELF sections to extract a list of source filenames with full paths. * Added cov_pre_read() by analogy with cov_post_read(); will be useful one day. * Added infrastructure for program preferences, saved and loaded using gnome_config_*() routines. * Added preferences dialog to edit preferences. * Added to prefs foreground and background colours for colour coding various items according to coverage status. * Tweaked some default colours for better look. * Summarywin uses colours from prefs. * Functionswin colour codes list entries using colours from prefs. * Fileswin colour codes list entries using colours from prefs. * Sourcewin uses colours from prefs. * Callgraph2win uses colours from prefs. * Added a second Call Graph window which actually has a graphical presentation rather than navigable distribution to callers/callees. New window present calls as nodes in a call graph, with function name, filename, and coverage show textually in the node. Nodes are colour coded red, yellow or green according to the function's line coverage. Nodes with no instrumented source lines are grey. Arcs are colour coded according to arc coverage. Layout is fixed and very primitive. * Changed the Windows menu names of the two call graph windows to be more indicative and less ambiguous: callgraphwin announces itself as "Call Butterfly" and callgraph2win as "Call Graph". * Attempted to improve the call graph window layout algorithm. * Callgraphwin list frame labels are easier to understand, e.g. "Called from" instead of "Distribution to Ancestors". * Sourcewin's block column collapses runs of consecutive blocks into a range, e.g. "3-6" instead of "3,4,5,6". Avoids a lot of column overflow. * Split Function combo box into From Function and To Function boxes, both of which have an "All Functions" wildcard item which is the default. * Reorganised columns in Calls window, now has From To Line Arc Count. * Moved list of filenames and functions in source window from menubar to a new toolbar. * Added View->Toolbar to the source window to control whether the toolbar is visible (visible by default). * Added to prefs a boolean controlling whether a new source window is popped up every time or an old one is reused. * Added preference to reuse the summary window. * Added concept of minimal file names, where only the minimal unique suffix of a filename is displayed to the user. * Double-clicking on a row in the Calls list shows the `from' source line. * Visual improvements to the About window. * Added View menu to Calls window with a check menu item for each column. Arc column is off by default. * Added icon for all toplevel windows derived from logo.xpm. * Added ui.c infrastructure for app to select a default icon. * Added infrastructure to debug GTK/Glib log messages. * Added to source window menu items to summarise the source file, the selected function, or the selected source lines. * window_t::show() will also raise a window. * Reduce unnecessary processing on windows that are reused by only calling populate() the first time a window is shown. * Added default definitions of _ and N_ in preparation for gettext. * Dealt with stupid gnome header files redefining _ and N_. * Made cov_function_t::name() const like it always should have been. * Adding version.m4 for the website. * Used aclocal.m4 the way it was intended. * Install & distribute the logo pixmap. * Removed autoconf stuff from .spec file setup section. * For gcc, add a bunch of warning options to $CFLAGS. * Added bbdump program to help debug .bb file problems. * Ignored a couple more generated files. * The .cvsignore and .gdbinit files are distributed. * Various minor configure.in/Makefile.am updates from Havoc Pennington. * Fixed bug which SEGVd when double-clicking on a function in the functions window which has no executable lines. * Fixed buffer overrun bug in sourcewin due to my misunderstanding the return value of snprintf(). * Fixed bug which incorrectly assumed that the last function listed in the coverage data file would contain the last source line in its source file. Now keep an explicit last location variable. * Fixed bug found by valgrind where selecting the last line of a source window overran the offsets_by_line_ array. * Fixed bug where sourcewin_t::show_lines() didn't show the window. * Worked around a bug where cov_arc_get_from_location() sometimes returned 0 unexpectedly. * Removed superfluous include of estring.h * Added estring_replace_all() instead of the poorly implemented attempt in ui.c. * Fixed minor warnings. * Made some debugging prints appear less frequently. * Removed some asserts from list_t dtor, valgrind is a better debugging tool. Mon Dec 3 12:07:12 2001 Greg Banks * Release 0.0.7. * Builds a callgraph from the information read from various files, including calls to functions not covered (like printf). * Added a window to explore the call graph. Shows distribution to callers and callees in clists; double-clicking navigates to the new function. * Added a Calls window which shows the call coverage per-call for a given function. * Ggcov uses the BFD library to read object files, using relocs, contents and symbols for text sections to figure out names for function call arcs in the block graph. * Added option to Source window to show block numbers. * Added ulcmp() and ullcmp() to help sorting on unsigned longs and unsigned long longs respectively. * Renamed xmalloc() -> gnb_xmalloc() to avoid possible clash with function of same name in -liberty. * Added ui_combo_set_current_data(). * Added listclear() macro which deletes GList structures like listdelete() but does not call any dtor. * Fixed a few minor problems with debugging prints and warnings. Fri Nov 30 12:26:55 2001 Greg Banks * Release 0.0.6 * Added a Files List window analagous to the Function List window. * Added fixed Windows menu items to create new Summary, Source, File List and Function List windows. * Initial window population is now just an overall summary. * Sortable column support now handles the case where not every column is sortable (backport from ggui). * Added a TODO list of some ideas. Tue Nov 27 11:53:14 2001 Greg Banks * Release 0.0.5 * Added progress bars to show test coverage stats in the Summary window. * Progress bars display red/green to color code coverage stats. Had to subclass from GtkProgressBar to achieve this. * Added a Functions List window to show all the functions in all the files, with line call and branch coverage results. Clicking on columns sorts the list by that column. Double-clicking on rows shows the source for that function. * Added support for having an up or down arrow in the current sort column of a clist. Clicking on the columns does the expected thing with sorting. Sun Nov 25 19:44:38 2001 Greg Banks * Release 0.0.4 * Added GUI to show summary of coverage statistics at overall, file, function, and range scope. * Various small GUI improvments. Sat Nov 24 01:34:43 2001 Greg Banks * Release 0.0.3 * Added GUI to browse source annotated with line execution counts (only). * Built RPM. Fri Nov 23 15:41:28 2001 Greg Banks * Release 0.0.2 * Split source code up from one big .c file. * First check into CVS. Thu Nov 22 17:39:15 2001 Greg Banks * Release 0.0.1 * Reads .bb, .bbg, and .da files to construct data structures * Annotates C files with line counts, identical results to gcov. ggcov-0.8.4/depcomp0000755000175000017500000003710011455722466011143 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: