1
0
Files
2016-11-30 09:03:17 +08:00

23380 lines
763 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#! /bin/sh
# Generated from testsuite.at by GNU Autoconf 2.65.
#
# Copyright (C) 2009 Free Software Foundation, Inc.
#
# This test suite 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
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
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (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
# 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
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="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_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
as_have_required=no
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
as_found=:
case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
CONFIG_SHELL=$as_shell as_have_required=yes
if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
break 2
fi
fi
done;;
esac
as_found=false
done
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
CONFIG_SHELL=$SHELL as_have_required=yes
fi; }
IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
$as_echo "$0: This script requires a shell more modern than all"
$as_echo "$0: the shells that I found on your system."
if test x${ZSH_VERSION+set} = xset ; then
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
$0: including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
{ eval $1=; unset $1;}
}
as_unset=as_fn_unset
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
return $1
} # as_fn_set_status
# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
set +e
as_fn_set_status $1
exit $1
} # as_fn_exit
# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{
case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
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_fn_error "cannot create directory $as_dir"
} # as_fn_mkdir_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
eval 'as_fn_append ()
{
eval $1+=\$2
}'
else
as_fn_append ()
{
eval $1=\$$1\$2
}
fi # as_fn_append
# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
eval 'as_fn_arith ()
{
as_val=$(( $* ))
}'
else
as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
}
fi # as_fn_arith
# as_fn_error ERROR [LINENO LOG_FD]
# ---------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with status $?, using 1 if that was 0.
as_fn_error ()
{
as_status=$?; test $as_status -eq 0 && as_status=1
if test "$3"; then
as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
$as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
fi
$as_echo "$as_me: error: $1" >&2
as_fn_exit $as_status
} # as_fn_error
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
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'`
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
# 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_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
# 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; as_fn_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
}
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
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='mkdir -p "$as_dir"'
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'"
SHELL=${CONFIG_SHELL-/bin/sh}
# How were we run?
at_cli_args="$@"
# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times_p=false
(times) >/dev/null 2>&1 && at_times_p=:
# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose? ':' means no, empty means yes.
at_verbose=:
at_quiet=
# Running several jobs in parallel, 0 means as many as test groups.
at_jobs=1
at_traceon=:
at_trace_echo=:
at_check_filter_trace=:
# Shall we keep the debug scripts? Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# Display the version message?
at_version_p=false
# List test groups?
at_list_p=false
# --clean
at_clean=false
# Test groups to run
at_groups=
# Whether a write failure occurred
at_write_fail=0
# The directory we run the suite in. Default to . if no -C option.
at_dir=`pwd`
# An absolute reference to this testsuite script.
case $as_myself in
[\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
* ) at_myself=$at_dir/$as_myself ;;
esac
# Whether -C is in effect.
at_change_dir=false
# List of the tested programs.
at_tested=''
# List of the all the test groups.
at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106'
# As many question marks as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='???'
# Description of all the test groups.
at_help_all="1;libtoolize.at:83;libtoolize macro installation;libtoolize;
2;libtoolize.at:108;libtoolize macro directory mismatch error;libtoolize;
3;libtoolize.at:128;libtoolize macro serial update;libtoolize;
4;libtoolize.at:201;libtoolize config files serial update;libtoolize;
5;libtoolize.at:281;diagnose missing LT_CONFIG_LTDL_DIR;libtoolize;
6;libtoolize.at:426;copy ltdl.m4 with shared macro directory;libtoolize;
7;libtoolize.at:438;correctly parse LTDL_INIT from configure.ac;libtoolize;
8;libtoolize.at:450;diagnose missing LTDL_INIT invocation;libtoolize;
9;libtoolize.at:527;upgrading verbatim style aclocal.m4;libtoolize automake;
10;libtoolize.at:651;verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR;libtoolize automake;
11;libtoolize.at:783;nonrecursive ltdl with AC_CONFIG_MACRO_DIR;libtoolize;
12;libtoolize.at:854;subproject ltdl with non-shared directories;libtoolize;
13;libtoolize.at:945;LIBTOOLIZE_OPTIONS;libtoolize;
14;libtoolize.at:992;cleanup old installation;libtoolize;
15;help.at:26;standard command line options;libtool libtoolize;
16;help.at:41;mode short-hands;;
17;duplicate_members.at:25;duplicate members in archive tests;libtool;
18;duplicate_conv.at:25;duplicate convenience archive names;libtool;
19;duplicate_deps.at:25;preserve duplicate convenience deps;libtool;
20;flags.at:24;passing CC flags through libtool;libtool cc;
21;flags.at:24;passing CXX flags through libtool;libtool cxx;
22;flags.at:24;passing F77 flags through libtool;libtool f77;
23;flags.at:24;passing FC flags through libtool;libtool fc;
24;flags.at:24;passing GCJ flags through libtool;libtool gcj;
25;inherited_flags.at:26;inherited_linker_flags;libtool;
26;convenience.at:30;C convenience archives;libtool;
27;convenience.at:69;C++ convenience archives;cxx libtool;
28;convenience.at:109;F77 convenience archives;f77 libtool;
29;convenience.at:169;FC convenience archives;fc libtool;
30;convenience.at:229;Java convenience archives;gcj libtool;
31;link-order.at:26;Link order test;libtool;
32;link-order2.at:46;Link order of deplibs;libtool interactive;
33;fail.at:27;Failure tests;libtool;
34;shlibpath.at:25;shlibpath_overrides_runpath;libtool;
35;runpath-in-lalib.at:25;Runpath in libtool library files;libtool;
36;static.at:68;static linking flags for programs;libtool interactive;
37;static.at:358;ccache -all-static;;
38;export.at:25;Export test;libtool;
39;search-path.at:25;sys_lib_search_path;libtool;
40;indirect_deps.at:25;indirect convenience;libtool;
41;indirect_deps.at:71;indirect uninstalled;libtool;
42;archive-in-archive.at:26;static library contains static library;libtool;
43;execute-mode.at:25;execute mode;libtool;
44;bindir.at:64;bindir compile check;;
45;bindir.at:81;bindir basic lib test;;
46;bindir.at:190;bindir install tests;;
47;cwrapper.at:25;cwrapper for uninstalled executables;libtool;
48;deplib-in-subdir.at:34;deplib in subdir;libtool;
49;infer-tag.at:30;inferred tag;libtool;
50;infer-tag.at:42;CXX inferred tag;cxx libtool;
51;infer-tag.at:55;F77 inferred tag;f77 libtool;
52;infer-tag.at:69;FC inferred tag;fc libtool;
53;infer-tag.at:83;GCJ inferred tag;gcj libtool;
54;localization.at:25;localized compiler messages;libtool;
55;install.at:25;Install tests;libtool;
56;versioning.at:24;versioning;libtool;
57;destdir.at:48;Simple DESTDIR install;libtool;
58;destdir.at:75;DESTDIR with in-package deplibs;libtool;
59;old-m4-iface.at:40;AM_PROG_LIBTOOL;libtoolize autoconf;
60;old-m4-iface.at:112;AC_WITH_LTDL;libtoolize automake autoconf;
61;am-subdir.at:33;C subdir-objects;libtoolize automake autoconf;
62;am-subdir.at:93;C++ subdir-objects;cxx libtoolize automake autoconf;
63;lt_dlexit.at:30;lt_dlexit unloading libs;libltdl;
64;lt_dladvise.at:28;lt_dlopenadvise library loading;libltdl;
65;lt_dlopen.at:23;lt_dlopen error messages;libltdl;
66;lt_dlopen_a.at:23;lt_dlopen archive;libltdl lt_dlopen_a;
67;lt_dlopenext.at:23;lt_dlopenext error messages;libltdl;
68;ltdl-api.at:25;ltdl API;libltdl;
69;dlloader-api.at:23;dlloader API;libltdl;
70;loadlibrary.at:23;loadlibrary error messages;libltdl;
71;lalib-syntax.at:24;syntax of .la files;libtool libltdl;
72;resident.at:27;resident modules;libltdl;
73;slist.at:24;SList functionality;;
74;need_lib_prefix.at:25;enforced lib prefix;libltdl libtool;
75;standalone.at:31;compiling softlinked libltdl;libtoolize;
76;standalone.at:46;compiling copied libltdl;libtoolize;
77;standalone.at:61;installable libltdl;libtoolize;
78;standalone.at:79;linking libltdl without autotools;libtoolize;
79;subproject.at:57;compiling softlinked libltdl;libtoolize automake autoconf;
80;subproject.at:73;compiling copied libltdl;libtoolize automake autoconf;
81;subproject.at:89;installable libltdl;libtoolize automake autoconf;
82;subproject.at:109;linking libltdl without autotools;libtoolize;
83;nonrecursive.at:78;compiling softlinked libltdl;libtoolize automake autoconf;
84;nonrecursive.at:102;compiling copied libltdl;libtoolize automake autoconf;
85;nonrecursive.at:126;installable libltdl;libtoolize automake autoconf;
86;recursive.at:60;compiling softlinked libltdl;libtoolize autoconf automake;
87;recursive.at:80;compiling copied libltdl;libtoolize autoconf automake;
88;recursive.at:100;installable libltdl;libtoolize autoconf automake;
89;template.at:27;simple template test;cxx libtool;
90;template.at:126;template test with subdirs;cxx libtool;
91;ctor.at:27;C++ static constructors;cxx libtool;
92;exceptions.at:24;C++ exception handling;libtool libltdl;
93;early-libtool.at:32;config.status;libtoolize automake autoconf;
94;early-libtool.at:126;config.lt;libtoolize automake autoconf;
95;no-executables.at:26;AC_NO_EXECUTABLES;libtoolize automake autoconf;
96;deplibs-ident.at:32;build tree relpaths;libtool;
97;configure-iface.at:102;installable libltdl;libltdl libtoolize automake autoconf;
98;configure-iface.at:162;--with-ltdl-include/lib;libltdl libtoolize automake autoconf;
99;configure-iface.at:243;--with-included-ltdl;libltdl libtoolize automake autoconf;
100;configure-iface.at:304;convenience libltdl;libtoolize automake autoconf;
101;stresstest.at:31;Link option thorough search test;libtool;
102;cmdline_wrap.at:28;Run tests with low max_cmd_len;recursive;
103;darwin.at:26;darwin fat compile;;
104;darwin.at:103;darwin concurrent library extraction;;
105;darwin.at:152;darwin gdb debug information;;
106;deplibs-mingw.at:27;deplibs without file command;libtool;
"
# at_fn_validate_ranges NAME...
# -----------------------------
# Validate and normalize the test group number contained in each variable
# NAME. Leading zeroes are treated as decimal.
at_fn_validate_ranges ()
{
for at_grp
do
eval at_value=\$$at_grp
if test $at_value -lt 1 || test $at_value -gt 106; then
$as_echo "invalid test group: $at_value" >&2
exit 1
fi
case $at_value in
0*) # We want to treat leading 0 as decimal, like expr and test, but
# AS_VAR_ARITH treats it as octal if it uses $(( )).
# With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
# expr fork, but it is not worth the effort to determine if the
# shell supports XSI when the user can just avoid leading 0.
eval $at_grp='`expr $at_value + 0`' ;;
esac
done
}
at_prev=
for at_option
do
# If the previous option needs an argument, assign it.
if test -n "$at_prev"; then
at_option=$at_prev=$at_option
at_prev=
fi
case $at_option in
*=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
*) at_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $at_option in
--help | -h )
at_help_p=:
;;
--list | -l )
at_list_p=:
;;
--version | -V )
at_version_p=:
;;
--clean | -c )
at_clean=:
;;
--debug | -d )
at_debug_p=:
;;
--errexit | -e )
at_debug_p=:
at_errexit_p=:
;;
--verbose | -v )
at_verbose=; at_quiet=:
;;
--trace | -x )
at_traceon='set -x'
at_trace_echo=echo
at_check_filter_trace=at_fn_filter_trace
;;
[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
at_fn_validate_ranges at_option
as_fn_append at_groups "$at_option "
;;
# Ranges
[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
at_range_start=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_start
at_range=`$as_echo " $at_groups_all " | \
sed -e 's/^.* \('$at_range_start' \)/\1/'`
as_fn_append at_groups "$at_range "
;;
-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
at_range_end=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_end
at_range=`$as_echo " $at_groups_all " | \
sed -e 's/\( '$at_range_end'\) .*$/\1/'`
as_fn_append at_groups "$at_range "
;;
[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
[0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
[0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
[0-9][0-9][0-9]-[0-9][0-9][0-9] | \
[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
at_range_start=`expr $at_option : '\(.*\)-'`
at_range_end=`expr $at_option : '.*-\(.*\)'`
if test $at_range_start -gt $at_range_end; then
at_tmp=$at_range_end
at_range_end=$at_range_start
at_range_start=$at_tmp
fi
at_fn_validate_ranges at_range_start at_range_end
at_range=`$as_echo " $at_groups_all " | \
sed -e 's/^.*\( '$at_range_start' \)/\1/' \
-e 's/\( '$at_range_end'\) .*$/\1/'`
as_fn_append at_groups "$at_range "
;;
# Directory selection.
--directory | -C )
at_prev=--directory
;;
--directory=* )
at_change_dir=:
at_dir=$at_optarg
;;
# Parallel execution.
--jobs | -j )
at_jobs=0
;;
--jobs=* | -j[0-9]* )
if test -n "$at_optarg"; then
at_jobs=$at_optarg
else
at_jobs=`expr X$at_option : 'X-j\(.*\)'`
fi
case $at_jobs in *[!0-9]*)
at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
as_fn_error "non-numeric argument to $at_optname: $at_jobs" ;;
esac
;;
# Keywords.
--keywords | -k )
at_prev=--keywords
;;
--keywords=* )
at_groups_selected=$at_help_all
at_save_IFS=$IFS
IFS=,
set X $at_optarg
shift
IFS=$at_save_IFS
for at_keyword
do
at_invert=
case $at_keyword in
'!'*)
at_invert="-v"
at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
;;
esac
# It is on purpose that we match the test group titles too.
at_groups_selected=`$as_echo "$at_groups_selected" |
grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
done
# Smash the newlines.
at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' |
tr "$as_nl" ' '
`
as_fn_append at_groups "$at_groups_selected "
;;
*=*)
at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
case $at_envvar in
'' | [0-9]* | *[!_$as_cr_alnum]* )
as_fn_error "invalid variable name: \`$at_envvar'" ;;
esac
at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
# Export now, but save eval for later and for debug scripts.
export $at_envvar
as_fn_append at_debug_args " $at_envvar='$at_value'"
;;
*) $as_echo "$as_me: invalid option: $at_option" >&2
$as_echo "Try \`$0 --help' for more information." >&2
exit 1
;;
esac
done
# Verify our last option didn't require an argument
if test -n "$at_prev"; then :
as_fn_error "\`$at_prev' requires an argument."
fi
# Selected test groups.
if test -z "$at_groups"; then
at_groups=$at_groups_all
else
# Sort the tests, removing duplicates.
at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu`
fi
# Help message.
if $at_help_p; then
cat <<_ATEOF || at_write_fail=1
Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
Run all the tests, or the selected TESTS, given by numeric ranges, and
save a detailed log file. Upon failure, create debugging scripts.
Do not change environment variables directly. Instead, set them via
command line arguments. Set \`AUTOTEST_PATH' to select the executables
to exercise. Each relative directory is expanded as build and source
directories relative to the top level of this distribution.
E.g., from within the build directory /tmp/foo-1.0, invoking this:
$ $0 AUTOTEST_PATH=bin
is equivalent to the following, assuming the source directory is /src/foo-1.0:
PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
_ATEOF
cat <<_ATEOF || at_write_fail=1
Operation modes:
-h, --help print the help message, then exit
-V, --version print version number, then exit
-c, --clean remove all the files this test suite might create and exit
-l, --list describes all the tests, or the selected TESTS
_ATEOF
cat <<_ATEOF || at_write_fail=1
Execution tuning:
-C, --directory=DIR
change to directory DIR before starting
-j, --jobs[=N]
Allow N jobs at once; infinite jobs with no arg (default 1)
-k, --keywords=KEYWORDS
select the tests matching all the comma-separated KEYWORDS
multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
-e, --errexit abort as soon as a test fails; implies --debug
-v, --verbose force more detailed output
default for debugging scripts
-d, --debug inhibit clean up and top-level logging
default for debugging scripts
-x, --trace enable tests shell tracing
_ATEOF
cat <<_ATEOF || at_write_fail=1
Report bugs to <bug-libtool@gnu.org>.
_ATEOF
exit $at_write_fail
fi
# List of tests.
if $at_list_p; then
cat <<_ATEOF || at_write_fail=1
libtool 2.2.10 test suite test groups:
NUM: FILE-NAME:LINE TEST-GROUP-NAME
KEYWORDS
_ATEOF
# Passing at_groups is tricky. We cannot use it to form a literal string
# or regexp because of the limitation of AIX awk. And Solaris' awk
# doesn't grok more than 99 fields in a record, so we have to use `split'.
# at_groups needs to be space-separated for this script to work.
case $at_groups in
*"$as_nl"* )
at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;;
esac
$as_echo "$at_groups$as_nl$at_help_all" |
awk 'BEGIN { FS = ";" }
NR == 1 {
for (n = split ($ 0, a, " "); n; n--)
selected[a[n]] = 1
next
}
NF > 0 {
if (selected[$ 1]) {
printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
if ($ 4) {
lmax = 79
indent = " "
line = indent
len = length (line)
n = split ($ 4, a, " ")
for (i = 1; i <= n; i++) {
l = length (a[i]) + 1
if (i > 1 && len + l > lmax) {
print line
line = indent " " a[i]
len = length (line)
} else {
line = line " " a[i]
len += l
}
}
if (n)
print line
}
}
}' || at_write_fail=1
exit $at_write_fail
fi
if $at_version_p; then
$as_echo "$as_me (libtool 2.2.10)" &&
cat <<\_ATEOF || at_write_fail=1
Copyright (C) 2009 Free Software Foundation, Inc.
This test suite is free software; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
_ATEOF
exit $at_write_fail
fi
# Should we print banners? at_groups is space-separated for entire test,
# newline-separated if only a subset of the testsuite is run.
case $at_groups in
*' '*' '* | *"$as_nl"*"$as_nl"* )
at_print_banners=: ;;
* ) at_print_banners=false ;;
esac
# Text for banner N, set to empty once printed.
# Banner 1. libtoolize.at:26
# Category starts at test group 1.
at_banner_text_1="Libtoolize operation."
# Banner 2. help.at:24
# Category starts at test group 15.
at_banner_text_2="Testing libtool functions."
# Banner 3. destdir.at:25
# Category starts at test group 57.
at_banner_text_3="DESTDIR tests"
# Banner 4. old-m4-iface.at:26
# Category starts at test group 59.
at_banner_text_4="Support for older m4 interface."
# Banner 5. am-subdir.at:26
# Category starts at test group 61.
at_banner_text_5="Libtool subdir-objects support."
# Banner 6. lt_dlexit.at:28
# Category starts at test group 63.
at_banner_text_6="Libltdl functionality."
# Banner 7. standalone.at:25
# Category starts at test group 75.
at_banner_text_7="Standalone Libltdl."
# Banner 8. subproject.at:25
# Category starts at test group 79.
at_banner_text_8="Subproject Libltdl."
# Banner 9. nonrecursive.at:26
# Category starts at test group 83.
at_banner_text_9="Nonrecursive Automake Libltdl."
# Banner 10. recursive.at:25
# Category starts at test group 86.
at_banner_text_10="Recursive Automake Libltdl."
# Banner 11. template.at:25
# Category starts at test group 89.
at_banner_text_11="C++ template tests."
# Banner 12. ctor.at:25
# Category starts at test group 91.
at_banner_text_12="Constructors."
# Banner 13. early-libtool.at:25
# Category starts at test group 93.
at_banner_text_13="libtool script generation."
# Banner 14. no-executables.at:25
# Category starts at test group 95.
at_banner_text_14="Libtool usage in GCC"
# Banner 15. deplibs-ident.at:25
# Category starts at test group 96.
at_banner_text_15="Detecting identical deplibs."
# Banner 16. configure-iface.at:25
# Category starts at test group 97.
at_banner_text_16="configure interface to libltdl."
# Banner 17. stresstest.at:30
# Category starts at test group 101.
at_banner_text_17="Libtool stress test."
# Banner 18. darwin.at:25
# Category starts at test group 103.
at_banner_text_18="Mac OS X tests"
# Take any -C into account.
if $at_change_dir ; then
if test x- = "x$at_dir" ; then
at_dir=./-
fi
test x != "x$at_dir" && cd "$at_dir" \
|| as_fn_error "unable to change directory"
at_dir=`pwd`
fi
# Load the config files for any default variable assignments.
for at_file in atconfig atlocal
do
test -r $at_file || continue
. ./$at_file || as_fn_error "invalid content: $at_file"
done
# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
: ${at_top_build_prefix=$at_top_builddir}
# Perform any assignments requested during argument parsing.
eval "$at_debug_args"
# atconfig delivers names relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
builddir=../..
for at_dir_var in srcdir top_srcdir top_build_prefix
do
eval at_val=\$at_$at_dir_var
case $at_val in
[\\/$]* | ?:[\\/]* ) at_prefix= ;;
*) at_prefix=../../ ;;
esac
eval "$at_dir_var=\$at_prefix\$at_val"
done
fi
## -------------------- ##
## Directory structure. ##
## -------------------- ##
# This is the set of directories and files used by this script
# (non-literals are capitalized):
#
# TESTSUITE - the testsuite
# TESTSUITE.log - summarizes the complete testsuite run
# TESTSUITE.dir/ - created during a run, remains after -d or failed test
# + at-groups/ - during a run: status of all groups in run
# | + NNN/ - during a run: meta-data about test group NNN
# | | + check-line - location (source file and line) of current AT_CHECK
# | | + status - exit status of current AT_CHECK
# | | + stdout - stdout of current AT_CHECK
# | | + stder1 - stderr, including trace
# | | + stderr - stderr, with trace filtered out
# | | + test-source - portion of testsuite that defines group
# | | + times - timestamps for computing duration
# | | + pass - created if group passed
# | | + xpass - created if group xpassed
# | | + fail - created if group failed
# | | + xfail - created if group xfailed
# | | + skip - created if group skipped
# + at-stop - during a run: end the run if this file exists
# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
# + 0..NNN/ - created for each group NNN, remains after -d or failed test
# | + TESTSUITE.log - summarizes the group results
# | + ... - files created during the group
# The directory the whole suite works in.
# Should be absolute to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the suite.
at_suite_log=$at_dir/$as_me.log
# The directory containing helper files per test group.
at_helper_dir=$at_suite_dir/at-groups
# Stop file: if it exists, do not start new jobs.
at_stop_file=$at_suite_dir/at-stop
# The fifo used for the job dispatcher.
at_job_fifo=$at_suite_dir/at-job-fifo
if $at_clean; then
test -d "$at_suite_dir" &&
find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -f -r "$at_suite_dir" "$at_suite_log"
exit $?
fi
# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites (ie. atconfig was not found),
# AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package. Then expand it into build/src parts, since users
# may create executables in both places.
AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
at_path=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $AUTOTEST_PATH $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
case $as_dir in
[\\/]* | ?:[\\/]* )
as_fn_append at_path "$as_dir"
;;
* )
if test -z "$at_top_build_prefix"; then
# Stand-alone test suite.
as_fn_append at_path "$as_dir"
else
# Embedded test suite.
as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
as_fn_append at_path "$at_top_srcdir/$as_dir"
fi
;;
esac
done
IFS=$as_save_IFS
# Now build and simplify PATH.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
at_new_path=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $at_path
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -d "$as_dir" || continue
case $as_dir in
[\\/]* | ?:[\\/]* ) ;;
* ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
esac
case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
*$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
$PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
*) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
esac
done
IFS=$as_save_IFS
PATH=$at_new_path
export PATH
# Setting up the FDs.
# 5 is the log file. Not to be overwritten if `-d'.
if $at_debug_p; then
at_suite_log=/dev/null
else
: >"$at_suite_log"
fi
exec 5>>"$at_suite_log"
# Banners and logs.
cat <<\_ASBOX
## -------------------------- ##
## libtool 2.2.10 test suite. ##
## -------------------------- ##
_ASBOX
{
cat <<\_ASBOX
## -------------------------- ##
## libtool 2.2.10 test suite. ##
## -------------------------- ##
_ASBOX
echo
$as_echo "$as_me: command line was:"
$as_echo " \$ $0 $at_cli_args"
echo
# Try to find a few ChangeLogs in case it might help determining the
# exact version. Use the relative dir: if the top dir is a symlink,
# find will not follow it (and options to follow the links are not
# portable), which would result in no output here. Prune directories
# matching the package tarname, since they tend to be leftovers from
# `make dist' or `make distcheck' and contain redundant or stale logs.
if test -n "$at_top_srcdir"; then
cat <<\_ASBOX
## ----------- ##
## ChangeLogs. ##
## ----------- ##
_ASBOX
echo
for at_file in `find "$at_top_srcdir" -name "libtool-*" -prune -o -name ChangeLog -print`
do
$as_echo "$as_me: $at_file:"
sed 's/^/| /;10q' $at_file
echo
done
fi
{
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
}
echo
# Contents of the config files.
for at_file in atconfig atlocal
do
test -r $at_file || continue
$as_echo "$as_me: $at_file:"
sed 's/^/| /' $at_file
echo
done
} >&5
## ------------------------- ##
## Autotest shell functions. ##
## ------------------------- ##
# at_fn_banner NUMBER
# -------------------
# Output banner NUMBER, provided the testsuite is running multiple groups and
# this particular banner has not yet been printed.
at_fn_banner ()
{
$at_print_banners || return 0
eval at_banner_text=\$at_banner_text_$1
test "x$at_banner_text" = x && return 0
eval at_banner_text_$1=
$as_echo "$as_nl$at_banner_text$as_nl"
} # at_fn_banner
# at_fn_check_prepare_notrace REASON LINE
# ---------------------------------------
# Perform AT_CHECK preparations for the command at LINE for an untraceable
# command; REASON is the reason for disabling tracing.
at_fn_check_prepare_notrace ()
{
$at_trace_echo "Not enabling shell tracing (command contains $1)"
$as_echo "$2" >"$at_check_line_file"
at_check_trace=: at_check_filter=:
: >"$at_stdout"; : >"$at_stderr"
}
# at_fn_check_prepare_trace LINE
# ------------------------------
# Perform AT_CHECK preparations for the command at LINE for a traceable
# command.
at_fn_check_prepare_trace ()
{
$as_echo "$1" >"$at_check_line_file"
at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
: >"$at_stdout"; : >"$at_stderr"
}
# at_fn_check_prepare_dynamic COMMAND LINE
# ----------------------------------------
# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
# preparation function.
at_fn_check_prepare_dynamic ()
{
case $1 in
*$as_nl*)
at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
*)
at_fn_check_prepare_trace "$2" ;;
esac
}
# at_fn_filter_trace
# ------------------
# Remove the lines in the file "$at_stderr" generated by "set -x" and print
# them to stderr.
at_fn_filter_trace ()
{
mv "$at_stderr" "$at_stder1"
grep '^ *+' "$at_stder1" >&2
grep -v '^ *+' "$at_stder1" >"$at_stderr"
}
# at_fn_log_failure FILE-LIST
# ---------------------------
# Copy the files in the list on stdout with a "> " prefix, and exit the shell
# with a failure exit code.
at_fn_log_failure ()
{
for file
do $as_echo "$file:"; sed 's/^/> /' "$file"; done
echo 1 > "$at_status_file"
exit 1
}
# at_fn_check_skip EXIT-CODE LINE
# -------------------------------
# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
# the test group subshell with that same exit code. Use LINE in any report
# about test failure.
at_fn_check_skip ()
{
case $1 in
99) echo 99 > "$at_status_file"; at_failed=:
$as_echo "$2: hard failure"; exit 99;;
77) echo 77 > "$at_status_file"; exit 77;;
esac
}
# at_fn_check_status EXPECTED EXIT-CODE LINE
# ------------------------------------------
# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
# Otherwise, if it is 77 or 99, exit the test group subshell with that same
# exit code; if it is anything else print an error message referring to LINE,
# and fail the test.
at_fn_check_status ()
{
case $2 in
$1 ) ;;
77) echo 77 > "$at_status_file"; exit 77;;
99) echo 99 > "$at_status_file"; at_failed=:
$as_echo "$3: hard failure"; exit 99;;
*) $as_echo "$3: exit code was $2, expected $1"
at_failed=:;;
esac
}
# at_fn_diff_devnull FILE
# -----------------------
# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
# invocations.
at_fn_diff_devnull ()
{
test -s "$1" || return 0
$at_diff "$at_devnull" "$1"
}
# at_fn_test NUMBER
# -----------------
# Parse out test NUMBER from the tail of this file.
at_fn_test ()
{
eval at_sed=\$at_sed$1
sed "$at_sed" "$at_myself" > "$at_test_source"
}
# at_fn_create_debugging_script
# -----------------------------
# Create the debugging script $at_group_dir/run which will reproduce the
# current test group.
at_fn_create_debugging_script ()
{
{
echo "#! /bin/sh" &&
echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
$as_echo "cd '$at_dir'" &&
$as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
echo 'exit 1'
} >"$at_group_dir/run" &&
chmod +x "$at_group_dir/run"
}
## -------------------------------- ##
## End of autotest shell functions. ##
## -------------------------------- ##
{
cat <<\_ASBOX
## ---------------- ##
## Tested programs. ##
## ---------------- ##
_ASBOX
echo
} >&5
# Report what programs are being tested.
for at_program in : $at_tested
do
test "$at_program" = : && continue
case $at_program in
[\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
* )
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -f "$as_dir/$at_program" && break
done
IFS=$as_save_IFS
at_program_=$as_dir/$at_program ;;
esac
if test -f "$at_program_"; then
{
$as_echo "$at_srcdir/testsuite.at:26: $at_program_ --version"
"$at_program_" --version </dev/null
echo
} >&5 2>&1
else
as_fn_error "cannot find $at_program" "$LINENO" 5
fi
done
{
cat <<\_ASBOX
## ------------------ ##
## Running the tests. ##
## ------------------ ##
_ASBOX
} >&5
at_start_date=`date`
at_start_time=`date +%s 2>/dev/null`
$as_echo "$as_me: starting at: $at_start_date" >&5
: ${tst_dist=dist}
: ${ACLOCAL=aclocal}
: ${AUTOHEADER=autoheader}
: ${AUTOCONF=autoconf}
: ${AUTOMAKE=automake}
: ${AUTORECONF=autoreconf}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${ECHO=$as_echo}
for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do
if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi
done
export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
eval `$LIBTOOL --config | grep '^EGREP='`
eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias)='`
configure_options=--prefix=/nonexistent
if test -n "$host_alias"; then
configure_options="$configure_options --host $host_alias"
fi
if test -n "$build_alias"; then
configure_options="$configure_options --build $build_alias"
fi
if (FOO=bar; unset FOO) >/dev/null 2>&1; then
unset=unset
else
unset=false
fi
: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
# Fix relative paths in $lt_INSTALL
case $lt_INSTALL in
*libltdl/config/install-sh*)
lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh
;;
esac
# On AIX, shared libraries remain loaded in memory after use if they
# are world-readable, until root issues slibclean. On NFS, this causes
# a testsuite rerun to fail to clean up test group directories. Avoid
# this with a suitable umask. Do not do this on other systems, for
# example HP-UX suffers unless shared libraries are mode 555.
case $host_os in
aix*) umask o-rwx ;;
esac
# Create the master directory if it doesn't already exist.
as_dir="$at_suite_dir"; as_fn_mkdir_p ||
as_fn_error "cannot create \`$at_suite_dir'" "$LINENO" 5
# Can we diff with `/dev/null'? DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
at_devnull=/dev/null
else
at_devnull=$at_suite_dir/devnull
>"$at_devnull"
fi
# Use `diff -u' when possible.
if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
then
at_diff='diff -u'
else
at_diff=diff
fi
# Get the last needed group.
for at_group in : $at_groups; do :; done
# Extract the start and end lines of each test group at the tail
# of this file
awk '
BEGIN { FS="" }
/^#AT_START_/ {
start = NR
}
/^#AT_STOP_/ {
test = substr ($ 0, 10)
print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
if (test == "'"$at_group"'") exit
}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
. "$at_suite_dir/at-source-lines" ||
as_fn_error "cannot create test line number cache" "$LINENO" 5
rm -f "$at_suite_dir/at-source-lines"
# Set number of jobs for `-j'; avoid more jobs than test groups.
set X $at_groups; shift; at_max_jobs=$#
if test $at_max_jobs -eq 0; then
at_jobs=1
fi
if test $at_jobs -ne 1 &&
{ test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
at_jobs=$at_max_jobs
fi
# If parallel mode, don't output banners, don't split summary lines.
if test $at_jobs -ne 1; then
at_print_banners=false
at_quiet=:
fi
# Set up helper dirs.
rm -rf "$at_helper_dir" &&
mkdir "$at_helper_dir" &&
cd "$at_helper_dir" &&
{ test -z "$at_groups" || mkdir $at_groups; } ||
as_fn_error "testsuite directory setup failed" "$LINENO" 5
# Functions for running a test group. We leave the actual
# test group execution outside of a shell function in order
# to avoid hitting zsh 4.x exit status bugs.
# at_fn_group_prepare
# -------------------
# Prepare running a test group.
at_fn_group_prepare ()
{
# The directory for additional per-group helper files.
at_job_dir=$at_helper_dir/$at_group
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_job_dir/check-line
# The file containing the exit status of the last command.
at_status_file=$at_job_dir/status
# The files containing the output of the tested commands.
at_stdout=$at_job_dir/stdout
at_stder1=$at_job_dir/stder1
at_stderr=$at_job_dir/stderr
# The file containing the code for a test group.
at_test_source=$at_job_dir/test-source
# The file containing dates.
at_times_file=$at_job_dir/times
# Be sure to come back to the top test directory.
cd "$at_suite_dir"
# Clearly separate the test groups when verbose.
$at_first || $at_verbose echo
at_group_normalized=$at_group
eval 'while :; do
case $at_group_normalized in #(
'"$at_format"'*) break;;
esac
at_group_normalized=0$at_group_normalized
done'
# Create a fresh directory for the next test group, and enter.
# If one already exists, the user may have invoked ./run from
# within that directory; we remove the contents, but not the
# directory itself, so that we aren't pulling the rug out from
# under the shell's notion of the current directory.
at_group_dir=$at_suite_dir/$at_group_normalized
at_group_log=$at_group_dir/$as_me.log
if test -d "$at_group_dir"; then
find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
fi ||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned." >&5
$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;}
# Be tolerant if the above `rm' was not able to remove the directory.
as_dir="$at_group_dir"; as_fn_mkdir_p
echo 0 > "$at_status_file"
# In verbose mode, append to the log file *and* show on
# the standard output; in quiet mode only write to the log.
if test -z "$at_verbose"; then
at_tee_pipe='tee -a "$at_group_log"'
else
at_tee_pipe='cat >> "$at_group_log"'
fi
}
# at_fn_group_postprocess
# -----------------------
# Perform cleanup after running a test group.
at_fn_group_postprocess ()
{
# Be sure to come back to the suite directory, in particular
# since below we might `rm' the group directory we are in currently.
cd "$at_suite_dir"
if test ! -f "$at_check_line_file"; then
sed "s/^ */$as_me: WARNING: /" <<_ATEOF
A failure happened in a test group before any test could be
run. This means that test suite is improperly designed. Please
report this failure to <bug-libtool@gnu.org>.
_ATEOF
$as_echo "$at_setup_line" >"$at_check_line_file"
at_status=99
fi
$at_verbose $as_echo_n "$at_group. $at_setup_line: "
$as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
case $at_xfail:$at_status in
*:99)
at_msg='FAILED ('`cat "$at_check_line_file"`')'
at_res=fail
at_errexit=$at_errexit_p
;;
yes:0)
at_msg="UNEXPECTED PASS"
at_res=xpass
at_errexit=$at_errexit_p
;;
no:0)
at_msg="ok"
at_res=pass
at_errexit=false
;;
*:77)
at_msg='skipped ('`cat "$at_check_line_file"`')'
at_res=skip
at_errexit=false
;;
yes:*)
at_msg='expected failure ('`cat "$at_check_line_file"`')'
at_res=xfail
at_errexit=false
;;
no:*)
at_msg='FAILED ('`cat "$at_check_line_file"`')'
at_res=fail
at_errexit=$at_errexit_p
;;
esac
echo "$at_res" > "$at_job_dir/$at_res"
# In parallel mode, output the summary line only afterwards.
if test $at_jobs -ne 1 && test -n "$at_verbose"; then
$as_echo "$at_desc_line $at_msg"
else
# Make sure there is a separator even with long titles.
$as_echo " $at_msg"
fi
at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
case $at_status in
0|77)
# $at_times_file is only available if the group succeeded.
# We're not including the group log, so the success message
# is written in the global log separately. But we also
# write to the group log in case they're using -d.
if test -f "$at_times_file"; then
at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
rm -f "$at_times_file"
fi
$as_echo "$at_log_msg" >> "$at_group_log"
$as_echo "$at_log_msg" >&5
# Cleanup the group directory, unless the user wants the files.
if $at_debug_p; then
at_fn_create_debugging_script
else
if test -d "$at_group_dir"; then
find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -fr "$at_group_dir"
fi
rm -f "$at_test_source"
fi
;;
*)
# Upon failure, include the log into the testsuite's global
# log. The failure message is written in the group log. It
# is later included in the global log.
$as_echo "$at_log_msg" >> "$at_group_log"
# Upon failure, keep the group directory for autopsy, and create
# the debugging script. With -e, do not start any further tests.
at_fn_create_debugging_script
if $at_errexit; then
echo stop > "$at_stop_file"
fi
;;
esac
}
## ------------ ##
## Driver loop. ##
## ------------ ##
if (set -m && set +m && set +b) >/dev/null 2>&1; then
set +b
at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
else
at_job_control_on=: at_job_control_off=: at_job_group=
fi
for at_signal in 1 2 15; do
trap 'set +x; set +e
$at_job_control_off
at_signal='"$at_signal"'
echo stop > "$at_stop_file"
trap "" $at_signal
at_pgids=
for at_pgid in `jobs -p 2>/dev/null`; do
at_pgids="$at_pgids $at_job_group$at_pgid"
done
test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
wait
if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
echo >&2
fi
at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
set x $at_signame
test 0 -gt 2 && at_signame=$at_signal
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
as_fn_arith 128 + $at_signal && exit_status=$as_val
as_fn_exit $exit_status' $at_signal
done
rm -f "$at_stop_file"
at_first=:
if test $at_jobs -ne 1 &&
rm -f "$at_job_fifo" &&
test -n "$at_job_group" &&
( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
then
# FIFO job dispatcher.
trap 'at_pids=
for at_pid in `jobs -p`; do
at_pids="$at_pids $at_job_group$at_pid"
done
if test -n "$at_pids"; then
at_sig=TSTP
test "${TMOUT+set}" = set && at_sig=STOP
kill -$at_sig $at_pids 2>/dev/null
fi
kill -STOP $$
test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
echo
# Turn jobs into a list of numbers, starting from 1.
at_joblist=`$as_echo " $at_groups_all " | \
sed 's/\( '$at_jobs'\) .*/\1/'`
set X $at_joblist
shift
for at_group in $at_groups; do
$at_job_control_on 2>/dev/null
(
# Start one test group.
$at_job_control_off
exec 6>"$at_job_fifo"
trap 'set +x; set +e
trap "" PIPE
echo stop > "$at_stop_file"
echo token >&6
as_fn_exit 141' PIPE
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source" # AT_JOB_FIFO_FD>&-
then :; else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
at_failed=:
fi
at_fn_group_postprocess
echo token >&6
) &
$at_job_control_off
if $at_first; then
at_first=false
exec 6<"$at_job_fifo"
fi
shift # Consume one token.
if test $# -gt 0; then :; else
read at_token <&6 || break
set x $*
fi
test -f "$at_stop_file" && break
done
# Read back the remaining ($at_jobs - 1) tokens.
set X $at_joblist
shift
if test $# -gt 0; then
shift
for at_job
do
read at_token
done <&6
fi
exec 6<&-
wait
else
# Run serially, avoid forks and other potential surprises.
for at_group in $at_groups; do
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source"; then :; else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
at_failed=:
fi
at_fn_group_postprocess
test -f "$at_stop_file" && break
at_first=false
done
fi
# Wrap up the test suite with summary statistics.
cd "$at_helper_dir"
# Use ?..???? when the list must remain sorted, the faster * otherwise.
at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
echo $f; done | sed '/?/d; s,/xpass,,'`
at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
echo $f; done | sed '/?/d; s,/fail,,'`
set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
shift; at_group_count=$#
set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
set X $at_xfail_list; shift; at_xfail_count=$#
set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
set X $at_skip_list; shift; at_skip_count=$#
as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
# Back to the top directory.
cd "$at_dir"
rm -rf "$at_helper_dir"
# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`date +%s 2>/dev/null`
$as_echo "$as_me: ending at: $at_stop_date" >&5
case $at_start_time,$at_stop_time in
[0-9]*,[0-9]*)
as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
$as_echo "$as_me: test suite duration: $at_duration" >&5
;;
esac
echo
cat <<\_ASBOX
## ------------- ##
## Test results. ##
## ------------- ##
_ASBOX
echo
{
echo
cat <<\_ASBOX
## ------------- ##
## Test results. ##
## ------------- ##
_ASBOX
echo
} >&5
if test $at_run_count = 1; then
at_result="1 test"
at_were=was
else
at_result="$at_run_count tests"
at_were=were
fi
if $at_errexit_p && test $at_unexpected_count != 0; then
if test $at_xpass_count = 1; then
at_result="$at_result $at_were run, one passed"
else
at_result="$at_result $at_were run, one failed"
fi
at_result="$at_result unexpectedly and inhibited subsequent tests."
else
# Don't you just love exponential explosion of the number of cases?
case $at_xpass_count:$at_fail_count:$at_xfail_count in
# So far, so good.
0:0:0) at_result="$at_result $at_were successful." ;;
0:0:*) at_result="$at_result behaved as expected." ;;
# Some unexpected failures
0:*:0) at_result="$at_result $at_were run,
$at_fail_count failed unexpectedly." ;;
# Some failures, both expected and unexpected
0:*:1) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
0:*:*) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
# No unexpected failures, but some xpasses
*:0:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly." ;;
# No expected failures, but failures and xpasses
*:1:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
*:*:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
# All of them.
*:*:1) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
*:*:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
esac
if test $at_skip_count = 0 && test $at_run_count -gt 1; then
at_result="All $at_result"
fi
fi
# Now put skips in the mix.
case $at_skip_count in
0) ;;
1) at_result="$at_result
1 test was skipped." ;;
*) at_result="$at_result
$at_skip_count tests were skipped." ;;
esac
if test $at_unexpected_count = 0; then
echo "$at_result"
echo "$at_result" >&5
else
echo "ERROR: $at_result" >&2
echo "ERROR: $at_result" >&5
{
echo
cat <<\_ASBOX
## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
_ASBOX
# Summary of failed and skipped tests.
if test $at_fail_count != 0; then
echo "Failed tests:"
$SHELL "$at_myself" $at_fail_list --list
echo
fi
if test $at_skip_count != 0; then
echo "Skipped tests:"
$SHELL "$at_myself" $at_skip_list --list
echo
fi
if test $at_xpass_count != 0; then
echo "Unexpected passes:"
$SHELL "$at_myself" $at_xpass_list --list
echo
fi
if test $at_fail_count != 0; then
cat <<\_ASBOX
## ---------------------- ##
## Detailed failed tests. ##
## ---------------------- ##
_ASBOX
echo
for at_group in $at_fail_list
do
at_group_normalized=$at_group
eval 'while :; do
case $at_group_normalized in #(
'"$at_format"'*) break;;
esac
at_group_normalized=0$at_group_normalized
done'
cat "$at_suite_dir/$at_group_normalized/$as_me.log"
echo
done
echo
fi
if test -n "$at_top_srcdir"; then
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## ${at_top_build_prefix}config.log ##
_ASBOX
sed 's/^/| /' ${at_top_build_prefix}config.log
echo
fi
} >&5
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## $as_me.log was created. ##
_ASBOX
echo
if $at_debug_p; then
at_msg='per-test log files'
else
at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
fi
$as_echo "Please send $at_msg and all information you think might help:
To: <bug-libtool@gnu.org>
Subject: [libtool 2.2.10] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
"
exit 1
fi
exit 0
## ------------- ##
## Actual tests. ##
## ------------- ##
#AT_START_1
# 1. libtoolize.at:83: libtoolize macro installation
at_setup_line='libtoolize.at:83'
at_fn_banner 1
at_desc="libtoolize macro installation"
at_desc_line=" 1: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "1. libtoolize.at:83: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:99: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:99"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_1
#AT_START_2
# 2. libtoolize.at:108: libtoolize macro directory mismatch error
at_setup_line='libtoolize.at:108'
at_fn_banner 1
at_desc="libtoolize macro directory mismatch error"
at_desc_line=" 2: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "2. libtoolize.at:108: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I me2
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I me2.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:120: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:120"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:120"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_2
#AT_START_3
# 3. libtoolize.at:128: libtoolize macro serial update
at_setup_line='libtoolize.at:128'
at_fn_banner 1
at_desc="libtoolize macro serial update"
at_desc_line=" 3: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "3. libtoolize.at:128: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
test -d m4 || { rm -f m4 && mkdir m4; }
rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
_ATEOF
# This file should be upgraded.
cat >m4/libtool.m4 <<'_ATEOF'
# serial 25 LT_INIT
_ATEOF
# This file has a very high serial number, and should be left unchanged
# until --force is passed.
cat >m4/ltoptions.m4 <<'_ATEOF'
# serial 99999 ltoptions.m4
_ATEOF
test -d build-aux || { rm -f build-aux && mkdir build-aux; }
# This file has a very high serial number, and needs --force to be updated.
cat >build-aux/ltmain.sh <<'_ATEOF'
package_revision=9999.9999
_ATEOF
# This file has a very old serial number, but should be left unchanged
# unless the --install flag is invoked.
cat >build-aux/config.guess <<'_ATEOF'
timestamp='1970-01-01'
_ATEOF
## -------------------------------------------------------------------- ##
## First we try to update with some newer files in the destination dir. ##
## -------------------------------------------------------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:151: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:151"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:151"
$at_failed && at_fn_log_failure
$at_traceon; }
## ---------------------------------------------------------- ##
## Next, a second update attempt with everything now updated. ##
## ---------------------------------------------------------- ##
cat >expout <<'_ATEOF'
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:165: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:165"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:165"
$at_failed && at_fn_log_failure
$at_traceon; }
## ----------------------------------------------------------- ##
## Now, a forced update to downgrade files with newer serials. ##
## ----------------------------------------------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:183: \$LIBTOOLIZE --copy --force
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:183"
( $at_check_trace; $LIBTOOLIZE --copy --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:183"
$at_failed && at_fn_log_failure
$at_traceon; }
## ---------------------------------------------------------------- ##
## A final update attempt with everything previously force updated. ##
## ---------------------------------------------------------------- ##
cat >expout <<'_ATEOF'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:192: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:192"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:192"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_3
#AT_START_4
# 4. libtoolize.at:201: libtoolize config files serial update
at_setup_line='libtoolize.at:201'
at_fn_banner 1
at_desc="libtoolize config files serial update"
at_desc_line=" 4: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "4. libtoolize.at:201: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
test -d m4 || { rm -f m4 && mkdir m4; }
rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
_ATEOF
# This file should be upgraded.
cat >m4/libtool.m4 <<'_ATEOF'
# serial 25 LT_INIT
_ATEOF
# This file has a very high serial number, and should be left unchanged
# until --force is passed.
cat >m4/ltoptions.m4 <<'_ATEOF'
# serial 99999 ltoptions.m4
_ATEOF
test -d build-aux || { rm -f build-aux && mkdir build-aux; }
# This file has a very high serial number, and needs --force to be updated.
cat >build-aux/ltmain.sh <<'_ATEOF'
package_revision=9999.9999
_ATEOF
# This file has a very old serial number, but should be left unchanged
# unless the --install flag is invoked.
cat >build-aux/config.guess <<'_ATEOF'
timestamp='1970-01-01'
_ATEOF
## -------------------------------------------------------------------- ##
## First we try to update with some newer files in the destination dir. ##
## -------------------------------------------------------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:228: \$LIBTOOLIZE --copy --install
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:228"
( $at_check_trace; $LIBTOOLIZE --copy --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:228"
$at_failed && at_fn_log_failure
$at_traceon; }
## ---------------------------------------------------------- ##
## Next, a second update attempt with everything now updated. ##
## ---------------------------------------------------------- ##
cat >expout <<'_ATEOF'
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:242: \$LIBTOOLIZE --copy --install
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:242"
( $at_check_trace; $LIBTOOLIZE --copy --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:242"
$at_failed && at_fn_log_failure
$at_traceon; }
## ----------------------------------------------------------- ##
## Now, a forced update to downgrade files with newer serials. ##
## ----------------------------------------------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:263: \$LIBTOOLIZE --copy --force --install
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:263"
( $at_check_trace; $LIBTOOLIZE --copy --force --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:263"
$at_failed && at_fn_log_failure
$at_traceon; }
## ---------------------------------------------------------------- ##
## A final update attempt with everything previously force updated. ##
## ---------------------------------------------------------------- ##
cat >expout <<'_ATEOF'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:272: \$LIBTOOLIZE --copy --install
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:272"
( $at_check_trace; $LIBTOOLIZE --copy --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:272"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_4
#AT_START_5
# 5. libtoolize.at:281: diagnose missing LT_CONFIG_LTDL_DIR
at_setup_line='libtoolize.at:281'
at_fn_banner 1
at_desc="diagnose missing LT_CONFIG_LTDL_DIR"
at_desc_line=" 5: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "5. libtoolize.at:281: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/argz.m4'
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltdl.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: putting libltdl files in `ltdl'.
libtoolize: copying file `ltdl/COPYING.LIB'
libtoolize: copying file `ltdl/README'
libtoolize: copying file `ltdl/argz_.h'
libtoolize: copying file `ltdl/argz.c'
libtoolize: copying file `ltdl/loaders/dld_link.c'
libtoolize: copying file `ltdl/loaders/dlopen.c'
libtoolize: copying file `ltdl/loaders/dyld.c'
libtoolize: copying file `ltdl/loaders/load_add_on.c'
libtoolize: copying file `ltdl/loaders/loadlibrary.c'
libtoolize: copying file `ltdl/loaders/shl_load.c'
libtoolize: copying file `ltdl/lt__dirent.c'
libtoolize: copying file `ltdl/lt__strl.c'
libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
libtoolize: copying file `ltdl/libltdl/lt__private.h'
libtoolize: copying file `ltdl/libltdl/lt__strl.h'
libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
libtoolize: copying file `ltdl/libltdl/lt_error.h'
libtoolize: copying file `ltdl/libltdl/lt_system.h'
libtoolize: copying file `ltdl/libltdl/slist.h'
libtoolize: copying file `ltdl/loaders/preopen.c'
libtoolize: copying file `ltdl/lt__alloc.c'
libtoolize: copying file `ltdl/lt_dlloader.c'
libtoolize: copying file `ltdl/lt_error.c'
libtoolize: copying file `ltdl/ltdl.c'
libtoolize: copying file `ltdl/ltdl.h'
libtoolize: copying file `ltdl/slist.c'
libtoolize: creating file `ltdl/Makefile.inc'
libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
LTDL_INIT([nonrecursive])
AC_OUTPUT
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:340: \$LIBTOOLIZE --copy --install --ltdl=ltdl
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:340"
( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:340"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_5
#AT_START_6
# 6. libtoolize.at:426: copy ltdl.m4 with shared macro directory
at_setup_line='libtoolize.at:426'
at_fn_banner 1
at_desc="copy ltdl.m4 with shared macro directory"
at_desc_line=" 6: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "6. libtoolize.at:426: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
libtoolize: linking file `ltdl/config/compile'
libtoolize: linking file `ltdl/config/config.guess'
libtoolize: linking file `ltdl/config/config.sub'
libtoolize: linking file `ltdl/config/depcomp'
libtoolize: linking file `ltdl/config/install-sh'
libtoolize: linking file `ltdl/config/missing'
libtoolize: linking file `ltdl/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
libtoolize: linking file `ltdl/m4/argz.m4'
libtoolize: linking file `ltdl/m4/libtool.m4'
libtoolize: linking file `ltdl/m4/ltdl.m4'
libtoolize: linking file `ltdl/m4/ltoptions.m4'
libtoolize: linking file `ltdl/m4/ltsugar.m4'
libtoolize: linking file `ltdl/m4/ltversion.m4'
libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
libtoolize: linking file `ltdl/COPYING.LIB'
libtoolize: linking file `ltdl/README'
libtoolize: linking file `ltdl/Makefile.am'
libtoolize: linking file `ltdl/configure.ac'
libtoolize: copying file `ltdl/aclocal.m4'
libtoolize: linking file `ltdl/Makefile.in'
libtoolize: linking file `ltdl/config-h.in'
libtoolize: linking file `ltdl/configure'
libtoolize: linking file `ltdl/argz_.h'
libtoolize: linking file `ltdl/argz.c'
libtoolize: linking file `ltdl/loaders/dld_link.c'
libtoolize: linking file `ltdl/loaders/dlopen.c'
libtoolize: linking file `ltdl/loaders/dyld.c'
libtoolize: linking file `ltdl/loaders/load_add_on.c'
libtoolize: linking file `ltdl/loaders/loadlibrary.c'
libtoolize: linking file `ltdl/loaders/shl_load.c'
libtoolize: linking file `ltdl/lt__dirent.c'
libtoolize: linking file `ltdl/lt__strl.c'
libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
libtoolize: linking file `ltdl/libltdl/lt__private.h'
libtoolize: linking file `ltdl/libltdl/lt__strl.h'
libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
libtoolize: linking file `ltdl/libltdl/lt_error.h'
libtoolize: linking file `ltdl/libltdl/lt_system.h'
libtoolize: linking file `ltdl/libltdl/slist.h'
libtoolize: linking file `ltdl/loaders/preopen.c'
libtoolize: linking file `ltdl/lt__alloc.c'
libtoolize: linking file `ltdl/lt_dlloader.c'
libtoolize: linking file `ltdl/lt_error.c'
libtoolize: linking file `ltdl/ltdl.c'
libtoolize: linking file `ltdl/ltdl.h'
libtoolize: linking file `ltdl/slist.c'
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
LT_INIT
LTDL_INIT
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:430: \$LIBTOOLIZE --ltdl
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:430"
( $at_check_trace; $LIBTOOLIZE --ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:430"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_6
#AT_START_7
# 7. libtoolize.at:438: correctly parse LTDL_INIT from configure.ac
at_setup_line='libtoolize.at:438'
at_fn_banner 1
at_desc="correctly parse LTDL_INIT from configure.ac"
at_desc_line=" 7: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "7. libtoolize.at:438: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
libtoolize: linking file `ltdl/config/compile'
libtoolize: linking file `ltdl/config/config.guess'
libtoolize: linking file `ltdl/config/config.sub'
libtoolize: linking file `ltdl/config/depcomp'
libtoolize: linking file `ltdl/config/install-sh'
libtoolize: linking file `ltdl/config/missing'
libtoolize: linking file `ltdl/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
libtoolize: linking file `ltdl/m4/argz.m4'
libtoolize: linking file `ltdl/m4/libtool.m4'
libtoolize: linking file `ltdl/m4/ltdl.m4'
libtoolize: linking file `ltdl/m4/ltoptions.m4'
libtoolize: linking file `ltdl/m4/ltsugar.m4'
libtoolize: linking file `ltdl/m4/ltversion.m4'
libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
libtoolize: linking file `ltdl/COPYING.LIB'
libtoolize: linking file `ltdl/README'
libtoolize: linking file `ltdl/Makefile.am'
libtoolize: linking file `ltdl/configure.ac'
libtoolize: copying file `ltdl/aclocal.m4'
libtoolize: linking file `ltdl/Makefile.in'
libtoolize: linking file `ltdl/config-h.in'
libtoolize: linking file `ltdl/configure'
libtoolize: linking file `ltdl/argz_.h'
libtoolize: linking file `ltdl/argz.c'
libtoolize: linking file `ltdl/loaders/dld_link.c'
libtoolize: linking file `ltdl/loaders/dlopen.c'
libtoolize: linking file `ltdl/loaders/dyld.c'
libtoolize: linking file `ltdl/loaders/load_add_on.c'
libtoolize: linking file `ltdl/loaders/loadlibrary.c'
libtoolize: linking file `ltdl/loaders/shl_load.c'
libtoolize: linking file `ltdl/lt__dirent.c'
libtoolize: linking file `ltdl/lt__strl.c'
libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
libtoolize: linking file `ltdl/libltdl/lt__private.h'
libtoolize: linking file `ltdl/libltdl/lt__strl.h'
libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
libtoolize: linking file `ltdl/libltdl/lt_error.h'
libtoolize: linking file `ltdl/libltdl/lt_system.h'
libtoolize: linking file `ltdl/libltdl/slist.h'
libtoolize: linking file `ltdl/loaders/preopen.c'
libtoolize: linking file `ltdl/lt__alloc.c'
libtoolize: linking file `ltdl/lt_dlloader.c'
libtoolize: linking file `ltdl/lt_error.c'
libtoolize: linking file `ltdl/ltdl.c'
libtoolize: linking file `ltdl/ltdl.h'
libtoolize: linking file `ltdl/slist.c'
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
LT_INIT
LTDL_INIT
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:442: \$LIBTOOLIZE
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:442"
( $at_check_trace; $LIBTOOLIZE
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:442"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_7
#AT_START_8
# 8. libtoolize.at:450: diagnose missing LTDL_INIT invocation
at_setup_line='libtoolize.at:450'
at_fn_banner 1
at_desc="diagnose missing LTDL_INIT invocation"
at_desc_line=" 8: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "8. libtoolize.at:450: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
libtoolize: copying file `ltdl/config/compile'
libtoolize: copying file `ltdl/config/config.guess'
libtoolize: copying file `ltdl/config/config.sub'
libtoolize: copying file `ltdl/config/depcomp'
libtoolize: copying file `ltdl/config/install-sh'
libtoolize: copying file `ltdl/config/missing'
libtoolize: copying file `ltdl/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
libtoolize: copying file `ltdl/m4/argz.m4'
libtoolize: copying file `ltdl/m4/libtool.m4'
libtoolize: copying file `ltdl/m4/ltdl.m4'
libtoolize: copying file `ltdl/m4/ltoptions.m4'
libtoolize: copying file `ltdl/m4/ltsugar.m4'
libtoolize: copying file `ltdl/m4/ltversion.m4'
libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
libtoolize: copying file `ltdl/COPYING.LIB'
libtoolize: copying file `ltdl/README'
libtoolize: copying file `ltdl/Makefile.am'
libtoolize: copying file `ltdl/configure.ac'
libtoolize: copying file `ltdl/aclocal.m4'
libtoolize: copying file `ltdl/Makefile.in'
libtoolize: copying file `ltdl/config-h.in'
libtoolize: copying file `ltdl/configure'
libtoolize: copying file `ltdl/argz_.h'
libtoolize: copying file `ltdl/argz.c'
libtoolize: copying file `ltdl/loaders/dld_link.c'
libtoolize: copying file `ltdl/loaders/dlopen.c'
libtoolize: copying file `ltdl/loaders/dyld.c'
libtoolize: copying file `ltdl/loaders/load_add_on.c'
libtoolize: copying file `ltdl/loaders/loadlibrary.c'
libtoolize: copying file `ltdl/loaders/shl_load.c'
libtoolize: copying file `ltdl/lt__dirent.c'
libtoolize: copying file `ltdl/lt__strl.c'
libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
libtoolize: copying file `ltdl/libltdl/lt__private.h'
libtoolize: copying file `ltdl/libltdl/lt__strl.h'
libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
libtoolize: copying file `ltdl/libltdl/lt_error.h'
libtoolize: copying file `ltdl/libltdl/lt_system.h'
libtoolize: copying file `ltdl/libltdl/slist.h'
libtoolize: copying file `ltdl/loaders/preopen.c'
libtoolize: copying file `ltdl/lt__alloc.c'
libtoolize: copying file `ltdl/lt_dlloader.c'
libtoolize: copying file `ltdl/lt_error.c'
libtoolize: copying file `ltdl/ltdl.c'
libtoolize: copying file `ltdl/ltdl.h'
libtoolize: copying file `ltdl/slist.c'
libtoolize: Remember to add `LTDL_INIT' to configure.ac.
libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
LT_INIT
AC_OUTPUT
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:517: \$LIBTOOLIZE --ltdl --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:517"
( $at_check_trace; $LIBTOOLIZE --ltdl --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:517"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_8
#AT_START_9
# 9. libtoolize.at:527: upgrading verbatim style aclocal.m4
at_setup_line='libtoolize.at:527'
at_fn_banner 1
at_desc="upgrading verbatim style aclocal.m4"
at_desc_line=" 9: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "9. libtoolize.at:527: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
LT_INIT
AC_OUTPUT
_ATEOF
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/local/share/aclocal/libtool.m4'
libtoolize: `/usr/local/share/aclocal/ltoptions.m4'
libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/ltsugar.m4'
libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:550: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:550"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:550"
$at_failed && at_fn_log_failure
$at_traceon; }
## --------------------------------------- ##
## Upgrading a hand maintained aclocal.m4. ##
## --------------------------------------- ##
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
_ATEOF
cat >aclocal.m4 <<'_ATEOF'
# This should need upgrading:
# serial 25 LT_INIT
AC_DEFUN([LT_INIT],
[blah])
# This is newer than the upgrade version:
# serial 99999 ltoptions.m4
# This is older than the upgrade version:
# serial 1 ltversion.m4
_ATEOF
cat >expout <<'_ATEOF'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: You should add the contents of `m4/ltsugar.m4' to `aclocal.m4'.
libtoolize: copying file `m4/ltversion.m4'
libtoolize: You should add the contents of `m4/ltversion.m4' to `aclocal.m4'.
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:594: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:594"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:594"
$at_failed && at_fn_log_failure
$at_traceon; }
## ------------------------------------------- ##
## Upgrading an aclocal maintained aclocal.m4. ##
## ------------------------------------------- ##
{ set +x
$as_echo "$at_srcdir/libtoolize.at:601: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "libtoolize.at:601"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:601"
$at_failed && at_fn_log_failure
$at_traceon; }
rm -f m4/libtool.m4 m4/ltoptions.m4
# This file should be upgraded.
cat >m4/libtool.m4 <<'_ATEOF'
# serial 25 LT_INIT
AC_DEFUN([LT_INIT])
_ATEOF
# This file has a very high serial number, and should be left unchanged.
cat >m4/ltoptions.m4 <<'_ATEOF'
# serial 99999 ltoptions.m4
_ATEOF
cat >expout <<'_ATEOF'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
_ATEOF
cat >experr <<'_ATEOF'
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:625: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:625"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:625"
$at_failed && at_fn_log_failure
$at_traceon; }
## ----------------------------------------------------------- ##
## Now, a forced update to downgrade files with newer serials. ##
## ----------------------------------------------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:642: \$LIBTOOLIZE --copy --force
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:642"
( $at_check_trace; $LIBTOOLIZE --copy --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:642"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_9
#AT_START_10
# 10. libtoolize.at:651: verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR
at_setup_line='libtoolize.at:651'
at_fn_banner 1
at_desc="verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR"
at_desc_line=" 10: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "10. libtoolize.at:651: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_INIT
AC_OUTPUT
_ATEOF
cat >aclocal.m4 <<'_ATEOF'
# This should need upgrading:
# serial 25 LT_INIT
AC_DEFUN([LT_INIT],
[blah])
# This is newer than the upgrade version:
# serial 99999 ltoptions.m4
# This is older than the upgrade version:
# serial 1 ltversion.m4
_ATEOF
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/local/share/aclocal/libtool.m4'
libtoolize: `/usr/local/share/aclocal/ltversion.m4'
libtoolize: `/usr/local/share/aclocal/ltsugar.m4'
libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:685: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:685"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:685"
$at_failed && at_fn_log_failure
$at_traceon; }
## ----------------------------------------------------------------------- ##
## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ##
## ----------------------------------------------------------------------- ##
{ set +x
$as_echo "$at_srcdir/libtoolize.at:692: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "libtoolize.at:692"
( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:692"
$at_failed && at_fn_log_failure
$at_traceon; }
## The following code is adapted (and simplified) from libtoolize.m4sh
####
: ${GREP="grep"}
: ${SED="sed"}
basename="s,^.*/,,"
# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
$GREP "$1" "$2" >/dev/null 2>&1
}
# func_serial filename [macro_regex]
# Output the value of the serial number comment in FILENAME, where the
# comment line must also match MACRO_REGEX, if given.
func_serial ()
{
my_filename="$1"
my_macro_regex="$2"
my_sed_serial='
/^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ {
s,^# serial \([1-9][0-9.]*\).*$,\1,
q
}
d'
# Search FILENAME and all the files it m4_includes for a serial number
# in the file that AC_DEFUNs MACRO_REGEX.
my_serial=
if test -z "$my_macro_regex" ||
test "$my_filename" = aclocal.m4 ||
test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_filename"
then
my_serial=`$SED -e "$my_sed_serial" "$my_filename"`
fi
# If the file has no serial number, something is badly wrong!
test -n "$my_serial" || exit 1
echo $my_serial
}
# Make the serial number in aclocal.m4 higher than installed ltoptions.m4,
# and the others match the macro files that libtoolize will compare against.
libtool_serial=`func_serial "$tst_aclocaldir/libtool.m4" LT_INIT`
ltversion_serial=`func_serial "$tst_aclocaldir/ltversion.m4" ltversion.m4`
ltsugar_serial=`func_serial "$tst_aclocaldir/ltsugar.m4" ltsugar.m4`
lt_obsolete_serial=`func_serial "$tst_aclocaldir/lt~obsolete.m4" lt~obsolete.m4`
$SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 ltoptions.m4,' \
-e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \
-e "s,^#.*serial.*ltversion.m4\$,# serial $ltversion_serial ltversion.m4," \
-e "s,^#.*serial.*ltsugar.m4\$,# serial $ltsugar_serial ltsugar.m4," \
-e "s,^#.*serial.*lt~obsolete.m4\$,# serial $lt_obsolete_serial lt~obsolete.m4," \
< aclocal.m4 > aclocal.m4t
mv -f aclocal.m4t aclocal.m4
cat >expout <<'_ATEOF'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:759: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:759"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:759"
$at_failed && at_fn_log_failure
$at_traceon; }
## --------------------- ##
## Now, a forced update. ##
## --------------------- ##
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:774: \$LIBTOOLIZE --copy --force
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:774"
( $at_check_trace; $LIBTOOLIZE --copy --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:774"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_10
#AT_START_11
# 11. libtoolize.at:783: nonrecursive ltdl with AC_CONFIG_MACRO_DIR
at_setup_line='libtoolize.at:783'
at_fn_banner 1
at_desc="nonrecursive ltdl with AC_CONFIG_MACRO_DIR"
at_desc_line=" 11: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "11. libtoolize.at:783: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/argz.m4'
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltdl.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
libtoolize: copying file `ltdl/COPYING.LIB'
libtoolize: copying file `ltdl/README'
libtoolize: copying file `ltdl/argz_.h'
libtoolize: copying file `ltdl/argz.c'
libtoolize: copying file `ltdl/loaders/dld_link.c'
libtoolize: copying file `ltdl/loaders/dlopen.c'
libtoolize: copying file `ltdl/loaders/dyld.c'
libtoolize: copying file `ltdl/loaders/load_add_on.c'
libtoolize: copying file `ltdl/loaders/loadlibrary.c'
libtoolize: copying file `ltdl/loaders/shl_load.c'
libtoolize: copying file `ltdl/lt__dirent.c'
libtoolize: copying file `ltdl/lt__strl.c'
libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
libtoolize: copying file `ltdl/libltdl/lt__private.h'
libtoolize: copying file `ltdl/libltdl/lt__strl.h'
libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
libtoolize: copying file `ltdl/libltdl/lt_error.h'
libtoolize: copying file `ltdl/libltdl/lt_system.h'
libtoolize: copying file `ltdl/libltdl/slist.h'
libtoolize: copying file `ltdl/loaders/preopen.c'
libtoolize: copying file `ltdl/lt__alloc.c'
libtoolize: copying file `ltdl/lt_dlloader.c'
libtoolize: copying file `ltdl/lt_error.c'
libtoolize: copying file `ltdl/ltdl.c'
libtoolize: copying file `ltdl/ltdl.h'
libtoolize: copying file `ltdl/slist.c'
libtoolize: creating file `ltdl/Makefile.inc'
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
LTDL_INIT([nonrecursive])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:845: \$LIBTOOLIZE --copy --install --ltdl=ltdl
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:845"
( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:845"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_11
#AT_START_12
# 12. libtoolize.at:854: subproject ltdl with non-shared directories
at_setup_line='libtoolize.at:854'
at_fn_banner 1
at_desc="subproject ltdl with non-shared directories"
at_desc_line=" 12: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "12. libtoolize.at:854: testing ..."
$at_traceon
cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/config.guess'
libtoolize: copying file `build-aux/config.sub'
libtoolize: copying file `build-aux/install-sh'
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting auxiliary files in `build-aux'.
libtoolize: copying file `ltdl/config/compile'
libtoolize: copying file `ltdl/config/config.guess'
libtoolize: copying file `ltdl/config/config.sub'
libtoolize: copying file `ltdl/config/depcomp'
libtoolize: copying file `ltdl/config/install-sh'
libtoolize: copying file `ltdl/config/missing'
libtoolize: copying file `ltdl/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'.
libtoolize: copying file `acm4/argz.m4'
libtoolize: copying file `acm4/libtool.m4'
libtoolize: copying file `acm4/ltdl.m4'
libtoolize: copying file `acm4/ltoptions.m4'
libtoolize: copying file `acm4/ltsugar.m4'
libtoolize: copying file `acm4/ltversion.m4'
libtoolize: copying file `acm4/lt~obsolete.m4'
libtoolize: putting macros in `ltdl/m4'.
libtoolize: copying file `ltdl/m4/argz.m4'
libtoolize: copying file `ltdl/m4/libtool.m4'
libtoolize: copying file `ltdl/m4/ltdl.m4'
libtoolize: copying file `ltdl/m4/ltoptions.m4'
libtoolize: copying file `ltdl/m4/ltsugar.m4'
libtoolize: copying file `ltdl/m4/ltversion.m4'
libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
libtoolize: copying file `ltdl/COPYING.LIB'
libtoolize: copying file `ltdl/README'
libtoolize: copying file `ltdl/Makefile.am'
libtoolize: copying file `ltdl/configure.ac'
libtoolize: copying file `ltdl/aclocal.m4'
libtoolize: copying file `ltdl/Makefile.in'
libtoolize: copying file `ltdl/config-h.in'
libtoolize: copying file `ltdl/configure'
libtoolize: copying file `ltdl/argz_.h'
libtoolize: copying file `ltdl/argz.c'
libtoolize: copying file `ltdl/loaders/dld_link.c'
libtoolize: copying file `ltdl/loaders/dlopen.c'
libtoolize: copying file `ltdl/loaders/dyld.c'
libtoolize: copying file `ltdl/loaders/load_add_on.c'
libtoolize: copying file `ltdl/loaders/loadlibrary.c'
libtoolize: copying file `ltdl/loaders/shl_load.c'
libtoolize: copying file `ltdl/lt__dirent.c'
libtoolize: copying file `ltdl/lt__strl.c'
libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
libtoolize: copying file `ltdl/libltdl/lt__private.h'
libtoolize: copying file `ltdl/libltdl/lt__strl.h'
libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
libtoolize: copying file `ltdl/libltdl/lt_error.h'
libtoolize: copying file `ltdl/libltdl/lt_system.h'
libtoolize: copying file `ltdl/libltdl/slist.h'
libtoolize: copying file `ltdl/loaders/preopen.c'
libtoolize: copying file `ltdl/lt__alloc.c'
libtoolize: copying file `ltdl/lt_dlloader.c'
libtoolize: copying file `ltdl/lt_error.c'
libtoolize: copying file `ltdl/ltdl.c'
libtoolize: copying file `ltdl/ltdl.h'
libtoolize: copying file `ltdl/slist.c'
libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac.
libtoolize: Consider using `AC_CONFIG_MACRO_DIR([ltdl/m4])' in configure.ac.
libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
_ATEOF
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([acm4])
LT_INIT
LTDL_INIT([subproject])
AC_OUTPUT
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
mv -f expout.t expout
{ set +x
$as_echo "$at_srcdir/libtoolize.at:936: \$LIBTOOLIZE --copy --install
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:936"
( $at_check_trace; $LIBTOOLIZE --copy --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:936"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_12
#AT_START_13
# 13. libtoolize.at:945: LIBTOOLIZE_OPTIONS
at_setup_line='libtoolize.at:945'
at_fn_banner 1
at_desc="LIBTOOLIZE_OPTIONS"
at_desc_line=" 13: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "13. libtoolize.at:945: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
LIBTOOLIZE_OPTIONS="narf"
export LIBTOOLIZE_OPTIONS
cat >experr <<'_ATEOF'
libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf'
libtoolize: Try `libtoolize --help' for more information.
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:957: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:957"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:957"
$at_failed && at_fn_log_failure
$at_traceon; }
## --------------------------- ##
## Unknown LIBTOOLIZE_OPTIONS. ##
## --------------------------- ##
LIBTOOLIZE_OPTIONS=--no-such-option
export LIBTOOLIZE_OPTIONS
cat >experr <<'_ATEOF'
libtoolize: warning: unrecognized environment option `--no-such-option'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:971: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:971"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:971"
$at_failed && at_fn_log_failure
$at_traceon; }
## ----------------------------- ##
## --no-warn environment option. ##
## ----------------------------- ##
LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option
export LIBTOOLIZE_OPTIONS
cat >experr <<'_ATEOF'
_ATEOF
lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
sed "s/libtoolize/$lt_name/g
s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
mv -f experr.t experr
{ set +x
$as_echo "$at_srcdir/libtoolize.at:983: \$LIBTOOLIZE --copy
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:983"
( $at_check_trace; $LIBTOOLIZE --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
$at_diff experr "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:983"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_13
#AT_START_14
# 14. libtoolize.at:992: cleanup old installation
at_setup_line='libtoolize.at:992'
at_fn_banner 1
at_desc="cleanup old installation"
at_desc_line=" 14: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "14. libtoolize.at:992: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
_ATEOF
cat >acinclude.m4 <<'_ATEOF'
AC_DEFUN([LT_INIT],
[: keep me, I might be hand maintained!]) # LT_INIT
_ATEOF
cat >libltdl/acinclude.m4 <<'_ATEOF'
AC_DEFUN([LT_INIT],
[: delete me, I was left here by on old libltdl build]) # LT_INIT
_ATEOF
{ set +x
$as_echo "$at_srcdir/libtoolize.at:1010: \$LIBTOOLIZE --copy --force --ltdl
"
at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:1010"
( $at_check_trace; $LIBTOOLIZE --copy --force --ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1010"
$at_failed && at_fn_log_failure
$at_traceon; }
# check files are left as expected
{ set +x
$as_echo "$at_srcdir/libtoolize.at:1013: grep 'keep me' acinclude.m4"
at_fn_check_prepare_trace "libtoolize.at:1013"
( $at_check_trace; grep 'keep me' acinclude.m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1013"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/libtoolize.at:1014: test -f libltdl/acinclude.m4"
at_fn_check_prepare_trace "libtoolize.at:1014"
( $at_check_trace; test -f libltdl/acinclude.m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:1014"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_14
#AT_START_15
# 15. help.at:26: standard command line options
at_setup_line='help.at:26'
at_fn_banner 2
at_desc="standard command line options"
at_desc_line=" 15: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "15. help.at:26: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/help.at:30: \$LIBTOOLIZE --help"
at_fn_check_prepare_dynamic "$LIBTOOLIZE --help" "help.at:30"
( $at_check_trace; $LIBTOOLIZE --help
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:30"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:31: \$LIBTOOLIZE --version"
at_fn_check_prepare_dynamic "$LIBTOOLIZE --version" "help.at:31"
( $at_check_trace; $LIBTOOLIZE --version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:31"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:32: grep 'Copyright.*Free Software Foundation' stdout"
at_fn_check_prepare_trace "help.at:32"
( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:32"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:33: \$LIBTOOL --help"
at_fn_check_prepare_dynamic "$LIBTOOL --help" "help.at:33"
( $at_check_trace; $LIBTOOL --help
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:33"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:34: \$LIBTOOL --help-all"
at_fn_check_prepare_dynamic "$LIBTOOL --help-all" "help.at:34"
( $at_check_trace; $LIBTOOL --help-all
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:34"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:35: \$LIBTOOL --version"
at_fn_check_prepare_dynamic "$LIBTOOL --version" "help.at:35"
( $at_check_trace; $LIBTOOL --version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:35"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:36: grep 'Copyright.*Free Software Foundation' stdout"
at_fn_check_prepare_trace "help.at:36"
( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:36"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_15
#AT_START_16
# 16. help.at:41: mode short-hands
at_setup_line='help.at:41'
at_fn_banner 2
at_desc="mode short-hands"
at_desc_line=" 16: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "16. help.at:41: testing ..."
$at_traceon
cat >a.c <<'_ATEOF'
int a () { return 0; }
_ATEOF
cat >main.c <<'_ATEOF'
extern int a ();
int main () { return a (); }
_ATEOF
inst=`pwd`/inst
libdir=$inst/lib
bindir=$inst/bin
mkdir $inst $libdir $bindir
{ set +x
$as_echo "$at_srcdir/help.at:57: \$LIBTOOL compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
at_fn_check_prepare_dynamic "$LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:57"
( $at_check_trace; $LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:57"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:59: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:59"
( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:59"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:61: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:61"
( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:63: \$LIBTOOL link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -no-undefined -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir" "help.at:63"
( $at_check_trace; $LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:65: \$LIBTOOL l \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la" "help.at:65"
( $at_check_trace; $LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:67: \$LIBTOOL execute --dry-run ./main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL execute --dry-run ./main$EXEEXT" "help.at:67"
( $at_check_trace; $LIBTOOL execute --dry-run ./main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:67"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:69: \$LIBTOOL exe --dry-run ./main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL exe --dry-run ./main$EXEEXT" "help.at:69"
( $at_check_trace; $LIBTOOL exe --dry-run ./main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:71: \$LIBTOOL e --dry-run ./main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL e --dry-run ./main$EXEEXT" "help.at:71"
( $at_check_trace; $LIBTOOL e --dry-run ./main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:71"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:73: \$LIBTOOL install cp liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL install cp liba.la $libdir" "help.at:73"
( $at_check_trace; $LIBTOOL install cp liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:73"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:75: \$LIBTOOL i cp main\$EXEEXT \$bindir"
at_fn_check_prepare_dynamic "$LIBTOOL i cp main$EXEEXT $bindir" "help.at:75"
( $at_check_trace; $LIBTOOL i cp main$EXEEXT $bindir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:75"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:77: \$LIBTOOL finish \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL finish $libdir" "help.at:77"
( $at_check_trace; $LIBTOOL finish $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:79: \$LIBTOOL f \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL f $libdir" "help.at:79"
( $at_check_trace; $LIBTOOL f $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:81: \$LIBTOOL uninstall rm -f \$libdir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL uninstall rm -f $libdir/liba.la" "help.at:81"
( $at_check_trace; $LIBTOOL uninstall rm -f $libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:83: \$LIBTOOL u rm -f \$bindir/main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL u rm -f $bindir/main$EXEEXT" "help.at:83"
( $at_check_trace; $LIBTOOL u rm -f $bindir/main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:85: \$LIBTOOL clean rm -f main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL clean rm -f main$EXEEXT" "help.at:85"
( $at_check_trace; $LIBTOOL clean rm -f main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/help.at:87: \$LIBTOOL cl liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL cl liba.la" "help.at:87"
( $at_check_trace; $LIBTOOL cl liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/help.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_16
#AT_START_17
# 17. duplicate_members.at:25: duplicate members in archive tests
at_setup_line='duplicate_members.at:25'
at_fn_banner 2
at_desc="duplicate members in archive tests"
at_desc_line=" 17: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "17. duplicate_members.at:25: testing ..."
$at_traceon
# we don't want to use whole_archive_flag_spec, even if available
sed -e 's|^whole_archive_flag_spec=.*|whole_archive_flag_spec=|g' < $LIBTOOL > libtool
chmod +x ./libtool
LIBTOOL=./libtool
cat >bar.c <<'_ATEOF'
extern int foo1 (), foo2 (), foo3 (), foo4 (), foo5 (), foo6 ();
int bar() {
int result = foo1 () + foo2 () + foo3 () + foo4 () + foo5 () + foo6 ();
return result;
}
_ATEOF
cat >main.c <<'_ATEOF'
int bar();
int main()
{
if (bar() == 21) return 0;
return 1;
}
_ATEOF
for a in 1 2 3 4 5 6
do
mkdir $a
echo "int foo$a() {return $a;}" > $a/a.c
done
for a in 1 2 3 4 5 6
do
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o $a/a.lo $a/a.c
done
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo
{ set +x
$as_echo "$at_srcdir/duplicate_members.at:64: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" "duplicate_members.at:64"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
{ set +x
$as_echo "$at_srcdir/duplicate_members.at:68: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist" "duplicate_members.at:68"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:68"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
{ set +x
$as_echo "$at_srcdir/duplicate_members.at:72: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo ./libbar.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la" "duplicate_members.at:72"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:72"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_members.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_members.at:75"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:75"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_17
#AT_START_18
# 18. duplicate_conv.at:25: duplicate convenience archive names
at_setup_line='duplicate_conv.at:25'
at_fn_banner 2
at_desc="duplicate convenience archive names"
at_desc_line=" 18: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "18. duplicate_conv.at:25: testing ..."
$at_traceon
# We create two convenience archives with the same name, and _also_
# containing an object with the same name. This is necessary to detect
# the failure with both 1.5.22 and HEAD, since the latter does not (did
# not?) remove the temporary output directory, thus masking the failure
# when all objects have distinct names.
mkdir a b c
echo 'int a () { return 0; }' > a/a.c
echo 'int a2() { return 0; }' > b/a.c
echo 'int b () { return 0; }' > b/b.c
echo 'extern int a(), a2(), b(); int c() { return a() + a2() + b(); }' > c.c
echo 'extern int c(); int main() { return c(); }' > main.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a/a.c -o a/a.lo
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/a.c -o b/a.lo
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/b.c -o b/b.lo
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c c.c
$CC $CPPFLAGS $CFLAGS -c main.c
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a/a.lo
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/liba.la b/a.lo b/b.lo
# Fold into convenience archive.
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:51: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:51"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:51"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:53"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:53"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:55: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:55"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:55"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=clean rm -f libcee.la
# FIXME: For this test, we may want to zero out whole_archive_flag_spec;
# OTOH, we'd like to test the other situation, too.
# Fold into static library.
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:63: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:63"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:65: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:65"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:67: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:67"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:67"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=clean rm -f libcee.la
# Fold into library.
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:71: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:71"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:71"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:73: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:73"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:73"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:75"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:75"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=clean rm -f libcee.la
# Test whether this works with reloadable objects as well.
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:79: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o cee.\$OBJEXT c.lo a/liba.la b/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la" "duplicate_conv.at:79"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT cee.\$OBJEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT" "duplicate_conv.at:81"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_conv.at:83: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:83"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
# TODO: test dlpreloading of duplicates (when it is implemented)
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_18
#AT_START_19
# 19. duplicate_deps.at:25: preserve duplicate convenience deps
at_setup_line='duplicate_deps.at:25'
at_fn_banner 2
at_desc="preserve duplicate convenience deps"
at_desc_line=" 19: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "19. duplicate_deps.at:25: testing ..."
$at_traceon
# --preserve-dup-deps should work for convenience archives.
# Create a circular dependency of liba and libb:
# a1 pulls in b1, that pulls in a2.
cat >a1.c <<\EOF
extern int b1 ();
int a1 () { return b1 (); }
EOF
cat >a2.c <<\EOF
int a2 () { return 0; }
EOF
cat >b1.c <<\EOF
extern int a2 ();
int b1 () { return a2 (); }
EOF
cat >main.c <<\EOF
extern int a1 ();
int main () { return a1 (); }
EOF
for file in a1.c a2.c b1.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
$CC $CPPFLAGS $CFLAGS -c main.c
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a1.lo a2.lo
# This could be worked around by adding liba.la to libb.la
# (in that case all objects from liba would be merged into
# libb.a as well, possibly renamed.)
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo liba.la
{ set +x
$as_echo "$at_srcdir/duplicate_deps.at:58: \$LIBTOOL --mode=link --tag=CC \\
\$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la"
at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:58"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC \
$CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:58"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/duplicate_deps.at:61: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_deps.at:61"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
# Forgo the workaround and create a true circular dependency.
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo
# Some systems find all symbols anyway; skip this test on such systems.
{ set +x
$as_echo "$at_srcdir/duplicate_deps.at:66: \$LIBTOOL --mode=link --tag=CC \\
\$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la \\
&& exit 77"
at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:66"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC \
$CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la \
&& exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/duplicate_deps.at:66"
$at_failed && at_fn_log_failure
$at_traceon; }
# Other systems need special treatment, which currently fails.
{ set +x
$as_echo "$at_srcdir/duplicate_deps.at:72: \$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \\
\$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la"
at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:72"
( $at_check_trace; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \
$CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:72"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_19
#AT_START_20
# 20. flags.at:24: passing CC flags through libtool
at_setup_line='flags.at:24'
at_fn_banner 2
at_desc="passing CC flags through libtool"
at_desc_line=" 20: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "20. flags.at:24: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CC\" && test \"X\$CC\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CC\" && test \"X$CC\" != Xno; } || (exit 77)" "flags.at:24"
( $at_check_trace; { test -n "$CC" && test "X$CC" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
cat >a.c <<'_ATEOF'
int main () { return 0; }
_ATEOF
compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c
# Linker flags are not passed to the archiver, so don't test static libraries.
if $LIBTOOL --features | grep 'enable shared libraries'; then
library_and_module='library.la "module.la -module -avoid-version"'
else
library_and_module=
fi
eval "`$LIBTOOL --tag=CC --config | $EGREP '^(wl|archive_cmds)='`"
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CC --mode=compile \$compile -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CC --mode=compile $compile -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL --tag=CC --mode=compile $compile -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
# Linker flags are prefixed with ${wl} iff they are passed to the
# compiler driver, instead of directly to the linker.
case $archive_cmds in
*\$LD*\$linker_flags*) maybe_wl= ;;
*) maybe_wl=$wl ;;
esac
for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
case $flag in
-Wc, | -Xcompiler\ )
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=compile \$compile \$flag-foo -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " -foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
flag_prefix=
;;
-Wl, | -Xlinker\ )
flag_prefix=$maybe_wl
;;
esac
eval set program$EXEEXT "$library_and_module"
for output
do
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " $flag_prefix-foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_20
#AT_START_21
# 21. flags.at:24: passing CXX flags through libtool
at_setup_line='flags.at:24'
at_fn_banner 2
at_desc="passing CXX flags through libtool"
at_desc_line=" 21: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "21. flags.at:24: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "flags.at:24"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
cat >a.cpp <<'_ATEOF'
int main () { return 0; }
_ATEOF
compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp
# Linker flags are not passed to the archiver, so don't test static libraries.
if $LIBTOOL --features | grep 'enable shared libraries'; then
library_and_module='library.la "module.la -module -avoid-version"'
else
library_and_module=
fi
eval "`$LIBTOOL --tag=CXX --config | $EGREP '^(wl|archive_cmds)='`"
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CXX --mode=compile \$compile -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $compile -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $compile -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
# Linker flags are prefixed with ${wl} iff they are passed to the
# compiler driver, instead of directly to the linker.
case $archive_cmds in
*\$LD*\$linker_flags*) maybe_wl= ;;
*) maybe_wl=$wl ;;
esac
for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
case $flag in
-Wc, | -Xcompiler\ )
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=compile \$compile \$flag-foo -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " -foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
flag_prefix=
;;
-Wl, | -Xlinker\ )
flag_prefix=$maybe_wl
;;
esac
eval set program$EXEEXT "$library_and_module"
for output
do
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " $flag_prefix-foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_21
#AT_START_22
# 22. flags.at:24: passing F77 flags through libtool
at_setup_line='flags.at:24'
at_fn_banner 2
at_desc="passing F77 flags through libtool"
at_desc_line=" 22: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "22. flags.at:24: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/flags.at:24: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "flags.at:24"
( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
cat >a.f <<'_ATEOF'
program main
end
_ATEOF
compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f
# Linker flags are not passed to the archiver, so don't test static libraries.
if $LIBTOOL --features | grep 'enable shared libraries'; then
library_and_module='library.la "module.la -module -avoid-version"'
else
library_and_module=
fi
eval "`$LIBTOOL --tag=F77 --config | $EGREP '^(wl|archive_cmds)='`"
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=F77 --mode=compile \$compile -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=compile $compile -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL --tag=F77 --mode=compile $compile -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
# Linker flags are prefixed with ${wl} iff they are passed to the
# compiler driver, instead of directly to the linker.
case $archive_cmds in
*\$LD*\$linker_flags*) maybe_wl= ;;
*) maybe_wl=$wl ;;
esac
for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
case $flag in
-Wc, | -Xcompiler\ )
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=compile \$compile \$flag-foo -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " -foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
flag_prefix=
;;
-Wl, | -Xlinker\ )
flag_prefix=$maybe_wl
;;
esac
eval set program$EXEEXT "$library_and_module"
for output
do
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " $flag_prefix-foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_22
#AT_START_23
# 23. flags.at:24: passing FC flags through libtool
at_setup_line='flags.at:24'
at_fn_banner 2
at_desc="passing FC flags through libtool"
at_desc_line=" 23: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "23. flags.at:24: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/flags.at:24: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "flags.at:24"
( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
cat >a.f90 <<'_ATEOF'
program main
end
_ATEOF
compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90
# Linker flags are not passed to the archiver, so don't test static libraries.
if $LIBTOOL --features | grep 'enable shared libraries'; then
library_and_module='library.la "module.la -module -avoid-version"'
else
library_and_module=
fi
eval "`$LIBTOOL --tag=FC --config | $EGREP '^(wl|archive_cmds)='`"
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=FC --mode=compile \$compile -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=compile $compile -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL --tag=FC --mode=compile $compile -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
# Linker flags are prefixed with ${wl} iff they are passed to the
# compiler driver, instead of directly to the linker.
case $archive_cmds in
*\$LD*\$linker_flags*) maybe_wl= ;;
*) maybe_wl=$wl ;;
esac
for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
case $flag in
-Wc, | -Xcompiler\ )
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=compile \$compile \$flag-foo -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " -foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
flag_prefix=
;;
-Wl, | -Xlinker\ )
flag_prefix=$maybe_wl
;;
esac
eval set program$EXEEXT "$library_and_module"
for output
do
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " $flag_prefix-foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_23
#AT_START_24
# 24. flags.at:24: passing GCJ flags through libtool
at_setup_line='flags.at:24'
at_fn_banner 2
at_desc="passing GCJ flags through libtool"
at_desc_line=" 24: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "24. flags.at:24: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/flags.at:24: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "flags.at:24"
( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
cat >a.java <<'_ATEOF'
class a {}
_ATEOF
compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java
# Linker flags are not passed to the archiver, so don't test static libraries.
if $LIBTOOL --features | grep 'enable shared libraries'; then
library_and_module='library.la "module.la -module -avoid-version"'
else
library_and_module=
fi
eval "`$LIBTOOL --tag=GCJ --config | $EGREP '^(wl|archive_cmds)='`"
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=GCJ --mode=compile \$compile -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=compile $compile -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL --tag=GCJ --mode=compile $compile -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
# Linker flags are prefixed with ${wl} iff they are passed to the
# compiler driver, instead of directly to the linker.
case $archive_cmds in
*\$LD*\$linker_flags*) maybe_wl= ;;
*) maybe_wl=$wl ;;
esac
for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
case $flag in
-Wc, | -Xcompiler\ )
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=compile \$compile \$flag-foo -c \$source"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=compile $compile $flag-foo -c $source" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=compile $compile $flag-foo -c $source
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " -foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
flag_prefix=
;;
-Wl, | -Xlinker\ )
flag_prefix=$maybe_wl
;;
esac
eval set program$EXEEXT "$library_and_module"
for output
do
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo"
at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout"
at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24"
( $at_check_trace; $FGREP " $flag_prefix-foo" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_24
#AT_START_25
# 25. inherited_flags.at:26: inherited_linker_flags
at_setup_line='inherited_flags.at:26'
at_fn_banner 2
at_desc="inherited_linker_flags"
at_desc_line=" 25: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "25. inherited_flags.at:26: testing ..."
$at_traceon
cat >foo.c <<'_ATEOF'
int foo() { return 1;}
_ATEOF
cat >bar.c <<'_ATEOF'
int bar() { return 1;}
_ATEOF
cat >baz.c <<'_ATEOF'
int baz() { return 1;}
_ATEOF
cat >both.c <<'_ATEOF'
int both() { return 1;}
_ATEOF
cat >main.c <<'_ATEOF'
int main() { return 0;}
_ATEOF
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o baz.lo baz.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o both.lo both.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo -rpath /nonexistent -no-undefined
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /nonexistent -no-undefined
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libboth.la both.lo -rpath /nonexistent -no-undefined
mv libfoo.la libfoo.la.bak
sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_inlikely_existing_lib/g' < libfoo.la.bak > libfoo.la
rm libfoo.la.bak
mv libbar.la libbar.la.bak
sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_unlikely_existing_lib/g' < libbar.la.bak > libbar.la
rm libbar.la.bak
mv libboth.la libboth.la.bak
sed -e "s/^inherited_linker_flags.*/inherited_linker_flags='-llt_inlikely_existing_lib -llt_unlikely_existing_lib'/g" < libboth.la.bak > libboth.la
rm libboth.la.bak
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:76: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:76"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:76"
$at_failed && at_fn_log_failure
$at_traceon; }
# We used to grep for
# 'llt_[[ui]]nlikely_existing_lib.*llt_[[ui]]nlikely_existing_lib'
# here. This fails on win32/MSVC because the generated command lines have a
# different syntax. So drop the first `l'.
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:82: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" "inherited_flags.at:82"
( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:82"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:83: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:83"
( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:85: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:85"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:87: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:87"
( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
# now check for duplicates
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:91: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:91"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:91"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:93: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:93"
( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:95: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:95"
( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:97: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:97"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:97"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:99: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:99"
( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:101: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
at_fn_check_prepare_trace "inherited_flags.at:101"
( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:101"
$at_failed && at_fn_log_failure
$at_traceon; }
mv libboth.la libboth.la.bak
sed "s/^inherited_linker_flags.*/inherited_linker_flags='-framework Cocoa -framework ApplicationServices'/" < libboth.la.bak > libboth.la
rm libboth.la.bak
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:108: \$LIBTOOL -n --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent"
at_fn_check_prepare_dynamic "$LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" "inherited_flags.at:108"
( $at_check_trace; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:108"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:110: grep Cocoa.ltframework stdout"
at_fn_check_prepare_trace "inherited_flags.at:110"
( $at_check_trace; grep Cocoa.ltframework stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:110"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/inherited_flags.at:111: grep ' -framework Cocoa' stdout"
at_fn_check_prepare_trace "inherited_flags.at:111"
( $at_check_trace; grep ' -framework Cocoa' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:111"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_25
#AT_START_26
# 26. convenience.at:30: C convenience archives
at_setup_line='convenience.at:30'
at_fn_banner 2
at_desc="C convenience archives"
at_desc_line=" 26: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "26. convenience.at:30: testing ..."
$at_traceon
cat >main1.c <<EOF
extern int a1(void);
int main(void) { return a1() != 1; }
EOF
cat >main2.c <<EOF
extern int a1(void), a2(void);
int main(void) { return a1() + a2() != 3; }
EOF
cat >main3.c <<EOF
extern int a1(void), a2(void), a3(void);
int main(void) { return a1() + a2() + a3() != 6; }
EOF
for i in 1 2 3; do
echo "int a$i(void) { return $i; }" > a$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo
done
{ set +x
$as_echo "$at_srcdir/convenience.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:51"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:51"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:53"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:53"
$at_failed && at_fn_log_failure
$at_traceon; }
conv=
for i in 1 2 3; do
conv=$conv$i
{ set +x
$as_echo "$at_srcdir/convenience.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:59"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:59"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:61: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:61"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:63: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:63"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:64"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_26
#AT_START_27
# 27. convenience.at:69: C++ convenience archives
at_setup_line='convenience.at:69'
at_fn_banner 2
at_desc="C++ convenience archives"
at_desc_line=" 27: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "27. convenience.at:69: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/convenience.at:70: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "convenience.at:70"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:70: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "convenience.at:70"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >main1.cpp <<EOF
extern int a1(void);
int main(void) { return a1() != 1; }
EOF
cat >main2.cpp <<EOF
extern int a1(void), a2(void);
int main(void) { return a1() + a2() != 3; }
EOF
cat >main3.cpp <<EOF
extern int a1(void), a2(void), a3(void);
int main(void) { return a1() + a2() + a3() != 6; }
EOF
for i in 1 2 3; do
echo "int a$i(void) { return $i; }" > a$i.cpp
$LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp
$LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp
$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba$i.la a$i.lo
done
{ set +x
$as_echo "$at_srcdir/convenience.at:91: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:91"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:91"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:93: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:93"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
conv=
for i in 1 2 3; do
conv=$conv$i
{ set +x
$as_echo "$at_srcdir/convenience.at:99: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:99"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:101: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:101"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:101"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:103: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:103"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:103"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:104: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:104"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:104"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_27
#AT_START_28
# 28. convenience.at:109: F77 convenience archives
at_setup_line='convenience.at:109'
at_fn_banner 2
at_desc="F77 convenience archives"
at_desc_line=" 28: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "28. convenience.at:109: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/convenience.at:110: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "convenience.at:110"
( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:110"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >main1.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
end
EOF
cat >main2.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
call a2(res)
end
EOF
cat >main3.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
call a2(res)
call a3(res)
end
EOF
for i in 1 2 3; do
cat >a$i.f <<EOF
subroutine a$i(res)
implicit none
integer*4 res
res=$i
return
end
EOF
$LIBTOOL --tag=F77 --mode=compile $F77 $FFLAGS -c main$i.f
$LIBTOOL --tag=F77 --mode=compile $F77 $FFLAGS -c a$i.f
$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba$i.la a$i.lo
done
{ set +x
$as_echo "$at_srcdir/convenience.at:151: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:151"
( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:151"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:153: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:153"
( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:153"
$at_failed && at_fn_log_failure
$at_traceon; }
conv=
for i in 1 2 3; do
conv=$conv$i
{ set +x
$as_echo "$at_srcdir/convenience.at:159: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:159"
( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:159"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:161: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:161"
( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:161"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:163"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:163"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:164"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:164"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_28
#AT_START_29
# 29. convenience.at:169: FC convenience archives
at_setup_line='convenience.at:169'
at_fn_banner 2
at_desc="FC convenience archives"
at_desc_line=" 29: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "29. convenience.at:169: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/convenience.at:170: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "convenience.at:170"
( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:170"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >main1.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
end
EOF
cat >main2.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
call a2(res)
end
EOF
cat >main3.f <<EOF
program main
implicit none
integer*4 res
call a1(res)
call a2(res)
call a3(res)
end
EOF
for i in 1 2 3; do
cat >a$i.f <<EOF
subroutine a$i(res)
implicit none
integer*4 res
res=$i
return
end
EOF
$LIBTOOL --tag=FC --mode=compile $FC $FCFLAGS -c main$i.f
$LIBTOOL --tag=FC --mode=compile $FC $FCFLAGS -c a$i.f
$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba$i.la a$i.lo
done
{ set +x
$as_echo "$at_srcdir/convenience.at:211: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:211"
( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:211"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:213: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:213"
( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:213"
$at_failed && at_fn_log_failure
$at_traceon; }
conv=
for i in 1 2 3; do
conv=$conv$i
{ set +x
$as_echo "$at_srcdir/convenience.at:219: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:219"
( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:219"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:221: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:221"
( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:221"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:223: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:223"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:223"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:224: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:224"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:224"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_29
#AT_START_30
# 30. convenience.at:229: Java convenience archives
at_setup_line='convenience.at:229'
at_fn_banner 2
at_desc="Java convenience archives"
at_desc_line=" 30: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "30. convenience.at:229: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/convenience.at:230: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "convenience.at:230"
( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:230"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >foo1.java <<EOF
public class foo1 {
public static void main(String[] argv) {
A1 a1 = new A1();
}
}
EOF
cat >foo2.java <<EOF
public class foo2 {
public static void main(String[] argv) {
A1 a1 = new A1(); A2 a2 = new A2();
}
}
EOF
cat >foo3.java <<EOF
public class foo3 {
public static void main(String[] argv) {
A1 a1 = new A1(); A2 a2 = new A2(); A3 a3 = new A3();
}
}
EOF
for i in 1 2 3; do
cat >A$i.java <<EOF
public class A$i {
private int a;
public A$i () { a = 0; }
};
EOF
# There are just too many broken gcj installations out there, either missing
# libgcj.spec or unable to find it. Skip this test for them.
if test $i -eq 1; then
{ set +x
$as_echo "$at_srcdir/convenience.at:265: \$GCJ \$GCJFLAGS -c foo1.java || exit 77"
at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c foo1.java || exit 77" "convenience.at:265"
( $at_check_trace; $GCJ $GCJFLAGS -c foo1.java || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:265"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:266: \$GCJ \$GCJFLAGS --main=foo1 -o foo1\$EXEEXT foo1.java A1.java || exit 77"
at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS --main=foo1 -o foo1$EXEEXT foo1.java A1.java || exit 77" "convenience.at:266"
( $at_check_trace; $GCJ $GCJFLAGS --main=foo1 -o foo1$EXEEXT foo1.java A1.java || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:266"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:267: ./foo1\$EXEEXT || exit 77"
at_fn_check_prepare_dynamic "./foo1$EXEEXT || exit 77" "convenience.at:267"
( $at_check_trace; ./foo1$EXEEXT || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:267"
$at_failed && at_fn_log_failure
$at_traceon; }
rm -f foo1.o foo1.obj foo1$EXEEXT
fi
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java
$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo
done
{ set +x
$as_echo "$at_srcdir/convenience.at:275: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:275"
( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:275"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:277: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:277"
( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:277"
$at_failed && at_fn_log_failure
$at_traceon; }
conv=
for i in 1 2 3; do
conv=$conv$i
{ set +x
$as_echo "$at_srcdir/convenience.at:283: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -static --main=foo\$i -o main_static\$EXEEXT foo\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la" "convenience.at:283"
( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:283"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/convenience.at:285: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS --main=foo\$i -o main\$EXEEXT foo\$i.lo liba\$conv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la" "convenience.at:285"
( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:285"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:287: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:287"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:287"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/convenience.at:288: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:288"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:288"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_30
#AT_START_31
# 31. link-order.at:26: Link order test
at_setup_line='link-order.at:26'
at_fn_banner 2
at_desc="Link order test"
at_desc_line=" 31: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "31. link-order.at:26: testing ..."
$at_traceon
eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_absolute|shrext_cmds)='`
LDFLAGS="$LDFLAGS -no-undefined"
module=no
eval shared_ext=\"$shrext_cmds\"
prefix_old=`pwd`/old
prefix_new=`pwd`/new
mkdir src $prefix_old $prefix_new $prefix_old/lib $prefix_new/lib
cat >src/c.c <<'_ATEOF'
int c = 1;
_ATEOF
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/c.c -o src/c.lo
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libcee.la src/c.lo -rpath $prefix_old/lib
$LIBTOOL --mode=install cp src/libcee.la $prefix_old/lib/libcee.la
for i in old new; do
rm -rf src
mkdir src
cat >src/a_$i.c <<EOF
extern int c;
extern int b_$i();
int a_$i() { return c + b_$i(); }
EOF
cat >src/b_$i.c <<EOF
extern int c;
int b_$i() { return 1 + c; }
EOF
prefix=`eval echo \\$prefix_$i`
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/a_$i.c -o src/a.lo
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/b_$i.c -o src/b.lo
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libb.la src/b.lo \
-L$prefix_old/lib -lcee -rpath $prefix/lib
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/liba.la src/a.lo \
src/libb.la -L$prefix_old/lib -lcee -rpath $prefix/lib
$LIBTOOL --mode=install cp src/libb.la $prefix/lib/libb.la
{ set +x
$as_echo "$at_srcdir/link-order.at:69: \$LIBTOOL --mode=install cp src/liba.la \$prefix/lib/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la" "link-order.at:69"
( $at_check_trace; $LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
done
$LIBTOOL --mode=clean rm -f src/libb.la
$LIBTOOL --mode=clean rm -f src/liba.la
case $host_os in
aix* | interix*) ;; # These systems have different path syntax
*)
# Do not error if we do not relink (e.g. static-only systems)
case $hardcode_direct$hardcode_direct_absolute in
yesno)
{ set +x
$as_echo "$at_srcdir/link-order.at:82: if \$EGREP relinking stderr; then
\$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout
else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:82"
( $at_check_trace; if $EGREP relinking stderr; then
$EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:82"
if $at_failed; then :
echo "wrong link order"
fi
$at_failed && at_fn_log_failure
$at_traceon; }
;;
*)
{ set +x
$as_echo "$at_srcdir/link-order.at:87: if \$EGREP relinking stderr; then
\$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout
else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:87"
( $at_check_trace; if $EGREP relinking stderr; then
$EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:87"
if $at_failed; then :
echo "wrong link order"
fi
$at_failed && at_fn_log_failure
$at_traceon; }
;;
esac
;;
esac
for i in old new; do
cat >src/main_$i.c <<EOF
extern int a_$i();
int main(void) { return a_$i() != 3; }
EOF
prefix=`eval echo \\$prefix_$i`
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/main_$i.c -o src/main_$i.lo
{ set +x
$as_echo "$at_srcdir/link-order.at:103: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/main_\$i\$EXEEXT src/main_\$i.lo -L\$prefix/lib -la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la" "link-order.at:103"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:103"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=src/main_$i; if test -f "src/main_$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/link-order.at:105: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order.at:105"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:105"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_31
#AT_START_32
# 32. link-order2.at:46: Link order of deplibs
at_setup_line='link-order2.at:46'
at_fn_banner 2
at_desc="Link order of deplibs"
at_desc_line=" 32: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "32. link-order2.at:46: testing ..."
$at_traceon
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
undefined_setting=-no-undefined
shared_fails=no
case $host_os,$LDFLAGS,$allow_undefined_flag in
aix*,*-brtl*,*) ;;
aix*) shared_fails=yes ;;
darwin*,*,*-flat_namespace*) undefined_setting= ;;
darwin*,*,*) shared_fails=yes ;;
esac
deflibdir=`pwd`/lib
defbindir=`pwd`/lib
libdir=`pwd`/inst/lib
bindir=`pwd`/inst/bin
mkdir bin lib inst inst/bin inst/lib
LDFLAGS="$LDFLAGS $undefined_setting -L$deflibdir"
cat >a0.c <<\EOF
int a (void) { return 1; }
EOF
cat >a1.c <<\EOF
int a (void) { return 0; }
EOF
cat >b.c <<\EOF
int a (void);
int b (void) { return a (); }
EOF
cat >main.c <<\EOF
#include <stdlib.h>
extern int a (void);
extern int b (void);
int main (void)
{
return !(a () + b () == 0);
}
EOF
for file in a0 a1 b; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
done
$CC $CPPFLAGS $CFLAGS -c main.c
# Build an old, installed library.
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
$LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la
$LIBTOOL --mode=clean rm -f liba0.la
for type_of_depdepl in libtool non-libtool; do
echo "type of depdepl: $type_of_depdepl"
if test $type_of_depdepl = non-libtool; then
# Simulate a non-Libtool system library.
rm $deflibdir/liba1.la
addpath=$deflibdir
if test "$shlibpath_var" = PATH; then
addpath=$defbindir
fi
sep=
eval test -n \"\$$shlibpath_var\" && sep=:
eval $shlibpath_var='$addpath$sep$'$shlibpath_var
export $shlibpath_var
fi
for static in '' -static-libtool-libs; do
case `$LIBTOOL --features` in
*disable\ static\ libraries*) test "$static" = '' || continue;;
esac
test "$type_of_depdepl,$static" = "non-libtool,-static-libtool-libs" &&
static=-all-static
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
{ set +x
$as_echo "$at_srcdir/link-order2.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o main\$EXEEXT main.\$OBJEXT libb.la -la0"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0" "link-order2.at:123"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:123"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/link-order2.at:125: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:125"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:125"
$at_failed && at_fn_log_failure
$at_traceon; }
# Now test that if we reverse the link order, the program fails.
{ set +x
$as_echo "$at_srcdir/link-order2.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o wrong\$EXEEXT main.\$OBJEXT -la0 libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la" "link-order2.at:127"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:127"
$at_failed && at_fn_log_failure
$at_traceon; }
if test $shared_fails,$static != yes,; then
lt_exe=./wrong; if test -f "./wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/link-order2.at:130: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:130"
( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:130"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$LIBTOOL --mode=install cp liba1.la $libdir/liba1.la
$LIBTOOL --mode=install cp libb.la $libdir/libb.la
$LIBTOOL --mode=install cp main$EXEEXT $bindir/main$EXEEXT
$LIBTOOL --mode=install cp wrong$EXEEXT $bindir/wrong$EXEEXT
$LIBTOOL --mode=clean rm -f liba1.la libb.la
lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/link-order2.at:138: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:138"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:138"
$at_failed && at_fn_log_failure
$at_traceon; }
if test $shared_fails,$static != yes,; then
lt_exe=$bindir/wrong; if test -f "$bindir/wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/link-order2.at:140: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:140"
( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
done
done
{ set +x
$as_echo "$at_srcdir/link-order2.at:145: test \$shared_fails = no || (exit 77)"
at_fn_check_prepare_dynamic "test $shared_fails = no || (exit 77)" "link-order2.at:145"
( $at_check_trace; test $shared_fails = no || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:145"
$at_failed && at_fn_log_failure
$at_traceon; }
# Now the converse: if both the program and the library need libm, then
# it needs to be sorted last. (TODO)
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_32
#AT_START_33
# 33. fail.at:27: Failure tests
at_setup_line='fail.at:27'
at_fn_banner 2
at_desc="Failure tests"
at_desc_line=" 33: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "33. fail.at:27: testing ..."
$at_traceon
eval `$LIBTOOL --config | $EGREP '^(pic_mode|pic_flag|build_old_libs|build_libtool_libs)='`
LDFLAGS="$LDFLAGS -no-undefined"
cat >script <<'_ATEOF'
#! /bin/sh
exit 0
_ATEOF
chmod +x script
if test -x script >/dev/null 2>&1; then
test_x="test -x"
else
test_x=:
fi
# compile failure
echo 'choke me' > a.c
{ set +x
$as_echo "$at_srcdir/fail.at:49: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi" "fail.at:49"
( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:49"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:50: test -f a.lo"
at_fn_check_prepare_trace "fail.at:50"
( $at_check_trace; test -f a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/fail.at:50"
$at_failed && at_fn_log_failure
$at_traceon; }
# non-PIC compile failure
case $pic_mode in default | no)
case " $CFLAGS " in
*\ -prefer-pic\ *) ;;
*)
case $build_old_libs,$pic_flag in yes,*-DPIC*)
cat >a.c <<'_ATEOF'
#ifndef PIC
choke me
#endif
_ATEOF
{ set +x
$as_echo "$at_srcdir/fail.at:63: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" "fail.at:63"
( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:64: test -f a.lo"
at_fn_check_prepare_trace "fail.at:64"
( $at_check_trace; test -f a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/fail.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
;;
esac
;;
esac
;;
esac
# program creation failure.
# We can't rely on `main' not being present: the QNX linker
# won't error out in that case, although the resulting binary won't work.
# So we provoke a link failure due to an unresolved symbol, and require
# libtool to fail only if the link without libtool would have failed, too.
cat > a.c <<'EOF'
extern int nonexistent_function (void);
int main (void)
{
return nonexistent_function ();
}
EOF
$CC $CPPFLAGS $CFLAGS -c a.c
if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else
rm -f a a$EXEEXT
{ set +x
$as_echo "$at_srcdir/fail.at:87: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi" "fail.at:87"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:88: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:88"
( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/fail.at:88"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:89: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT -static; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi" "fail.at:89"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:89"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:90: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:90"
( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/fail.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
# shared library creation failure
case $build_libtool_libs in yes)
echo 'int duplicate_name(void) { return 0; }' > a.c
echo 'double duplicate_name(double x) { return 2.*x; }' > b.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c
# Unfortunately, this may actually succeed on AIX and IRIX :(
# So, also add a bogus object file to provoke more failure.
echo 'int whatever(void) { return 0;}' > c.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c
(
. ./c.lo
test "$pic_object" != none && echo choke me >"$pic_object"
test "$non_pic_object" != none && echo choke me >"$non_pic_object"
)
{ set +x
$as_echo "$at_srcdir/fail.at:108: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" "fail.at:108"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:108"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:109: test -f liba.la"
at_fn_check_prepare_trace "fail.at:109"
( $at_check_trace; test -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/fail.at:109"
$at_failed && at_fn_log_failure
$at_traceon; }
;;
esac
# Ensure we diagnose '-L path'.
echo 'int main () { return 0; }' > d.c
echo 'int foo () { return 0; }' > space-after-L.c
$CC $CPPFLAGS $CFLAGS -c d.c
$CC $CPPFLAGS $CFLAGS -c space-after-L.c
{ set +x
$as_echo "$at_srcdir/fail.at:118: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -L space-after-L.\$OBJEXT -o d\$EXEEXT d.\$OBJEXT; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi" "fail.at:118"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:118"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/fail.at:119: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o d\$EXEEXT d.\$OBJEXT -L; then (exit 1); else :; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi" "fail.at:119"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/fail.at:119"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_33
#AT_START_34
# 34. shlibpath.at:25: shlibpath_overrides_runpath
at_setup_line='shlibpath.at:25'
at_fn_banner 2
at_desc="shlibpath_overrides_runpath"
at_desc_line=" 34: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "34. shlibpath.at:25: testing ..."
$at_traceon
mkdir sub sub/lib sub/bin
echo 'int a () { return 0; }' > a.c
echo 'extern int a (); int main () { return a(); }' > m.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib
$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la
$LIBTOOL --mode=clean rm -f liba.la
rm -f sub/lib/liba.la
$CC $CPPFLAGS $CFLAGS -c m.c
{ set +x
$as_echo "$at_srcdir/shlibpath.at:38: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT -Lsub/lib -la -R\`pwd\`/sub/lib"
at_fn_check_prepare_notrace 'a `...` command substitution' "shlibpath.at:38"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:38"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/shlibpath.at:40: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT -Lsub/lib -la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la" "shlibpath.at:40"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:40"
$at_failed && at_fn_log_failure
$at_traceon; }
$mkdir_p moved
(cd sub && find . -type d) | (cd moved && xargs $mkdir_p)
for file in `cd sub && find . -type f -print -o -type l -print`
do
mv sub/$file moved/$file
done
rm -rf sub
mkdir sub sub/lib sub/bin
echo 'int wrong_lib () { return 0; }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib
$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la
$LIBTOOL --mode=clean rm -f liba.la
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shlibpath_overrides_runpath)='`
# No point checking a system with static libraries:
lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/shlibpath.at:54: if \"\$lt_exe\" || exit 1 && exit 77; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:54"
( $at_check_trace; if "$lt_exe" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:54"
$at_failed && at_fn_log_failure
$at_traceon; }
if test "$shlibpath_var" = PATH; then
addpath=`pwd`/moved/bin
else
addpath=`pwd`/moved/lib
fi
sep=
eval test -n \"\$$shlibpath_var\" && sep=:
eval $shlibpath_var='$addpath$sep$'$shlibpath_var
export $shlibpath_var
if test "$shlibpath_overrides_runpath" != no; then
lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/shlibpath.at:66: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:66"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:66"
$at_failed && at_fn_log_failure
$at_traceon; }
else
lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/shlibpath.at:68: if \"\$lt_exe\" || exit 1; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:68"
( $at_check_trace; if "$lt_exe" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:68"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
# Test that shlibpath_var is effective in adding paths at all:
lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/shlibpath.at:71: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:71"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:71"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_34
#AT_START_35
# 35. runpath-in-lalib.at:25: Runpath in libtool library files
at_setup_line='runpath-in-lalib.at:25'
at_fn_banner 2
at_desc="Runpath in libtool library files"
at_desc_line=" 35: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "35. runpath-in-lalib.at:25: testing ..."
$at_traceon
cat >a.c <<'_ATEOF'
int a () { return 0; }
_ATEOF
cat >b.c <<'_ATEOF'
extern int a ();
int b () { return a (); }
_ATEOF
cat >m.c <<'_ATEOF'
extern int b ();
int main () { return b (); }
_ATEOF
instdir=`pwd`/inst
libdir=$instdir/lib
bindir=$instdir/bin
addrunpath=`pwd`/foobar
mkdir $instdir $libdir $bindir
for file in a.c b.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
$CC $CPPFLAGS $CFLAGS -c m.c
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir -R\$addrunpath"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath" "runpath-in-lalib.at:51"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:51"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la" "runpath-in-lalib.at:53"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:53"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la" "runpath-in-lalib.at:55"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:55"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:57: \$LIBTOOL --mode=install cp liba.la \$libdir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir/liba.la" "runpath-in-lalib.at:57"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:57"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:58: \$LIBTOOL --mode=install cp libb.la \$libdir/libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb.la $libdir/libb.la" "runpath-in-lalib.at:58"
( $at_check_trace; $LIBTOOL --mode=install cp libb.la $libdir/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:58"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:59: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "runpath-in-lalib.at:59"
( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:59"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:61: grep /foobar \$libdir/liba.la"
at_fn_check_prepare_dynamic "grep /foobar $libdir/liba.la" "runpath-in-lalib.at:61"
( $at_check_trace; grep /foobar $libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/runpath-in-lalib.at:62: grep /foobar \$libdir/libb.la"
at_fn_check_prepare_dynamic "grep /foobar $libdir/libb.la" "runpath-in-lalib.at:62"
( $at_check_trace; grep /foobar $libdir/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:62"
$at_failed && at_fn_log_failure
$at_traceon; }
# TODO: check that m gets -R, too.
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_35
#AT_START_36
# 36. static.at:68: static linking flags for programs
at_setup_line='static.at:68'
at_fn_banner 2
at_desc="static linking flags for programs"
at_desc_line=" 36: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "36. static.at:68: testing ..."
$at_traceon
LDFLAGS="$LDFLAGS -no-undefined"
prefix=`pwd`/inst
bindir=$prefix/bin
prefix1=`pwd`/inst1
prefix2=`pwd`/inst2
prefix3=`pwd`/inst3
libdir1=$prefix1/lib
libdir2=$prefix2/lib
libdir3=$prefix3/lib
srcdir_broken=`pwd`/broken-src
prefix_broken=`pwd`/broken
libdir_broken=$prefix_broken/lib
bindir_broken=$prefix_broken/bin
have_static=false
have_shared=false
per_deplib=false
$LIBTOOL --features | grep 'enable static libraries' >/dev/null && have_static=:
$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
eval `$LIBTOOL --config |
$EGREP '^(per_deplib_(static|dynamic)_flag|shlibpath_var|link_static_flag)='`
if test -n "$per_deplib_static_flag" && test -n "$per_deplib_dynamic_flag"; then
per_deplib=:
fi
# On GNU/Linux with --disable-static, m-all-static fails to link.
# What we'd like to state here is: if the user actively passed
# --disable-static (as opposed to: the libtool.m4 macros set
# enable_static=no), then they cannot expect -all-static to work.
# So we punt, knowing that we mangle enable_static on AIX only.
can_link_all_static=-all-static
case $host_os,$have_static,$link_static_flag in
aix*) ;;
*,false,?*) can_link_all_static= ;;
esac
# Create broken libraries. They will later be moved to those
# directories where the respective libraries should be linked
# statically from. This detects both failure to link statically
# and failure to omit extraneous run paths.
mkdir $srcdir_broken $prefix_broken $libdir_broken
(
cd $srcdir_broken
echo 'int this_should_not_be_linked_against() { return 0; }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
for i in 1 1dep 2 2dep 3 3dep; do
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a.lo -rpath $libdir_broken
$LIBTOOL --mode=install cp liba$i.la $libdir_broken/liba$i.la
done
)
func_fix_path ()
{
# For w32, hardcoding cannot work, but $libdir/../bin is where binaries
# usually are installed. Since we use several prefixes for testing
# convenience -- it allows us to replace the good libraries easily with
# broken ones and vice versa -- we have to set PATH to find them.
# Since OTOH we put broken libs of all names in the "moved" prefixes,
# we have to ensure that this prefix comes last: otherwise we may link
# against a broken library but the good one would come later in the PATH.
# So we let the caller of this function set the order: the "other" two
# come first.
if test "$shlibpath_var" = PATH; then
save_PATH=$PATH
sep=
test -z "$PATH" || sep=:
PATH=${2}/bin:${3}/bin:${1}/bin$sep$PATH
fi
}
func_restore_path ()
{
if test "$shlibpath_var" = PATH; then
PATH=$save_PATH
fi
}
# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
func_move_libs ()
{
$mkdir_p "${1}-moved"
(cd "${1}" && find . -type d) | (cd "${1}-moved" && xargs $mkdir_p)
for file in `cd "${1}" && find . -type f -print -o -type l -print`
do
mv "${1}"/$file "${1}-moved"/$file
done
rm -rf "${1}"
$mkdir_p "${2}-moved"
(cd "${2}" && find . -type d) | (cd "${2}-moved" && xargs $mkdir_p)
for file in `cd "${2}" && find . -type f -print -o -type l -print`
do
mv "${2}"/$file "${2}-moved"/$file
done
rm -rf "${2}"
$mkdir_p "${1}"
(cd "$srcdir_broken" && find . -type d) | (cd "${1}" && xargs $mkdir_p)
for file in `cd "$srcdir_broken" && find . -type f -print -o -type l -print`
do
mv "$srcdir_broken"/$file "${1}"/$file
done
rm -rf "$srcdir_broken"
$mkdir_p "${2}"
(cd "$prefix_broken" && find . -type d) | (cd "${2}" && xargs $mkdir_p)
for file in `cd "$prefix_broken" && find . -type f -print -o -type l -print`
do
mv "$prefix_broken"/$file "${2}"/$file
done
rm -rf "$prefix_broken"
func_fix_path ${2} ${3} ${4}
}
# func_restore_libs srcdir_to_restore prefix_to_restore
func_restore_libs ()
{
func_restore_path
$mkdir_p "$prefix_broken"
(cd "${2}" && find . -type d) | (cd "$prefix_broken" && xargs $mkdir_p)
for file in `cd "${2}" && find . -type f -print -o -type l -print`
do
mv "${2}"/$file "$prefix_broken"/$file
done
rm -rf "${2}"
$mkdir_p "$srcdir_broken"
(cd "${1}" && find . -type d) | (cd "$srcdir_broken" && xargs $mkdir_p)
for file in `cd "${1}" && find . -type f -print -o -type l -print`
do
mv "${1}"/$file "$srcdir_broken"/$file
done
rm -rf "${1}"
$mkdir_p "${2}"
(cd "${2}-moved" && find . -type d) | (cd "${2}" && xargs $mkdir_p)
for file in `cd "${2}-moved" && find . -type f -print -o -type l -print`
do
mv "${2}-moved"/$file "${2}"/$file
done
rm -rf "${2}-moved"
$mkdir_p "${1}"
(cd "${1}-moved" && find . -type d) | (cd "${1}" && xargs $mkdir_p)
for file in `cd "${1}-moved" && find . -type f -print -o -type l -print`
do
mv "${1}-moved"/$file "${1}"/$file
done
rm -rf "${1}-moved"
}
# make sure the program can be run.
func_test_exec ()
{
# On AIX without runtimelinking, this does not make sense.
if $have_static; then
echo "## The following should succeed:"
for st
do
echo "# m$st"
lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/static.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:178"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/static.at:178"
$at_failed && at_fn_log_failure
$at_traceon; }
# For some per-deplib flag combinations there may be no installed program,
# because liba2 is not yet installed.
if test -f "$bindir/m${st}$EXEEXT"; then
lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/static.at:182: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:182"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/static.at:182"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
done
fi
}
# make sure the program cannot be run.
func_test_exec_fail ()
{
# No point in testing if we're linking statically anyway.
# TODO: Maybe in the `else' case we could test for success?
if $have_shared; then
echo "## The following should fail:"
for st
do
echo "# m$st"
lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/static.at:198: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:198"
( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/static.at:198"
$at_failed && at_fn_log_failure
$at_traceon; }
# For some per-deplib flag combinations there may be no installed program,
# because liba2 is not yet installed.
if test -f "$bindir/m${st}$EXEEXT"; then
lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/static.at:202: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:202"
( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/static.at:202"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
done
fi
}
# Try three independent libraries,
# one installed libtool library,
# one uninstalled libtool library,
# one non-libtool library,
# the libtool libraries each having a dependency, or not.
# Try both an uninstalled and the corresponding installed program.
for withdep in no yes; do
echo
echo "### libraries with dependencies: $withdep"
rm -rf src $prefix $prefix1 $prefix2 $prefix3
mkdir src $prefix $bindir $prefix1 $prefix2 $prefix3
cd src
### build the libraries.
for i in 1 2 3; do
eval ldir=\$libdir$i
mkdir a$i $ldir
cd a$i
case $withdep,$i in
no,* | yes,3)
echo "int a$i() { return 0; }" > a$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir
;;
*)
echo "int a${i}dep() { return 0; }" > a${i}dep.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a${i}dep.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba${i}dep.la a${i}dep.lo -rpath $ldir
echo "extern int a${i}dep(); int a$i() { return a${i}dep(); }" > a$i.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir ./liba${i}dep.la
;;
esac
cd ..
done
### install the libraries.
test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
$LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
$LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
$LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
# simulate a non-libtool lib:
rm -f $libdir3/liba3.la
### build the programs.
echo 'extern int a1(), a2(), a3();
int main() { return a1() + a2() + a3(); }' > m.c
$CC $CPPFLAGS $CFLAGS -c m.c
# global static flags.
for st in -static -static-libtool-libs $can_link_all_static; do
{ set +x
$as_echo "$at_srcdir/static.at:263: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o m\${st}\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:263"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m${st}$EXEEXT m.$OBJEXT \
-L$libdir1 -la1 a2/liba2.la -L$libdir3 -R$libdir3 -la3
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:263"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# per-deplib static/shared flags.
# also try a bit redundant flags, and shuffled order (for run paths check).
if $per_deplib; then
{ set +x
$as_echo "$at_srcdir/static.at:271: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:271"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT \
-L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:271"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:274: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:274"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT \
-L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:274"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:277: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -Bstatic -la3 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:277"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT m.$OBJEXT \
-L$libdir1 -la1 a2/liba2.la -L$libdir3 -Bstatic -la3 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:277"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m12\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:280"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12$EXEEXT m.$OBJEXT \
-L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:280"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:283: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m13\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \\
-L\$libdir3 -Bstatic -la3 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:283"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m13$EXEEXT m.$OBJEXT \
-L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \
-L$libdir3 -Bstatic -la3 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:283"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:287: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m31\$EXEEXT m.\$OBJEXT \\
-L\$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \\
-L\$libdir1 -Bstatic -la1 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:287"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31$EXEEXT m.$OBJEXT \
-L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \
-L$libdir1 -Bstatic -la1 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:287"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:291: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m23\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \\
-L\$libdir3 -Bstatic -la3 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:291"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m23$EXEEXT m.$OBJEXT \
-L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \
-L$libdir3 -Bstatic -la3 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:291"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:295: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -Bstatic -la1 a2/liba2.la -L\$libdir3 -la3 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:295"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123$EXEEXT m.$OBJEXT \
-L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:295"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:298: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123a\$EXEEXT m.\$OBJEXT \\
-L\$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \\
-Bstatic -L\$libdir3 -la3 -Bdynamic"
at_fn_check_prepare_notrace 'an embedded newline' "static.at:298"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123a$EXEEXT m.$OBJEXT \
-L$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \
-Bstatic -L$libdir3 -la3 -Bdynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:298"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
### install the programs.
# We can't install any program that links dynamically against liba2.
for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do
echo "# m$st"
{ set +x
$as_echo "$at_srcdir/static.at:312: \$LIBTOOL --mode=install cp m\${st}\$EXEEXT \$bindir/m\${st}\$EXEEXT"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:312"
( $at_check_trace; $LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:312"
$at_failed && at_fn_log_failure
$at_traceon; }
if $have_static; then
{ set +x
$as_echo "$at_srcdir/static.at:314: \$EGREP 'relinking|has not been installed' stderr"
at_fn_check_prepare_dynamic "$EGREP 'relinking|has not been installed' stderr" "static.at:314"
( $at_check_trace; $EGREP 'relinking|has not been installed' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/static.at:314"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
done
### Run each program once so that relinking has happened.
func_fix_path $prefix1 $prefix2 $prefix3
func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a`
func_restore_path
# For each library:
# - remove the library images to catch failure to link statically/dynamically,
# - add false other deplibs in the paths to catch (some) wrongly added run paths.
# if -all-static does not work, do not exercise it any more.
all_static=-all-static
test -z "$link_static_flag" && all_static=
echo "### test whether installed libtool library liba2 was linked statically"
func_move_libs a2 $prefix2 $prefix3 $prefix1
func_test_exec -static -static-libtool-libs $all_static `$per_deplib && echo 2 12 23 123 123a`
$per_deplib && func_test_exec_fail 1 3 13 31
func_restore_libs a2 $prefix2
echo "### test whether uninstalled libtool library liba1 was linked statically"
func_move_libs a1 $prefix1 $prefix2 $prefix3
func_test_exec -static-libtool-libs $all_static `$per_deplib && echo 1 12 13 31 123 123a`
$per_deplib && func_test_exec_fail -static 2 3 23
func_restore_libs a1 $prefix1
echo "### test whether non-libtool library liba3 was linked statically"
func_move_libs a3 $prefix3 $prefix1 $prefix2
func_test_exec $all_static `$per_deplib && echo 3 13 23 31 123 123a`
func_test_exec_fail -static -static-libtool-libs `$per_deplib && echo 1 2 12`
func_restore_libs a3 $prefix3
cd ..
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_36
#AT_START_37
# 37. static.at:358: ccache -all-static
at_setup_line='static.at:358'
at_fn_banner 2
at_desc="ccache -all-static"
at_desc_line=" 37: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "37. static.at:358: testing ..."
$at_traceon
cat >ccache <<'_ATEOF'
#! /bin/sh
# poor man's ccache clone
case $1 in
-*) echo "bogus argument: $1" >&2; exit 1 ;;
esac
exec "$@"
_ATEOF
chmod +x ./ccache
cat >a.c <<'_ATEOF'
int main(void) { return 0; }
_ATEOF
{ set +x
$as_echo "$at_srcdir/static.at:374: \$CC \$CPPFLAGS \$CFLAGS -c a.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c" "static.at:374"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:374"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/static.at:375: \$LIBTOOL --mode=link --tag=CC ./ccache \$CC \$CFLAGS \$LDFLAGS -all-static a.\$OBJEXT -o a\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT" "static.at:375"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/static.at:375"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_37
#AT_START_38
# 38. export.at:25: Export test
at_setup_line='export.at:25'
at_fn_banner 2
at_desc="Export test"
at_desc_line=" 38: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "38. export.at:25: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/export.at:28: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" "export.at:28"
( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/export.at:28"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/export.at:30: eval \`\$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^\$/p'\`
test -n \"\$archive_expsym_cmds\" || echo false >can-hide
case \$archive_expsym_cmds in
*-retain-symbols-file*) echo false >can-hide ;;
esac"
at_fn_check_prepare_notrace 'a `...` command substitution' "export.at:30"
( $at_check_trace; eval `$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^$/p'`
test -n "$archive_expsym_cmds" || echo false >can-hide
case $archive_expsym_cmds in
*-retain-symbols-file*) echo false >can-hide ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/export.at:30"
$at_failed && at_fn_log_failure
$at_traceon; }
can_hide=:
test -s can-hide && can_hide=false
LDFLAGS="$LDFLAGS -no-undefined"
libdir=`pwd`/inst/lib
mkdir inst inst/lib
cat >a.c <<'_ATEOF'
/* all kinds of data items */
#ifdef __cplusplus
extern "C" {
#endif
int v1;
static int v2;
int v3 = 0;
int v4 = 1;
extern const int v5, v6;
extern const char *v7;
extern const char v8[];
extern int (*const v12) (void);
const int v5 = 0;
const int v6 = 1;
const char* v7 = "\01foo";
const char v8[] = "\01bar";
int v9(void) { return v2 + 1; }
int (*v10) (void);
int (*v11) (void) = v9;
int (*const v12) (void) = v9;
typedef struct { int arr[1000]; } large;
large v13;
large v14 = { { 0 } };
large v15 = { { 1 } };
int w1 (void) { return 0; }
#ifdef __cplusplus
}
#endif
_ATEOF
cat >asyms <<'_ATEOF'
v1
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
_ATEOF
cat >main.c <<'_ATEOF'
#if defined(LIBA_DLL_IMPORT)
# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
# define LIBA_SCOPE extern __declspec(dllimport)
# endif
#endif
#if !defined(LIBA_SCOPE)
# define LIBA_SCOPE extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int v1;
extern int v3, v4;
LIBA_SCOPE const int v5, v6;
extern const char* v7;
extern const char v8[];
extern int v9(void);
extern int (*v10) (void);
extern int (*v11) (void);
LIBA_SCOPE int (*const v12) (void);
#ifdef __cplusplus
}
#endif
typedef struct { int arr[1000]; } large;
extern large v13, v14, v15;
int main (void)
{
char s = v7[0] + v8[0];
return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
+ v13.arr[0] + v14.arr[0] + v15.arr[0]
- 8;
}
_ATEOF
cat >broken.c <<'_ATEOF'
/* these symbols should not be exported */
#ifdef __cplusplus
extern "C" {
#endif
extern int w1 (void);
#ifdef __cplusplus
}
#endif
int main (void)
{
return w1 ();
}
_ATEOF
{ set +x
$as_echo "$at_srcdir/export.at:148: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "export.at:148"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/export.at:149: \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "export.at:149"
( $at_check_trace; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:149"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/export.at:150: \$CC \$CPPFLAGS \$CFLAGS -c broken.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c broken.c" "export.at:150"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c broken.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:150"
$at_failed && at_fn_log_failure
$at_traceon; }
for exportsyms in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'
do
# case 1: shared library built from object.
echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \\
-rpath $libdir' $exportsyms"; { set +x
$as_echo "$at_srcdir/export.at:155: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo \\
-rpath \$libdir' \$exportsyms"
at_fn_check_prepare_notrace 'an embedded newline' "export.at:155"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \
-rpath $libdir' $exportsyms
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:155"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/export.at:157: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:157"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:157"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/export.at:159: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:159"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/export.at:159"
$at_failed && at_fn_log_failure
$at_traceon; }
if test -n "$exportsyms" && $can_hide; then
{ set +x
$as_echo "$at_srcdir/export.at:161: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la
then (exit 1); else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "export.at:161"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la
then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:161"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
# case 2: shared library built from convenience archive.
{ set +x
$as_echo "$at_srcdir/export.at:166: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libconv.la a.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo" "export.at:166"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:166"
$at_failed && at_fn_log_failure
$at_traceon; }
echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \\
-rpath $libdir' $exportsyms"; { set +x
$as_echo "$at_srcdir/export.at:168: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la libconv.la \\
-rpath \$libdir' \$exportsyms"
at_fn_check_prepare_notrace 'an embedded newline' "export.at:168"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \
-rpath $libdir' $exportsyms
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:168"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/export.at:170: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:170"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:170"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/export.at:172: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:172"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/export.at:172"
$at_failed && at_fn_log_failure
$at_traceon; }
if test -n "$exportsyms" && $can_hide; then
{ set +x
$as_echo "$at_srcdir/export.at:174: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la
then (exit 1); else :; fi"
at_fn_check_prepare_notrace 'an embedded newline' "export.at:174"
( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la
then (exit 1); else :; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/export.at:174"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
done
{ set +x
$as_echo "$at_srcdir/export.at:179: \$can_hide || (exit 77)"
at_fn_check_prepare_dynamic "$can_hide || (exit 77)" "export.at:179"
( $at_check_trace; $can_hide || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/export.at:179"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_38
#AT_START_39
# 39. search-path.at:25: sys_lib_search_path
at_setup_line='search-path.at:25'
at_fn_banner 2
at_desc="sys_lib_search_path"
at_desc_line=" 39: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "39. search-path.at:25: testing ..."
$at_traceon
LDFLAGS="$LDFLAGS -no-undefined"
cat >main.c <<'_ATEOF'
extern
#ifdef __cplusplus
"C"
#endif
int inflate ();
int main()
{
return inflate ();
}
_ATEOF
$CC $CPPFLAGS $CFLAGS -c main.c
eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='`
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
no_libz=:
for path in $sys_lib_search_path; do
if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$path -lz
then
{ set +x
$as_echo "$at_srcdir/search-path.at:48: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -lz"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz" "search-path.at:48"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:48"
$at_failed && at_fn_log_failure
$at_traceon; }
no_libz=false
break
fi
done
# If -lz doesn't exist (hello, cross compiler!), we need a dummy test.
if $no_libz; then
{ set +x
$as_echo "$at_srcdir/search-path.at:57: exit 77"
at_fn_check_prepare_trace "search-path.at:57"
( $at_check_trace; exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:57"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_39
#AT_START_40
# 40. indirect_deps.at:25: indirect convenience
at_setup_line='indirect_deps.at:25'
at_fn_banner 2
at_desc="indirect convenience"
at_desc_line=" 40: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "40. indirect_deps.at:25: testing ..."
$at_traceon
cat >a.c <<'_ATEOF'
#include <math.h>
int a () { return 0; }
double ad (double x) { return sin (x); }
_ATEOF
cat >b.c <<'_ATEOF'
extern int a ();
extern double ad (double);
int b () { return a () + (int) ad (0.0); }
_ATEOF
cat >c.c <<'_ATEOF'
extern int b ();
int c () { return b (); }
_ATEOF
cat >m.c <<'_ATEOF'
extern int c ();
int main () { return c (); }
_ATEOF
LDFLAGS="$LDFLAGS -no-undefined"
for file in a.c b.c c.c; do
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file
done
$CC $CPPFLAGS $CFLAGS -c m.c
# liba is an indirect dependency of libd and of libconv.
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath /nowhere -lm
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b.lo liba.la -rpath /nowhere
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la c.lo libb.la
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libd.la libconv.la -rpath /nowhere
for st in '' -static; do
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:60: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m.\$OBJEXT libd.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la" "indirect_deps.at:60"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:60"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:62: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m.\$OBJEXT libconv.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la" "indirect_deps.at:62"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:62"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:64"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:65"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_40
#AT_START_41
# 41. indirect_deps.at:71: indirect uninstalled
at_setup_line='indirect_deps.at:71'
at_fn_banner 2
at_desc="indirect uninstalled"
at_desc_line=" 41: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "41. indirect_deps.at:71: testing ..."
$at_traceon
cat >a.c <<'_ATEOF'
int a () { return 0; }
_ATEOF
cat >b.c <<'_ATEOF'
extern int a ();
int b () { return a (); }
_ATEOF
cat >c.c <<'_ATEOF'
extern int b ();
int c () { return b (); }
_ATEOF
cat >m1.c <<'_ATEOF'
extern int b ();
int main () { return b (); }
_ATEOF
cat >m2.c <<'_ATEOF'
extern int c ();
int main () { return c (); }
_ATEOF
mkdir a b c
LDFLAGS="$LDFLAGS -no-undefined"
for file in a.c b.c c.c; do
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file
done
for file in m1.c m2.c; do
$CC $CPPFLAGS $CFLAGS -c $file
done
for st in '' -static; do
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a.lo -rpath /nowherea
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/libb.la b.lo a/liba.la -rpath /nowhereb
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o c/libcee.la c.lo b/libb.la -rpath /nowherec
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:109: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m1.\$OBJEXT b/libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la" "indirect_deps.at:109"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:109"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:111: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m2.\$OBJEXT c/libcee.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la" "indirect_deps.at:111"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:111"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:113: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:113"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:113"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/indirect_deps.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:114"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_41
#AT_START_42
# 42. archive-in-archive.at:26: static library contains static library
at_setup_line='archive-in-archive.at:26'
at_fn_banner 2
at_desc="static library contains static library"
at_desc_line=" 42: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
case "$archive_contents" in *"libfoo.a"*) : ;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "42. archive-in-archive.at:26: testing ..."
$at_traceon
cat >foo.c <<'_ATEOF'
int foo() { return 1;}
_ATEOF
cat >bar.c <<'_ATEOF'
int bar() { return 1;}
_ATEOF
thisdir=`cd . && pwd`
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
-o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
$LIBTOOL --mode=install cp libfoo.la $thisdir
{ set +x
$as_echo "$at_srcdir/archive-in-archive.at:45: \$LIBTOOL --mode=link --tag=CC --tag=disable-shared \$CC \$CFLAGS \$LDFLAGS \\
-o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath \$thisdir"
at_fn_check_prepare_notrace 'an embedded newline' "archive-in-archive.at:45"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
-o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath $thisdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:45"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/archive-in-archive.at:48: \$LIBTOOL --mode=install cp libbar.la \$thisdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libbar.la $thisdir" "archive-in-archive.at:48"
( $at_check_trace; $LIBTOOL --mode=install cp libbar.la $thisdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:48"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/archive-in-archive.at:49: ar -t libbar.a | grep libfoo.a"
at_fn_check_prepare_trace "archive-in-archive.at:49"
( $at_check_trace; ar -t libbar.a | grep libfoo.a
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/archive-in-archive.at:49"
$at_failed && at_fn_log_failure
$at_traceon; }
archive_contents=`ar -t libbar.a`
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_42
#AT_START_43
# 43. execute-mode.at:25: execute mode
at_setup_line='execute-mode.at:25'
at_fn_banner 2
at_desc="execute mode"
at_desc_line=" 43: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "43. execute-mode.at:25: testing ..."
$at_traceon
eval `$LIBTOOL --config | $EGREP '^(FGREP)='`
cat >foo <<'_ATEOF'
#! /bin/sh
if test $# -gt 0; then
for arg
do
printf %s\\n "$arg"
done
else
:
fi
_ATEOF
cat >lt-wrapper <<'_ATEOF'
#! /bin/sh
# Generated by GNU libtool.
# fake wrapper script.
program=lt-real
progdir=.
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
# Run the actual program with our arguments.
exec "$progdir/$program" ${1+"$@"}
echo "$0: cannot exec $program $*" >&2
exit 1
fi
_ATEOF
cat >lt-real <<'_ATEOF'
#! /bin/sh
for arg
do
printf %s\\n "$arg"
done
cat
_ATEOF
cat >libfakelib.la <<'_ATEOF'
# libfakelib.la - a libtool library file
# Generated by ltmain.sh (GNU libtool 1.2605 2008/03/04 22:31:32) 2.3a
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
dlname=''
library_names=''
old_library='libfakelib.a'
inherited_linker_flags=''
dependency_libs=''
weak_library_names=''
current=
age=
revision=
installed=no
shouldnotlink=yes
dlopen=''
dlpreopen=''
libdir=''
_ATEOF
mkdir sub
cp foo sub/foo
chmod +x foo sub/foo lt-wrapper lt-real
cat >liba.c <<'_ATEOF'
int a () { return 0; }
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
extern int a ();
int main (int argc, char **argv)
{
int i;
for (i=1; i<argc; ++i)
{
if (i != 1)
fputc ('\n', stdout);
fputs (argv[i], stdout);
}
fputc ('\n', stdout);
return a ();
}
_ATEOF
LDFLAGS="$LDFLAGS -no-undefined"
instdir=`pwd`/inst
libdir=$instdir/lib
{ set +x
$as_echo "$at_srcdir/execute-mode.at:117: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "execute-mode.at:117"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:117"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la -rpath \$libdir liba.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo" "execute-mode.at:119"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:119"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:121: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "execute-mode.at:121"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:121"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "execute-mode.at:123"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:123"
$at_failed && at_fn_log_failure
$at_traceon; }
# end of preparatory blurb.
# Now, when doing the tests, we both try the fake wrappers plus the real one
# (only the latter exposes the C wrappers used for w32 systems).
# With the latter, however, we need to ignore additional output; esp. wine
# may be rather noisy.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:132: \$LIBTOOL --mode=execute ./foo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo" "execute-mode.at:132"
( $at_check_trace; $LIBTOOL --mode=execute ./foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:132"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:133: \$LIBTOOL --mode=execute sub/foo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute sub/foo" "execute-mode.at:133"
( $at_check_trace; $LIBTOOL --mode=execute sub/foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:133"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:134: \$LIBTOOL --mode=execute ./foo foo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo foo" "execute-mode.at:134"
( $at_check_trace; $LIBTOOL --mode=execute ./foo foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "foo
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:134"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:136: \$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null" "execute-mode.at:136"
( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper foo </dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "foo
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:136"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:138: cd sub && \$LIBTOOL --mode=execute ./foo ../foo"
at_fn_check_prepare_dynamic "cd sub && $LIBTOOL --mode=execute ./foo ../foo" "execute-mode.at:138"
( $at_check_trace; cd sub && $LIBTOOL --mode=execute ./foo ../foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "../foo
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:138"
$at_failed && at_fn_log_failure
$at_traceon; }
# suppose that ./foo is gdb, and lt-wrapper is the wrapper script.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:141: \$LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null" "execute-mode.at:141"
( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "./lt-real
bar
baz
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:141"
$at_failed && at_fn_log_failure
$at_traceon; }
# check that stdin works even with -dlopen.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:148: echo bar | \$LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo"
at_fn_check_prepare_dynamic "echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo" "execute-mode.at:148"
( $at_check_trace; echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "foo
bar
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
# Check that a missing real program causes an error.
# The error message and code are likely to be 126,
# "No such file or directory" but system-dependent.
mv -f lt-real lt-backup
{ set +x
$as_echo "$at_srcdir/execute-mode.at:157: \$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1" "execute-mode.at:157"
( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/execute-mode.at:157"
$at_failed && at_fn_log_failure
$at_traceon; }
mv -f lt-backup lt-real
# Now use arguments that require decent quoting.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:162: \$LIBTOOL --mode=execute ./foo \"arg with special chars: \\\$!&*\\\`'()\""
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:162"
( $at_check_trace; $LIBTOOL --mode=execute ./foo "arg with special chars: \$!&*\`'()"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'()
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:162"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:165: \$LIBTOOL --mode=execute ./lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\" </dev/null"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:165"
( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper "arg with special chars: \$!&*\`'()" </dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'()
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:165"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:168: \$LIBTOOL --mode=execute ./foo lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\""
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:168"
( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper "arg with special chars: \$!&*\`'()"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "./lt-real
arg with special chars: \$!&*\`'()
" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:168"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/execute-mode.at:172: if \$LIBTOOL --mode=execute \"\$lt_exe\" \"arg with special chars: \\\$!&*\\\`'()\"; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:172"
( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" "arg with special chars: \$!&*\`'()"; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:172"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:174: \$FGREP 'arg with special chars: \$!&*\`'\\''()' stdout"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:174"
( $at_check_trace; $FGREP 'arg with special chars: $!&*`'\''()' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:174"
$at_failed && at_fn_log_failure
$at_traceon; }
# We always pair two args. The first one is never the empty string.
arg1=
for arg2 in \
'def ghi' '' \
'd"e' 'f"g' \
'd\"e' 'f\"g' \
'd\\"e' 'f\\"g' \
'd\\\"e' 'f\\\"g' \
'd\' '' \
'd\\' '' \
'd\\\' '' \
'd\\\\' '' \
'<' '>' \
'<def>' ''
do
if test -z "$arg1"; then
arg1=$arg2; continue
fi
{ set +x
$as_echo "$at_srcdir/execute-mode.at:194: \$LIBTOOL --mode=execute ./foo abc \"\$arg1\" \"\$arg2\" xyz"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:194"
( $at_check_trace; $LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:194"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:195: \$FGREP \"\$arg1\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:195"
( $at_check_trace; $FGREP "$arg1" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:195"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:196: \$FGREP \"\$arg2\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:196"
( $at_check_trace; $FGREP "$arg2" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:196"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:197: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:197"
( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:197"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:198: \$LIBTOOL --mode=execute ./lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz </dev/null"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper abc \"$arg1\" \"$arg2\" xyz </dev/null" "execute-mode.at:198"
( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper abc "$arg1" "$arg2" xyz </dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:198"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:199: \$FGREP \"\$arg1\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:199"
( $at_check_trace; $FGREP "$arg1" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:199"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:200: \$FGREP \"\$arg2\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:200"
( $at_check_trace; $FGREP "$arg2" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:200"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:201: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:201"
( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:201"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:202: \$LIBTOOL --mode=execute ./foo lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:202"
( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper abc "$arg1" "$arg2" xyz
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:202"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:203: \$FGREP \"\$arg1\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:203"
( $at_check_trace; $FGREP "$arg1" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:203"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:204: \$FGREP \"\$arg2\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:204"
( $at_check_trace; $FGREP "$arg2" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:204"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:205: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:205"
( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:205"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:206: \$LIBTOOL --mode=execute ./main\$EXEEXT abc \"\$arg1\" \"\$arg2\" xyz"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./main$EXEEXT abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:206"
( $at_check_trace; $LIBTOOL --mode=execute ./main$EXEEXT abc "$arg1" "$arg2" xyz
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:206"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:207: \$FGREP \"\$arg1\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:207"
( $at_check_trace; $FGREP "$arg1" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:207"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:208: \$FGREP \"\$arg2\" stdout"
at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:208"
( $at_check_trace; $FGREP "$arg2" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:208"
$at_failed && at_fn_log_failure
$at_traceon; }
# Do not match EOL here, cross setups may have an extra \r here.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:210: test \`sed -n '/^abc/,/^xyz/p' stdout | wc -l\` -eq 4"
at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:210"
( $at_check_trace; test `sed -n '/^abc/,/^xyz/p' stdout | wc -l` -eq 4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:210"
$at_failed && at_fn_log_failure
$at_traceon; }
arg1=
done
# Check that .la files are not transformed by the wrapper searching loop.
{ set +x
$as_echo "$at_srcdir/execute-mode.at:215: \$LIBTOOL --mode=execute echo ./main\$EXEEXT liba.lo libfakelib.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la" "execute-mode.at:215"
( $at_check_trace; $LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:215"
$at_failed && at_fn_log_failure
$at_traceon; }
# This could be .libs/lt-main or similar (or just plain `main').
{ set +x
$as_echo "$at_srcdir/execute-mode.at:217: grep main stdout"
at_fn_check_prepare_trace "execute-mode.at:217"
( $at_check_trace; grep main stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:217"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:218: grep liba.lo stdout"
at_fn_check_prepare_trace "execute-mode.at:218"
( $at_check_trace; grep liba.lo stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:218"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/execute-mode.at:219: grep libfakelib.la stdout"
at_fn_check_prepare_trace "execute-mode.at:219"
( $at_check_trace; grep libfakelib.la stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:219"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_43
#AT_START_44
# 44. bindir.at:64: bindir compile check
at_setup_line='bindir.at:64'
at_fn_banner 2
at_desc="bindir compile check"
at_desc_line=" 44: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "44. bindir.at:64: testing ..."
$at_traceon
cat >simple.c <<'_ATEOF'
int main() { return 0;}
_ATEOF
$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false
rm -f simple
{ set +x
$as_echo "$at_srcdir/bindir.at:73: \$noskip || (exit 77)"
at_fn_check_prepare_dynamic "$noskip || (exit 77)" "bindir.at:73"
( $at_check_trace; $noskip || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:73"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_44
#AT_START_45
# 45. bindir.at:81: bindir basic lib test
at_setup_line='bindir.at:81'
at_fn_banner 2
at_desc="bindir basic lib test"
at_desc_line=" 45: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "45. bindir.at:81: testing ..."
$at_traceon
bindirneeded=:
case "$host_os" in
cygwin*|mingw*|cegcc*)
;;
*)
bindirneeded=false
;;
esac
####
# These routines save the PATH before a test and restore it after,
# prepending a chosen directory to the path on the platforms where
# -bindir is needed after saving.
#
func_save_and_prepend_path ()
{
save_PATH=$PATH
if $bindirneeded ; then
PATH=$1:$PATH
fi
export PATH
}
func_restore_path ()
{
PATH=$save_PATH
export PATH
}
cat >foo.c <<'_ATEOF'
int x=11;
_ATEOF
cat >baz.c <<'_ATEOF'
extern int x;
int baz (void);
int baz (void) { return x;}
_ATEOF
cat >bar.c <<'_ATEOF'
extern int baz (void);
int y=3;
int bar (void);
int bar (void) { return y + baz ();}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdlib.h>
extern int baz (void);
extern int bar (void);
int main() {
if (baz () + bar () - 25) abort ();
return 0;
}
_ATEOF
curdir=`pwd`
eval "`$LIBTOOL --config | grep '^objdir='`"
{ set +x
$as_echo "$at_srcdir/bindir.at:144: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:144"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:145: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:145"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:145"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:146: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo baz.lo -rpath \$curdir/\$objdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir" "bindir.at:146"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:148: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:148"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:149: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS bar.lo libfoo.la -rpath \$curdir/\$objdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir" "bindir.at:149"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:149"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:151: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:151"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:151"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:152: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libbar.la libfoo.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la" "bindir.at:152"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:152"
$at_failed && at_fn_log_failure
$at_traceon; }
# Check both static and shared versions run. We don't install them
# here, that will be covered by the later tests; we've rpath'd things
# so that they can all be run in situ.
lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/bindir.at:158: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute ./main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:158"
( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:158"
$at_failed && at_fn_log_failure
$at_traceon; }
# Ensure libraries can be found on PATH, if we are on one
# of the affected platforms, before testing the shared version.
func_save_and_prepend_path $curdir/$objdir
$bindirneeded && {
lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/bindir.at:165: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute \$objdir/main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:165"
( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:165"
$at_failed && at_fn_log_failure
$at_traceon; }
}
# In fact, prepending the PATH as above is superfluous on the windows
# platforms that this feature is primarily aimed at, as the DLL search
# path always includes the directory from which the app was launched.
# To make sure it still works even when not side-by-side, we'll install
# the main executable and execute it from there while the PATH still
# points to the shared libs in the .libs subdir. On other platforms,
# the rpaths we set at link time will guarantee it runs from the bindir.
mkdir $curdir/bin
{ set +x
$as_echo "$at_srcdir/bindir.at:177: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/bin/main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT" "bindir.at:177"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:177"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=$curdir/bin/main$EXEEXT; if test -f "$curdir/bin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/bindir.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:178"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:178"
$at_failed && at_fn_log_failure
$at_traceon; }
func_restore_path
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_45
#AT_START_46
# 46. bindir.at:190: bindir install tests
at_setup_line='bindir.at:190'
at_fn_banner 2
at_desc="bindir install tests"
at_desc_line=" 46: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "46. bindir.at:190: testing ..."
$at_traceon
bindirneeded=:
case "$host_os" in
cygwin*|mingw*|cegcc*)
;;
*)
bindirneeded=false
;;
esac
####
# These routines save the PATH before a test and restore it after,
# prepending a chosen directory to the path on the platforms where
# -bindir is needed after saving.
#
func_save_and_prepend_path ()
{
save_PATH=$PATH
if $bindirneeded ; then
PATH=$1:$PATH
fi
export PATH
}
func_restore_path ()
{
PATH=$save_PATH
export PATH
}
cat >foo.c <<'_ATEOF'
int x=11;
_ATEOF
cat >baz.c <<'_ATEOF'
extern int x;
int baz (void);
int baz (void) { return x;}
_ATEOF
cat >bar.c <<'_ATEOF'
extern int baz (void);
int y=3;
int bar (void);
int bar (void) { return y + baz ();}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdlib.h>
extern int baz (void);
extern int bar (void);
int main() {
if (baz () + bar () - 25) abort ();
return 0;
}
_ATEOF
# We only need to compile once, but we'll need to relink for each different value
# of libdir in order to set the rpath, and we'll install for each combination of
# libdir and bindir.
{ set +x
$as_echo "$at_srcdir/bindir.at:253: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:253"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:253"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:254: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:254"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:254"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:255: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:255"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:255"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:256: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:256"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:256"
$at_failed && at_fn_log_failure
$at_traceon; }
# Now try installing the libs. There are the following cases:
# No -bindir
# -bindir below lib install dir
# -bindir is lib install dir
# -bindir beside lib install dir
# -bindir above lib dir
# -bindir above and beside lib dir
# -bindir in entirely unrelated prefix.
curdir=`pwd`
for libdir in \
$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
$curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \
$curdir/usr/lib/ \
$curdir/usr/lib \
$curdir/baz \
$curdir/baz/lib/ ;
do
# Do a basic install with no -bindir option for reference. We use the sbin/
# dir for the main exe to avoid the potential "this only works because it's
# side-by-side with the libs" default DLL search path problem mentioned above.
rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
as_dir=$libdir; as_fn_mkdir_p
as_dir=$curdir/sbin; as_fn_mkdir_p
{ set +x
$as_echo "$at_srcdir/bindir.at:283: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:283"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:283"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:284: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir" "bindir.at:284"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:284"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:285: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:285"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:285"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:286: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:286"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:286"
$at_failed && at_fn_log_failure
$at_traceon; }
# And ensure it went where we expect. Could be looking for any of 'cygfoo-0.dll',
# 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking advantage
# of the fact that if it's a DLL, it has to go in bindir, so we'll not check for
# both forms in libdir.
{ set +x
$as_echo "$at_srcdir/bindir.at:292: \$bindirneeded && { test -f \$libdir/../bin/???foo-0.dll || ls \$libdir/../bin/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null"
at_fn_check_prepare_dynamic "$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:292"
( $at_check_trace; $bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:292"
$at_failed && at_fn_log_failure
$at_traceon; }
# And that it can be executed.
extrapath=
$bindirneeded && extrapath=$libdir/../bin
func_save_and_prepend_path $extrapath
lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/bindir.at:298: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:298"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:298"
$at_failed && at_fn_log_failure
$at_traceon; }
func_restore_path
for bindir in \
$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \
$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \
$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/ \
$curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
$curdir/usr/lib/gcc/i686-pc-cygwin/bin/ \
$curdir/usr/lib/gcc/i686-pc-cygwin/bin \
$curdir/usr/lib/gcc/i686-pc-cygwin/ \
$curdir/usr/lib/gcc/i686-pc-cygwin \
$curdir/usr/lib/bin/ \
$curdir/usr/lib/bin \
$curdir/usr/bin/ \
$curdir/usr/bin \
$curdir/bin/ \
$curdir/bin \
/tmp/foo/bar ;
do
# Clear any old stuff out before we install. Because bindir
# may be in /tmp, we have to take care to create it securely
# and not to delete and recreate it if we do.
rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
tmp=
case $bindir in
/tmp*)
# Create a temporary directory $tmp in $TMPDIR (default /tmp).
# Use mktemp if possible; otherwise fall back on mkdir,
# with $RANDOM to make collisions less likely.
: ${TMPDIR=/tmp}
{
tmp=`
(umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
` &&
test -n "$tmp" && test -d "$tmp"
} || {
tmp=$TMPDIR/foo$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || exit 77
bindir=$tmp/bar
;;
*)
# Clear any old stuff out before we install.
rm -rf $bindir
as_dir=$bindir; as_fn_mkdir_p
;;
esac
# Relink with new rpaths.
{ set +x
$as_echo "$at_srcdir/bindir.at:350: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -bindir \$bindir -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:350"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:350"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:351: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la" "bindir.at:351"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:351"
$at_failed && at_fn_log_failure
$at_traceon; }
# Recreate directories (bindir already done) and install.
as_dir=$libdir; as_fn_mkdir_p
as_dir=$curdir/sbin; as_fn_mkdir_p
{ set +x
$as_echo "$at_srcdir/bindir.at:356: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:356"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:356"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/bindir.at:357: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:357"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:357"
$at_failed && at_fn_log_failure
$at_traceon; }
# Ensure it went to bindir rather than default dir this time.
{ set +x
$as_echo "$at_srcdir/bindir.at:360: \$bindirneeded && { test -f \$bindir/???foo-0.dll || ls \$bindir/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null"
at_fn_check_prepare_dynamic "$bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:360"
( $at_check_trace; $bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:360"
$at_failed && at_fn_log_failure
$at_traceon; }
# And that it can be executed.
extrapath=
$bindirneeded && extrapath=$bindir
func_save_and_prepend_path $extrapath
lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/bindir.at:366: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:366"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:366"
$at_failed && at_fn_log_failure
$at_traceon; }
func_restore_path
# Clean up if we made a temp dir. Subdirs under our testdir get rm'd
# and recreated at the top of the loop. Securely created subdirs under
# /tmp get created precisely once and rm'd when we're done with them.
if test ! -z "$tmp" ; then
rm -rf "$tmp"
fi
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_46
#AT_START_47
# 47. cwrapper.at:25: cwrapper for uninstalled executables
at_setup_line='cwrapper.at:25'
at_fn_banner 2
at_desc="cwrapper for uninstalled executables"
at_desc_line=" 47: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "47. cwrapper.at:25: testing ..."
$at_traceon
# make sure existing libtool is configured for shared libraries
{ set +x
$as_echo "$at_srcdir/cwrapper.at:29: \$LIBTOOL --features | grep 'disable shared libraries' && exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && exit 77" "cwrapper.at:29"
( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/cwrapper.at:29"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >trivial.c <<'_ATEOF'
int main (void)
{
return 0;
}
_ATEOF
cat >liba.c <<'_ATEOF'
int liba_func1 (int arg)
{
return arg + 1;
}
_ATEOF
cat >usea.c <<'_ATEOF'
extern int liba_func1 (int arg);
int main (void)
{
int a = 2;
int b = liba_func1 (a);
if (b == 3) return 0;
return 1;
}
_ATEOF
orig_CFLAGS=$CFLAGS
orig_LIBTOOL=$LIBTOOL
for restrictive_flags in '-Wall -Werror' '-std=c89 -Wall -Werror' '-std=c99 -Wall -Werror'; do
CFLAGS="$orig_CFLAGS $restrictive_flags"
sed "s/LTCFLAGS=.*/&' $restrictive_flags'/" < "$orig_LIBTOOL" > ./libtool
chmod +x libtool
LIBTOOL=./libtool
# make sure $restrictive_flags do not cause a failure
# themselves (e.g. because a non-gcc compiler doesn't
# understand them)
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c trivial.c || continue
{ set +x
$as_echo "$at_srcdir/cwrapper.at:69: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:69"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:71: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:71"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:71"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:73: test -f liba.la"
at_fn_check_prepare_trace "cwrapper.at:73"
( $at_check_trace; test -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:73"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:75: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:75"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:75"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:77: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:77"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/cwrapper.at:79: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:79"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# Test run-time activation of wrapper debugging.
# This is not part of the loop above, because we
# need to check, not ignore, the output.
CFLAGS="$orig_CFLAGS"
LIBTOOL=$orig_LIBTOOL
{ set +x
$as_echo "$at_srcdir/cwrapper.at:89: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:89"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:89"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:91: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:91"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:91"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:93: test -f liba.la"
at_fn_check_prepare_trace "cwrapper.at:93"
( $at_check_trace; test -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:95: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:95"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:97: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:97"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:97"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/cwrapper.at:99: if \"\$lt_exe\" --lt-debug; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:99"
( $at_check_trace; if "$lt_exe" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
case $host_os in
mingw*)
tr -d '\015' < stderr > stderr.t
mv -f stderr.t stderr ;;
esac
{ set +x
$as_echo "$at_srcdir/cwrapper.at:101: grep 'libtool wrapper' stderr"
at_fn_check_prepare_trace "cwrapper.at:101"
( $at_check_trace; grep 'libtool wrapper' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:101"
$at_failed && at_fn_log_failure
$at_traceon; }
# Test compile-time activation of wrapper debugging.
# We structure this test as a loop, so that we can 'break' out of it
# if necessary -- even though the loop by design executes only once.
for debugwrapper_flags in '-DLT_DEBUGWRAPPER'; do
CFLAGS="$orig_CFLAGS $debugwrapper_flags"
sed -e "s/LTCFLAGS=.*/&' $debugwrapper_flags'/" \
-e "s/^lt_option_debug=/lt_option_debug=1/" \
< "$orig_LIBTOOL" > ./libtool
LIBTOOL=./libtool
# make sure $debugwrapper_flags do not cause a failure
# themselves (e.g. because a non-gcc compiler doesn't
# understand them)
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c trivial.c || continue
{ set +x
$as_echo "$at_srcdir/cwrapper.at:119: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:119"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:119"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:121: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:121"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:121"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:123: test -f liba.la"
at_fn_check_prepare_trace "cwrapper.at:123"
( $at_check_trace; test -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:123"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:125: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:125"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:125"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/cwrapper.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:127"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:127"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/cwrapper.at:129: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:129"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:129"
$at_failed && at_fn_log_failure
$at_traceon; }
case $host_os in
mingw*)
tr -d '\015' < stderr > stderr.t
mv -f stderr.t stderr ;;
esac
{ set +x
$as_echo "$at_srcdir/cwrapper.at:131: grep 'libtool wrapper' stderr"
at_fn_check_prepare_trace "cwrapper.at:131"
( $at_check_trace; grep 'libtool wrapper' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:131"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_47
#AT_START_48
# 48. deplib-in-subdir.at:34: deplib in subdir
at_setup_line='deplib-in-subdir.at:34'
at_fn_banner 2
at_desc="deplib in subdir"
at_desc_line=" 48: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "48. deplib-in-subdir.at:34: testing ..."
$at_traceon
cat >a1.c <<'_ATEOF'
int a1 () { return 0; }
_ATEOF
cat >a2.c <<'_ATEOF'
int a2 () { return 0; }
_ATEOF
cat >a3.c <<'_ATEOF'
int a3 () { return 0; }
_ATEOF
cat >b1.c <<'_ATEOF'
extern int a1 ();
int b1 () { return a1 (); }
_ATEOF
cat >b2.c <<'_ATEOF'
extern int a2 ();
int b2 () { return a2 (); }
_ATEOF
cat >b3.c <<'_ATEOF'
extern int a3 ();
int b3 () { return a3 (); }
_ATEOF
cat >m.c <<'_ATEOF'
extern int b1 ();
extern int b2 ();
extern int b3 ();
int main () { return b1 () + b2 () + b3 (); }
_ATEOF
cwd=`pwd`
instdir=$cwd/inst
lib1dir=$instdir/lib1
lib2dir=$instdir/lib2
bindir=$instdir/bin
addrunpath=$cwd/foobar
LDFLAGS="$LDFLAGS -no-undefined"
flags='-export-symbols-regex ".*"'
mkdir -p sub1 sub2/subsub sub3/subsub $instdir $lib1dir $lib2dir $bindir
for file in a1.c a2.c a3.c b1.c b2.c b3.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
$CC $CPPFLAGS $CFLAGS -c m.c
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba1.la a1.lo -rpath \$lib1dir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir" "deplib-in-subdir.at:81"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba2.la a2.lo -rpath \$lib1dir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir" "deplib-in-subdir.at:83"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba3.la a3.lo -rpath \$lib1dir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir" "deplib-in-subdir.at:85"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:88: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath \$lib2dir sub1/liba1.la' \"\$flags\""
at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' \"$flags\"" "deplib-in-subdir.at:88"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' "$flags"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:88"
$at_failed && at_fn_log_failure
$at_traceon; }
cd sub2
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:92: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/libb2.la ../b2.lo -rpath \$lib2dir ../sub1/liba2.la' \"\$flags\""
at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' \"$flags\"" "deplib-in-subdir.at:92"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' "$flags"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:92"
$at_failed && at_fn_log_failure
$at_traceon; }
cd subsub
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:96: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb3.la ../../b3.lo -rpath \$lib2dir ../../sub1/liba3.la' \"\$flags\""
at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' \"$flags\"" "deplib-in-subdir.at:96"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' "$flags"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:96"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ../..
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:100: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub3/subsub/m1\$EXEEXT m.\$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" "deplib-in-subdir.at:100"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:100"
$at_failed && at_fn_log_failure
$at_traceon; }
cd sub3
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/m2\$EXEEXT ../m.\$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" "deplib-in-subdir.at:104"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:104"
$at_failed && at_fn_log_failure
$at_traceon; }
cd subsub
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:108: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT ../../m.\$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" "deplib-in-subdir.at:108"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:108"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ../..
for i in 1 2 3; do
lt_exe=./sub3/subsub/m$i; if test -f "./sub3/subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:114"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
cd sub3
lt_exe=./subsub/m$i; if test -f "./subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:116: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:116"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:116"
$at_failed && at_fn_log_failure
$at_traceon; }
cd subsub
lt_exe=./m$i; if test -f "./m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:118: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:118"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:118"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ../..
done
for i in 1 2 3; do
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:123: \$LIBTOOL --mode=install cp sub1/liba\$i.la \$lib1dir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la" "deplib-in-subdir.at:123"
( $at_check_trace; $LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:123"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:126: \$LIBTOOL --mode=install cp sub2/subsub/libb1.la \$lib2dir/libb1.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la" "deplib-in-subdir.at:126"
( $at_check_trace; $LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:126"
$at_failed && at_fn_log_failure
$at_traceon; }
cd sub2
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:128: \$LIBTOOL --mode=install cp subsub/libb2.la \$lib2dir/libb2.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la" "deplib-in-subdir.at:128"
( $at_check_trace; $LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:128"
$at_failed && at_fn_log_failure
$at_traceon; }
cd subsub
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:130: \$LIBTOOL --mode=install cp libb3.la \$lib2dir/libb3.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la" "deplib-in-subdir.at:130"
( $at_check_trace; $LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:130"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ../..
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:133: \$LIBTOOL --mode=install cp sub3/subsub/m1\$EXEEXT \$bindir/m1\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT" "deplib-in-subdir.at:133"
( $at_check_trace; $LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:133"
$at_failed && at_fn_log_failure
$at_traceon; }
cd sub3
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:135: \$LIBTOOL --mode=install cp subsub/m2\$EXEEXT \$bindir/m2\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT" "deplib-in-subdir.at:135"
( $at_check_trace; $LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:135"
$at_failed && at_fn_log_failure
$at_traceon; }
cd subsub
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:137: \$LIBTOOL --mode=install cp m3\$EXEEXT \$bindir/m3\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT" "deplib-in-subdir.at:137"
( $at_check_trace; $LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:137"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ../..
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:140: \$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1\$EXEEXT sub3/subsub/m2\$EXEEXT sub3/subsub/m3\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT" "deplib-in-subdir.at:140"
( $at_check_trace; $LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
for i in 1 2 3; do
lt_exe=$bindir/m$i$EXEEXT; if test -f "$bindir/m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:146: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:146"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
cd $bindir
lt_exe=./m$i$EXEEXT; if test -f "./m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:148"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
cd $cwd
done
PATH=$bindir${PATH_SEPARATOR-:}$PATH
for i in 1 2 3; do
lt_exe=m$i$EXEEXT; if test -f "m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/deplib-in-subdir.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:154"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:154"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_48
#AT_START_49
# 49. infer-tag.at:30: inferred tag
at_setup_line='infer-tag.at:30'
at_fn_banner 2
at_desc="inferred tag"
at_desc_line=" 49: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "49. infer-tag.at:30: testing ..."
$at_traceon
cat >a.c <<'_ATEOF'
int a (void) { return 0; }
_ATEOF
{ set +x
$as_echo "$at_srcdir/infer-tag.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "infer-tag.at:37"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:37"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_49
#AT_START_50
# 50. infer-tag.at:42: CXX inferred tag
at_setup_line='infer-tag.at:42'
at_fn_banner 2
at_desc="CXX inferred tag"
at_desc_line=" 50: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "50. infer-tag.at:42: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/infer-tag.at:43: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "infer-tag.at:43"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/infer-tag.at:43: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "infer-tag.at:43"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >a.cpp <<'_ATEOF'
int a (void) { return 0; }
_ATEOF
{ set +x
$as_echo "$at_srcdir/infer-tag.at:50: \$LIBTOOL --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c a.cpp"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp" "infer-tag.at:50"
( $at_check_trace; $LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:50"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_50
#AT_START_51
# 51. infer-tag.at:55: F77 inferred tag
at_setup_line='infer-tag.at:55'
at_fn_banner 2
at_desc="F77 inferred tag"
at_desc_line=" 51: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "51. infer-tag.at:55: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/infer-tag.at:56: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "infer-tag.at:56"
( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:56"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >a.f <<'_ATEOF'
program main
end
_ATEOF
{ set +x
$as_echo "$at_srcdir/infer-tag.at:64: \$LIBTOOL --mode=compile \$F77 \$FFLAGS -c a.f"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $F77 $FFLAGS -c a.f" "infer-tag.at:64"
( $at_check_trace; $LIBTOOL --mode=compile $F77 $FFLAGS -c a.f
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_51
#AT_START_52
# 52. infer-tag.at:69: FC inferred tag
at_setup_line='infer-tag.at:69'
at_fn_banner 2
at_desc="FC inferred tag"
at_desc_line=" 52: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "52. infer-tag.at:69: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/infer-tag.at:70: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "infer-tag.at:70"
( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >a.f <<'_ATEOF'
program main
end
_ATEOF
{ set +x
$as_echo "$at_srcdir/infer-tag.at:78: \$LIBTOOL --mode=compile \$FC \$FCFLAGS -c a.f"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $FC $FCFLAGS -c a.f" "infer-tag.at:78"
( $at_check_trace; $LIBTOOL --mode=compile $FC $FCFLAGS -c a.f
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_52
#AT_START_53
# 53. infer-tag.at:83: GCJ inferred tag
at_setup_line='infer-tag.at:83'
at_fn_banner 2
at_desc="GCJ inferred tag"
at_desc_line=" 53: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "53. infer-tag.at:83: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/infer-tag.at:84: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "infer-tag.at:84"
( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >A.java <<'_ATEOF'
public class A {
private int a;
public A () { a = 0; }
};
_ATEOF
# There are just too many broken gcj installations out there, either missing
# libgcj.spec or unable to find it. Skip this test for them.
{ set +x
$as_echo "$at_srcdir/infer-tag.at:96: \$GCJ \$GCJFLAGS -c A.java || exit 77"
at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c A.java || exit 77" "infer-tag.at:96"
( $at_check_trace; $GCJ $GCJFLAGS -c A.java || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:96"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/infer-tag.at:98: \$LIBTOOL --mode=compile \$GCJ \$GCJCFLAGS -c A.java"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java" "infer-tag.at:98"
( $at_check_trace; $LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:98"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_53
#AT_START_54
# 54. localization.at:25: localized compiler messages
at_setup_line='localization.at:25'
at_fn_banner 2
at_desc="localized compiler messages"
at_desc_line=" 54: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "54. localization.at:25: testing ..."
$at_traceon
# Let's try German locale. :-)
LANG=de_DE
LANGUAGE=de_DE
LC_ALL=de_DE
export LANG LANGUAGE LC_ALL
cat >a.c <<'_ATEOF'
int x[-1];
_ATEOF
cat >b.c <<'_ATEOF'
int y;
_ATEOF
# First see if setting a locale is accepted at all.
{ set +x
$as_echo "$at_srcdir/localization.at:42: \$CC \$CPPFLAGS \$CFLAGS -c b.c || exit 77"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c b.c || exit 77" "localization.at:42"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c b.c || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/localization.at:42"
$at_failed && at_fn_log_failure
$at_traceon; }
# Find out about expected output.
{ set +x
$as_echo "$at_srcdir/localization.at:45: \$CC \$CPPFLAGS \$CFLAGS -c a.c || exit 1"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c || exit 1" "localization.at:45"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c || exit 1
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/localization.at:45"
$at_failed && at_fn_log_failure
$at_traceon; }
_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stdout > stdout.t
case $host_os in
mingw*)
tr -d '\015' < stdout.t > expected-stdout ;;
*)
cp stdout.t expected-stdout ;;
esac
_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stderr > stderr.t
case $host_os in
mingw*)
tr -d '\015' < stderr.t > expected-stderr ;;
*)
cp stderr.t expected-stderr ;;
esac
{ set +x
$as_echo "$at_srcdir/localization.at:48: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c || exit 1"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit 1" "localization.at:48"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit 1
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/localization.at:48"
$at_failed && at_fn_log_failure
$at_traceon; }
_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stdout > stdout.t
case $host_os in
mingw*)
tr -d '\015' < stdout.t > libtool-stdout ;;
*)
cp stdout.t libtool-stdout ;;
esac
_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stderr > stderr.t
case $host_os in
mingw*)
tr -d '\015' < stderr.t > libtool-stderr ;;
*)
cp stderr.t libtool-stderr ;;
esac
# Avoid these errors:
# GNU/Linux:
# /bin/sh: warning: setlocale: LC_ALL: cannot change locale (de_DE)
# HP-UX:
# Warning! One or more of your selected locales are not available.
# Please invoke the commands "locale" and "locale -a" to verify your
# selections and the available locales.
#
# Continuing processing using the "C" locale.
{ set +x
$as_echo "$at_srcdir/localization.at:61: grep locale stdout stderr && exit 77"
at_fn_check_prepare_trace "localization.at:61"
( $at_check_trace; grep locale stdout stderr && exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/localization.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/localization.at:62: diff expected-stderr libtool-stderr"
at_fn_check_prepare_trace "localization.at:62"
( $at_check_trace; diff expected-stderr libtool-stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/localization.at:62"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/localization.at:63: diff expected-stdout libtool-stdout"
at_fn_check_prepare_trace "localization.at:63"
( $at_check_trace; diff expected-stdout libtool-stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/localization.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
# check that we get our quoting right.
LANGUAGE='a; nosuchprogram " '\'' & $x /#+*(){}|,:`\ !%'
export LANGUAGE
{ set +x
$as_echo "$at_srcdir/localization.at:68: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c b.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c" "localization.at:68"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/localization.at:68"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/localization.at:70: grep nosuchprogram stdout stderr"
at_fn_check_prepare_trace "localization.at:70"
( $at_check_trace; grep nosuchprogram stdout stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/localization.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_54
#AT_START_55
# 55. install.at:25: Install tests
at_setup_line='install.at:25'
at_fn_banner 2
at_desc="Install tests"
at_desc_line=" 55: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "55. install.at:25: testing ..."
$at_traceon
# Ensure that install_override_mode overrides the mode of the shared
# library (and only the shared library).
{ set +x
$as_echo "$at_srcdir/install.at:31: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'enable shared libraries' || exit 77" "install.at:31"
( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:31"
$at_failed && at_fn_log_failure
$at_traceon; }
sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool
LIBTOOL=./libtool
chmod a+rx $LIBTOOL
inst=`pwd`/inst
mkdir inst
echo 'int a () { return 0; }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
{ set +x
$as_echo "$at_srcdir/install.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$inst -no-undefined"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined" "install.at:42"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:42"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/install.at:44: \$LIBTOOL --mode=install \$lt_INSTALL liba.la \$inst"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL liba.la $inst" "install.at:44"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL liba.la $inst
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:44"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/install.at:46: grep ' -m 755' stdout"
at_fn_check_prepare_trace "install.at:46"
( $at_check_trace; grep ' -m 755' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:46"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/install.at:47: \$LIBTOOL --mode=install \$lt_INSTALL -m 644 liba.la \$inst"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst" "install.at:47"
( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:47"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/install.at:49: grep ' -m 755' stdout"
at_fn_check_prepare_trace "install.at:49"
( $at_check_trace; grep ' -m 755' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:49"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/install.at:50: grep ' -m 644.*liba.la' stdout"
at_fn_check_prepare_trace "install.at:50"
( $at_check_trace; grep ' -m 644.*liba.la' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/install.at:50"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_55
#AT_START_56
# 56. versioning.at:24: versioning
at_setup_line='versioning.at:24'
at_fn_banner 2
at_desc="versioning"
at_desc_line=" 56: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "56. versioning.at:24: testing ..."
$at_traceon
eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
# Setup some library and program sources:
# a library (a1), a new revision (a2), a compatible update (a3),
# an incompatible update (a4).
# Another library (libb) using liba, and a couple of programs,
# using liba directly and indirectly through libb.
cat >liba1.c <<'_ATEOF'
int a (void)
{
return 0;
}
_ATEOF
cat >liba2.c <<'_ATEOF'
/* The internal detail should be static. It isn't static in this test,
so we can later find out that it's this revision of the library. */
int internal_detail = 42;
int a (void)
{
return internal_detail - 42;
}
_ATEOF
cat >liba3.c <<'_ATEOF'
int a (void)
{
return 0;
}
int aa (void)
{
return 0;
}
_ATEOF
cat >liba4.c <<'_ATEOF'
int aa (void)
{
return 0;
}
_ATEOF
cat >libb.c <<'_ATEOF'
extern int a (void);
int b (void)
{
return a ();
}
_ATEOF
cat >prog1.c <<'_ATEOF'
extern int a (void);
int main (void)
{
return a ();
}
_ATEOF
cat >prog2.c <<'_ATEOF'
extern int b (void);
int main (void)
{
return b ();
}
_ATEOF
cat >prog3.c <<'_ATEOF'
extern int a (void), internal_detail;
int main (void)
{
return a () + internal_detail - 42;
}
_ATEOF
inst=`pwd`/inst
libdir=$inst/lib
bindir=$inst/bin
LDFLAGS="$LDFLAGS -no-undefined"
mkdir $inst $libdir $bindir
for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
for file in prog1.c prog2.c prog3.c; do
$CC $CPPFLAGS $CFLAGS -c $file
done
# Setup is finished here.
# Hypothesis: -version-info is ignored for convenience archives.
{ set +x
$as_echo "$at_srcdir/versioning.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0" "versioning.at:119"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:119"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:121: grep 'version-info.*ignored for convenience' stderr"
at_fn_check_prepare_trace "versioning.at:121"
( $at_check_trace; grep 'version-info.*ignored for convenience' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:121"
$at_failed && at_fn_log_failure
$at_traceon; }
# Hypothesis: the deprecated -version-number works.
# Be sure not to use zero here, it's not portable.
for version_number in 1 1:1 2:1 1:1:1 3:2:1; do
{ set +x
$as_echo "$at_srcdir/versioning.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-number \$version_number -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir" "versioning.at:126"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:126"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# Hypothesis: -version-info can be passed kinds of values, esp. zero ones
# and large ones.
# TODO: check something like 1001:2419:189 after fixing issues
# for `version_type's of `irix', `nonstopux', or `osf'.
for version_info in 1 1:2 0:0:0 1:1:1 13:241:7; do
{ set +x
$as_echo "$at_srcdir/versioning.at:135: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:135"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:135"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# Hypothesis: we diagnose when AGE is higher than CURRENT.
{ set +x
$as_echo "$at_srcdir/versioning.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir" "versioning.at:140"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:142: grep 'AGE.*is greater than' stderr"
at_fn_check_prepare_trace "versioning.at:142"
( $at_check_trace; grep 'AGE.*is greater than' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:142"
$at_failed && at_fn_log_failure
$at_traceon; }
# Hypothesis: we diagnose invalid values.
for version_info in 1:2:3:4 -1 0:-1 0:0:-1; do
{ set +x
$as_echo "$at_srcdir/versioning.at:146: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:146"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# Now, create an original version of the library and associated users.
# This setup will be reused for further hypotheses below, and these
# functions will be used to test working programs.
test_uninstalled ()
{
# temporarily move installed libraries out of the way in order to avoid
# skewing test results:
mv $libdir temp-lib
mv $bindir temp-bin
lt_exe=./prog1; if test -f "./prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/versioning.at:161: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:161"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:161"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./prog2; if test -f "./prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/versioning.at:162: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:162"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:162"
$at_failed && at_fn_log_failure
$at_traceon; }
mv temp-lib $libdir
mv temp-bin $bindir
}
test_installed ()
{
# temporarily move uninstalled libraries out of the way in order to avoid
# skewing test results:
mv $objdir temp
lt_exe=$bindir/prog1; if test -f "$bindir/prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/versioning.at:172: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:172"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:172"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=$bindir/prog2; if test -f "$bindir/prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/versioning.at:173: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:173"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:173"
$at_failed && at_fn_log_failure
$at_traceon; }
mv temp $objdir
}
{ set +x
$as_echo "$at_srcdir/versioning.at:177: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir" "versioning.at:177"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:177"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:179: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir" "versioning.at:179"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:179"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog1\$EXEEXT prog1.\$OBJEXT liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la" "versioning.at:181"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:181"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:183: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog2\$EXEEXT prog2.\$OBJEXT libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la" "versioning.at:183"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:183"
$at_failed && at_fn_log_failure
$at_traceon; }
test_uninstalled
{ set +x
$as_echo "$at_srcdir/versioning.at:186: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "versioning.at:186"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:186"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:188: \$LIBTOOL --mode=install cp prog1\$EXEEXT prog2\$EXEEXT \$bindir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir" "versioning.at:188"
( $at_check_trace; $LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:188"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:190: \$LIBTOOL --mode=clean rm -f liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:190"
( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:190"
$at_failed && at_fn_log_failure
$at_traceon; }
test_installed
{ set +x
$as_echo "$at_srcdir/versioning.at:192: \$LIBTOOL --mode=uninstall rm -f \$libdir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $libdir/liba.la" "versioning.at:192"
( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:192"
$at_failed && at_fn_log_failure
$at_traceon; }
# Hypothesis: library revision updates do not require (uninstalled
# nor installed) programs or libraries to be relinked.
{ set +x
$as_echo "$at_srcdir/versioning.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir" "versioning.at:197"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:197"
$at_failed && at_fn_log_failure
$at_traceon; }
test_uninstalled
{ set +x
$as_echo "$at_srcdir/versioning.at:200: \$LIBTOOL --mode=install cp liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:200"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:200"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:201: \$LIBTOOL --mode=clean rm -f liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:201"
( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:201"
$at_failed && at_fn_log_failure
$at_traceon; }
test_installed
# do not uninstall here: the library may be reused in the next test.
# Hypothesis: backward compatible library updates do not require
# (uninstalled nor installed) programs or libraries to be relinked.
# This can have one of several reasons:
# - the soname is the difference between $current and $age, thus
# unchanged; in this case, the newly installed library will be used,
# - the soname is only $current, or we are linking statically, in which case
# the old installed library code will be used,
# - the numbers are not encoded at all, in which case the newly installed
# library will be used.
{ set +x
$as_echo "$at_srcdir/versioning.at:214: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir" "versioning.at:214"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:214"
$at_failed && at_fn_log_failure
$at_traceon; }
# Do not test the uninstalled program, it may be broken (in the second case).
{ set +x
$as_echo "$at_srcdir/versioning.at:217: \$LIBTOOL --mode=install cp liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:217"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:217"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:218: \$LIBTOOL --mode=clean rm -f liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:218"
( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:218"
$at_failed && at_fn_log_failure
$at_traceon; }
test_installed
# do not uninstall here: the library may be reused in the next test.
# Hypothesis: with shared libraries, incompatible library updates
# will not cause old installed programs or libraries (linked against the old
# library version) to break.
# This can have one of several reasons:
# - the soname has changed, so the old installed library will still be
# available,
# - we are linking statically, so the old library code will still be used.
# In order to be sure we are still linking against the old library version,
# we must ensure that libb is not relinked, so we must not reinstall libb here.
{ set +x
$as_echo "$at_srcdir/versioning.at:232: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir" "versioning.at:232"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:232"
$at_failed && at_fn_log_failure
$at_traceon; }
# We do not guarantee that old versions of an uninstalled library are still
# available, so test_uninstalled will not necessarily work here any more.
{ set +x
$as_echo "$at_srcdir/versioning.at:236: \$LIBTOOL --mode=install cp liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:236"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:236"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/versioning.at:237: \$LIBTOOL --mode=clean rm -f liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:237"
( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:237"
$at_failed && at_fn_log_failure
$at_traceon; }
test_installed
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_56
#AT_START_57
# 57. destdir.at:48: Simple DESTDIR install
at_setup_line='destdir.at:48'
at_fn_banner 3
at_desc="Simple DESTDIR install"
at_desc_line=" 57: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
eval `$LIBTOOL --config | grep '^fast_install='`
case $fast_install in no) :;; *) false;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "57. destdir.at:48: testing ..."
$at_traceon
# A program that depends upon a library, both in the same package.
# DESTDIR installs do not work with relink at install time.
LDFLAGS="$LDFLAGS -no-undefined"
if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines.
DESTDIR=/tmp/dest
prefix=/tmp/inst
rm -rf $DESTDIR $prefix
else
DESTDIR=`pwd`/dest
prefix=`pwd`/inst
fi
libdir=$prefix/lib
bindir=$prefix/bin
$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
cd src
echo 'int a() { return 0; }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir
echo 'extern int a(); int main() { return a(); }' > m.c
$CC $CPPFLAGS $CFLAGS -c m.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la
mkdir $DESTDIR$libdir $DESTDIR$bindir
{ set +x
$as_echo "$at_srcdir/destdir.at:61: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:61"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/destdir.at:63: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:63"
( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:63"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=clean rm -f liba.la m
$mkdir_p "$libdir"
(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p)
for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print`
do
mv "$DESTDIR$libdir"/$file "$libdir"/$file
done
rm -rf "$DESTDIR$libdir"
$mkdir_p "$bindir"
(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p)
for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print`
do
mv "$DESTDIR$bindir"/$file "$bindir"/$file
done
rm -rf "$DESTDIR$bindir"
# We ignore failure on purpose here: we may not be root.
{ set +x
$as_echo "$at_srcdir/destdir.at:69: \$LIBTOOL --mode=finish \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $libdir" "destdir.at:69"
( $at_check_trace; $LIBTOOL --mode=finish $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/destdir.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/destdir.at:70: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:70"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_57
#AT_START_58
# 58. destdir.at:75: DESTDIR with in-package deplibs
at_setup_line='destdir.at:75'
at_fn_banner 3
at_desc="DESTDIR with in-package deplibs"
at_desc_line=" 58: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
eval `$LIBTOOL --config | grep '^fast_install='`
case $fast_install in no) :;; *) false;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "58. destdir.at:75: testing ..."
$at_traceon
# A program that depends upon a library that depends upon another
# library, all in the same package. Use two deplibs, one in $libdir
# and one in another directory.
# DESTDIR installs do not work with relink at install time.
LDFLAGS="$LDFLAGS -no-undefined"
if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines.
DESTDIR=/tmp/dest
prefix=/tmp/inst
rm -rf $DESTDIR $prefix
else
DESTDIR=`pwd`/dest
prefix=`pwd`/inst
fi
libdir=$prefix/lib
bindir=$prefix/bin
$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
cd src
echo 'int a1dep() { return 0; }' > a1dep.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a1dep.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1dep.la a1dep.lo -rpath $libdir
echo 'int a2dep() { return 0; }' > a2dep.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a2dep.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba2dep.la a2dep.lo -rpath ${libdir}2
echo 'extern int a1dep(), a2dep(); int a() { return a1dep() + a2dep(); }' > a.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir liba1dep.la liba2dep.la
echo 'extern int a(); int main() { return a(); }' > m.c
$CC $CPPFLAGS $CFLAGS -c m.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la
mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir
{ set +x
$as_echo "$at_srcdir/destdir.at:96: \$LIBTOOL --mode=install cp liba1dep.la \$DESTDIR\$libdir/liba1dep.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la" "destdir.at:96"
( $at_check_trace; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:96"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/destdir.at:98: \$LIBTOOL --mode=install cp liba2dep.la \$DESTDIR\${libdir}2/liba2dep.la"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:98"
( $at_check_trace; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:98"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/destdir.at:100: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:100"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:100"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/destdir.at:102: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:102"
( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:102"
$at_failed && at_fn_log_failure
$at_traceon; }
$LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m
$mkdir_p "$libdir"
(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p)
for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print`
do
mv "$DESTDIR$libdir"/$file "$libdir"/$file
done
rm -rf "$DESTDIR$libdir"
$mkdir_p "${libdir}2"
(cd "$DESTDIR${libdir}2" && find . -type d) | (cd "${libdir}2" && xargs $mkdir_p)
for file in `cd "$DESTDIR${libdir}2" && find . -type f -print -o -type l -print`
do
mv "$DESTDIR${libdir}2"/$file "${libdir}2"/$file
done
rm -rf "$DESTDIR${libdir}2"
$mkdir_p "$bindir"
(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p)
for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print`
do
mv "$DESTDIR$bindir"/$file "$bindir"/$file
done
rm -rf "$DESTDIR$bindir"
# We ignore failure on purpose here: we may not be root.
{ set +x
$as_echo "$at_srcdir/destdir.at:109: \$LIBTOOL --mode=finish \$libdir \${libdir}2"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:109"
( $at_check_trace; $LIBTOOL --mode=finish $libdir ${libdir}2
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/destdir.at:109"
$at_failed && at_fn_log_failure
$at_traceon; }
# put false libraries in the DESTDIR paths: if the installed program
# refers to them, that is a bug.
mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir
for lib in a1dep a2dep a; do
case $lib in
a2dep) ldir=${libdir}2;;
*) ldir=$libdir;;
esac
echo "int this_should_not_be_linked_against () { return 0; }" > $lib.c
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $lib.c
# Note the rpath argument includes $DESTDIR: the installed false libs
# should be functional (i.e., not need `libtool --mode=finish').
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o lib$lib.la $lib.lo -rpath $DESTDIR$ldir
$LIBTOOL --mode=install cp lib$lib.la $DESTDIR$ldir/lib$lib.la
done
lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/destdir.at:127: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:127"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:127"
$at_failed && at_fn_log_failure
$at_traceon; }
# TODO: make this more portable:
if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then
{ set +x
$as_echo "$at_srcdir/destdir.at:131: \$OBJDUMP -p \$bindir/m\$EXEEXT | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
at_fn_check_prepare_dynamic "$OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" "destdir.at:131"
( $at_check_trace; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:131"
$at_failed && at_fn_log_failure
$at_traceon; }
. $libdir/liba.la
set x $library_names
lname=$2
if test -n "$lname"; then
{ set +x
$as_echo "$at_srcdir/destdir.at:136: \$OBJDUMP -p \$libdir/\$lname | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
at_fn_check_prepare_dynamic "$OBJDUMP -p $libdir/$lname | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" "destdir.at:136"
( $at_check_trace; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:136"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
fi
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_58
#AT_START_59
# 59. old-m4-iface.at:40: AM_PROG_LIBTOOL
at_setup_line='old-m4-iface.at:40'
at_fn_banner 4
at_desc="AM_PROG_LIBTOOL"
at_desc_line=" 59: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "59. old-m4-iface.at:40: testing ..."
$at_traceon
cat >configure.in <<'_ATEOF'
AC_INIT(old.c)
AM_PROG_LIBTOOL
AC_SUBST([LIBTOOL_DEPS])
AC_OUTPUT(Makefile)
_ATEOF
cat >Makefile.in <<'_ATEOF'
COMPILE = @CC@ @CPPFLAGS@ @CFLAGS@
LINK = @CC@ @CFLAGS@ @LDFLAGS@ -o $@
SHELL = @SHELL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
all: libtool old@EXEEXT@
old@EXEEXT@: old.@OBJEXT@
$(LINK) old.@OBJEXT@
.SUFFIXES:
.SUFFIXES: .c .@OBJEXT@
.c.@OBJEXT@:
$(COMPILE) -c $<
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
_ATEOF
cat >old.c <<'_ATEOF'
#include <stdio.h>
int main (void)
{
printf ("Hello, World!");
return 0;
}
_ATEOF
$LIBTOOLIZE --install
# This is slightly bogus, since only libtool.m4 was required in aclocal.m4
# with libtool-1.5x...
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:85: test -f aclocal.m4 ||
cat \"\$tst_aclocaldir/libtool.m4\" \"\$tst_aclocaldir/ltoptions.m4\" \\
\"\$tst_aclocaldir/ltsugar.m4\" \"\$tst_aclocaldir/ltversion.m4\" \\
\"\$tst_aclocaldir/lt~obsolete.m4\" > aclocal.m4"
at_fn_check_prepare_notrace 'an embedded newline' "old-m4-iface.at:85"
( $at_check_trace; test -f aclocal.m4 ||
cat "$tst_aclocaldir/libtool.m4" "$tst_aclocaldir/ltoptions.m4" \
"$tst_aclocaldir/ltsugar.m4" "$tst_aclocaldir/ltversion.m4" \
"$tst_aclocaldir/lt~obsolete.m4" > aclocal.m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:90: \$AUTOCONF --force"
at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:90"
( $at_check_trace; $AUTOCONF --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:90"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:90"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./old; if test -f "./old$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:92"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo >>"$at_stdout"; $as_echo "Hello, World!" | \
$at_diff - "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:92"
$at_failed && at_fn_log_failure
$at_traceon; }
# Now, test that libtoolize doesn't mistakenly think the user called
# any libtool macros if in fact she didn't.
sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int
mv -f configure.int configure.in
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:98: \$LIBTOOLIZE -n"
at_fn_check_prepare_dynamic "$LIBTOOLIZE -n" "old-m4-iface.at:98"
( $at_check_trace; $LIBTOOLIZE -n
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:98"
$at_failed && at_fn_log_failure
$at_traceon; }
# ensure no shell errors:
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:100: grep -v \"^libtoolize: \" stderr"
at_fn_check_prepare_trace "old-m4-iface.at:100"
( $at_check_trace; grep -v "^libtoolize: " stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:100"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:101: grep \"Remember to add.*LT_INIT.*to configure.in\" stdout"
at_fn_check_prepare_trace "old-m4-iface.at:101"
( $at_check_trace; grep "Remember to add.*LT_INIT.*to configure.in" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:101"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:102: grep \"Consider adding.*LT_WITH_LTDL\" stdout"
at_fn_check_prepare_trace "old-m4-iface.at:102"
( $at_check_trace; grep "Consider adding.*LT_WITH_LTDL" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:102"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:103: grep \"Remember to add.*LT_CONFIG_LTDL_DIR\" stdout"
at_fn_check_prepare_trace "old-m4-iface.at:103"
( $at_check_trace; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:103"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_59
#AT_START_60
# 60. old-m4-iface.at:112: AC_WITH_LTDL
at_setup_line='old-m4-iface.at:112'
at_fn_banner 4
at_desc="AC_WITH_LTDL"
at_desc_line=" 60: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "60. old-m4-iface.at:112: testing ..."
$at_traceon
cat >module.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
const char *
hello (void)
{
return "Hello!";
}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
#include "ltdl.h"
int
main ()
{
lt_dlhandle module;
const char *(*func) (void) = 0;
int status = 1;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0) {
fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
return 1;
}
module = lt_dlopen("./module.la");
if (!module) {
fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
goto finish;
}
func = (const char *(*)(void)) lt_dlsym (module, "hello");
if (!func) {
fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
goto finish;
}
printf ("%s\n", (*func) ());
status = 0;
finish:
if (lt_dlexit() != 0) {
fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
status = 1;
}
return status;
}
_ATEOF
cat >configure.in <<'_ATEOF'
AC_PREREQ(2.50)
AC_INIT([main.c])
AC_PROG_MAKE_SET
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_WITH_LTDL
AC_OUTPUT(Makefile)
_ATEOF
cat >Makefile.in <<'_ATEOF'
top_srcdir = .
top_builddir = .
COMPILE = @CC@ @INCLTDL@ @CPPFLAGS@ @CFLAGS@
LTCOMPILE = @LIBTOOL@ --mode=compile $(COMPILE)
LTLINK = @LIBTOOL@ --mode=link @CC@ -no-undefined @CFLAGS@ @LDFLAGS@ -o $@
SHELL = @SHELL@
@SET_MAKE@
TARGETS = libltdl/libltdlc.la module.la ltdldemo@EXEEXT@
all: $(TARGETS)
libltdl/libltdlc.la:
cd libltdl && $(MAKE)
module.la: module.lo
$(LTLINK) module.lo -module -avoid-version -rpath /dev/null
ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la
$(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@ @LIBS@
.SUFFIXES:
.SUFFIXES: .c .@OBJEXT@ .lo
.c.@OBJEXT@:
$(COMPILE) -c $<
.c.lo:
$(LTCOMPILE) -c -o $@ $<
_ATEOF
# Be sure to use the in-tree libltdl, somebody might have removed
# an installed libltdl.la file.
$LIBTOOLIZE --ltdl --install
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:160: \$ACLOCAL -I libltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "old-m4-iface.at:160"
( $at_check_trace; $ACLOCAL -I libltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:160: \$AUTOCONF --force"
at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:160"
( $at_check_trace; $AUTOCONF --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:160: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:160"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:160: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:160"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/old-m4-iface.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:163"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:163"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_60
#AT_START_61
# 61. am-subdir.at:33: C subdir-objects
at_setup_line='am-subdir.at:33'
at_fn_banner 5
at_desc="C subdir-objects"
at_desc_line=" 61: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "61. am-subdir.at:33: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdir-demo], 2.2.10, bug-libtool@gnu.org)
AM_INIT_AUTOMAKE
LT_INIT([win32-dll])
AC_PROG_CC
AM_PROG_CC_C_O
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects foreign 1.6
AM_CPPFLAGS = -I$(top_srcdir)/../..
lib_LTLIBRARIES = subdir/libsub.la
subdir_libsub_la_SOURCES= subdir/sub.c
bin_PROGRAMS = subdir/subdemo
subdir_subdemo_SOURCES = subdir/main.c
subdir_subdemo_LDADD = subdir/libsub.la
_ATEOF
test -d subdir || { rm -f subdir && mkdir subdir; }
cat >subdir/main.c <<'_ATEOF'
#include <stdio.h>
extern void sub (void);
int main (void)
{
printf ("Welcome to GNU Libtool subdir-objects test!\n");
sub();
return 0;
}
_ATEOF
cat >subdir/sub.c <<'_ATEOF'
#include <stdio.h>
void sub (void) { printf ("** This is libsub **\n"); }
_ATEOF
$LIBTOOLIZE --copy
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:78"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOMAKE --add-missing"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:78"
( $at_check_trace; $AUTOMAKE --add-missing
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "am-subdir.at:78"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:78"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:78"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/am-subdir.at:78: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:78"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/am-subdir.at:80: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:80"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:80"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:81: grep 'Welcome to GNU Libtool subdir-objects test' stdout"
at_fn_check_prepare_trace "am-subdir.at:81"
( $at_check_trace; grep 'Welcome to GNU Libtool subdir-objects test' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:83: grep 'This is libsub' stdout"
at_fn_check_prepare_trace "am-subdir.at:83"
( $at_check_trace; grep 'This is libsub' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_61
#AT_START_62
# 62. am-subdir.at:93: C++ subdir-objects
at_setup_line='am-subdir.at:93'
at_fn_banner 5
at_desc="C++ subdir-objects"
at_desc_line=" 62: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "62. am-subdir.at:93: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/am-subdir.at:94: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "am-subdir.at:94"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:94: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "am-subdir.at:94"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >configure.ac <<'_ATEOF'
AC_INIT([subdir-demo], 2.2.10, bug-libtool@gnu.org)
AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG([C++])
LT_INIT([win32-dll])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects foreign 1.6
AM_CPPFLAGS = -I$(top_srcdir)/../..
lib_LTLIBRARIES = subdir/libsub.la
subdir_libsub_la_SOURCES= subdir/sub.cxx subdir/sub.hxx
bin_PROGRAMS = subdir/subdemo
subdir_subdemo_SOURCES = subdir/main.cxx
subdir_subdemo_LDADD = subdir/libsub.la
_ATEOF
test -d subdir || { rm -f subdir && mkdir subdir; }
cat >subdir/sub.hxx <<'_ATEOF'
class libsub { public: int sub (void); };
_ATEOF
cat >subdir/main.cxx <<'_ATEOF'
#include "sub.hxx"
int main (void)
{
libsub SUB;
return SUB.sub() != 27;
}
_ATEOF
cat >subdir/sub.cxx <<'_ATEOF'
#include "sub.hxx"
int libsub::sub (void) { return 27; }
_ATEOF
$LIBTOOLIZE --copy
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:146"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOMAKE --add-missing"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:146"
( $at_check_trace; $AUTOMAKE --add-missing
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "am-subdir.at:146"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:146"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:146"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/am-subdir.at:146: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:146"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/am-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:148"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_62
#AT_START_63
# 63. lt_dlexit.at:30: lt_dlexit unloading libs
at_setup_line='lt_dlexit.at:30'
at_fn_banner 6
at_desc="lt_dlexit unloading libs"
at_desc_line=" 63: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "63. lt_dlexit.at:30: testing ..."
$at_traceon
# Test for
# http://lists.gnu.org/archive/html/bug-libtool/2007-01/msg00014.html
# http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00013.html
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
#include <string.h>
typedef int (*pfun_T) (int);
typedef int *pvar_T;
/* lt_dlopen wrapper */
static lt_dlhandle
xdlopen (const char *filename)
{
lt_dlhandle handle = lt_dlopen (filename);
if (!handle) {
fprintf (stderr, "can't open the module %s!\n", filename);
fprintf (stderr, "error was: %s\n", lt_dlerror());
}
return handle;
}
/* lt_dlsym wrapper: try one function and one variable */
static int
xdlsymtest (lt_dlhandle handle, const char *func, const char *var)
{
pfun_T pf = (pfun_T) lt_dlsym (handle, func);
pvar_T pv = (pvar_T) lt_dlsym (handle, var);
if (pf == NULL) {
fprintf (stderr, "function `%s' not found\n", func);
return 1;
}
if (pv == NULL) {
fprintf (stderr, "variable `%s' not found\n", var);
return 1;
}
return (*pf) (*pv);
}
int
main (void)
{
lt_dlhandle b1;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0) {
fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
return 1;
}
if (lt_dlexit() != 0) {
fprintf (stderr, "error during first lt_dlexit: %s\n", lt_dlerror());
return 1;
}
if (lt_dlinit() != 0) {
fprintf (stderr, "error during second initialization: %s\n", lt_dlerror());
return 1;
}
if (!(b1 = xdlopen ("modb1.la"))) return 1;
if (xdlsymtest (b1, "fb1", "vb1")) return 1;
/* do not lt_dlclose here on purpose. */
if (lt_dlexit() != 0) {
fprintf (stderr, "error during exit: %s\n", lt_dlerror());
return 1;
}
return 0;
}
_ATEOF
cat >a1.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f1 (int x) { return x - 1; }
int v1 = 1;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >b1.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
extern int f1 (int), v1;
int fb1 (int x) { return f1 (v1) + x - 3; }
int vb1 = 3;
#ifdef __cplusplus
}
#endif
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/lt_dlexit.at:134: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:134"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:134"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
LDFLAGS="$LDFLAGS -no-undefined"
for file in a1 b1; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
done
$CC $CPPFLAGS $CFLAGS -c main.c
{ set +x
$as_echo "$at_srcdir/lt_dlexit.at:145: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba1.la a1.lo \\
-rpath /foo -avoid-version"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:145"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \
-rpath /foo -avoid-version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:145"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlexit.at:147: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o modb1.la b1.lo \\
-rpath /foo -module -avoid-version liba1.la"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:147"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o modb1.la b1.lo \
-rpath /foo -module -avoid-version liba1.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:147"
$at_failed && at_fn_log_failure
$at_traceon; }
# TODO: test -dlpreopen
for dlopen in -dlopen; do
{ set +x
$as_echo "$at_srcdir/lt_dlexit.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \\
\$dlopen modb1.la \$LIBLTDL"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:152"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT \
$dlopen modb1.la $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:152"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlexit.at:154: if \$LIBTOOL --mode=execute -dlopen modb1.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen modb1.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlexit.at:154"
( $at_check_trace; if $LIBTOOL --mode=execute -dlopen modb1.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:154"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_63
#AT_START_64
# 64. lt_dladvise.at:28: lt_dlopenadvise library loading
at_setup_line='lt_dladvise.at:28'
at_fn_banner 6
at_desc="lt_dlopenadvise library loading"
at_desc_line=" 64: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "64. lt_dladvise.at:28: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
typedef int funcp (int);
static int errors = 0;
static void
complain (const char *msg)
{
const char *errmsg = lt_dlerror ();
fprintf (stderr, "%s", msg);
if (errmsg)
fprintf (stderr, ": %s\n", errmsg);
else
fprintf (stderr, ".\n");
++errors;
}
static lt_dlhandle
moduleopen (const char *filename, lt_dladvise advise)
{
lt_dlhandle handle;
handle = lt_dlopenadvise (filename, advise);
if (!handle)
{
fprintf (stderr, "can't open the module %s!\n", filename);
complain ("error was");
}
return handle;
}
static int
moduletest (lt_dlhandle handle, const char *fname, const char *vname)
{
funcp *f = (funcp *) lt_dlsym (handle, fname);
int *v = (int *) lt_dlsym (handle, vname);
if (!f)
{
fprintf (stderr, "function `%s' not found\n", fname);
++errors;
return -1;
}
if (!v)
{
fprintf (stderr, "variable `%s' not found\n", vname);
++errors;
return -1;
}
return f (*v);
}
void
hint_ext (void)
{
lt_dlhandle handle;
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_ext (&advise))
complain ("error setting advise ext");
handle = moduleopen ("libdepend", advise);
if (handle)
printf ("depend: %d\n", moduletest (handle, "g", "j"));
lt_dladvise_destroy (&advise);
}
void
hint_resident (void)
{
const lt_dlinfo *info;
lt_dlhandle handle;
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_resident (&advise))
complain ("error setting advise resident");
handle = moduleopen ("libresident.la", advise);
if (handle)
{
info = lt_dlgetinfo (handle);
if (!info->is_resident)
complain ("error taking advise resident");
/* cannot close resident modules */
if (lt_dlclose (handle) == 0)
complain ("successfully unloaded resident module");
printf ("resident: %d\n", moduletest (handle, "func", "numb"));
}
lt_dladvise_destroy (&advise);
}
void
hint_local (void)
{
const lt_dlinfo *info;
lt_dlhandle handle;
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_local (&advise))
complain ("error setting advise local");
handle = moduleopen ("liblocal.la", advise);
if (handle)
{
info = lt_dlgetinfo (handle);
printf ("local: %d\n", moduletest (handle, "f", "i"));
/* If the symlocal hint was taken, don't unload this module
and test that our local symbolnames won't clash with modglobal. */
if (!info->is_symlocal && lt_dlclose (handle))
complain ("error unloading modlocal");
}
lt_dladvise_destroy (&advise);
}
void
hint_global (void)
{
const lt_dlinfo *info;
lt_dlhandle handle;
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise))
complain ("error setting advise global");
handle = moduleopen ("libglobal.la", advise);
if (handle)
{
info = lt_dlgetinfo (handle);
printf ("global: %d\n", moduletest (handle, "f", "i"));
/* Don't attempt to load moddepend unless modglobal was successfully
loaded and the symglobal hint was taken, and the system allows to
to have undefined symbols. */
if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
{
hint_ext ();
}
else
{
/* Fake the output so the test won't fail when using a dlloader
unable to take symglobal hints. */
printf ("depend: 5\n");
}
}
lt_dladvise_destroy (&advise);
}
void
hint_preload (void)
{
lt_dlhandle handle;
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_preload (&advise))
complain ("error setting advise preload");
handle = moduleopen ("libpreload.la", advise);
if (handle)
{
printf("preload: %d\n", moduletest (handle, "h", "k"));
}
lt_dladvise_destroy (&advise);
}
int
main (void)
{
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0)
{
fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
return 1;
}
hint_resident ();
hint_local ();
hint_global ();
hint_preload ();
if (lt_dlexit () != 0)
complain ("error during exit");
return (errors != 0);
}
_ATEOF
cat >modresident.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int func (int x) { return x / 3; }
int numb = 7;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >modlocal.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f (int x) { return (x * x) / 10; }
int i = 6;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >modglobal.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f (int x) { return x - 1; }
int i = 5;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >moddepend.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
extern int f (int), i;
int g (int x) { return f (i) + x - 3; }
int j = 4;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >modpreload.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int h (int x) { return 2 * x; }
int k = 3;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >expout <<'_ATEOF'
resident: 2
local: 3
global: 4
depend: 5
preload: 6
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:305: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dladvise.at:305"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:305"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
dlopenable='resident local global'
dlpreloadable='preload'
# ------------------------------------------------------------------------- #
# The depend test makes no sense unless compiled without -no-undefined. By #
# not building the depend module in that case, when this test passes we can #
# be sure that hint_global() above, is being correctly informed those hosts #
# are reporting not able to accept the global hint to lt_dlopenadvise(). #
# ------------------------------------------------------------------------- #
have_shared=false
$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
case $host_os,$have_shared in
cygwin* | mingw* | cegcc* | *,false)
# These hosts do not support linking without -no-undefined
CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
;;
*)
CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
dlopenable="$dlopen depend"
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:333: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version" "lt_dladvise.at:333"
( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:333"
$at_failed && at_fn_log_failure
$at_traceon; }
;;
esac
# ------------------------------------------------------------------------- #
# Other modules can be tested correctly even when built with -no-undefined. #
# ------------------------------------------------------------------------- #
LDFLAGS="$LDFLAGS -no-undefined"
$CC $CPPFLAGS $CFLAGS -c main.c
for name in resident local global preload; do
# FIXME: adding -static to libpreload shouldn't be necessary.
# Fix this properly in ltmain, then remove this workaround.
if test $name = preload; then
st=-static
else
st=
fi
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:354: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o lib\$name.la mod\$name.lo \$st -rpath /foo -avoid-version"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version" "lt_dladvise.at:354"
( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:354"
$at_failed && at_fn_log_failure
$at_traceon; }
done
preloaded=
for module in $dlpreloadable; do
preloaded="${preloaded+$preloaded }-dlpreopen lib$module.la"
done
modules=
for module in $dlopenable; do
modules="${modules+$modules }-dlopen lib$module.la"
done
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:368: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$preloaded \$modules \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL" "lt_dladvise.at:368"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:368"
$at_failed && at_fn_log_failure
$at_traceon; }
# Remove loadable libpreload module, so we know it is the preloaded module
# that is being executed by a successful test invocation:
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:373: \$LIBTOOL --mode=clean rm -f libpreload.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f libpreload.la" "lt_dladvise.at:373"
( $at_check_trace; $LIBTOOL --mode=clean rm -f libpreload.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:373"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dladvise.at:375: if \$LIBTOOL --mode=execute \$modules \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute $modules \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dladvise.at:375"
( $at_check_trace; if $LIBTOOL --mode=execute $modules "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:375"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_64
#AT_START_65
# 65. lt_dlopen.at:23: lt_dlopen error messages
at_setup_line='lt_dlopen.at:23'
at_fn_banner 6
at_desc="lt_dlopen error messages"
at_desc_line=" 65: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "65. lt_dlopen.at:23: testing ..."
$at_traceon
# The bug is not fixed:
# This test only works if the system allows undefined symbols.
eval `$LIBTOOL --config | grep '^allow_undefined_flag='`
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:31: test unsupported != \"\$allow_undefined_flag\" || exit 77"
at_fn_check_prepare_dynamic "test unsupported != \"$allow_undefined_flag\" || exit 77" "lt_dlopen.at:31"
( $at_check_trace; test unsupported != "$allow_undefined_flag" || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:31"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlhandle plugin_handle;
if (argc < 2)
{
fprintf (stderr, "usage: %s plugin\n", argv[0]);
return 1;
}
lt_dlinit ();
plugin_handle = lt_dlopenext (argv[1]);
if (NULL != plugin_handle)
{
printf ("plugin opened successfully!\n");
lt_dlclose (plugin_handle);
}
else
{
printf ("plugin failed to open: %s\n", lt_dlerror());
err = 1;
}
lt_dlexit ();
return err;
}
_ATEOF
cat >good-plugin.c <<'_ATEOF'
int foo;
int *i = &foo;
_ATEOF
cat >missing-symbol-plugin.c <<'_ATEOF'
/* On systems that allow undefined symbols, this will compile,
but the symbol "foo" won't be found at runtime */
extern int foo;
int *i = &foo;
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
CPPFLAGS="$LTDLINCL $CPPFLAGS"
inst=`pwd`/inst
libdir=$inst/lib
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:85: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lt_dlopen.at:85"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
for file in good-plugin.c missing-symbol-plugin.c; do
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:87: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "lt_dlopen.at:87"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:90: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o good-plugin.la -rpath \$libdir -module -avoid-version good-plugin.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo" "lt_dlopen.at:90"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:92: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o missing-symbol-plugin.la -rpath \$libdir -module -avoid-version missing-symbol-plugin.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo" "lt_dlopen.at:92"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:92"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:95: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL" "lt_dlopen.at:95"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:99: if \"\$lt_exe\" ./good-plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./good-plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:99"
( $at_check_trace; if "$lt_exe" ./good-plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:100: if \"\$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:100"
( $at_check_trace; if "$lt_exe" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/lt_dlopen.at:100"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen.at:101: grep 'missing symbol' stderr"
at_fn_check_prepare_trace "lt_dlopen.at:101"
( $at_check_trace; grep 'missing symbol' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:101"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_65
#AT_START_66
# 66. lt_dlopen_a.at:23: lt_dlopen archive
at_setup_line='lt_dlopen_a.at:23'
at_fn_banner 6
at_desc="lt_dlopen archive"
at_desc_line=" 66: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "66. lt_dlopen_a.at:23: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
/* This dlopen() in the main executable should override any dlopen()s in
shared libraries etc.
If that is not the case (or the platform does not use dlopen()) then this
test should exit 77, causing the test to SKIP.
*/
static int retcde = 77;
void * dlopen(const char *path, int mode) {
if (!(strcmp(path,"plugin.a") && strcmp(path,"plugin.lib")))
{
fprintf(stderr,"Tried to open archive %s\n",path);
retcde = 1;
}
else
{
fprintf(stderr,"Opening ... %s\n", path);
if (retcde == 77) retcde = 0;
}
return NULL;
}
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlhandle plugin_handle;
lt_dlinit ();
plugin_handle = lt_dlopenext (argv[1]);
lt_dlexit ();
return retcde;
}
_ATEOF
cat >plugin.c <<'_ATEOF'
int i = 1;
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
CPPFLAGS="$LTDLINCL $CPPFLAGS"
inst=`pwd`/inst
libdir=$inst/lib
bindir=$inst/bin
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:78: \$CC \$CPPFLAGS \$CFLAGS -c main.c || exit 77"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c || exit 77" "lt_dlopen_a.at:78"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:78"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:79: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77" "lt_dlopen_a.at:79"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -no-undefined -avoid-version plugin.lo || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77" "lt_dlopen_a.at:81"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77" "lt_dlopen_a.at:85"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
mkdir -p $libdir
mkdir -p $bindir
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:92: \$LIBTOOL --mode=install cp plugin.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp plugin.la $libdir" "lt_dlopen_a.at:92"
( $at_check_trace; $LIBTOOL --mode=install cp plugin.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:92"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:93: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "lt_dlopen_a.at:93"
( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:94: test -f \$libdir/plugin.a || exit 77"
at_fn_check_prepare_dynamic "test -f $libdir/plugin.a || exit 77" "lt_dlopen_a.at:94"
( $at_check_trace; test -f $libdir/plugin.a || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:94"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlopen_a.at:95: if \"\$lt_exe\" \$libdir/plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" $libdir/plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen_a.at:95"
( $at_check_trace; if "$lt_exe" $libdir/plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_66
#AT_START_67
# 67. lt_dlopenext.at:23: lt_dlopenext error messages
at_setup_line='lt_dlopenext.at:23'
at_fn_banner 6
at_desc="lt_dlopenext error messages"
at_desc_line=" 67: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "67. lt_dlopenext.at:23: testing ..."
$at_traceon
# This test requires shared library support.
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'enable shared libraries' || exit 77" "lt_dlopenext.at:27"
( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:27"
$at_failed && at_fn_log_failure
$at_traceon; }
prefix=`pwd`/inst
libdir=$prefix/lib
bindir=$prefix/bin
mkdir $prefix $libdir $bindir
# This code is copied from the Autobook:
# <http://sources.redhat.com/autobook/autobook/autobook_169.html>
# so if it needs changes, be sure to notify the Autobook authors
# about them.
cat >simple-module.c <<'_ATEOF'
#include <stdio.h>
#ifdef __cplusplus
extern "C"
#endif
int
run (const char *argument)
{
printf ("Hello, %s!\n", argument);
return 0;
}
_ATEOF
cat >ltdl-loader.c <<'_ATEOF'
#include <stdio.h>
#include <stdlib.h>
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
# define EXIT_SUCCESS 0
#endif
#include <limits.h>
#ifndef PATH_MAX
# define PATH_MAX 255
#endif
#include <string.h>
#include <ltdl.h>
#ifndef MODULE_PATH_ENV
# define MODULE_PATH_ENV "MODULE_PATH"
#endif
typedef int entrypoint (const char *argument);
/* Save and return a copy of the dlerror() error message,
since the next API call may overwrite the original. */
static char *dlerrordup (char *errormsg);
int
main (int argc, const char *argv[])
{
char *errormsg = NULL;
lt_dlhandle module = NULL;
entrypoint *run = NULL;
int errors = 0;
if (argc != 3)
{
fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n");
exit (EXIT_FAILURE);
}
/* Initialise libltdl. */
errors = lt_dlinit ();
/* Set the module search path. */
if (!errors)
{
const char *path = getenv (MODULE_PATH_ENV);
if (path != NULL)
errors = lt_dlsetsearchpath (path);
}
/* Load the module. */
if (!errors)
module = lt_dlopenext (argv[1]);
/* Find the entry point. */
if (module)
{
run = (entrypoint *) lt_dlsym (module, "run");
/* In principle, run might legitimately be NULL, so
I don't use run == NULL as an error indicator
in general. */
errormsg = dlerrordup (errormsg);
if (errormsg != NULL)
{
errors = lt_dlclose (module);
module = NULL;
}
}
else
errors = 1;
/* Call the entry point function. */
if (!errors)
{
int result = (*run) (argv[2]);
if (result < 0)
errormsg = strdup ("module entry point execution failed");
else
printf ("\t=> %d\n", result);
}
/* Unload the module, now that we are done with it. */
if (!errors)
errors = lt_dlclose (module);
if (errors)
{
/* Diagnose the encountered error. */
errormsg = dlerrordup (errormsg);
if (!errormsg)
{
fprintf (stderr, "%s: dlerror() failed.\n", argv[0]);
return EXIT_FAILURE;
}
}
/* Finished with ltdl now. */
if (!errors)
if (lt_dlexit () != 0)
errormsg = dlerrordup (errormsg);
if (errormsg)
{
fprintf (stderr, "%s: %s.\n", argv[0], errormsg);
free (errormsg);
exit (EXIT_FAILURE);
}
return EXIT_SUCCESS;
}
/* Be careful to save a copy of the error message,
since the next API call may overwrite the original. */
static char *
dlerrordup (char *errormsg)
{
char *error = (char *) lt_dlerror ();
if (error && !errormsg)
errormsg = strdup (error);
return errormsg;
}
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:188: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "lt_dlopenext.at:188"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:188"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
LDFLAGS="$LDFLAGS -no-undefined"
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:195: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c simple-module.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c" "lt_dlopenext.at:195"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:195"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o simple-module.la simple-module.lo -rpath \$libdir -module -avoid-version"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version" "lt_dlopenext.at:197"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:197"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:200: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c ltdl-loader.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c" "lt_dlopenext.at:200"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:200"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:202: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o ltdl-loader\$EXEEXT ltdl-loader.\$OBJEXT -dlopen self \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL" "lt_dlopenext.at:202"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:202"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:205: \$LIBTOOL --mode=install cp simple-module.la \$libdir/simple-module.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la" "lt_dlopenext.at:205"
( $at_check_trace; $LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:205"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:206: \$LIBTOOL --mode=clean rm -f simple-module.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f simple-module.la" "lt_dlopenext.at:206"
( $at_check_trace; $LIBTOOL --mode=clean rm -f simple-module.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:206"
$at_failed && at_fn_log_failure
$at_traceon; }
# Try finding the module with and without the .la file, with absolute
# path, relative path, or one of the path variables. Do not override
# $PATH for w32, see shlibpath.at for the hacks this requires.
#
# Finding the module without the .la file will not work if MODULE_EXT
# aka. shared_ext is empty.
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shrext_cmds)='`
module=no
eval shared_ext=\"$shrext_cmds\"
if test -n "$shared_ext"; then
have_lafile="with without"
else
have="with"
fi
if test "$shlibpath_var" = PATH; then
$unset shlibpath_var || shlibpath_var=
fi
for lafile in $have_lafile; do
if test $lafile = without; then
rm $libdir/simple-module.la
fi
for dir in inst/lib "$libdir"; do
lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:235: if \"\$lt_exe\" \$dir/simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:235"
( $at_check_trace; if "$lt_exe" $dir/simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:235"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:237: grep \"Hello, World\" stdout"
at_fn_check_prepare_trace "lt_dlopenext.at:237"
( $at_check_trace; grep "Hello, World" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:237"
$at_failed && at_fn_log_failure
$at_traceon; }
for var in MODULE_PATH LTDL_LIBRARY_PATH $shlibpath_var
do
eval $var=\$dir
export $var
lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:243: if \"\$lt_exe\" simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:243"
( $at_check_trace; if "$lt_exe" simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:243"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lt_dlopenext.at:245: grep \"Hello, World\" stdout"
at_fn_check_prepare_trace "lt_dlopenext.at:245"
( $at_check_trace; grep "Hello, World" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:245"
$at_failed && at_fn_log_failure
$at_traceon; }
$unset $var || eval $var=
done
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_67
#AT_START_68
# 68. ltdl-api.at:25: ltdl API
at_setup_line='ltdl-api.at:25'
at_fn_banner 6
at_desc="ltdl API"
at_desc_line=" 68: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "68. ltdl-api.at:25: testing ..."
$at_traceon
# Ensure that no symbols from argz are unrenamed.
eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
argz_o=$abs_top_builddir/libltdl/argz.$objext
{ set +x
$as_echo "$at_srcdir/ltdl-api.at:31: test -f \"\$argz_o\" || exit 77"
at_fn_check_prepare_dynamic "test -f \"$argz_o\" || exit 77" "ltdl-api.at:31"
( $at_check_trace; test -f "$argz_o" || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:31"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/ltdl-api.at:32: eval \"\$NM \\\"\\\$argz_o\\\" | \$global_symbol_pipe\""
at_fn_check_prepare_dynamic "eval \"$NM \\\"\\$argz_o\\\" | $global_symbol_pipe\"" "ltdl-api.at:32"
( $at_check_trace; eval "$NM \"\$argz_o\" | $global_symbol_pipe"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:32"
$at_failed && at_fn_log_failure
$at_traceon; }
# Check for global symbols beginning with "argz_"
{ set +x
$as_echo "$at_srcdir/ltdl-api.at:35: grep \"^T argz_\" stdout"
at_fn_check_prepare_trace "ltdl-api.at:35"
( $at_check_trace; grep "^T argz_" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:35"
$at_failed && at_fn_log_failure
$at_traceon; }
# and also for the _ prefixed version "_argz_"
{ set +x
$as_echo "$at_srcdir/ltdl-api.at:37: grep \"^T _argz_\" stdout"
at_fn_check_prepare_trace "ltdl-api.at:37"
( $at_check_trace; grep "^T _argz_" stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:37"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_68
#AT_START_69
# 69. dlloader-api.at:23: dlloader API
at_setup_line='dlloader-api.at:23'
at_fn_banner 6
at_desc="dlloader API"
at_desc_line=" 69: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "69. dlloader-api.at:23: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int
first_init (lt_user_data data)
{
const char *ctx = (const char *) data;
printf ("first_init: %s\n", ctx);
return 0;
}
static lt_module
first_open (lt_user_data data, const char *filename, lt_dladvise advise)
{
static const char *first_module = "first";
const char *ctx = (const char *) data;
if (!filename || strcmp (filename, "first"))
{
printf ("first_open denies a request\n");
lt_dlseterror (LT_ERROR_FILE_NOT_FOUND);
return NULL;
}
printf ("first_open (\"%s\"): %s\n", filename, ctx);
return (lt_module) first_module;
}
static const char *
first_symbol (void)
{
return "first_symbol";
}
static void *
first_sym (lt_user_data data, lt_module module, const char *symbolname)
{
const char *ctx = (const char *) data;
const char *filename = (const char *) module;
printf ("first_sym (%s): %s\n", filename, ctx);
return (void *) first_symbol;
}
static int
first_close (lt_user_data data, lt_module module)
{
const char *ctx = (const char *) data;
const char *filename = (const char *) module;
printf ("first_close (%s): %s\n", filename, ctx);
return 0;
}
static int
first_exit (lt_user_data data)
{
const char *ctx = (const char *) data;
printf ("first_exit: %s\n", ctx);
return 0;
}
static int
last_init (lt_user_data data)
{
const char *ctx = (const char *) data;
printf ("last_init: %s\n", ctx);
return 0;
}
static lt_module
last_open (lt_user_data data, const char *filename, lt_dladvise advise)
{
static const char *last_module = "last";
const char *ctx = (const char *) data;
if (!filename || strcmp (filename, "last"))
{
printf ("last_open denies a request\n");
lt_dlseterror (LT_ERROR_FILE_NOT_FOUND);
return NULL;
}
printf ("last_open (\"%s\"): %s\n", filename, ctx);
return (lt_module) last_module;
}
static const char *
last_symbol (void)
{
return "last_symbol";
}
static void *
last_sym (lt_user_data data, lt_module module, const char *symbolname)
{
const char *ctx = (const char *) data;
const char *filename = (const char *) module;
printf ("last_sym (%s): %s\n", filename, ctx);
return (void *) last_symbol;
}
static int
last_close (lt_user_data data, lt_module module)
{
const char *ctx = (const char *) data;
const char *filename = (const char *) module;
printf ("last_close (%s): %s\n", filename, ctx);
return 0;
}
static int
last_exit (lt_user_data data)
{
const char *ctx = (const char *) data;
printf ("last_exit: %s\n", ctx);
return 0;
}
typedef const char *module_func (void);
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlvtable *first;
lt_dlvtable *last;
lt_dlhandle module = NULL;
module_func *symbol;
const char *first_ctx = "first_ctx";
const char *last_ctx = "last_ctx";
const lt_dlvtable *finder;
LTDL_SET_PRELOADED_SYMBOLS ();
if (lt_dlinit ())
{
printf ("lt_dlinit failed\n");
return 1;
}
first = (lt_dlvtable *) malloc (sizeof (*first));
if (!first)
{
printf ("malloc failed\n");
err = 1;
goto cleanup;
}
first->name = "first";
first->sym_prefix = NULL;
first->module_open = first_open;
first->module_close = first_close;
first->find_sym = first_sym;
first->dlloader_init = first_init; /* test that it isn't called twice */
first->dlloader_exit = first_exit;
first->dlloader_data = (lt_user_data) first_ctx;
first->priority = LT_DLLOADER_PREPEND;
if (first_init (first->dlloader_data))
{
printf ("first_init failed\n");
err = 1;
goto cleanup;
}
if (lt_dlloader_add (first))
{
printf ("lt_dlloader_add failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
finder = lt_dlloader_find ("first");
if (!finder)
{
printf ("lt_dlloader_find failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
printf ("Found loader \"%s\"\n", finder->name);
last = (lt_dlvtable *) malloc (sizeof (*last));
if (!last)
{
printf ("malloc failed\n");
err = 1;
goto cleanup;
}
last->name = "last";
last->sym_prefix = NULL;
last->module_open = last_open;
last->module_close = last_close;
last->find_sym = last_sym;
last->dlloader_init = last_init; /* test that it isn't called twice */
last->dlloader_exit = last_exit;
last->dlloader_data = (lt_user_data) last_ctx;
last->priority = LT_DLLOADER_APPEND;
if (last_init (last->dlloader_data))
{
printf ("last_init failed\n");
err = 1;
goto cleanup;
}
if (lt_dlloader_add (last))
{
printf ("lt_dlloader_add failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
finder = lt_dlloader_find ("last");
if (!finder)
{
printf ("lt_dlloader_find failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
printf ("Found loader \"%s\"\n", finder->name);
module = lt_dlopen ("first");
if (!module)
{
printf ("lt_dlopen failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
symbol = (module_func *) lt_dlsym (module, "symbol");
if (!symbol)
{
printf ("lt_dlsym failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
printf ("result: %s\n", symbol ());
lt_dlclose (module);
module = lt_dlopen ("./module.la");
if (!module)
{
printf ("lt_dlopen failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
symbol = (module_func *) lt_dlsym (module, "symbol");
if (!symbol)
{
printf ("lt_dlsym failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
printf ("result: %s\n", symbol ());
lt_dlclose (module);
module = lt_dlopen ("last");
if (!module)
{
printf ("lt_dlopen failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
symbol = (module_func *) lt_dlsym (module, "symbol");
if (!symbol)
{
printf ("lt_dlsym failed: %s\n", lt_dlerror ());
err = 1;
goto cleanup;
}
printf ("result: %s\n", symbol ());
if (lt_dlopen ("no-module"))
{
printf ("lt_dlopen unexpectedly opened \"no-module\"\n");
err = 1;
goto cleanup;
}
if (lt_dlloader_remove ("first") != first)
{
printf ("vtable of first loader has changed\n");
err = 1;
goto cleanup;
}
free (first);
cleanup:
if (module)
{
lt_dlclose (module);
}
lt_dlexit ();
return err;
}
_ATEOF
cat >module.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
const char *symbol (void);
const char *
symbol (void)
{
return "module_symbol";
}
_ATEOF
cat >expout <<'_ATEOF'
first_init: first_ctx
Found loader "first"
last_init: last_ctx
Found loader "last"
first_open ("first"): first_ctx
first_sym (first): first_ctx
result: first_symbol
first_close (first): first_ctx
first_open denies a request
result: module_symbol
first_open denies a request
last_open ("last"): last_ctx
last_sym (last): last_ctx
result: last_symbol
first_open denies a request
last_open denies a request
first_exit: first_ctx
last_close (last): last_ctx
last_exit: last_ctx
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:400: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "dlloader-api.at:400"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:400"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:406: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "dlloader-api.at:406"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:406"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:408: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo" "dlloader-api.at:408"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:408"
$at_failed && at_fn_log_failure
$at_traceon; }
. ./module.la
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:415: test -n \"\$dlname\" || (exit 77)"
at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "dlloader-api.at:415"
( $at_check_trace; test -n "$dlname" || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:415"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:417: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "dlloader-api.at:417"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:417"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:418: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen module.la \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL" "dlloader-api.at:418"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:418"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/dlloader-api.at:422: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "dlloader-api.at:422"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:422"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_69
#AT_START_70
# 70. loadlibrary.at:23: loadlibrary error messages
at_setup_line='loadlibrary.at:23'
at_fn_banner 6
at_desc="loadlibrary error messages"
at_desc_line=" 70: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "70. loadlibrary.at:23: testing ..."
$at_traceon
eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
static int
standard_error_message(const char *error)
{
int error_number;
for (error_number = 0; error_number < LT_ERROR_MAX; ++error_number)
{
lt_dlseterror (error_number);
if (error == lt_dlerror ())
{
return 1;
}
}
lt_dlseterror (LT_ERROR_UNKNOWN);
return 0;
}
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlhandle module = NULL;
const lt_dlvtable *loadlibrary;
const lt_dlvtable *preopen;
lt_dlloader loader = NULL;
lt_dlloader next;
const lt_dlvtable *vtable;
void *symbol;
const char *error;
if (argc < 2)
{
fprintf (stderr, "usage: %s plugin [symbol]\n", argv[0]);
return 1;
}
lt_dlinit ();
loadlibrary = lt_dlloader_find ("lt_loadlibrary");
if (!loadlibrary)
{
/* Skip if the loadlibrary loader isn't supported */
printf ("loadlibrary loader not found\n");
err = 77;
goto cleanup;
}
preopen = lt_dlloader_find ("lt_preopen");
if (!loadlibrary)
{
printf ("preopen loader not found\n");
err = 2;
goto cleanup;
}
/* Remove all loaders except the preopen and loadlibrary loaders. */
while (next = lt_dlloader_next (loader))
{
if (lt_dlloader_get (next) == loadlibrary)
{
loader = next;
continue;
}
if (lt_dlloader_get (next) == preopen)
{
loader = next;
continue;
}
lt_dlloader_remove (lt_dlloader_get (next)->name);
}
module = lt_dlopen (argv[1]);
error = lt_dlerror ();
if (module)
{
printf ("lt_dlopen: success!\n");
if (argc == 2)
{
/* But failure was the desired result... */
printf ("expected failure\n");
err = 2;
goto cleanup;
}
}
else if (argc > 2)
{
/* Didn't expect failure... */
printf ("lt_dlopen: failure: %s\n", error);
err = 2;
goto cleanup;
}
else if (standard_error_message (error))
{
/* Expected custom error message... */
printf ("lt_dlopen: standard error (bad): %s\n", error);
err = 1;
goto cleanup;
}
else
{
printf ("lt_dlopen: custom error (good): %s\n", error);
goto cleanup;
}
symbol = lt_dlsym (module, argv[2]);
error = lt_dlerror ();
if (symbol)
{
printf ("lt_dlsym: success!\n");
}
else if (standard_error_message (error))
{
/* Expected custom failure message... */
printf ("lt_dlsym: standard error (bad): %s\n", error);
err = 1;
}
else
{
printf ("lt_dlsym: custom error (good): %s\n", error);
}
cleanup:
if (module)
{
lt_dlclose (module);
}
lt_dlexit ();
return err;
}
_ATEOF
cat >foomod.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
int foosym (void);
int
foosym (void)
{
return 0;
}
_ATEOF
cat >bardep.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
int bardep (void);
int
bardep (void)
{
return 0;
}
_ATEOF
cat >barmod.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int bardep (void);
int barsym (void);
#ifdef __cplusplus
}
#endif
int
barsym (void)
{
return bardep ();
}
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:217: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "loadlibrary.at:217"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:217"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
inst=`pwd`/inst
libdir=$inst/lib
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:225: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "loadlibrary.at:225"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:225"
$at_failed && at_fn_log_failure
$at_traceon; }
for file in foomod.c bardep.c barmod.c; do
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "loadlibrary.at:227"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:230: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o foomod.la -rpath \$libdir -module -avoid-version -no-undefined foomod.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo" "loadlibrary.at:230"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:230"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:234: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbardep.la -rpath \$libdir -avoid-version -no-undefined bardep.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo" "loadlibrary.at:234"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:234"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:238: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o barmod.la -rpath \$libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la" "loadlibrary.at:238"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:238"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:243: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL" "loadlibrary.at:243"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:243"
$at_failed && at_fn_log_failure
$at_traceon; }
. ./foomod.la
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:248: test -n \"\$dlname\" || (exit 77)"
at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "loadlibrary.at:248"
( $at_check_trace; test -n "$dlname" || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:248"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:250: if \"\$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:250"
( $at_check_trace; if "$lt_exe" ./foomod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:250"
$at_failed && at_fn_log_failure
$at_traceon; }
# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls.
rm -f $objdir/$dlname
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:257: if \"\$lt_exe\" ./foomod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:257"
( $at_check_trace; if "$lt_exe" ./foomod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:257"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:259: if \"\$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:259"
( $at_check_trace; if "$lt_exe" ./barmod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:259"
$at_failed && at_fn_log_failure
$at_traceon; }
. ./libbardep.la
# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls.
rm -f $objdir/$dlname
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/loadlibrary.at:267: if \"\$lt_exe\" ./barmod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:267"
( $at_check_trace; if "$lt_exe" ./barmod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:267"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_70
#AT_START_71
# 71. lalib-syntax.at:24: syntax of .la files
at_setup_line='lalib-syntax.at:24'
at_fn_banner 6
at_desc="syntax of .la files"
at_desc_line=" 71: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "71. lalib-syntax.at:24: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlhandle plugin_handle;
if (argc < 2)
{
fprintf (stderr, "usage: %s plugin\n", argv[0]);
return 1;
}
lt_dlinit ();
plugin_handle = lt_dlopenext (argv[1]);
if (NULL != plugin_handle)
{
printf ("plugin opened successfully!\n");
lt_dlclose (plugin_handle);
}
else
{
printf ("plugin failed to open: %s\n", lt_dlerror());
err = 1;
}
lt_dlexit ();
return err;
}
_ATEOF
cat >module.c <<'_ATEOF'
int foo (void) { return 0; }
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:70: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "lalib-syntax.at:70"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$CPPFLAGS $LTDLINCL"
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:76: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lalib-syntax.at:76"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:76"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:77: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "lalib-syntax.at:77"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:79: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere" "lalib-syntax.at:79"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL" "lalib-syntax.at:81"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
# Several bogus test cases.
cat >missing-closing-quote.la <<'_ATEOF'
# missing-closing-quote.la - a libtool library file
# Generated by libtool
dlname='module.so
library_names='module.so module.so module.so'
old_library='module.a'
installed=no
shouldnotlink=yes
libdir='/somewhere'
_ATEOF
cat >wrong-quotes.la <<'_ATEOF'
# wrong-quotes.la - a libtool library file
# Generated by libtool
dlname="module.so"
library_names='module.so module.so module.so'
old_library='module.a'
installed=no
shouldnotlink=yes
libdir='/somewhere'
_ATEOF
cat >no-dlname.la <<'_ATEOF'
# no-dlname.la - a libtool library file
# Generated by libtool
installed=no
shouldnotlink=yes
libdir='/somewhere'
_ATEOF
cat >nonexistent-dlname.la <<'_ATEOF'
# nonexistent-dlname.la - a libtool library file
# Generated by libtool
dlname='does-not-exist.so'
installed=no
shouldnotlink=yes
libdir='/somewhere'
_ATEOF
for file in ./missing-closing-quote.la ./wrong-quotes.la \
./no-dlname.la ./nonexistent-dlname.la; do
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:128: if \"\$lt_exe\" \$file; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" $file; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lalib-syntax.at:128"
( $at_check_trace; if "$lt_exe" $file; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/lalib-syntax.at:128"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/lalib-syntax.at:129: grep 'plugin failed to open' stdout"
at_fn_check_prepare_trace "lalib-syntax.at:129"
( $at_check_trace; grep 'plugin failed to open' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:129"
$at_failed && at_fn_log_failure
$at_traceon; }
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_71
#AT_START_72
# 72. resident.at:27: resident modules
at_setup_line='resident.at:27'
at_fn_banner 6
at_desc="resident modules"
at_desc_line=" 72: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "72. resident.at:27: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
int
main (int argc, char* argv[])
{
int err = 0;
lt_dlhandle plugin_handle;
lt_dladvise advise;
if (argc < 2)
{
fprintf (stderr, "usage: %s plugin\n", argv[0]);
return 1;
}
lt_dlinit ();
if (lt_dladvise_init (&advise) != 0
|| lt_dladvise_ext (&advise) != 0
|| lt_dladvise_resident (&advise) != 0)
{
printf ("advise failure: %s\n", lt_dlerror ());
err = 1;
}
else
{
plugin_handle = lt_dlopenadvise (argv[1], advise);
if (NULL != plugin_handle)
{
int (*pf) (void);
printf ("plugin opened successfully!\n");
pf = (int (*) (void)) lt_dlsym (plugin_handle, "setup_plugin");
if (pf)
pf ();
else
{
printf ("dlsym failure: %s\n", lt_dlerror ());
err = 1;
}
if (!lt_dlisresident (plugin_handle))
{
printf ("module wrongly not marked resident\n");
err = 1;
}
if (lt_dlclose (plugin_handle) != 0)
{
printf ("close failure (expected): %s\n", lt_dlerror ());
}
else
{
printf ("wrongly closed resident module\n");
err = 1;
}
}
else
{
printf ("plugin failed to open: %s\n", lt_dlerror ());
err = 1;
}
if (lt_dladvise_destroy (&advise) != 0)
{
printf ("advise destroy failure: %s\n", lt_dlerror ());
err = 1;
}
}
lt_dlexit ();
return err;
}
_ATEOF
cat >plugin.c <<'_ATEOF'
#include <stdlib.h>
#include <stdio.h>
void
bye (void)
{
puts ("called from atexit handler");
}
#ifdef __cplusplus
extern "C"
#endif
int
setup_plugin (void)
{
atexit (bye);
}
_ATEOF
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/resident.at:126: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "resident.at:126"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:126"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
LDFLAGS="$LDFLAGS -no-undefined"
inst=`pwd`/inst
libdir=$inst/lib
{ set +x
$as_echo "$at_srcdir/resident.at:135: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "resident.at:135"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:135"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/resident.at:136: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c" "resident.at:136"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:136"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/resident.at:138: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -avoid-version plugin.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo" "resident.at:138"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:138"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/resident.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL" "resident.at:140"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/resident.at:143: if \"\$lt_exe\" ./plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ./plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "resident.at:143"
( $at_check_trace; if "$lt_exe" ./plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:143"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/resident.at:144: grep 'called from atexit handler' stdout"
at_fn_check_prepare_trace "resident.at:144"
( $at_check_trace; grep 'called from atexit handler' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/resident.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_72
#AT_START_73
# 73. slist.at:24: SList functionality
at_setup_line='slist.at:24'
at_fn_banner 6
at_desc="SList functionality"
at_desc_line=" 73: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "73. slist.at:24: testing ..."
$at_traceon
cat >test-slist.c <<'_ATEOF'
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include "slist.h"
void *find_string (SList *item, void *data)
{
if (data != NULL && !strcmp ((const char *) item->userdata, (const char *)data))
return item;
else
return NULL;
}
void boxed_delete (void *item)
{
free (slist_unbox ((SList *) item));
}
void *print_item (SList *item, void *userdata)
{
userdata = userdata; /* unused */
printf ("%s\n", (const char*)item->userdata);
return NULL;
}
int list_compare (const SList *item1, const SList *item2, void *userdata)
{
userdata = userdata;
return strcmp ((const char *) item1->userdata, (const char *)item2->userdata);
}
int main ()
{
int i;
SList *empty_list = NULL, *list = NULL, *item, *list_save;
char *data = NULL;
/* slist_cons */
list = slist_cons (NULL, NULL);
for (i=0; i < 10; ++i) {
data = (char *) malloc (42);
assert (data);
sprintf (data, "foo%d", i);
list = slist_cons (slist_box (data), list);
}
list_save = list;
list = slist_cons (NULL, list);
assert (list == list_save);
/* slist_find */
assert (slist_find (NULL, find_string, (void *) "whatever") == NULL);
assert (slist_find (empty_list, find_string, (void *) "whatever") == NULL);
assert (slist_find (list, find_string, (void *) "foo10") == NULL);
item = (SList *) slist_find (list, find_string, (void *) "foo1");
assert (item != NULL);
assert (!strcmp ((const char *) item->userdata, "foo1"));
item = slist_nth (list, 10);
assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
puts ("list as inserted:");
slist_foreach (list, print_item, NULL);
puts ("reversed list:");
list = slist_reverse (list);
slist_foreach (list, print_item, NULL);
item = slist_nth (list, 1);
assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
assert (10 == slist_length (list));
/* slist_tail is the second item, not the last one */
item = slist_tail (list);
assert (item != NULL && !strcmp ((const char *) item->userdata, "foo1"));
assert (slist_tail (slist_nth (list, 10)) == NULL);
/* slist_sort and implicitly, slist_sort_merge */
assert (slist_sort (NULL, list_compare, NULL) == NULL);
list = slist_sort (list, list_compare, NULL);
puts ("list after no-op sort:");
slist_foreach (list, print_item, NULL);
list = slist_reverse (list);
puts ("reversed list:");
slist_foreach (list, print_item, NULL);
puts ("sorting reversed list:");
list = slist_sort (list, list_compare, NULL);
slist_foreach (list, print_item, NULL);
/* slist_remove */
assert (slist_remove (NULL, find_string, NULL) == NULL);
assert (slist_remove (&empty_list, find_string, NULL) == NULL);
list_save = list;
assert (slist_remove (&list, find_string, NULL) == NULL);
assert (list_save == list);
/* remove entries: middle, last, first, not present */
/* slist_reverse above has left us with increasing order */
list_save = list;
item = slist_remove (&list, find_string, (void *) "foo5");
assert (list_save == list);
assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo5"));
free (data);
list_save = list;
item = slist_remove (&list, find_string, (void *) "foo9");
assert (list_save == list);
assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo9"));
free (data);
list_save = list;
item = slist_remove (&list, find_string, (void *) "foo0");
assert (list_save != list);
assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo0"));
free (data);
list_save = list;
item = slist_remove (&list, find_string, (void *) "foo5");
assert (list_save == list);
assert (item == NULL);
assert (slist_delete (list, boxed_delete) == NULL);
return 0;
}
_ATEOF
CPPFLAGS="-I$top_srcdir/libltdl -I$top_srcdir/libltdl/libltdl -I$abs_top_builddir"
{ set +x
$as_echo "$at_srcdir/slist.at:160: \$CC \$CPPFLAGS \$CFLAGS -c test-slist.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c test-slist.c" "slist.at:160"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c test-slist.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/slist.at:160"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/slist.at:162: \$CC \$CPPFLAGS \$CFLAGS -c \$top_srcdir/libltdl/slist.c"
at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c" "slist.at:162"
( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/slist.at:162"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/slist.at:164: \$CC \$CFLAGS \$LDFLAGS -o test-slist test-slist.\$OBJEXT slist.\$OBJEXT"
at_fn_check_prepare_dynamic "$CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT" "slist.at:164"
( $at_check_trace; $CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/slist.at:164"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./test-slist; if test -f "./test-slist$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/slist.at:166: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "slist.at:166"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/slist.at:166"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_73
#AT_START_74
# 74. need_lib_prefix.at:25: enforced lib prefix
at_setup_line='need_lib_prefix.at:25'
at_fn_banner 6
at_desc="enforced lib prefix"
at_desc_line=" 74: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "74. need_lib_prefix.at:25: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
typedef int fun (int);
static int errors = 0;
static void
complain (const char *msg)
{
const char *errmsg = lt_dlerror ();
fprintf (stderr, "%s", msg);
if (errmsg)
fprintf (stderr, ": %s\n", errmsg);
else
fprintf (stderr, ".\n");
++errors;
}
static lt_dlhandle
moduleopen (const char *filename)
{
lt_dlhandle handle;
handle = lt_dlopen (filename);
if (!handle)
{
fprintf (stderr, "can't open the module %s!\n", filename);
complain ("error was");
}
return handle;
}
static int
moduletest (lt_dlhandle handle)
{
const lt_dlinfo *info = lt_dlgetinfo (handle);
fun *f = (fun *) lt_dlsym (handle, "f");
int *v = (int *) lt_dlsym (handle, "i");
if (!f)
{
complain ("function `f' not found");
return 1;
}
if (!v)
{
complain ("variable `i' not found");
return 1;
}
printf ("%s: %d\n", info->name, f (*v));
return 0;
}
int
main (int argc, char **argv)
{
lt_dlhandle handle;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0)
{
fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
return 1;
}
if (lt_dlpreload_open (0, moduletest) != 0)
complain ("error during preloading");
if (lt_dlexit () != 0)
complain ("error during exit");
return (errors != 0);
}
_ATEOF
cat >foo1.c <<'_ATEOF'
#define f foo1_LTX_f
#define i foo1_LTX_i
#ifdef __cplusplus
extern "C" {
#endif
int f (int x) { return x / 3; }
int i = 7;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >foo2.c <<'_ATEOF'
#define f libfoo2_LTX_f
#define i libfoo2_LTX_i
#ifdef __cplusplus
extern "C" {
#endif
int f (int x) { return (x * x) / 10; }
int i = 6;
#ifdef __cplusplus
}
#endif
_ATEOF
cat >expout <<'_ATEOF'
libfoo1: 2
libfoo2: 3
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:144: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "need_lib_prefix.at:144"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
LDFLAGS="$LDFLAGS"
# Create our own libtool, forcing need_lib_prefix setting
sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool
LIBTOOL="$SHELL ./libtool"
# Installation directory:
instdir=`pwd`/_inst
$CC $CPPFLAGS $CFLAGS -c main.c
for file in foo1 foo2; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
done
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:163: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o foo1.la foo1.lo -rpath \$instdir/lib"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib" "need_lib_prefix.at:163"
( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:163"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:165: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o libfoo2.la foo2.lo -rpath \$instdir/lib"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib" "need_lib_prefix.at:165"
( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:165"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:167: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la \$LIBLTDL"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL" "need_lib_prefix.at:167"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:167"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:170: if \$LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:170"
( $at_check_trace; if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:170"
$at_failed && at_fn_log_failure
$at_traceon; }
# Install the libraries.
mkdir $instdir
mkdir $instdir/lib
$LIBTOOL --mode=install cp foo1.la $instdir/lib/foo1.la
$LIBTOOL --mode=install cp libfoo2.la $instdir/lib/libfoo2.la
# Install the binary
mkdir $instdir/bin
$LIBTOOL --mode=install cp main$EXEEXT $instdir/bin/main$EXEEXT
lt_exe=$instdir/bin/main; if test -f "$instdir/bin/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/need_lib_prefix.at:183: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:183"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:183"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_74
#AT_START_75
# 75. standalone.at:31: compiling softlinked libltdl
at_setup_line='standalone.at:31'
at_fn_banner 7
at_desc="compiling softlinked libltdl"
at_desc_line=" 75: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "75. standalone.at:31: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/standalone.at:33: \$LIBTOOLIZE --ltdl=.
"
at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:33"
( $at_check_trace; $LIBTOOLIZE --ltdl=.
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:33"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/standalone.at:34: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:34"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:34"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/standalone.at:35: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:35"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:35"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/standalone.at:37: test -f libltdlc.la"
at_fn_check_prepare_trace "standalone.at:37"
( $at_check_trace; test -f libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:37"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_75
#AT_START_76
# 76. standalone.at:46: compiling copied libltdl
at_setup_line='standalone.at:46'
at_fn_banner 7
at_desc="compiling copied libltdl"
at_desc_line=" 76: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "76. standalone.at:46: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/standalone.at:48: \$LIBTOOLIZE --copy --ltdl=.
"
at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:48"
( $at_check_trace; $LIBTOOLIZE --copy --ltdl=.
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:48"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/standalone.at:49: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:49"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:49"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/standalone.at:50: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:50"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:50"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/standalone.at:52: test -f libltdlc.la"
at_fn_check_prepare_trace "standalone.at:52"
( $at_check_trace; test -f libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:52"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_76
#AT_START_77
# 77. standalone.at:61: installable libltdl
at_setup_line='standalone.at:61'
at_fn_banner 7
at_desc="installable libltdl"
at_desc_line=" 77: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "77. standalone.at:61: testing ..."
$at_traceon
prefix=`pwd`/_inst
{ set +x
$as_echo "$at_srcdir/standalone.at:65: \$LIBTOOLIZE --copy --ltdl=.
"
at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:65"
( $at_check_trace; $LIBTOOLIZE --copy --ltdl=.
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/standalone.at:66: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:66"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:66"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install $tst_dist
do
{ set +x
$as_echo "$at_srcdir/standalone.at:67: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:67"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:67"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/standalone.at:69: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "standalone.at:69"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/standalone.at:70: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "standalone.at:70"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:70"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_77
#AT_START_78
# 78. standalone.at:79: linking libltdl without autotools
at_setup_line='standalone.at:79'
at_fn_banner 7
at_desc="linking libltdl without autotools"
at_desc_line=" 78: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "78. standalone.at:79: testing ..."
$at_traceon
cat >module.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
const char *
hello (void)
{
return "Hello!";
}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
#include "ltdl.h"
int
main ()
{
lt_dlhandle module;
const char *(*func) (void) = 0;
int status = 1;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0) {
fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
return 1;
}
module = lt_dlopen("./module.la");
if (!module) {
fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
goto finish;
}
func = (const char *(*)(void)) lt_dlsym (module, "hello");
if (!func) {
fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
goto finish;
}
printf ("%s\n", (*func) ());
status = 0;
finish:
if (lt_dlexit() != 0) {
fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
status = 1;
}
return status;
}
_ATEOF
cat >Makefile <<'_ATEOF'
top_builddir = .
LIBTOOL = ./libltdl/libtool
INCLUDES = -I./libltdl
MODFLAGS = -module -avoid-version -no-undefined
LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \
$(CC) $(CFLAGS) $(LDFLAGS)
TARGETS = libltdl/libltdlc.la module.la ltdldemo$(EXEEXT)
all: $(TARGETS)
libltdl/libltdlc.la: $(LIBTOOL) libltdl/Makefile
MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \
cd libltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)"
$(LIBTOOL): libltdl/Makefile
libltdl/Makefile:
cd libltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS)
ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo
$(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./libltdl/libltdlc.la
main.lo: $(LIBTOOL) main.c
$(LTCOMPILE) -c main.c
module.la: $(LIBTOOL) module.lo
$(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null
module.lo: $(LIBTOOL) module.c
$(LTCOMPILE) -c module.c
_ATEOF
cat >> Makefile <<EOF
SHELL = $SHELL
EOF
{ set +x
$as_echo "$at_srcdir/standalone.at:82: \$LIBTOOLIZE --copy --ltdl
"
at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:82"
( $at_check_trace; $LIBTOOLIZE --copy --ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:82"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/standalone.at:83: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" CONFIGURE_OPTIONS=\"\$configure_options\""
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target CC=\"$CC\" LIBTOOLFLAGS=\"$LIBTOOLFLAGS\" CPPFLAGS=\"$CPPFLAGS\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" CONFIGURE_OPTIONS=\"$configure_options\"" "standalone.at:83"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONFIGURE_OPTIONS="$configure_options"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/standalone.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "standalone.at:87"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_78
#AT_START_79
# 79. subproject.at:57: compiling softlinked libltdl
at_setup_line='subproject.at:57'
at_fn_banner 8
at_desc="compiling softlinked libltdl"
at_desc_line=" 79: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "79. subproject.at:57: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([sub/ltdl])
AC_CONFIG_AUX_DIR([sub/ltdl/config])
AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LT_WITH_LTDL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I sub/ltdl/m4
AUTOMAKE_OPTIONS = 1.9
SUBDIRS = sub/ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/subproject.at:61: \$ACLOCAL -I sub/ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:61"
( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:61: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:61"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/subproject.at:61: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "subproject.at:61"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:61: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:61"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:61: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:61"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/subproject.at:61: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:61"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/subproject.at:64: test -f sub/ltdl/libltdlc.la"
at_fn_check_prepare_trace "subproject.at:64"
( $at_check_trace; test -f sub/ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:64"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_79
#AT_START_80
# 80. subproject.at:73: compiling copied libltdl
at_setup_line='subproject.at:73'
at_fn_banner 8
at_desc="compiling copied libltdl"
at_desc_line=" 80: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "80. subproject.at:73: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([sub/ltdl])
AC_CONFIG_AUX_DIR([sub/ltdl/config])
AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LT_WITH_LTDL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I sub/ltdl/m4
AUTOMAKE_OPTIONS = 1.9
SUBDIRS = sub/ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/subproject.at:77: \$ACLOCAL -I sub/ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:77"
( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:77: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:77"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/subproject.at:77: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "subproject.at:77"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:77: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:77"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:77"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/subproject.at:77: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:77"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/subproject.at:80: test -f sub/ltdl/libltdlc.la"
at_fn_check_prepare_trace "subproject.at:80"
( $at_check_trace; test -f sub/ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:80"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_80
#AT_START_81
# 81. subproject.at:89: installable libltdl
at_setup_line='subproject.at:89'
at_fn_banner 8
at_desc="installable libltdl"
at_desc_line=" 81: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "81. subproject.at:89: testing ..."
$at_traceon
prefix=`pwd`/_inst
cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([sub/ltdl])
AC_CONFIG_AUX_DIR([sub/ltdl/config])
AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LT_WITH_LTDL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I sub/ltdl/m4
AUTOMAKE_OPTIONS = 1.9
SUBDIRS = sub/ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/subproject.at:95: \$ACLOCAL -I sub/ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:95"
( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:95: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:95"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/subproject.at:95: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "subproject.at:95"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:95: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:95"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:95: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:95"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install $tst_dist
do
{ set +x
$as_echo "$at_srcdir/subproject.at:95: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:95"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/subproject.at:99: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "subproject.at:99"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:99"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/subproject.at:100: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "subproject.at:100"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:100"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_81
#AT_START_82
# 82. subproject.at:109: linking libltdl without autotools
at_setup_line='subproject.at:109'
at_fn_banner 8
at_desc="linking libltdl without autotools"
at_desc_line=" 82: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "82. subproject.at:109: testing ..."
$at_traceon
cat >module.c <<'_ATEOF'
#ifdef __cplusplus
extern "C"
#endif
const char *
hello (void)
{
return "Hello!";
}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
#include "ltdl.h"
int
main ()
{
lt_dlhandle module;
const char *(*func) (void) = 0;
int status = 1;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit() != 0) {
fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
return 1;
}
module = lt_dlopen("./module.la");
if (!module) {
fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
goto finish;
}
func = (const char *(*)(void)) lt_dlsym (module, "hello");
if (!func) {
fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
goto finish;
}
printf ("%s\n", (*func) ());
status = 0;
finish:
if (lt_dlexit() != 0) {
fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
status = 1;
}
return status;
}
_ATEOF
cat >Makefile <<'_ATEOF'
top_builddir = .
LIBTOOL = ./sub/ltdl/libtool
INCLUDES = -I./sub/ltdl
MODFLAGS = -module -avoid-version -no-undefined
LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
$(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \
$(CC) $(CFLAGS) $(LDFLAGS)
TARGETS = sub/ltdl/libltdlc.la module.la ltdldemo$(EXEEXT)
all: $(TARGETS)
sub/ltdl/libltdlc.la: $(LIBTOOL) sub/ltdl/Makefile
MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \
cd sub/ltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)"
$(LIBTOOL): sub/ltdl/Makefile
sub/ltdl/Makefile:
cd sub/ltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS)
ltdldemo$(EXEEXT): $(LIBTOOL) module.la sub/ltdl/libltdlc.la main.lo
$(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./sub/ltdl/libltdlc.la
main.lo: $(LIBTOOL) main.c
$(LTCOMPILE) -c main.c
module.la: $(LIBTOOL) module.lo
$(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null
module.lo: $(LIBTOOL) module.c
$(LTCOMPILE) -c module.c
_ATEOF
cat >> Makefile <<EOF
SHELL = $SHELL
EOF
$LIBTOOLIZE --copy --ltdl=sub/ltdl
for target in all
do
{ set +x
$as_echo "$at_srcdir/subproject.at:113: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" SHELL=\"\$SHELL\" MAKE=\"\${MAKE-make}\" CONFIGURE_OPTIONS=\"\$configure_options\""
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:113"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" SHELL="$SHELL" MAKE="${MAKE-make}" CONFIGURE_OPTIONS="$configure_options"
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:113"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/subproject.at:117: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "subproject.at:117"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:117"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_82
#AT_START_83
# 83. nonrecursive.at:78: compiling softlinked libltdl
at_setup_line='nonrecursive.at:78'
at_fn_banner 9
at_desc="compiling softlinked libltdl"
at_desc_line=" 83: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "83. nonrecursive.at:78: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT
LTDL_INIT([nonrecursive])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.9.6
BUILT_SOURCES =
AM_CPPFLAGS =
AM_LDFLAGS =
include_HEADERS =
noinst_LTLIBRARIES =
lib_LTLIBRARIES = foo.la
EXTRA_LTLIBRARIES =
EXTRA_DIST =
CLEANFILES =
MOSTLYCLEANFILES =
include ltdl/Makefile.inc
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:83: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "nonrecursive.at:83"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
# Support vanilla autoconf-2.59 & automake-1.9.6
for file in argz.c lt__dirent.c lt__strl.c; do
cp ltdl/$file $file
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: \$ACLOCAL -I ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:90"
( $at_check_trace; $ACLOCAL -I ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:90"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:90"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "nonrecursive.at:90"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:90"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:90"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:90"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:93: test -f ltdl/libltdlc.la"
at_fn_check_prepare_trace "nonrecursive.at:93"
( $at_check_trace; test -f ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_83
#AT_START_84
# 84. nonrecursive.at:102: compiling copied libltdl
at_setup_line='nonrecursive.at:102'
at_fn_banner 9
at_desc="compiling copied libltdl"
at_desc_line=" 84: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "84. nonrecursive.at:102: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT
LTDL_INIT([nonrecursive])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.9.6
BUILT_SOURCES =
AM_CPPFLAGS =
AM_LDFLAGS =
include_HEADERS =
noinst_LTLIBRARIES =
lib_LTLIBRARIES = foo.la
EXTRA_LTLIBRARIES =
EXTRA_DIST =
CLEANFILES =
MOSTLYCLEANFILES =
include ltdl/Makefile.inc
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:107: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "nonrecursive.at:107"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:107"
$at_failed && at_fn_log_failure
$at_traceon; }
# Support vanilla autoconf-2.59 & automake-1.9.6
for file in argz.c lt__dirent.c lt__strl.c; do
cp ltdl/$file $file
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: \$ACLOCAL -I ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:114"
( $at_check_trace; $ACLOCAL -I ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:114"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:114"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "nonrecursive.at:114"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:114"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:114"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:114: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:114"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:117: test -f ltdl/libltdlc.la"
at_fn_check_prepare_trace "nonrecursive.at:117"
( $at_check_trace; test -f ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:117"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_84
#AT_START_85
# 85. nonrecursive.at:126: installable libltdl
at_setup_line='nonrecursive.at:126'
at_fn_banner 9
at_desc="installable libltdl"
at_desc_line=" 85: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "85. nonrecursive.at:126: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT
LTDL_INIT([nonrecursive])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.9.6
BUILT_SOURCES =
AM_CPPFLAGS =
AM_LDFLAGS =
include_HEADERS =
noinst_LTLIBRARIES =
lib_LTLIBRARIES = foo.la
EXTRA_LTLIBRARIES =
EXTRA_DIST =
CLEANFILES =
MOSTLYCLEANFILES =
include ltdl/Makefile.inc
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
prefix=`pwd`/_inst
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:133: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "nonrecursive.at:133"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:133"
$at_failed && at_fn_log_failure
$at_traceon; }
# Support vanilla autoconf-2.59 & automake-1.9.6
for file in argz.c lt__dirent.c lt__strl.c; do
cp ltdl/$file $file
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: \$ACLOCAL -I ltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:140"
( $at_check_trace; $ACLOCAL -I ltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:140"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOMAKE --add-missing --copy"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:140"
( $at_check_trace; $AUTOMAKE --add-missing --copy
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "nonrecursive.at:140"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:140"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:140"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install $tst_dist
do
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:140: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:140"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:143: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "nonrecursive.at:143"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:143"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/nonrecursive.at:144: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "nonrecursive.at:144"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_85
#AT_START_86
# 86. recursive.at:60: compiling softlinked libltdl
at_setup_line='recursive.at:60'
at_fn_banner 10
at_desc="compiling softlinked libltdl"
at_desc_line=" 86: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "86. recursive.at:60: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LTDL_INIT([recursive])
AC_CONFIG_FILES([Makefile ltdl/Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/recursive.at:65: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "recursive.at:65"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:67: \$AUTORECONF --force --verbose --install"
at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:67"
( $at_check_trace; $AUTORECONF --force --verbose --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:67"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/recursive.at:67: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "recursive.at:67"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:67"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:68: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:68"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:68"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/recursive.at:69: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:69"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:69"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/recursive.at:71: test -f ltdl/libltdlc.la"
at_fn_check_prepare_trace "recursive.at:71"
( $at_check_trace; test -f ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:71"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_86
#AT_START_87
# 87. recursive.at:80: compiling copied libltdl
at_setup_line='recursive.at:80'
at_fn_banner 10
at_desc="compiling copied libltdl"
at_desc_line=" 87: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "87. recursive.at:80: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LTDL_INIT([recursive])
AC_CONFIG_FILES([Makefile ltdl/Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/recursive.at:85: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "recursive.at:85"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:87: \$AUTORECONF --force --verbose --install"
at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:87"
( $at_check_trace; $AUTORECONF --force --verbose --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:87"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/recursive.at:87: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "recursive.at:87"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:88: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:88"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:88"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all $tst_dist
do
{ set +x
$as_echo "$at_srcdir/recursive.at:89: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:89"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:89"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/recursive.at:91: test -f ltdl/libltdlc.la"
at_fn_check_prepare_trace "recursive.at:91"
( $at_check_trace; test -f ltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:91"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_87
#AT_START_88
# 88. recursive.at:100: installable libltdl
at_setup_line='recursive.at:100'
at_fn_banner 10
at_desc="installable libltdl"
at_desc_line=" 88: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "88. recursive.at:100: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org)
LT_CONFIG_LTDL_DIR([ltdl])
AC_CONFIG_AUX_DIR([ltdl/config])
AC_CONFIG_MACRO_DIR([ltdl/m4])
AC_CONFIG_LIBOBJ_DIR([ltdl])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
LTDL_INIT([recursive])
AC_CONFIG_FILES([Makefile ltdl/Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
ACLOCAL_AMFLAGS = -I ltdl/m4
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = ltdl
lib_LTLIBRARIES = foo.la
foo_la_LDFLAGS = -module -avoid-version -no-undefined
foo_la_SOURCES = foo.c
_ATEOF
echo 'int dummy = 0;' > foo.c
prefix=`pwd`/_inst
$LIBTOOLIZE --copy --ltdl
{ set +x
$as_echo "$at_srcdir/recursive.at:107: if test -f ltdl/configure.ac; then false; fi"
at_fn_check_prepare_trace "recursive.at:107"
( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:107"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:109: \$AUTORECONF --force --verbose --install"
at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:109"
( $at_check_trace; $AUTORECONF --force --verbose --install
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:109"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/recursive.at:109: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "recursive.at:109"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:109"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:110: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:110"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:110"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install $tst_dist
do
{ set +x
$as_echo "$at_srcdir/recursive.at:111: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:111"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:111"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/recursive.at:113: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "recursive.at:113"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:113"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/recursive.at:114: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "recursive.at:114"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_88
#AT_START_89
# 89. template.at:27: simple template test
at_setup_line='template.at:27'
at_fn_banner 11
at_desc="simple template test"
at_desc_line=" 89: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "89. template.at:27: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/template.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:28"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:28"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:28"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:28"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >aclib.h <<'_ATEOF'
int cf(int);
_ATEOF
cat >aclib.cpp <<'_ATEOF'
#include "aclib.h"
template<typename T>
T cq(T b)
{
return b * 3;
}
int cf(int i)
{
return cq(i);
}
_ATEOF
cat >alib.h <<'_ATEOF'
int f(int);
_ATEOF
cat >alib.cpp <<'_ATEOF'
#include "alib.h"
template<typename T>
T q(T b)
{
return b * 2;
}
int f(int i)
{
return q(i);
}
_ATEOF
cat >prog.cpp <<'_ATEOF'
#include "alib.h"
#include "aclib.h"
int main()
{
return f(3) + 3 - cf(3) != 0;
}
_ATEOF
{ set +x
$as_echo "$at_srcdir/template.at:79: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o alib.lo alib.cpp"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp" "template.at:79"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:79"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:81: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o aclib.lo aclib.cpp"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp" "template.at:81"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:81"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:83: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libaclib.la aclib.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo" "template.at:83"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:85: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" "template.at:85"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:87: \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c prog.cpp"
at_fn_check_prepare_dynamic "$CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp" "template.at:87"
( $at_check_trace; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:89: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o prog\$EXEEXT prog.\$OBJEXT libalib.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la" "template.at:89"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:89"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./prog; if test -f "./prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:92"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:92"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_89
#AT_START_90
# 90. template.at:126: template test with subdirs
at_setup_line='template.at:126'
at_fn_banner 11
at_desc="template test with subdirs"
at_desc_line=" 90: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "90. template.at:126: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/template.at:127: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:127"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:127"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:127: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:127"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:127"
$at_failed && at_fn_log_failure
$at_traceon; }
noskip=:
# Mac OS X.
# The linker has issues with this test.
case $host in
*-darwin*) noskip=false ;;
esac
CPPFLAGS="$CPPFLAGS -I../src/lib -I../src/lib2"
mkdir src obj
( cd src; mkdir lib lib2 sub )
( cd obj; mkdir lib lib2 sub )
cat >src/lib/a.hh <<'_ATEOF'
template <class T>
unsigned int a(const T&);
template <class T>
unsigned int a(const T& t)
{
return sizeof t;
}
extern int a2(char t);
inline int a3(const double* t)
{
return a(t);
}
_ATEOF
cat >src/lib/a.cpp <<'_ATEOF'
#include "a.hh"
int a2(char t)
{
return a(t);
}
_ATEOF
cat >src/lib2/b.hh <<'_ATEOF'
#include "a.hh"
template <class T>
unsigned int b(T& t)
{
return a(t);
}
extern int b2(char* t);
struct bs { int bi; };
extern int b3(bs t);
_ATEOF
cat >src/lib2/b.cpp <<'_ATEOF'
#include "b.hh"
int b2(char* t)
{
return a2(t[0]);
}
int b3(bs t)
{
return b(t);
}
_ATEOF
cat >src/sub/main.cpp <<'_ATEOF'
#include "b.hh"
int main()
{
double foo;
const char s = ' ';
char d;
char *t = &d;
return b(foo) + a3(&foo) + b2(t) - a(s)
- (sizeof(double) + sizeof(double*));
}
_ATEOF
cd obj
# If the compiler supports -c -o, we want to use it:
# it may make a difference for templates
eval `$LIBTOOL --tag=CXX --config | grep ^compiler_c_o=`
case $compiler_c_o in
yes)
main_o=sub/main.$OBJEXT
{ set +x
$as_echo "$at_srcdir/template.at:220: \$CXX \$CPPFLAGS \$CXXFLAGS -c -o \$main_o ../src/sub/main.cpp"
at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp" "template.at:220"
( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:220"
$at_failed && at_fn_log_failure
$at_traceon; }
;;
*)
main_o=main.$OBJEXT
{ set +x
$as_echo "$at_srcdir/template.at:225: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:225"
( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:225"
$at_failed && at_fn_log_failure
$at_traceon; }
;;
esac
{ set +x
$as_echo "$at_srcdir/template.at:230: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" "template.at:230"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:230"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:232: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" "template.at:232"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:232"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:234: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:234"
( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:234"
$at_failed && at_fn_log_failure
$at_traceon; }
# both convenience
{ set +x
$as_echo "$at_srcdir/template.at:237: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:237"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:237"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:239: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo" "template.at:239"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:239"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:241: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:241"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:241"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:243: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != ignore && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != ignore && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:243"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != ignore && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_skip $at_status "$at_srcdir/template.at:243"
$at_failed && at_fn_log_failure
$at_traceon; }
# lib convenience
if $noskip; then
{ set +x
$as_echo "$at_srcdir/template.at:246: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" "template.at:246"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:246"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:248: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:248"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:248"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:250: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:250"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:250"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
# both installed
{ set +x
$as_echo "$at_srcdir/template.at:254: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" "template.at:254"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:254"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:256: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" "template.at:256"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:256"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:258: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:258"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:258"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:260: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:260"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:260"
$at_failed && at_fn_log_failure
$at_traceon; }
# both convenience, libb depending on liba
{ set +x
$as_echo "$at_srcdir/template.at:262: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:262"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:262"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:264: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" "template.at:264"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:264"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:266: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:266"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:266"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:268: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:268"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:268"
$at_failed && at_fn_log_failure
$at_traceon; }
# lib convenience
if $noskip; then
{ set +x
$as_echo "$at_srcdir/template.at:272: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" "template.at:272"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:272"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:274: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:274"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:274"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:276: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:276"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:276"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
# both installed
if $noskip; then
{ set +x
$as_echo "$at_srcdir/template.at:280: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" "template.at:280"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:280"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/template.at:282: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:282"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/template.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/template.at:284: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:284"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:284"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
cd ..
{ set +x
$as_echo "$at_srcdir/template.at:289: \$noskip || (exit 77)"
at_fn_check_prepare_dynamic "$noskip || (exit 77)" "template.at:289"
( $at_check_trace; $noskip || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/template.at:289"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_90
#AT_START_91
# 91. ctor.at:27: C++ static constructors
at_setup_line='ctor.at:27'
at_fn_banner 12
at_desc="C++ static constructors"
at_desc_line=" 91: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "91. ctor.at:27: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/ctor.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "ctor.at:28"
( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/ctor.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "ctor.at:28"
( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >class.h <<'_ATEOF'
#define magic 0xaabbccdd
class Foo {
public:
Foo() { bar = magic; }
unsigned bar;
};
extern Foo instance;
_ATEOF
cat >libctor.cpp <<'_ATEOF'
#include "class.h"
Foo instance;
_ATEOF
cat >main.cpp <<'_ATEOF'
#include "class.h"
int main(void)
{
return instance.bar != magic;
}
_ATEOF
{ set +x
$as_echo "$at_srcdir/ctor.at:56: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
-c libctor.cpp -o libctor.lo"
at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:56"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
-c libctor.cpp -o libctor.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:56"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/ctor.at:58: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
-c main.cpp -o main.lo"
at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:58"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
-c main.cpp -o main.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:58"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/ctor.at:60: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
libctor.lo -o libctor.la -rpath /none"
at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:60"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
libctor.lo -o libctor.la -rpath /none
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:60"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/ctor.at:62: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
main.lo libctor.la -o main\$EXEEXT"
at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:62"
( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
main.lo libctor.la -o main$EXEEXT
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:62"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/ctor.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "ctor.at:65"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_91
#AT_START_92
# 92. exceptions.at:24: C++ exception handling
at_setup_line='exceptions.at:24'
at_fn_banner 12
at_desc="C++ exception handling"
at_desc_line=" 92: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "92. exceptions.at:24: testing ..."
$at_traceon
: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
# Skip this test when called from:
# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
{ set +x
$as_echo "$at_srcdir/exceptions.at:33: case \$LIBLTDL in #(
*/_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
at_fn_check_prepare_notrace 'an embedded newline' "exceptions.at:33"
( $at_check_trace; case $LIBLTDL in #(
*/_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:33"
$at_failed && at_fn_log_failure
$at_traceon; }
CPPFLAGS="$LTDLINCL $CPPFLAGS"
cat >module.h <<'_ATEOF'
#include <exception>
#include <string>
class modexc : public std::exception {
public:
modexc (std::string str) : message (str) { }
~modexc () throw () { }
virtual const char *what () const throw ()
{
return message.c_str ();
}
private:
std::string message;
};
extern "C" int modfoo () throw (modexc);
_ATEOF
cat >module.cpp <<'_ATEOF'
#include <iostream>
#include "module.h"
int modbar (void) throw (modexc)
{
throw modexc ("exception in module");
}
extern "C"
int modfoo (void) throw (modexc)
{
try {
modbar ();
}
catch (modexc e) {
std::cerr << "caught inside module: " << e.what () << '\n';
throw modexc ("exception from module");
}
return 0;
}
_ATEOF
cat >lib.h <<'_ATEOF'
#include <exception>
#include <string>
class libexc : public std::exception {
public:
libexc (std::string str) : message (str) { }
~libexc () throw () { }
virtual const char *what () const throw ()
{
return message.c_str ();
}
private:
std::string message;
};
int libfoo () throw (libexc);
_ATEOF
cat >lib.cpp <<'_ATEOF'
#include <iostream>
#include "lib.h"
int libbar (void) throw (libexc)
{
throw libexc ("exception in library");
}
int libfoo (void) throw (libexc)
{
try {
libbar ();
}
catch (libexc e) {
std::cerr << "caught inside lib: " << e.what () << '\n';
throw libexc ("exception from library");
}
return 0;
}
_ATEOF
cat >main.cpp <<'_ATEOF'
#include <ltdl.h>
#include <cstdlib>
#include <iostream>
#include <exception>
#include <string>
#include "lib.h"
#include "module.h"
class exc : public std::exception {
public:
exc (std::string str) : message (str) { }
~exc () throw () { }
virtual const char *what () const throw ()
{
return message.c_str ();
}
private:
std::string message;
};
int foo (void) throw (exc)
{
throw exc ("exception in program");
return 0;
}
int exceptions_in_prog (void)
{
std::cerr << "exceptions_in_prog\n";
try {
foo ();
}
catch (exc e) {
std::cerr << "caught: " << e.what () << '\n';
return 0;
}
return 1;
}
int exceptions_in_lib (void)
{
std::cerr << "exceptions_in_lib\n";
try {
libfoo ();
}
catch (libexc e) {
std::cerr << "caught: " << e.what () << '\n';
return 0;
}
return 1;
}
int exceptions_in_module (void)
{
std::cerr << "exceptions_in_module\n";
if (lt_dlinit ())
{
std::cerr << "init error: " << lt_dlerror () << '\n';
return 1;
}
// Some systems need RTLD_GLOBAL for exceptions to work in modules.
lt_dladvise advise;
if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise))
{
std::cerr << "error setting advise global\n";
return 1;
}
lt_dlhandle handle = lt_dlopenadvise ("module.la", advise);
if (handle == NULL)
{
std::cerr << "dlopen failed: " << lt_dlerror () << '\n';
return 1;
}
lt_dladvise_destroy (&advise);
typedef int (*pfun) (void);
pfun pf = (pfun) lt_dlsym (handle, "modfoo");
if (pf == NULL)
{
std::cerr << "dlsym failed: " << lt_dlerror () << '\n';
return 1;
}
try {
(*pf) ();
}
catch (modexc e) {
std::cerr << "caught: " << e.what () << '\n';
if (lt_dlclose (handle))
{
std::cerr << "dlclose failed: " << lt_dlerror () << '\n';
return 1;
}
if (lt_dlexit ())
{
std::cerr << "lt_dlexit failed: " << lt_dlerror () << '\n';
return 1;
}
return 0;
}
return 1;
}
int main (void)
{
if (exceptions_in_prog ())
return 1;
if (exceptions_in_lib ())
return 1;
if (exceptions_in_module ())
return 1;
return 0;
}
_ATEOF
inst=`pwd`/inst
libdir=$inst/lib
bindir=$inst/bin
moddir=$inst/mod
mkdir l m $inst $libdir $bindir $moddir
# If the C++ compiler isn't capable, don't bother.
{ set +x
$as_echo "$at_srcdir/exceptions.at:244: \$CXX \$CPPFLAGS \$CXXFLAGS -c main.cpp || exit 77"
at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c main.cpp || exit 77" "exceptions.at:244"
( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c main.cpp || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:244"
$at_failed && at_fn_log_failure
$at_traceon; }
for file in lib.cpp module.cpp; do
{ set +x
$as_echo "$at_srcdir/exceptions.at:247: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c \$file"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c $file" "exceptions.at:247"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c $file
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:247"
$at_failed && at_fn_log_failure
$at_traceon; }
done
{ set +x
$as_echo "$at_srcdir/exceptions.at:250: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:250"
( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:250"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/exceptions.at:253: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath \$moddir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath $moddir" "exceptions.at:253"
( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath $moddir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:253"
$at_failed && at_fn_log_failure
$at_traceon; }
# We need -export-dynamic for the exception handling in modules to work.
{ set +x
$as_echo "$at_srcdir/exceptions.at:258: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT l/liba.la -dlopen m/module.la \$LIBLTDL -export-dynamic"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la -dlopen m/module.la $LIBLTDL -export-dynamic" "exceptions.at:258"
( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la -dlopen m/module.la $LIBLTDL -export-dynamic
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:258"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/exceptions.at:262: if \$LIBTOOL --mode=execute -dlopen m/module.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen m/module.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:262"
( $at_check_trace; if $LIBTOOL --mode=execute -dlopen m/module.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:262"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/exceptions.at:264: \$LIBTOOL --mode=install cp l/liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/liba.la $libdir" "exceptions.at:264"
( $at_check_trace; $LIBTOOL --mode=install cp l/liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:264"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/exceptions.at:266: \$LIBTOOL --mode=install cp m/module.la \$moddir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m/module.la $moddir" "exceptions.at:266"
( $at_check_trace; $LIBTOOL --mode=install cp m/module.la $moddir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:266"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/exceptions.at:268: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "exceptions.at:268"
( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:268"
$at_failed && at_fn_log_failure
$at_traceon; }
rm -rf l m main$EXEEXT
LTDL_LIBRARY_PATH=$moddir
export LTDL_LIBRARY_PATH
lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/exceptions.at:274: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:274"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:274"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_92
#AT_START_93
# 93. early-libtool.at:32: config.status
at_setup_line='early-libtool.at:32'
at_fn_banner 13
at_desc="config.status"
at_desc_line=" 93: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "93. early-libtool.at:32: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtool-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.in <<'_ATEOF'
prefix = @prefix@
libdir = @libdir@
top_builddir = .
SHELL = @SHELL@
DEFAULT_INCLUDES = -I. -I@srcdir@
EXEEXT = @EXEEXT@
LIBTOOL = @LIBTOOL@
OBJEXT = @OBJEXT@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
all: hell$(EXEEXT)
libhello.la: hello.lo
$(LINK) -rpath $(libdir) hello.lo
hell$(EXEEXT): main.$(OBJEXT) libhello.la
$(LINK) main.$(OBJEXT) libhello.la
.SUFFIXES:
.SUFFIXES: .c .$(OBJEXT) .lo
.c.$(OBJEXT):
$(COMPILE) -c $<
.c.lo:
$(LTCOMPILE) -c -o $@ $<
_ATEOF
cat >hello.c <<'_ATEOF'
#include <stdio.h>
void
hello (void)
{
printf ("** This is not GNU Hello. There is no built-in mail reader. **\n");
}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
extern void hello (void);
int
main (void)
{
printf ("Welcome to GNU Hell!\n");
hello ();
return 0;
}
_ATEOF
cat > missing <<_EOF
#! /bin/sh
exit 0
_EOF
chmod a+x missing
$LIBTOOLIZE --copy --verbose --install
{ set +x
$as_echo "$at_srcdir/early-libtool.at:109: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:109"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:109"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:110: \$AUTOCONF --force"
at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:110"
( $at_check_trace; $AUTOCONF --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:110"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:111: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:111"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:111"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/early-libtool.at:112: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:112"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:112"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/early-libtool.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:114"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:114"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:115: grep 'Welcome to GNU Hell' stdout"
at_fn_check_prepare_trace "early-libtool.at:115"
( $at_check_trace; grep 'Welcome to GNU Hell' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:115"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:116: grep 'This is not GNU Hello.' stdout"
at_fn_check_prepare_trace "early-libtool.at:116"
( $at_check_trace; grep 'This is not GNU Hello.' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:116"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_93
#AT_START_94
# 94. early-libtool.at:126: config.lt
at_setup_line='early-libtool.at:126'
at_fn_banner 13
at_desc="config.lt"
at_desc_line=" 94: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "94. early-libtool.at:126: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT([libtool-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
LT_OUTPUT
cat >hello.c <<\_EOF
#include <stdio.h>
void
hello (void)
{
printf ("** This is not GNU Hello. There is no built-in mail reader. **\n");
}
_EOF
# Prove that we can run libtool from inside configure:
$SHELL ./libtool --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS \
-I. -I$srcdir -c -o hello.lo hello.c || exit 1
$SHELL ./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS \
-o libhello.la -rpath /notexist hello.lo || exit 1
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.in <<'_ATEOF'
prefix = @prefix@
libdir = @libdir@
top_builddir = .
SHELL = @SHELL@
DEFAULT_INCLUDES = -I. -I@srcdir@
EXEEXT = @EXEEXT@
LIBTOOL = @LIBTOOL@
OBJEXT = @OBJEXT@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
all: hell$(EXEEXT)
hell$(EXEEXT): main.$(OBJEXT) libhello.la
$(LINK) main.$(OBJEXT) libhello.la
.SUFFIXES:
.SUFFIXES: .c .$(OBJEXT)
.c.$(OBJEXT):
$(COMPILE) -c $<
_ATEOF
cat >hello.c <<'_ATEOF'
#include <stdio.h>
void
hello (void)
{
printf ("** This is not GNU Hello. There is no built-in mail reader. **\n");
}
_ATEOF
cat >main.c <<'_ATEOF'
#include <stdio.h>
extern void hello (void);
int
main (int argc, char *argv[])
{
printf ("Welcome to GNU Hell!\n");
hello ();
return 0;
}
_ATEOF
cat > missing <<_EOF
#! /bin/sh
exit 0
_EOF
chmod a+x missing
$LIBTOOLIZE --copy --verbose --install
{ set +x
$as_echo "$at_srcdir/early-libtool.at:216: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:216"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:216"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:217: \$AUTOCONF --force"
at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:217"
( $at_check_trace; $AUTOCONF --force
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:217"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:218: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:218"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:218"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/early-libtool.at:219: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:219"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:219"
$at_failed && at_fn_log_failure
$at_traceon; }
done
lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/early-libtool.at:221: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:221"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:221"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:222: grep 'Welcome to GNU Hell' stdout"
at_fn_check_prepare_trace "early-libtool.at:222"
( $at_check_trace; grep 'Welcome to GNU Hell' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:222"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/early-libtool.at:223: grep 'This is not GNU Hello.' stdout"
at_fn_check_prepare_trace "early-libtool.at:223"
( $at_check_trace; grep 'This is not GNU Hello.' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:223"
$at_failed && at_fn_log_failure
$at_traceon; }
# Make sure config.status --recheck updates the libtool script
rm libtool
{ set +x
$as_echo "$at_srcdir/early-libtool.at:227: \$SHELL ./config.status --recheck"
at_fn_check_prepare_dynamic "$SHELL ./config.status --recheck" "early-libtool.at:227"
( $at_check_trace; $SHELL ./config.status --recheck
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_94
#AT_START_95
# 95. no-executables.at:26: AC_NO_EXECUTABLES
at_setup_line='no-executables.at:26'
at_fn_banner 14
at_desc="AC_NO_EXECUTABLES"
at_desc_line=" 95: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "95. no-executables.at:26: testing ..."
$at_traceon
mkdir m4
cat >configure.ac <<'_ATEOF'
AC_INIT([no-exec], [1])
AC_CONFIG_MACRO_DIR([m4])
# We punt a bit here, to get the results of AC_PROG_CC
# (and allow it to do link tests) but still error out on
# link tests within Libtool macros.
LDFLAGS=-lnosuchlibrary
AC_NO_EXECUTABLES
AC_PROG_CC
AC_PROG_CXX
AC_PROG_F77
AC_PROG_FC
AM_PROG_GCJ
# Consequently, we have to set cache variables for each link
# test we may need. For the purposes of this test, it shouldn't
# matter much whether these values are actually wrong, the point
# is that the linker should never be invoked.
lt_cv_shlibpath_overrides_runpath=no
lt_cv_archive_cmds_need_lc=no
lt_cv_cc_needs_belf=no
lt_cv_ld_exported_symbols_list=no
lt_cv_prog_compiler_static_works=no
# Deal with AC_LIBTOOL_DLOPEN in one of two possible ways:
# - do not execute it at all in the ac_no_link case
# - preset the individual Autoconf test variables
if ${test_ac_libtool_dlopen-false}; then
ac_cv_func_shl_load=no
ac_cv_lib_dld_shl_load=no
ac_cv_func_dlopen=no
ac_cv_lib_dl_dlopen=no
ac_cv_lib_svld_dlopen=no
ac_cv_lib_dld_dld_link=no
AC_LIBTOOL_DLOPEN
fi
AC_PROG_LIBTOOL
AC_OUTPUT
_ATEOF
$LIBTOOLIZE --install
{ set +x
$as_echo "$at_srcdir/no-executables.at:74: \$ACLOCAL -I m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "no-executables.at:74"
( $at_check_trace; $ACLOCAL -I m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:74"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/no-executables.at:74: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "no-executables.at:74"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:74"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/no-executables.at:75: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:75"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/no-executables.at:76: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options test_ac_libtool_dlopen=:"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:76"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options test_ac_libtool_dlopen=:
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:76"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_95
#AT_START_96
# 96. deplibs-ident.at:32: build tree relpaths
at_setup_line='deplibs-ident.at:32'
at_fn_banner 15
at_desc="build tree relpaths"
at_desc_line=" 96: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
case $host in
*-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;;
*):;;
esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "96. deplibs-ident.at:32: testing ..."
$at_traceon
mkdir a a/b c
echo 'int c() { return 0; }' > c/libcee.c
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c c/libcee.c -o c/libcee.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo" "deplibs-ident.at:37"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:37"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:39: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" "deplibs-ident.at:39"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:39"
$at_failed && at_fn_log_failure
$at_traceon; }
depl_1=../c/libcee.la
depl_2=`pwd`/c/libcee.la
depl_3="-L../c -lcee"
(
cd a
for i in 1 2 3; do
eval depend_on_c=\"\$depl_$i\"
echo "extern int c(void); int a$i() { return c(); }" > liba$i.c
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:51: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba\$i.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c" "deplibs-ident.at:51"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:51"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba\$i.la liba\$i.lo \$depend_on_c -rpath /nowhere"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere" "deplibs-ident.at:53"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:53"
$at_failed && at_fn_log_failure
$at_traceon; }
done
)
cat >a/b/b.c <<'_ATEOF'
extern int a1(void), a2(void), a3(void), c(void);
int main() { return a1() + a2() + a3() + c(); }
_ATEOF
(
cd a/b
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:65: \$CC \$CFLAGS -c b.c"
at_fn_check_prepare_dynamic "$CC $CFLAGS -c b.c" "deplibs-ident.at:65"
( $at_check_trace; $CC $CFLAGS -c b.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:65"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:66: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o b\$EXEEXT b.\$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" "deplibs-ident.at:66"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:66"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-ident.at:68: \$EGREP 'cee.*cee' stdout"
at_fn_check_prepare_dynamic "$EGREP 'cee.*cee' stdout" "deplibs-ident.at:68"
( $at_check_trace; $EGREP 'cee.*cee' stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/deplibs-ident.at:68"
$at_failed && at_fn_log_failure
$at_traceon; }
)
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_96
#AT_START_97
# 97. configure-iface.at:102: installable libltdl
at_setup_line='configure-iface.at:102'
at_fn_banner 16
at_desc="installable libltdl"
at_desc_line=" 97: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "97. configure-iface.at:102: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
typedef int funcp (void);
static int errors = 0;
int
main (void)
{
lt_dlhandle handle;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit () != 0)
{
fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
return 1;
}
handle = lt_dlopenext ("libmodule");
if (!handle)
{
fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
++errors;
}
{
funcp *f = (funcp *) lt_dlsym (handle, "f");
if (f)
{
printf ("%d\n", f ());
}
else
{
fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
++errors;
}
}
if (lt_dlexit () != 0)
{
fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
++errors;
}
return (errors != 0);
}
_ATEOF
cat >libmodule.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f (void) { return 5150; }
#ifdef __cplusplus
}
#endif
_ATEOF
cat >expout <<'_ATEOF'
5150
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
cat >configure.ac <<'_ATEOF'
AC_INIT([installable-ltdl-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([libltdl/config])
AC_CONFIG_MACRO_DIR([libltdl/m4])
AC_CONFIG_HEADERS([config.h:config.hin])
LT_CONFIG_LTDL_DIR([libltdl])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT([dlopen])
LTDL_INIT([installable])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = libltdl
AM_CPPFLAGS = $(LTDLINCL)
lib_LTLIBRARIES = libmodule.la
# Automake < 1.8 will use libmodule.la.c as default source,
# while newer will choose libmodule.c; so specify it here.
libmodule_la_SOURCES = libmodule.c
libmodule_la_LDFLAGS = -module
bin_PROGRAMS = main
main_LDFLAGS = -dlopen libmodule.la
main_LDADD = $(LIBLTDL)
main_DEPENDENCIES = $(LTDLDEPS) libmodule.la
_ATEOF
# Install everything!
prefix=`pwd`/_inst
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: \$ACLOCAL -I libltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:144"
( $at_check_trace; $ACLOCAL -I libltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:144"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOMAKE --add-missing"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:144"
( $at_check_trace; $AUTOMAKE --add-missing
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "configure-iface.at:144"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:144"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:144"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install
do
{ set +x
$as_echo "$at_srcdir/configure-iface.at:144: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:144"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# TODO: Check that the installed program `main' is linked against our libltdl
{ set +x
$as_echo "$at_srcdir/configure-iface.at:148: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:148"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:149: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:149"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:149"
$at_failed && at_fn_log_failure
$at_traceon; }
# Check that main is rebuilt if libltdl.la is newer
rm -f libltdl/libltdl.la
{ set +x
$as_echo "$at_srcdir/configure-iface.at:153: \$MAKE -q main\$EXEEXT || exit 1"
at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:153"
( $at_check_trace; $MAKE -q main$EXEEXT || exit 1
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:153"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_97
#AT_START_98
# 98. configure-iface.at:162: --with-ltdl-include/lib
at_setup_line='configure-iface.at:162'
at_fn_banner 16
at_desc="--with-ltdl-include/lib"
at_desc_line=" 98: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "98. configure-iface.at:162: testing ..."
$at_traceon
# Install libltdl
prefix=`pwd`/_inst
$LIBTOOLIZE --copy --ltdl=ltdl
(cd ltdl
{ set +x
$as_echo "$at_srcdir/configure-iface.at:171: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:171"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:171"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all install
do
{ set +x
$as_echo "$at_srcdir/configure-iface.at:172: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:172"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:172"
$at_failed && at_fn_log_failure
$at_traceon; }
done
)
# Remove build files
rm -rf ltdl/
{ set +x
$as_echo "$at_srcdir/configure-iface.at:178: test -f \$prefix/lib/libltdl.la"
at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:178"
( $at_check_trace; test -f $prefix/lib/libltdl.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:178"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:179: test -f \$prefix/include/ltdl.h"
at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:179"
( $at_check_trace; test -f $prefix/include/ltdl.h
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:179"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
typedef int funcp (void);
static int errors = 0;
int
main (void)
{
lt_dlhandle handle;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit () != 0)
{
fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
return 1;
}
handle = lt_dlopenext ("libmodule");
if (!handle)
{
fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
++errors;
}
{
funcp *f = (funcp *) lt_dlsym (handle, "f");
if (f)
{
printf ("%d\n", f ());
}
else
{
fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
++errors;
}
}
if (lt_dlexit () != 0)
{
fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
++errors;
}
return (errors != 0);
}
_ATEOF
cat >libmodule.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f (void) { return 5150; }
#ifdef __cplusplus
}
#endif
_ATEOF
cat >expout <<'_ATEOF'
5150
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
cat >configure.ac <<'_ATEOF'
AC_INIT([configure-iface-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_MACRO_DIR([_inst/aclocal])
AC_CONFIG_HEADERS([config.h:config.hin])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT([dlopen])
LTDL_INIT
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
AUTOMAKE_OPTIONS = 1.7
AM_CPPFLAGS = $(LTDLINCL)
lib_LTLIBRARIES = libmodule.la
# Automake < 1.8 will use libmodule.la.c as default source,
# while newer will choose libmodule.c; so specify it here.
libmodule_la_SOURCES = libmodule.c
libmodule_la_LDFLAGS = -module
bin_PROGRAMS = main
main_LDFLAGS = -dlopen libmodule.la
main_LDADD = $(LIBLTDL)
main_DEPENDENCIES = $(LTDLDEPS) libmodule.la
_ATEOF
## Try to avoid linking against a previously installed libltdl found
## with an explicit -L/path.
save_LDFLAGS=$LDFLAGS
LDFLAGS=
for l in $save_LDFLAGS
do
case $l in
-L*) ;;
*) LDFLAGS="$LDFLAGS $l" ;;
esac
done
# We don't use 'libtoolize --ltdl', so that we get an error if the test
# tries to build and link against its own ltdl sources:
$LIBTOOLIZE
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: \$ACLOCAL -I _inst/aclocal"
at_fn_check_prepare_dynamic "$ACLOCAL -I _inst/aclocal" "configure-iface.at:227"
( $at_check_trace; $ACLOCAL -I _inst/aclocal
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:227"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOMAKE --add-missing"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:227"
( $at_check_trace; $AUTOMAKE --add-missing
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "configure-iface.at:227"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:227"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-ltdl-lib=\$prefix/lib --with-ltdl-include=\$prefix/include"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:227"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/configure-iface.at:227: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:227"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
done
## TODO: portable ldd check for correct libltdl
## Currently, this test doesn't fail if `main' ends up linking against a
## previously installed system libltdl.
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/configure-iface.at:234: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:234"
( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:234"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_98
#AT_START_99
# 99. configure-iface.at:243: --with-included-ltdl
at_setup_line='configure-iface.at:243'
at_fn_banner 16
at_desc="--with-included-ltdl"
at_desc_line=" 99: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOHEADER" = no && at_xfail=yes
test "$AUTOMAKE" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "99. configure-iface.at:243: testing ..."
$at_traceon
cat >main.c <<'_ATEOF'
#include <ltdl.h>
#include <stdio.h>
typedef int funcp (void);
static int errors = 0;
int
main (void)
{
lt_dlhandle handle;
LTDL_SET_PRELOADED_SYMBOLS();
if (lt_dlinit () != 0)
{
fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
return 1;
}
handle = lt_dlopenext ("libmodule");
if (!handle)
{
fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
++errors;
}
{
funcp *f = (funcp *) lt_dlsym (handle, "f");
if (f)
{
printf ("%d\n", f ());
}
else
{
fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
++errors;
}
}
if (lt_dlexit () != 0)
{
fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
++errors;
}
return (errors != 0);
}
_ATEOF
cat >libmodule.c <<'_ATEOF'
#ifdef __cplusplus
extern "C" {
#endif
int f (void) { return 5150; }
#ifdef __cplusplus
}
#endif
_ATEOF
cat >expout <<'_ATEOF'
5150
_ATEOF
case $host_os in mingw*)
while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
mv -f expout.t expout ;;
esac
cat >configure.ac <<'_ATEOF'
AC_INIT([configure-iface-demo], 2.2.10, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([libltdl/config])
AC_CONFIG_MACRO_DIR([libltdl/m4])
AC_CONFIG_HEADERS([config.h:config.hin])
LT_CONFIG_LTDL_DIR([libltdl])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AM_PROG_CC_C_O
LT_INIT([dlopen])
LTDL_INIT
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
_ATEOF
cat >Makefile.am <<'_ATEOF'
AUTOMAKE_OPTIONS = 1.7
SUBDIRS = libltdl
AM_CPPFLAGS = $(LTDLINCL)
lib_LTLIBRARIES = libmodule.la
# Automake < 1.8 will use libmodule.la.c as default source,
# while newer will choose libmodule.c; so specify it here.
libmodule_la_SOURCES = libmodule.c
libmodule_la_LDFLAGS = -module
bin_PROGRAMS = main
main_LDFLAGS = -dlopen libmodule.la
main_LDADD = $(LIBLTDL)
main_DEPENDENCIES = $(LTDLDEPS) libmodule.la
_ATEOF
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: \$ACLOCAL -I libltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:282"
( $at_check_trace; $ACLOCAL -I libltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOHEADER "
at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:282"
( $at_check_trace; $AUTOHEADER
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOMAKE --add-missing"
at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:282"
( $at_check_trace; $AUTOMAKE --add-missing
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
if $at_failed; then :
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: grep 'require .*but have' stderr && (exit 77)"
at_fn_check_prepare_trace "configure-iface.at:282"
( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
fi
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:282"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl"
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:282"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
for target in all
do
{ set +x
$as_echo "$at_srcdir/configure-iface.at:282: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:282"
( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# --with-included-ltdl should build a convenience lib by default
{ set +x
$as_echo "$at_srcdir/configure-iface.at:286: test -f libltdl/libltdlc.la"
at_fn_check_prepare_trace "configure-iface.at:286"
( $at_check_trace; test -f libltdl/libltdlc.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:286"
$at_failed && at_fn_log_failure
$at_traceon; }
## TODO: portable ldd check for correct libltdl
## Currently, this test doesn't fail if `main' ends up linking against a
## previously installed system libltdl.
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/configure-iface.at:291: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:291"
( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:291"
$at_failed && at_fn_log_failure
$at_traceon; }
# Check that main is rebuilt if libltdlc.la is newer
rm -f libltdl/libltdlc.la
{ set +x
$as_echo "$at_srcdir/configure-iface.at:295: \$MAKE -q main\$EXEEXT || exit 1"
at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:295"
( $at_check_trace; $MAKE -q main$EXEEXT || exit 1
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:295"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_99
#AT_START_100
# 100. configure-iface.at:304: convenience libltdl
at_setup_line='configure-iface.at:304'
at_fn_banner 16
at_desc="convenience libltdl"
at_desc_line="100: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
test "$ACLOCAL" = no && at_xfail=yes
test "$AUTOCONF" = no && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "100. configure-iface.at:304: testing ..."
$at_traceon
cat >configure.ac <<'_ATEOF'
AC_INIT
AC_CONFIG_AUX_DIR([libltdl/config])
AC_LIBLTDL_CONVENIENCE
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
_ATEOF
cat >Makefile.in <<'_ATEOF'
LIBLTDL = @LIBLTDL@
print-ltdl:
echo $(LIBLTDL)
_ATEOF
$LIBTOOLIZE --ltdl
{ set +x
$as_echo "$at_srcdir/configure-iface.at:321: \$ACLOCAL -I libltdl/m4"
at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:321"
( $at_check_trace; $ACLOCAL -I libltdl/m4
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:321: \$AUTOCONF "
at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:321"
( $at_check_trace; $AUTOCONF
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:321: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options "
at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:321"
( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:322: \$MAKE print-ltdl"
at_fn_check_prepare_dynamic "$MAKE print-ltdl" "configure-iface.at:322"
( $at_check_trace; $MAKE print-ltdl
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:322"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/configure-iface.at:323: grep libltdl/libltdlc.la stdout"
at_fn_check_prepare_trace "configure-iface.at:323"
( $at_check_trace; grep libltdl/libltdlc.la stdout
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:323"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_100
#AT_START_101
# 101. stresstest.at:31: Link option thorough search test
at_setup_line='stresstest.at:31'
at_fn_banner 17
at_desc="Link option thorough search test"
at_desc_line="101: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "101. stresstest.at:31: testing ..."
$at_traceon
eval `$LIBTOOL --config | $EGREP '^(CC|objdir|allow_undefined_flag)='`
mkdir sub sub2 sub3 2>/dev/null
cat >a.c <<'_ATEOF'
/* all kinds of data items */
#ifdef __cplusplus
extern "C" {
#endif
int v1;
static int v2;
int v3 = 0;
int v4 = 1;
extern const int v5, v6;
extern const char *v7;
extern const char v8[];
extern int (*const v12) (void);
const int v5 = 0;
const int v6 = 1;
const char* v7 = "\01foo";
const char v8[] = "\01bar";
int v9(void) { return v2 + 1; }
int (*v10) (void);
int (*v11) (void) = v9;
int (*const v12) (void) = v9;
typedef struct { int arr[1000]; } large;
large v13;
large v14 = { { 0 } };
large v15 = { { 1 } };
#ifdef __cplusplus
}
#endif
_ATEOF
cat >asyms <<'_ATEOF'
v1
v3
v4
v5
v6
v7
v8
v9
v10
v11
v12
v13
v14
v15
_ATEOF
cat >b.c <<'_ATEOF'
int b = 42;
int b3 = 1;
int ab = 1;
_ATEOF
cat >main.c <<'_ATEOF'
#if defined(LIBA_DLL_IMPORT)
# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
# define LIBA_SCOPE extern __declspec(dllimport)
# endif
#endif
#if !defined(LIBA_SCOPE)
# define LIBA_SCOPE extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int v1;
extern int v3, v4;
LIBA_SCOPE const int v5, v6;
extern const char* v7;
extern const char v8[];
extern int v9(void);
extern int (*v10) (void);
extern int (*v11) (void);
LIBA_SCOPE int (*const v12) (void);
#ifdef __cplusplus
}
#endif
typedef struct { int arr[1000]; } large;
extern large v13, v14, v15;
int main(void)
{
char s = v7[0] + v8[0];
return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
+ v13.arr[0] + v14.arr[0] + v15.arr[0]
- 8;
}
_ATEOF
cat >dlself.c <<'_ATEOF'
#if defined(LIBA_DLL_IMPORT)
# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
# define LIBA_SCOPE extern __declspec(dllimport)
# endif
#endif
#if !defined(LIBA_SCOPE)
# define LIBA_SCOPE extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int v1;
extern int v3, v4;
LIBA_SCOPE const int v5, v6;
extern const char* v7;
extern const char v8[];
extern int v9(void);
extern int (*v10) (void);
extern int (*v11) (void);
LIBA_SCOPE int (*const v12) (void);
typedef struct { int arr[1000]; } large;
extern large v13, v14, v15;
extern int w1;
extern int w3, w4;
extern const int w5, w6;
extern const char* w7;
extern const char w8[];
extern int w9(void);
extern int (*w10) (void);
extern int (*w11) (void);
extern int (*const w12) (void);
extern large w13, w14, w15;
#ifdef __cplusplus
}
#endif
int main(void)
{
char s = v7[0] + v8[0] + w7[0] + w8[0];
return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
+ v13.arr[0] + v14.arr[0] + v15.arr[0]
+ w1 + w3 + w4 + w5 + w6 + w9() + w11() + w12()
+ w13.arr[0] + w14.arr[0] + w15.arr[0]
- 16;
}
#ifdef __cplusplus
extern "C" {
#endif
int w1;
static int w2;
int w3 = 0;
int w4 = 1;
const int w5 = 0;
const int w6 = 1;
const char* w7 = "\01foo";
const char w8[] = "\01bar";
int w9(void) { return w2 + 1; }
int (*w10) (void);
int (*w11) (void) = w9;
int (*const w12) (void) = w9;
large w13;
large w14 = { { 0 } };
large w15 = { { 1 } };
#ifdef __cplusplus
}
#endif
_ATEOF
cat >dlselfsyms <<'_ATEOF'
w1
w3
w4
w5
w6
w7
w8
w9
w10
w11
w12
w13
w14
w15
_ATEOF
{ set +x
$as_echo "$at_srcdir/stresstest.at:221: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c -o sub/a.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo" "stresstest.at:221"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:221"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/stresstest.at:223: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c -o sub/b.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo" "stresstest.at:223"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:223"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/stresstest.at:225: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "stresstest.at:225"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:225"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/stresstest.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c -o main-static.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo" "stresstest.at:227"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:227"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/stresstest.at:229: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c dlself.c -o sub3/dlself.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo" "stresstest.at:229"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:229"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/stresstest.at:231: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c dlself.c -o sub3/dlself-static.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo" "stresstest.at:231"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:231"
$at_failed && at_fn_log_failure
$at_traceon; }
case $allow_undefined_flag in
unsupported) undef_opts=-no-undefined ;;
*) undef_opts='"" -no-undefined' ;;
esac
# expose problems with the regex:
touch vfoo v.bar
for l1 in $undef_opts
do
for l2 in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'
do
for l3 in '' '-rpath /nonexistent'
do
linkargs="$l1 $l2 $l3"
for rel in '' ./ `pwd`/
do
echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs"; { set +x
$as_echo "$at_srcdir/stresstest.at:251: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o \"\$rel\"sub2/liba.la \"\$rel\"sub/a.lo' \$linkargs"
at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs" "stresstest.at:251"
( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:251"
$at_failed && at_fn_log_failure
$at_traceon; }
for st in '' '-static' '-no-install'
do
case $st,$l3 in
,-rpath*) mst= ;;
*) mst=-static ;;
esac
echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la"; { set +x
$as_echo "$at_srcdir/stresstest.at:260: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"main\$EXEEXT \"\$rel\"main\$mst.lo \"\$rel\"sub2/liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la" "stresstest.at:260"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:260"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/stresstest.at:262: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:262"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:262"
$at_failed && at_fn_log_failure
$at_traceon; }
for l10 in '' '-export-symbols dlselfsyms'
do
echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10"; { set +x
$as_echo "$at_srcdir/stresstest.at:265: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"sub3/dlself\$EXEEXT \"\$rel\"sub3/dlself\$mst.lo \"\$rel\"sub2/liba.la sub/b.lo -dlopen self \$l10"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10" "stresstest.at:265"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:265"
$at_failed && at_fn_log_failure
$at_traceon; }
lt_exe=./sub3/dlself; if test -f "./sub3/dlself$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
{ set +x
$as_echo "$at_srcdir/stresstest.at:267: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi"
at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:267"
( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:267"
$at_failed && at_fn_log_failure
$at_traceon; }
done
done
done
done
done
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_101
#AT_START_102
# 102. cmdline_wrap.at:28: Run tests with low max_cmd_len
at_setup_line='cmdline_wrap.at:28'
at_fn_banner 17
at_desc="Run tests with low max_cmd_len"
at_desc_line="102: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "102. cmdline_wrap.at:28: testing ..."
$at_traceon
sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool
chmod +x libtool
LIBTOOL=`pwd`/libtool
export LIBTOOL
# run the suite in a subdirectory, otherwise the two suites will compete
# for the output file `testsuite.log'.
mkdir tests
cd tests
INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \
abs_builddir=$abs_builddir"
{ set +x
$as_echo "$at_srcdir/cmdline_wrap.at:43: \$CONFIG_SHELL \$abs_srcdir/testsuite -k libtool\$INNER_TESTSUITEFLAGS"
at_fn_check_prepare_dynamic "$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS" "cmdline_wrap.at:43"
( $at_check_trace; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/cmdline_wrap.at:43"
$at_failed && at_fn_log_failure \
"testsuite.log"
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_102
#AT_START_103
# 103. darwin.at:26: darwin fat compile
at_setup_line='darwin.at:26'
at_fn_banner 18
at_desc="darwin fat compile"
at_desc_line="103: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "103. darwin.at:26: testing ..."
$at_traceon
noskip=:
case "$host_os" in
darwin*) ;;
*) noskip=false ;;
esac
cat >simple.c <<'_ATEOF'
int main() { return 0;}
_ATEOF
$noskip && {
$CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false
rm -f simple
}
{ set +x
$as_echo "$at_srcdir/darwin.at:42: \$noskip || (exit 77)"
at_fn_check_prepare_dynamic "$noskip || (exit 77)" "darwin.at:42"
( $at_check_trace; $noskip || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
at_fn_diff_devnull "$at_stdout" || at_failed=:
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:42"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >foo.c <<'_ATEOF'
int x=0;
_ATEOF
cat >baz.c <<'_ATEOF'
int y=0;
_ATEOF
cat >bar.c <<'_ATEOF'
extern int x;
int bar(void);
int bar() { return x;}
_ATEOF
cat >main.c <<'_ATEOF'
extern int x;
extern int y;
int main() {
return x+y;
}
_ATEOF
mkdir bin
cat >bin/basename <<'_ATEOF'
#! /bin/sh
usage="usage: $0 argument"
if test $# != 1; then
echo $usage >&2
exit 1
fi
echo $1 | sed "s,^.*/,,"
_ATEOF
chmod +x bin/basename
save_PATH=$PATH
PATH=`pwd`/bin:$PATH
export PATH
{ set +x
$as_echo "$at_srcdir/darwin.at:85: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 foo.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c" "darwin.at:85"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:85"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:87: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 baz.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c" "darwin.at:87"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:87"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:89: \$LIBTOOL --mode=link --tag=CC \$CC -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 foo.lo baz.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" "darwin.at:89"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:89"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:91: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 bar.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c" "darwin.at:91"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:91"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:93: \$LIBTOOL --mode=link --tag=CC \$CC -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" "darwin.at:93"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:93"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:95: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 main.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c" "darwin.at:95"
( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:95"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:97: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 main.lo libbar.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la" "darwin.at:97"
( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:97"
$at_failed && at_fn_log_failure
$at_traceon; }
PATH=$save_PATH
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_103
#AT_START_104
# 104. darwin.at:103: darwin concurrent library extraction
at_setup_line='darwin.at:103'
at_fn_banner 18
at_desc="darwin concurrent library extraction"
at_desc_line="104: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "104. darwin.at:103: testing ..."
$at_traceon
cat >foo.c <<'_ATEOF'
int foo (void) { return 0; }
_ATEOF
cat >bar.c <<'_ATEOF'
extern int foo1 (void);
int bar (void) { return foo1 (); }
_ATEOF
cp bar.c baz.c
objects=
for obj in 1 2 3 4 5 6 7 8; do
sed "s/foo/foo$obj/" < foo.c > foo$obj.c
{ set +x
$as_echo "$at_srcdir/darwin.at:118: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo\$obj.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c" "darwin.at:118"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:118"
$at_failed && at_fn_log_failure
$at_traceon; }
objects="$objects foo$obj.lo"
done
{ set +x
$as_echo "$at_srcdir/darwin.at:122: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:122"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:122"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:124: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c baz.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c" "darwin.at:124"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:124"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la \$objects"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects" "darwin.at:126"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:126"
$at_failed && at_fn_log_failure
$at_traceon; }
# Hypothesis: concurrent convenience archive extraction works.
for i in 1 2 3 4 5; do
rm -f libbar.la libbaz.la
{ set +x
$as_echo "$at_srcdir/darwin.at:132: (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la"
at_fn_check_prepare_dynamic "($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la" "darwin.at:132"
( $at_check_trace; ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:132"
$at_failed && at_fn_log_failure
$at_traceon; }
done
# Hypothesis: the lock is not used in dry run mode.
eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
# Next line is internal detail.
lockfile=$objdir/libfoo.a.lock
echo stamp > $lockfile
{ set +x
$as_echo "$at_srcdir/darwin.at:145: \$LIBTOOL --dry-run --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la"
at_fn_check_prepare_dynamic "$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la" "darwin.at:145"
( $at_check_trace; $LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:145"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:148: grep stamp \$lockfile"
at_fn_check_prepare_dynamic "grep stamp $lockfile" "darwin.at:148"
( $at_check_trace; grep stamp $lockfile
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
at_fn_diff_devnull "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:148"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_104
#AT_START_105
# 105. darwin.at:152: darwin gdb debug information
at_setup_line='darwin.at:152'
at_fn_banner 18
at_desc="darwin gdb debug information"
at_desc_line="105: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`"
case $whole_archive_flag_spec:$host_os in
:darwin*) : ;;
*) false ;;
esac && at_xfail=yes
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "105. darwin.at:152: testing ..."
$at_traceon
{ set +x
$as_echo "$at_srcdir/darwin.at:154: gdb --version || (exit 77)"
at_fn_check_prepare_trace "darwin.at:154"
( $at_check_trace; gdb --version || (exit 77)
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/darwin.at:154"
$at_failed && at_fn_log_failure
$at_traceon; }
cat >foo.c <<'_ATEOF'
int foo (void) { return 0; }
_ATEOF
cat >bar.c <<'_ATEOF'
extern int foo (void);
int bar (void) { return foo (); }
_ATEOF
cat >main.c <<'_ATEOF'
extern int bar(void);
int main() { return bar();}
_ATEOF
{ set +x
$as_echo "$at_srcdir/darwin.at:171: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:171"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:171"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:173: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c" "darwin.at:173"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:173"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:175: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c" "darwin.at:175"
( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:175"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:178: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la foo.lo"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo" "darwin.at:178"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:178"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la "
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la " "darwin.at:181"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:181"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:185: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.lo libbar.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la" "darwin.at:185"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:185"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:187: echo quit | \$LIBTOOL --mode=execute gdb main"
at_fn_check_prepare_dynamic "echo quit | $LIBTOOL --mode=execute gdb main" "darwin.at:187"
( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/darwin.at:187"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:190: grep 'Could not find object file' stderr"
at_fn_check_prepare_trace "darwin.at:190"
( $at_check_trace; grep 'Could not find object file' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:190"
$at_failed && at_fn_log_failure
$at_traceon; }
# Remove any dSYM bundle
rm -rf .libs/*.dSYM
{ set +x
$as_echo "$at_srcdir/darwin.at:202: echo quit | \$LIBTOOL --mode=execute gdb main"
at_fn_check_prepare_dynamic "echo quit | $LIBTOOL --mode=execute gdb main" "darwin.at:202"
( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_skip $at_status "$at_srcdir/darwin.at:202"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/darwin.at:204: grep 'Could not find object file' stderr"
at_fn_check_prepare_trace "darwin.at:204"
( $at_check_trace; grep 'Could not find object file' stderr
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:204"
$at_failed && at_fn_log_failure
$at_traceon; }
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_105
#AT_START_106
# 106. deplibs-mingw.at:27: deplibs without file command
at_setup_line='deplibs-mingw.at:27'
at_fn_banner 18
at_desc="deplibs without file command"
at_desc_line="106: $at_desc "
$at_quiet $as_echo_n "$at_desc_line"
at_xfail=no
echo "# -*- compilation -*-" >> "$at_group_log"
(
$as_echo "106. deplibs-mingw.at:27: testing ..."
$at_traceon
cwd=`pwd`
instdir=$cwd/inst
libdir=$instdir/lib
bindir=$instdir/bin
LDFLAGS="$LDFLAGS -no-undefined"
mkdir inst inst/bin inst/lib
cat >a.c <<'_ATEOF'
int a () { return 0; }
_ATEOF
cat >b.c <<'_ATEOF'
extern int a ();
int b () { return a (); }
_ATEOF
for file in a.c b.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:49: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir" "deplibs-mingw.at:49"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:49"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:51: library_names= && . ./liba.la && if test -z \"\$library_names\"; then exit 77; fi "
at_fn_check_prepare_dynamic "library_names= && . ./liba.la && if test -z \"$library_names\"; then exit 77; fi " "deplibs-mingw.at:51"
( $at_check_trace; library_names= && . ./liba.la && if test -z "$library_names"; then exit 77; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:51"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:53: \$LIBTOOL --mode=install cp liba.la \$libdir"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "deplibs-mingw.at:53"
( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:53"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:54: \$LIBTOOL --mode=clean rm -f liba.la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "deplibs-mingw.at:54"
( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:54"
$at_failed && at_fn_log_failure
$at_traceon; }
rm -f $libdir/liba.la
# check once with `file' (if present) and once without, if on MinGW.
for try in with-file without-file; do
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir -L\$libdir -la"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la" "deplibs-mingw.at:59"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:59"
$at_failed && at_fn_log_failure
$at_traceon; }
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:62: library_names= && . ./libb.la && if test -z \"\$library_names\"; then exit 99; fi "
at_fn_check_prepare_dynamic "library_names= && . ./libb.la && if test -z \"$library_names\"; then exit 99; fi " "deplibs-mingw.at:62"
( $at_check_trace; library_names= && . ./libb.la && if test -z "$library_names"; then exit 99; fi
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:62"
$at_failed && at_fn_log_failure
$at_traceon; }
case $host_os in
mingw*)
if file /; then
mkdir bin new-libtool
cat >bin/file <<\EOF
#! /bin/sh
exit 1
EOF
chmod +x bin/file
PATH=`pwd`/bin${PATH_SEPARATOR-:}$PATH
cd new-libtool
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:77: \"\$abs_top_srcdir\"/configure \$configure_options || exit 77"
at_fn_check_prepare_dynamic "\"$abs_top_srcdir\"/configure $configure_options || exit 77" "deplibs-mingw.at:77"
( $at_check_trace; "$abs_top_srcdir"/configure $configure_options || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:77"
$at_failed && at_fn_log_failure
$at_traceon; }
cd ..
LIBTOOL=new-libtool/libtool
export LIBTOOL
# Check whether the generated script is usable; otherwise, skip.
{ set +x
$as_echo "$at_srcdir/deplibs-mingw.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libunrelated.la a.lo -rpath \$libdir || exit 77"
at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77" "deplibs-mingw.at:83"
( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77
) >>"$at_stdout" 2>>"$at_stderr"
at_status=$? at_failed=false
$at_check_filter
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:83"
$at_failed && at_fn_log_failure
$at_traceon; }
else
break;
fi;;
*)
break;;
esac
done
set +x
$at_times_p && times >"$at_times_file"
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <"$at_status_file"
#AT_STOP_106