fi
# preserve --debug
- test "$opt_debug" = : || func_append preserve_args " --debug"
+ test "$debug_cmd" = : || func_append preserve_args " --debug"
case $host in
*cygwin* | *mingw* | *pw32* | *cegcc*)
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
- $opt_debug
+ $debug_cmd
+
save_ifs=$IFS; IFS='~'
for cmd in $1; do
IFS=$save_ifs
# `FILE.' does not work on cygwin managed mounts.
func_source ()
{
- $opt_debug
+ $debug_cmd
+
case $1 in
*/* | *\\*) . "$1" ;;
*) . "./$1" ;;
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
- $opt_debug
+ $debug_cmd
+
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
# be empty on error (or when ARG is empty)
func_convert_core_file_wine_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_convert_core_file_wine_to_w32_result="$1"
if test -n "$1"; then
# Unfortunately, winepath does not exit with a non-zero error code, so we
# are convertible, then the result may be empty.
func_convert_core_path_wine_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
# unfortunately, winepath doesn't convert paths, only file names
func_convert_core_path_wine_to_w32_result=""
if test -n "$1"; then
# environment variable; do not put it in $PATH.
func_cygpath ()
{
- $opt_debug
+ $debug_cmd
+
if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
if test "$?" -ne 0; then
# result in func_convert_core_msys_to_w32_result.
func_convert_core_msys_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
# awkward: cmd appends spaces to result
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
# func_to_host_file_result to ARG1).
func_convert_file_check ()
{
- $opt_debug
+ $debug_cmd
+
if test -z "$2" && test -n "$1" ; then
func_error "Could not determine host file name corresponding to"
func_error " \`$1'"
# func_to_host_file_result to a simplistic fallback value (see below).
func_convert_path_check ()
{
- $opt_debug
+ $debug_cmd
+
if test -z "$4" && test -n "$3"; then
func_error "Could not determine the host path corresponding to"
func_error " \`$3'"
# and appending REPL if ORIG matches BACKPAT.
func_convert_path_front_back_pathsep ()
{
- $opt_debug
+ $debug_cmd
+
case $4 in
$1 ) func_to_host_path_result="$3$func_to_host_path_result"
;;
# in func_to_host_file_result.
func_to_host_file ()
{
- $opt_debug
+ $debug_cmd
+
$to_host_file_cmd "$1"
}
# end func_to_host_file
# in (the comma separated) LAZY, no conversion takes place.
func_to_tool_file ()
{
- $opt_debug
+ $debug_cmd
+
case ,$2, in
*,"$to_tool_file_cmd",*)
func_to_tool_file_result=$1
# func_to_host_file_result.
func_convert_file_msys_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
# func_to_host_file_result.
func_convert_file_cygwin_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_file_result="$1"
if test -n "$1"; then
# because $build is cygwin, we call "the" cygpath in $PATH; no need to use
# and a working winepath. Returns result in func_to_host_file_result.
func_convert_file_nix_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_file_wine_to_w32 "$1"
# Returns result in func_to_host_file_result.
func_convert_file_msys_to_cygwin ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
# in func_to_host_file_result.
func_convert_file_nix_to_cygwin ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_file_result="$1"
if test -n "$1"; then
# convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
to_host_path_cmd=
func_init_to_host_path_cmd ()
{
- $opt_debug
+ $debug_cmd
+
if test -z "$to_host_path_cmd"; then
func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
to_host_path_cmd="func_convert_path_${func_stripname_result}"
# in func_to_host_path_result.
func_to_host_path ()
{
- $opt_debug
+ $debug_cmd
+
func_init_to_host_path_cmd
$to_host_path_cmd "$1"
}
# func_to_host_path_result.
func_convert_path_msys_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_path_result="$1"
if test -n "$1"; then
# Remove leading and trailing path separator characters from ARG. MSYS
# func_to_host_file_result.
func_convert_path_cygwin_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
# a working winepath. Returns result in func_to_host_file_result.
func_convert_path_nix_to_w32 ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
# Returns result in func_to_host_file_result.
func_convert_path_msys_to_cygwin ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
# func_to_host_file_result.
func_convert_path_nix_to_cygwin ()
{
- $opt_debug
+ $debug_cmd
+
func_to_host_path_result="$1"
if test -n "$1"; then
# Remove leading and trailing path separator characters from
# func_mode_compile arg...
func_mode_compile ()
{
- $opt_debug
+ $debug_cmd
+
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
# func_mode_execute arg...
func_mode_execute ()
{
- $opt_debug
+ $debug_cmd
+
# The first argument is the command name.
cmd="$nonopt"
test -z "$cmd" && \
# func_mode_finish arg...
func_mode_finish ()
{
- $opt_debug
+ $debug_cmd
+
libs=
libdirs=
admincmds=
# func_mode_install arg...
func_mode_install ()
{
- $opt_debug
+ $debug_cmd
+
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# a dlpreopen symbol table.
func_generate_dlsyms ()
{
- $opt_debug
+ $debug_cmd
+
my_outputname="$1"
my_originator="$2"
my_pic_p="${3-no}"
# Despite the name, also deal with 64 bit binaries.
func_win32_libid ()
{
- $opt_debug
+ $debug_cmd
+
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib ()
{
- $opt_debug
+ $debug_cmd
+
sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
}
# specified import library.
func_cygming_dll_for_implib_fallback_core ()
{
- $opt_debug
+ $debug_cmd
+
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
$SED '/^Contents of section '"$match_literal"':/{
# with nonzero status (FALSE) otherwise.
func_cygming_gnu_implib_p ()
{
- $opt_debug
+ $debug_cmd
+
func_to_tool_file "$1" func_convert_file_msys_to_w32
func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
test -n "$func_cygming_gnu_implib_tmp"
# with nonzero status (FALSE) otherwise.
func_cygming_ms_implib_p ()
{
- $opt_debug
+ $debug_cmd
+
func_to_tool_file "$1" func_convert_file_msys_to_w32
func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
test -n "$func_cygming_ms_implib_tmp"
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib_fallback ()
{
- $opt_debug
+ $debug_cmd
+
if func_cygming_gnu_implib_p "$1" ; then
# binutils import library
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
- $opt_debug
+ $debug_cmd
+
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
if test "$lock_old_archive_extraction" = yes; then
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
- $opt_debug
+ $debug_cmd
+
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
# True if ARG is an import lib, as indicated by $file_magic_cmd
func_win32_import_lib_p ()
{
- $opt_debug
+ $debug_cmd
+
case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
*import*) : ;;
*) false ;;
# func_mode_link arg...
func_mode_link ()
{
- $opt_debug
+ $debug_cmd
+
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# func_mode_uninstall arg...
func_mode_uninstall ()
{
- $opt_debug
+ $debug_cmd
+
RM="$nonopt"
files=
rmforce=
# that subsequent calls have no effect.
func_echo_once ()
{
- $opt_debug
+ $debug_cmd
+
if test -n "$1"; then
eval my_msg=\$$1
# as the cp(1) shell command.
func_copy ()
{
- $opt_debug
+ $debug_cmd
test -f "$1" || \
{ func_error "\`$1' not copied: not a regular file"; return 1; }
# possible).
func_copy_cb ()
{
- $opt_debug
+ $debug_cmd
+
my_file="$1"
my_srcdir="$2"
my_destdir="$3"
# spaces in file and directory names.
func_copy_some_files ()
{
- $opt_debug
+ $debug_cmd
+
my_srcfile_spec="$1"
my_srcdir="$2"
my_destdir="$3"
# func_fixup_Makefile srcfile srcdir destdir
func_fixup_Makefile ()
{
- $opt_debug
+ $debug_cmd
+
my_filename="$1"
my_srcdir="$2"
my_destdir="$3"
# configure.(ac|in) and aclocal.m4.
func_scan_files ()
{
- $opt_debug
+ $debug_cmd
+
# Prefer configure.ac to configure.in
test -f configure.ac && configure_ac=configure.ac
test -f "$configure_ac" || configure_ac=
# Output INCLUDEFILE if SEARCHFILE m4_includes it, else output SEARCHFILE.
func_included_files ()
{
- $opt_debug
+ $debug_cmd
+
my_searchfile="$1"
my_include_regex=
# comment line must also match MACRO_REGEX, if given.
func_serial ()
{
- $opt_debug
+ $debug_cmd
+
my_filename="$1"
my_macro_regex="$2"
my_sed_serial='
# same, func_serial_max_result will be empty.
func_serial_max ()
{
- $opt_debug
+ $debug_cmd
+
my_serial1="$1"
my_serial2="$2"
# to 'false'.
func_serial_update_check ()
{
- $opt_debug
+ $debug_cmd
+
my_srcfile="$1"
my_src_serial="$2"
my_destfile="$3"
# in aclocal.m4, set $func_aclocal_update_check to 'false'.
func_aclocal_update_check ()
{
- $opt_debug
+ $debug_cmd
+
my_srcfile="$aclocaldir/$1"
my_destfile="aclocal.m4"
# OLD_MACRO_REGEX must match any text after "# serial N" in both files.
func_serial_update ()
{
- $opt_debug
+ $debug_cmd
+
my_filename="$1"
my_srcdir="$2"
my_destdir="$3"
# `--force' at the command line.
func_keyword_update ()
{
- $opt_debug
+ $debug_cmd
+
my_filename="$1"
my_srcdir="$2"
my_destdir="$3"
# specified `--force' at the command line.
func_ltmain_update ()
{
- $opt_debug
+ $debug_cmd
+
my_sed_ltmain='
/^package_revision='\''*[0-9][1-9.]*'\''*/ {
s,^package_revision='\''*\([0-9.]*\)'\''*[ ]*$,\1,
# specified `--force' at the command line.
func_config_update ()
{
- $opt_debug
+ $debug_cmd
+
my_sed_config='
/^timestamp='\''*[0-9][1-9-]*'\''*/ {
s,^timestamp='\''*\([0-9-]*\)'\''*,\1,
# specified `--force' at the command line.
func_install_update ()
{
- $opt_debug
+ $debug_cmd
+
my_sed_install='
/^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
s,[#;].*,,
# this function massages it into a suitable format for func_copy_some_files.
func_massage_aclocal_DATA ()
{
- $opt_debug
+ $debug_cmd
+
pkgmacro_files= # GLOBAL VAR
my_glob_exclude="$1"
# from libtool installation tree to subproject libltdl tree.
func_install_pkgmacro_subproject ()
{
- $opt_debug
+ $debug_cmd
# Remove any lingering files that my have been installed by some
# previous libtoolize release:
# from the libtool installation tree.
func_install_pkgmacro_parent ()
{
- $opt_debug
+ $debug_cmd
# Remove any lingering files that my have been installed by some
# previous libtoolize release:
# Install copies of the libtool and libltdl m4 macros into this package.
func_install_pkgmacro_files ()
{
- $opt_debug
+ $debug_cmd
# argz.m4, libtool.m4 and ltdl.m4 are handled specially:
func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
# function massages it into a suitable format for func_copy_some_files.
func_massage_pkgltdl_files ()
{
- $opt_debug
+ $debug_cmd
+
pkgltdl_files= # GLOBAL VAR
my_glob_exclude="$1"
# func_install_pkgconfig_files and func_install_pkgmacro_files resp.
func_install_pkgltdl_files ()
{
- $opt_debug
+ $debug_cmd
+
$opt_ltdl || return
# Remove any lingering files that my have been installed by some
# function massages it into a suitable format for func_copy_some_files.
func_massage_pkgconfig_files ()
{
- $opt_debug
+ $debug_cmd
+
pkgconfig_files= # GLOBAL VAR
my_glob_exclude="$1"
# from libtool installation tree to subproject libltdl tree.
func_install_pkgconfig_subproject ()
{
- $opt_debug
+ $debug_cmd
# Remove any lingering files that my have been installed by some
# previous libtoolize release:
# available from the libtool installation tree.
func_install_pkgconfig_parent ()
{
- $opt_debug
+ $debug_cmd
# Remove any lingering files that my have been installed by some
# previous libtoolize release:
# shares the AC_CONFIG_AUX_DIR setting.
func_install_pkgconfig_files ()
{
- $opt_debug
+ $debug_cmd
+
func_massage_pkgconfig_files
# 1. Parent shares aux_dir with subproject ltdl:
# a directory that exists and is non-empty abort with a diagnostic.
func_nonemptydir_p ()
{
- $opt_debug
+ $debug_cmd
+
my_dirvar="$1"
my_dir=`eval echo "\\\$$my_dirvar"`
# Sanity check macros from aclocal.m4 against installed versions.
func_check_macros ()
{
- $opt_debug
+ $debug_cmd
+
$opt_quiet && return
$seen_autoconf || return
# How verbose should we be? Default is test output in log file.
# Setting VERBOSE=debug puts the shell in debug mode.
-opt_debug=:
+debug_cmd=:
case "$VERBOSE" in
DEBUG | debug )
- opt_debug='set -x'
- $opt_debug
+ debug_cmd='set -x'
+ $debug_cmd
;;
esac
# func_get_config varname_list src [failp] [regex]
func_get_config ()
{
- $opt_debug
+ $debug_cmd
+
my_varname_list="$1"
my_src="$2"
my_failp="false"; test -z "$3" || my_failp=:
# func_mkprefixdir
func_mkprefixdir ()
{
- $opt_debug
+ $debug_cmd
+
# An absolute path to a test installation directory.
func_mkdir_p "$prefix"
prefix=`cd $prefix && pwd`
# func_rmprefixdir
func_rmprefixdir ()
{
- $opt_debug
+ $debug_cmd
+
test -d $prefix && rm -rf $prefix
prefix=NONE
}
# Make sure a directory exists, and then change to it.
func_cd ()
{
- $opt_debug
+ $debug_cmd
+
my_dir="$1"
# Maybe we have a VPATH build, in which case, create a new subdir.
# If FILE does not exist, give a fatal error regarding running PREREQ first.
func_require ()
{
- $opt_debug
+ $debug_cmd
+
my_prereq="$1"; shift
my_files=${1+"$@"}
# Configure the demonstration.
func_configure_nofail ()
{
- $opt_debug
+ $debug_cmd
+
my_args=${1+"$@"}
func_dirname_and_basename "`pwd`"
my_dir=$func_basename_result
# for the expected STATICP and SHAREDP library building
func_check_static_shared ()
{
- $opt_debug
+ $debug_cmd
+
my_staticp="$1"
my_sharedp="$2"
# Do the actual build.
func_make ()
{
- $opt_debug
+ $debug_cmd
+
my_args=${1+"$@"}
func_dirname_and_basename "`pwd`"
func_msg "Running \`$MAKE $my_args' in $func_basename_result"
# Possibly clean up the distribution.
func_make_distclean ()
{
- $opt_debug
+ $debug_cmd
+
if test -f Makefile; then
func_make distclean
fi
# Ignore dotfiles, so that .nfsXXX files don't screw up the test.
func_make_uninstall ()
{
- $opt_debug
+ $debug_cmd
+
func_make uninstall
leftovers=`find $prefix ! -type d ! -name '.*' -print`
# func_exec_init mode
func_exec_init ()
{
- $opt_debug
+ $debug_cmd
+
func_dirname_and_basename "`pwd`"
func_msg "Executing $1 programs in $func_basename_result"
# Check to see if PROGRAM was built. If not display MSG.
func_exec_check ()
{
- $opt_debug
+ $debug_cmd
+
my_program="$1"
if test -f "$my_program"; then :
# If not display MSG.
func_exec ()
{
- $opt_debug
+ $debug_cmd
+
my_program="$1"
my_exp_output="$2"
func_dirname_and_basename "`pwd`"