#! /bin/sh
#
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 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=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi




# PATH needs CR
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits

# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
  else
    PATH_SEPARATOR=:
  fi
  rm -f conf$$.sh
fi

# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  as_unset=unset
else
  as_unset=false
fi


# IFS
# We need space, tab and new line, in precisely that order.  Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
as_nl='
'
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
  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  { (exit 1); exit 1; }
fi

# Work around bugs in pre-3.0 UWIN ksh.
for as_var in ENV MAIL MAILPATH
do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
done
PS1='$ '
PS2='> '
PS4='+ '

# NLS nuisances.
for as_var in \
  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
  LC_TELEPHONE LC_TIME
do
  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
    eval $as_var=C; export $as_var
  else
    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
  fi
done

# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi


# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# CDPATH.
$as_unset CDPATH


if test "x$CONFIG_SHELL" = x; then
  if (eval ":") 2>/dev/null; then
  as_have_required=yes
else
  as_have_required=no
fi

  if test $as_have_required = yes && 	 (eval ":
(as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=\$LINENO
  as_lineno_2=\$LINENO
  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
") 2> /dev/null; then
  :
else
  as_candidate_shells=
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  case $as_dir in
	 /*)
	   for as_base in sh bash ksh sh5; do
	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
	   done;;
       esac
done
IFS=$as_save_IFS


      for as_shell in $as_candidate_shells $SHELL; do
	 # Try only shells that exist, to save several forks.
	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		{ ("$as_shell") 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi


:
_ASEOF
}; then
  CONFIG_SHELL=$as_shell
	       as_have_required=yes
	       if { "$as_shell" 2> /dev/null <<\_ASEOF
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
  emulate sh
  NULLCMD=:
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else
  case `(set -o) 2>/dev/null` in
  *posix*) set -o posix ;;
esac

fi


:
(as_func_return () {
  (exit $1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = "$1" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test $exitcode = 0) || { (exit 1); exit 1; }

(
  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }

_ASEOF
}; then
  break
fi

fi

      done

      if test "x$CONFIG_SHELL" != x; then
  for as_var in BASH_ENV ENV
        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
        done
        export CONFIG_SHELL
        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi


    if test $as_have_required = no; then
  echo This script requires a shell more modern than all the
      echo shells that I found on your system.  Please install a
      echo modern shell, or manually run the script under such a
      echo shell if you do have one.
      { (exit 1); exit 1; }
fi


fi

fi



(eval "as_func_return () {
  (exit \$1)
}
as_func_success () {
  as_func_return 0
}
as_func_failure () {
  as_func_return 1
}
as_func_ret_success () {
  return 0
}
as_func_ret_failure () {
  return 1
}

exitcode=0
if as_func_success; then
  :
else
  exitcode=1
  echo as_func_success failed.
fi

if as_func_failure; then
  exitcode=1
  echo as_func_failure succeeded.
fi

if as_func_ret_success; then
  :
else
  exitcode=1
  echo as_func_ret_success failed.
fi

if as_func_ret_failure; then
  exitcode=1
  echo as_func_ret_failure succeeded.
fi

if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
  :
else
  exitcode=1
  echo positional parameters were not saved.
fi

test \$exitcode = 0") || {
  echo No shell found that supports shell functions.
  echo Please tell autoconf@gnu.org about your system,
  echo including any error possibly output before this
  echo message
}



  as_lineno_1=$LINENO
  as_lineno_2=$LINENO
  test "x$as_lineno_1" != "x$as_lineno_2" &&
  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {

  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
  # uniformly replaced by the line number.  The first 'sed' inserts a
  # line-number line after each line using $LINENO; the second 'sed'
  # does the real work.  The second script uses 'N' to pair each
  # line-number line with the line containing $LINENO, and appends
  # trailing '-' during substitution so that $LINENO is not a special
  # case at line end.
  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
  # scripts with optimization help from Paolo Bonzini.  Blame Lee
  # E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
   { (exit 1); exit 1; }; }

  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in
-n*)
  case `echo 'x\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  *)   ECHO_C='\c';;
  esac;;
*)
  ECHO_N='-n';;
esac

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir
fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
  as_ln_s='ln -s'
  # ... but there are two gotchas:
  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
  # In both cases, we have to default to `cp -p'.
  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
    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
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p=:
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

if test -x / >/dev/null 2>&1; then
  as_test_x='test -x'
else
  if ls -dL / >/dev/null 2>&1; then
    as_ls_L_option=L
  else
    as_ls_L_option=
  fi
  as_test_x='
    eval sh -c '\''
      if test -d "$1"; then
        test -d "$1/.";
      else
	case $1 in
        -*)set "./$1";;
	esac;
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
	???[sx]*):;;*)false;;esac;fi
    '\'' sh
  '
fi
as_executable_p=$as_test_x

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"



SHELL=${CONFIG_SHELL-/bin/sh}

# How were we run?
at_cli_args="$@"

# Load the config file.
for at_file in atconfig atlocal
do
  test -r $at_file || continue
  . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
   { (exit 1); exit 1; }; }
done

# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
: ${at_top_build_prefix=$at_top_builddir}

# 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 in srcdir top_srcdir top_build_prefix
  do
    at_val=`eval echo '${'at_$at_dir'}'`
    eval "$at_dir=\$at_val/../.."
  done
fi

# 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?
at_verbose=:
at_quiet=echo

# 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
# Test groups to run
at_groups=

# The directory we are in.
at_dir=`pwd`
# The directory the whole suite works in.
# Should be absolutely 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 file containing the location of the last AT_CHECK.
at_check_line_file=$at_suite_dir/at-check-line
# The file containing the exit status of the last command.
at_status_file=$at_suite_dir/at-status
# The files containing the output of the tested commands.
at_stdout=$at_suite_dir/at-stdout
at_stder1=$at_suite_dir/at-stder1
at_stderr=$at_suite_dir/at-stderr
# The file containing dates.
at_times_file=$at_suite_dir/at-times

# List of the tested programs.
at_tested=''
# List of the all the test groups.
at_groups_all=' banner-1 1 2 3 4 5 6 7 8 9 10 banner-2 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 banner-3 31 32 banner-4 33 34 banner-5 35 36 banner-6 37 38 39 banner-7 40 41 42 43 banner-8 44 45 46 47 banner-9 48 49 50 banner-10 51 52 53 banner-11 54 55 banner-12 56 banner-13 57 58 banner-14 59 banner-15 60 61 62 banner-16 63 64'
# 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:79;libtoolize macro installation;libtoolize;
2;libtoolize.at:103;libtoolize macro serial update;libtoolize;
3;libtoolize.at:194;libtoolize config files serial update;libtoolize;
4;libtoolize.at:296;diagnose missing LT_CONFIG_LTDL_DIR;libtoolize;
5;libtoolize.at:436;copy ltdl.m4 with shared macro directory;libtoolize;
6;libtoolize.at:448;correctly parse LTDL_INIT from configure.ac;libtoolize;
7;libtoolize.at:460;diagnose missing LTDL_INIT invocation;libtoolize;
8;libtoolize.at:536;upgrading verbatim style aclocal.m4;libtoolize automake;
9;libtoolize.at:660;nonrecursive ltdl with AC_CONFIG_MACRO_DIR;libtoolize;
10;libtoolize.at:727;subproject ltdl with non-shared directories;libtoolize;
11;duplicate_members.at:26;duplicate members in archive tests;libtool;
12;duplicate_conv.at:25;duplicate convenience archive names;libtool;
13;duplicate_deps.at:25;preserve duplicate convenience deps;libtool;
14;inherited_flags.at:26;inherited_linker_flags;libtool;
15;convenience.at:30;C convenience archives;libtool;
16;convenience.at:69;C++ convenience archives;CXX libtool;
17;convenience.at:109;F77 convenience archives;F77 libtool;
18;convenience.at:169;FC convenience archives;FC libtool;
19;convenience.at:229;Java convenience archives;GCJ libtool;
20;link-order.at:26;Link order test.;libtool;
21;link-order2.at:46;Link order of deplibs.;libtool;
22;fail.at:27;Failure tests;libtool;
23;shlibpath.at:25;shlibpath_overrides_runpath;libtool;
24;runpath-in-lalib.at:25;Runpath in libtool library files;libtool;
25;static.at:68;static linking flags for programs;libtool;
26;export.at:25;Export test;libtool;
27;search-path.at:25;sys_lib_search_path;libtool;
28;indirect_deps.at:25;indirect convenience;libtool;
29;indirect_deps.at:71;indirect uninstalled;libtool;
30;archive-in-archive.at:26;static library contains static library;libtool;
31;destdir.at:48;Simple DESTDIR install;libtool;
32;destdir.at:75;DESTDIR with in-package deplibs;libtool;
33;old-m4-iface.at:40;AM_PROG_LIBTOOL;libtoolize autoconf;
34;old-m4-iface.at:107;AC_WITH_LTDL;libtoolize automake autoconf;
35;am-subdir.at:33;C subdir-objects;libtoolize automake autoconf;
36;am-subdir.at:93;C++ subdir-objects;CXX libtoolize automake autoconf;
37;lt_dlexit.at:30;lt_dlexit unloading libs;libltdl;
38;lt_dladvise.at:28;lt_dlopenadvise library loading;libltdl;
39;need_lib_prefix.at:25;enforced lib prefix;libltdl libtool;
40;standalone.at:31;compiling softlinked libltdl;libtoolize;
41;standalone.at:46;compiling copied libltdl;libtoolize;
42;standalone.at:61;installable libltdl;libtoolize;
43;standalone.at:79;linking libltdl without autotools;libtoolize;
44;subproject.at:57;compiling softlinked libltdl;libtoolize automake autoconf;
45;subproject.at:73;compiling copied libltdl;libtoolize automake autoconf;
46;subproject.at:89;installable libltdl;libtoolize automake autoconf;
47;subproject.at:109;linking libltdl without autotools;libtoolize;
48;nonrecursive.at:78;compiling softlinked libltdl;libtoolize automake autoconf;
49;nonrecursive.at:102;compiling copied libltdl;libtoolize automake autoconf;
50;nonrecursive.at:126;installable libltdl;libtoolize automake autoconf;
51;recursive.at:60;compiling softlinked libltdl;libtoolize autoconf automake;
52;recursive.at:80;compiling copied libltdl;libtoolize autoconf automake;
53;recursive.at:100;installable libltdl;libtoolize autoconf automake;
54;template.at:27;simple template test;CXX libtool;
55;template.at:126;template test with subdirs;CXX libtool;
56;ctor.at:27;C++ static constructors;CXX libtool;
57;early-libtool.at:32;config.status;libtoolize automake autoconf;
58;early-libtool.at:126;config.lt;libtoolize automake autoconf;
59;deplibs-ident.at:32;build tree relpaths;libtool;
60;configure-iface.at:102;installable libltdl;libltdl libtoolize automake autoconf;
61;configure-iface.at:159;--with-ltdl-include/lib;libltdl libtoolize automake autoconf;
62;configure-iface.at:225;--with-included-ltdl;libltdl libtoolize automake autoconf;
63;stresstest.at:31;Link option thorough search test;libtool;
64;cmdline_wrap.at:28;Run tests with low max_cmd_len;recursive;
"

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 )
	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 0
	;;

    --debug | -d )
	at_debug_p=:
	;;

    --errexit | -e )
	at_debug_p=:
	at_errexit_p=:
	;;

    --verbose | -v )
	at_verbose=echo; at_quiet=:
	;;

    --trace | -x )
	at_traceon='set -x'; at_traceoff='set +x'
	;;

    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
	at_groups="$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_range=`echo " $at_groups_all " | \
	  sed -e 's/^.* \('$at_range_start' \)/\1/'`
	at_groups="$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_range=`echo " $at_groups_all " | \
	  sed -e 's/\( '$at_range_end'\) .*$/\1/'`
	at_groups="$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_range=`echo " $at_groups_all " | \
	  sed -e 's/^.*\( '$at_range_start' \)/\1/' \
	      -e 's/\( '$at_range_end'\) .*$/\1/'`
	at_groups="$at_groups$at_range "
	;;

    # 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=`echo "$at_groups_selected" |
	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
	done
	at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
	# Smash the newlines.
	at_groups="$at_groups`echo $at_groups_selected` "
	;;

    *=*)
	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
	# Reject names that are not valid shell variable names.
	expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
	  { echo "$as_me: error: invalid variable name: $at_envvar" >&2
   { (exit 1); exit 1; }; }
	at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
	eval "$at_envvar='$at_value'"
	export $at_envvar
	# Propagate to debug scripts.
	at_debug_args="$at_debug_args $at_envvar='$at_value'"
	;;

     *) echo "$as_me: invalid option: $at_option" >&2
	echo "Try \`$0 --help' for more information." >&2
	exit 1
	;;
  esac
done

# Selected test groups.
if test -z "$at_groups"; then
  at_groups=$at_groups_all
else
  # Sort the tests, removing duplicates:
  at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
  # and add banners.  (Passing at_groups_all is tricky--see the comment
  # starting with "Passing at_groups is tricky.")
  at_groups=`echo "$at_groups$as_nl $at_groups_all" |
    awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
	/^$/ { next }  # Ignore the empty line.
	!/ / { groups++; selected[$ 0] = 1; next }
	# The last line, containing at_groups_all.
	{
		n = split($ 0, a, " ")
		# If there are several tests, select their banners:
		if (groups > 1) {
			for (i = 1; i <= n; i++) {
				if (a[i] ~ /^banner-/)
					banner = a[i]
				else if (banner != "" && selected[a[i]] == 1)
					selected[banner] = 1
			}
		}
		for (i = 1; i <= n; i++)
			if (selected[a[i]] == 1)
				list = list " " a[i]
		print list
	}'`
fi

# Help message.
if $at_help_p; then
  cat <<_ATEOF
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.

You should not change environment variables unless explicitly passed
as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
to exercise.  Each relative directory is expanded as build and source
directories relatively to the top level of this distribution.  E.g.,

  $ $0 AUTOTEST_PATH=bin

possibly amounts into

  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
_ATEOF
cat <<_ATEOF

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

Execution tuning:
  -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

Report bugs to <bug-libtool@gnu.org>.
_ATEOF
  exit 0
fi

# List of tests.
if $at_list_p; then
  cat <<_ATEOF
libtool 2.2 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'.
  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
	 }
	 {
	   if (selected[$ 1]) {
	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
	     if ($ 4) printf "      %s\n", $ 4
	   }
	 }'
  exit 0
fi
if $at_version_p; then
  echo "$as_me (libtool 2.2)"
  cat <<\_ACEOF

Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This test suite is free software; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
_ACEOF
  exit 0
fi
: ${tst_dist=dist}
: ${ACLOCAL=aclocal}
: ${AUTOHEADER=autoheader}
: ${AUTOCONF=autoconf}
: ${AUTOMAKE=automake}
: ${AUTORECONF=autoreconf}
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|ECHO)='`
configure_options=
if test -n "$host_alias"; then
  configure_options="--host $host_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"}

# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites, 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=`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" && at_path=$at_path$PATH_SEPARATOR
case $as_dir in
  [\\/]* | ?:[\\/]* )
    at_path=$at_path$as_dir
    ;;
  * )
    if test -z "$at_top_build_prefix"; then
      # Stand-alone test suite.
      at_path=$at_path$as_dir
    else
      # Embedded test suite.
      at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
      at_path=$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.
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=.
  as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
test -d "$as_dir" || continue
case $PATH in
	          $as_dir                 | \
	          $as_dir$PATH_SEPARATOR* | \
  *$PATH_SEPARATOR$as_dir                 | \
  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;

  '') PATH=$as_dir ;;
   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
esac
done
IFS=$as_save_IFS

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 test suite. ##
## ----------------------- ##
_ASBOX
{
  cat <<\_ASBOX
## ----------------------- ##
## libtool 2.2 test suite. ##
## ----------------------- ##
_ASBOX
  echo

  echo "$as_me: command line was:"
  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.
  if test -n "$at_top_srcdir"; then
    cat <<\_ASBOX
## ----------- ##
## ChangeLogs. ##
## ----------- ##
_ASBOX
    echo
    for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
    do
      echo "$as_me: $at_file:"
      sed 's/^/| /;10q' $at_file
      echo
    done

    {
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=.
  echo "PATH: $as_dir"
done
IFS=$as_save_IFS

}
    echo
  fi

  # Contents of the config files.
  for at_file in atconfig atlocal
  do
    test -r $at_file || continue
    echo "$as_me: $at_file:"
    sed 's/^/| /' $at_file
    echo
  done

  cat <<\_ASBOX
## ---------------- ##
## Tested programs. ##
## ---------------- ##
_ASBOX
  echo
} >&5

# Report what programs are being tested.
for at_program in : $at_tested
do
  test "$at_program" = : && continue
  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

  if test -f "$as_dir/$at_program"; then
    {
      echo "$at_srcdir/testsuite.at:329: $as_dir/$at_program --version"
      "$as_dir/$at_program" --version
      echo
    } >&5 2>&1
  else
    { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
echo "$as_me: error: cannot find $at_program" >&2;}
   { (exit 1); exit 1; }; }
  fi
done

{
  cat <<\_ASBOX
## ------------------ ##
## Running the tests. ##
## ------------------ ##
_ASBOX
} >&5

at_start_date=`date`
at_start_time=`date +%s 2>/dev/null`
echo "$as_me: starting at: $at_start_date" >&5
at_xpass_list=
at_xfail_list=
at_pass_list=
at_fail_list=
at_skip_list=
at_group_count=0

# Create the master directory if it doesn't already exist.
test -d "$at_suite_dir" ||
  mkdir "$at_suite_dir" ||
  { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
   { (exit 1); exit 1; }; }

# 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


for at_group in $at_groups
do
  # Be sure to come back to the top test directory.
  cd "$at_suite_dir"

  case $at_group in
    banner-*)
      at_group_log=$at_suite_log
      ;;

    *)
      at_group_normalized=$at_group

  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.
      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"
      fi
      # Be tolerant if the above `rm' was not able to remove the directory.
      { as_dir=$at_group_dir
  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`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 ||
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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
echo "$as_me: error: cannot create directory $as_dir" >&2;}
   { (exit 1); exit 1; }; }; }
      cd $at_group_dir
      ;;
  esac

  echo 0 > "$at_status_file"

  # Clearly separate the test groups when verbose.
  test $at_group_count != 0 && $at_verbose

  # In verbose mode, append to the log file *and* show on
  # the standard output; in quiet mode only write to the log
  if test $at_verbose = echo; then
    at_tee_pipe='tee -a "$at_group_log"'
  else
    at_tee_pipe='cat >> "$at_group_log"'
  fi

  case $at_group in

  banner-1 ) # Banner 1. libtoolize.at:26
    cat <<\_ATEOF

Libtoolize operation.

_ATEOF
    ;;

  1 ) # 1. libtoolize.at:79: libtoolize macro installation
    at_setup_line='libtoolize.at:79'
    at_desc="libtoolize macro installation"
    $at_quiet $ECHO_N "  1: libtoolize macro installation                  $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "1. libtoolize.at:79: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, 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'
_ATEOF


$at_traceoff
echo "$at_srcdir/libtoolize.at:94: $LIBTOOLIZE --copy

"
echo libtoolize.at:94 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:94: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  2 ) # 2. libtoolize.at:103: libtoolize macro serial update
    at_setup_line='libtoolize.at:103'
    at_desc="libtoolize macro serial update"
    $at_quiet $ECHO_N "  2: libtoolize macro serial update                 $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "2. libtoolize.at:103: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, 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

# 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: 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


$at_traceoff
echo "$at_srcdir/libtoolize.at:127: $LIBTOOLIZE --copy

"
echo libtoolize.at:127 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:127: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## ---------------------------------------------------------- ##
## Next, a second update attempt with everything now updated. ##
## ---------------------------------------------------------- ##

cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: `m4/libtool.m4' is already up to date.
libtoolize: `m4/ltsugar.m4' is already up to date.
libtoolize: `m4/ltversion.m4' is already up to date.
libtoolize: `m4/lt~obsolete.m4' is already up to date.
_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


$at_traceoff
echo "$at_srcdir/libtoolize.at:148: $LIBTOOLIZE --copy

"
echo libtoolize.at:148 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:148: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/libtoolize.at:166: $LIBTOOLIZE --copy --force

"
echo libtoolize.at:166 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --force

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --force

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:166: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## --------------------------------------------------------- ##
## A final update attempt with everything now force updated. ##
## --------------------------------------------------------- ##

cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: `build-aux/ltmain.sh' is already up to date.
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: `m4/libtool.m4' is already up to date.
libtoolize: `m4/ltoptions.m4' is already up to date.
libtoolize: `m4/ltsugar.m4' is already up to date.
libtoolize: `m4/ltversion.m4' is already up to date.
libtoolize: `m4/lt~obsolete.m4' is already up to date.
_ATEOF


$at_traceoff
echo "$at_srcdir/libtoolize.at:184: $LIBTOOLIZE --copy

"
echo libtoolize.at:184 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:184: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  3 ) # 3. libtoolize.at:194: libtoolize config files serial update
    at_setup_line='libtoolize.at:194'
    at_desc="libtoolize config files serial update"
    $at_quiet $ECHO_N "  3: libtoolize config files serial update          $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "3. libtoolize.at:194: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, 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

# 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


$at_traceoff
echo "$at_srcdir/libtoolize.at:221: $LIBTOOLIZE --copy --install

"
echo libtoolize.at:221 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:221: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## ---------------------------------------------------------- ##
## Next, a second update attempt with everything now updated. ##
## ---------------------------------------------------------- ##

cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: `build-aux/config.guess' is already up to date.
libtoolize: `build-aux/config.sub' is already up to date.
libtoolize: `build-aux/install-sh' is already up to date.
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: `m4/libtool.m4' is already up to date.
libtoolize: `m4/ltsugar.m4' is already up to date.
libtoolize: `m4/ltversion.m4' is already up to date.
libtoolize: `m4/lt~obsolete.m4' is already up to date.
_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


$at_traceoff
echo "$at_srcdir/libtoolize.at:245: $LIBTOOLIZE --copy --install

"
echo libtoolize.at:245 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:245: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/libtoolize.at:266: $LIBTOOLIZE --copy --force --install

"
echo libtoolize.at:266 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --force --install

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --force --install

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:266: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## --------------------------------------------------------- ##
## A final update attempt with everything now force updated. ##
## --------------------------------------------------------- ##

cat >expout <<'_ATEOF'
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: `build-aux/config.guess' is already up to date.
libtoolize: `build-aux/config.sub' is already up to date.
libtoolize: `build-aux/install-sh' is already up to date.
libtoolize: `build-aux/ltmain.sh' is already up to date.
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: `m4/libtool.m4' is already up to date.
libtoolize: `m4/ltoptions.m4' is already up to date.
libtoolize: `m4/ltsugar.m4' is already up to date.
libtoolize: `m4/ltversion.m4' is already up to date.
libtoolize: `m4/lt~obsolete.m4' is already up to date.
_ATEOF


$at_traceoff
echo "$at_srcdir/libtoolize.at:287: $LIBTOOLIZE --copy --install

"
echo libtoolize.at:287 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:287: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  4 ) # 4. libtoolize.at:296: diagnose missing LT_CONFIG_LTDL_DIR
    at_setup_line='libtoolize.at:296'
    at_desc="diagnose missing LT_CONFIG_LTDL_DIR"
    $at_quiet $ECHO_N "  4: diagnose missing LT_CONFIG_LTDL_DIR            $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "4. libtoolize.at:296: 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'.
_ATEOF


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
LTDL_INIT([nonrecursive])
AC_OUTPUT
_ATEOF


$at_traceoff
echo "$at_srcdir/libtoolize.at:354: $LIBTOOLIZE --copy --install --ltdl=ltdl

"
echo libtoolize.at:354 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install --ltdl=ltdl

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install --ltdl=ltdl

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:354: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  5 ) # 5. libtoolize.at:436: copy ltdl.m4 with shared macro directory
    at_setup_line='libtoolize.at:436'
    at_desc="copy ltdl.m4 with shared macro directory"
    $at_quiet $ECHO_N "  5: copy ltdl.m4 with shared macro directory       $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "5. libtoolize.at:436: 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, 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



$at_traceoff
echo "$at_srcdir/libtoolize.at:440: $LIBTOOLIZE --ltdl

"
echo libtoolize.at:440 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --ltdl

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --ltdl

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:440: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  6 ) # 6. libtoolize.at:448: correctly parse LTDL_INIT from configure.ac
    at_setup_line='libtoolize.at:448'
    at_desc="correctly parse LTDL_INIT from configure.ac"
    $at_quiet $ECHO_N "  6: correctly parse LTDL_INIT from configure.ac    $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "6. libtoolize.at:448: 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, 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



$at_traceoff
echo "$at_srcdir/libtoolize.at:452: $LIBTOOLIZE

"
echo libtoolize.at:452 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:452: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  7 ) # 7. libtoolize.at:460: diagnose missing LTDL_INIT invocation
    at_setup_line='libtoolize.at:460'
    at_desc="diagnose missing LTDL_INIT invocation"
    $at_quiet $ECHO_N "  7: diagnose missing LTDL_INIT invocation          $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "7. libtoolize.at:460: 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.
_ATEOF


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, 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


$at_traceoff
echo "$at_srcdir/libtoolize.at:526: $LIBTOOLIZE --ltdl --copy

"
echo libtoolize.at:526 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --ltdl --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --ltdl --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:526: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  8 ) # 8. libtoolize.at:536: upgrading verbatim style aclocal.m4
    at_setup_line='libtoolize.at:536'
    at_desc="upgrading verbatim style aclocal.m4"
    $at_quiet $ECHO_N "  8: upgrading verbatim style aclocal.m4            $ECHO_C"
    at_xfail=no
      test "$ACLOCAL" = no && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "8. libtoolize.at:536: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
LT_INIT
AC_OUTPUT
_ATEOF


cat >expout <<EOF
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:   \`$tst_aclocaldir/libtool.m4'
libtoolize:   \`$tst_aclocaldir/ltoptions.m4'
libtoolize:   \`$tst_aclocaldir/ltversion.m4'
libtoolize:   \`$tst_aclocaldir/ltsugar.m4'
libtoolize:   \`$tst_aclocaldir/lt~obsolete.m4'
EOF

$at_traceoff
echo "$at_srcdir/libtoolize.at:556: $LIBTOOLIZE --copy

"
echo libtoolize.at:556 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:556: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## --------------------------------------- ##
## Upgrading a hand maintained aclocal.m4. ##
## --------------------------------------- ##

cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, bug-libtool@gnu.org)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
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 AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: `build-aux/ltmain.sh' is already up to date.
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


$at_traceoff
echo "$at_srcdir/libtoolize.at:598: $LIBTOOLIZE --copy

"
echo libtoolize.at:598 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:598: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




## ------------------------------------------- ##
## Upgrading an aclocal maintained aclocal.m4. ##
## ------------------------------------------- ##

$at_traceoff
echo "$at_srcdir/libtoolize.at:605: \$ACLOCAL -I m4"
echo libtoolize.at:605 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:605: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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 auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: `build-aux/ltmain.sh' is already up to date.
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: `m4/ltsugar.m4' is already up to date.
libtoolize: `m4/ltversion.m4' is already up to date.
libtoolize: `m4/lt~obsolete.m4' is already up to date.
_ATEOF


cat >experr <<'_ATEOF'
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
_ATEOF


$at_traceoff
echo "$at_srcdir/libtoolize.at:634: $LIBTOOLIZE --copy

"
echo libtoolize.at:634 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff experr "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:634: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/libtoolize.at:651: $LIBTOOLIZE --copy --force

"
echo libtoolize.at:651 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --force

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --force

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:651: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  9 ) # 9. libtoolize.at:660: nonrecursive ltdl with AC_CONFIG_MACRO_DIR
    at_setup_line='libtoolize.at:660'
    at_desc="nonrecursive ltdl with AC_CONFIG_MACRO_DIR"
    $at_quiet $ECHO_N "  9: nonrecursive ltdl with AC_CONFIG_MACRO_DIR     $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "9. libtoolize.at:660: 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, 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


$at_traceoff
echo "$at_srcdir/libtoolize.at:718: $LIBTOOLIZE --copy --install --ltdl=ltdl

"
echo libtoolize.at:718 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install --ltdl=ltdl

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install --ltdl=ltdl

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:718: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  10 ) # 10. libtoolize.at:727: subproject ltdl with non-shared directories
    at_setup_line='libtoolize.at:727'
    at_desc="subproject ltdl with non-shared directories"
    $at_quiet $ECHO_N " 10: subproject ltdl with non-shared directories    $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "10. libtoolize.at:727: 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.
_ATEOF


cat >configure.ac <<'_ATEOF'
AC_INIT([libtoolize-demo], 2.2, 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


$at_traceoff
echo "$at_srcdir/libtoolize.at:808: $LIBTOOLIZE --copy --install

"
echo libtoolize.at:808 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --install

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/libtoolize.at:808: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-2 ) # Banner 2. duplicate_members.at:25
    cat <<\_ATEOF

Testing libtool functions.

_ATEOF
    ;;

  11 ) # 11. duplicate_members.at:26: duplicate members in archive tests
    at_setup_line='duplicate_members.at:26'
    at_desc="duplicate members in archive tests"
    $at_quiet $ECHO_N " 11: duplicate members in archive tests             $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "11. duplicate_members.at:26: 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
$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

$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist

$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo ./libbar.la

$at_traceoff
echo "$at_srcdir/duplicate_members.at:73: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_members.at:73 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_members.at:73: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  12 ) # 12. duplicate_conv.at:25: duplicate convenience archive names
    at_setup_line='duplicate_conv.at:25'
    at_desc="duplicate convenience archive names"
    $at_quiet $ECHO_N " 12: duplicate convenience archive names            $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "12. 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.
$at_traceoff
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"
echo duplicate_conv.at:51 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:51: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT ./libcee.la"
echo duplicate_conv.at:53 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:53: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:55: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_conv.at:55 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:55: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
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"
echo duplicate_conv.at:63 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:63: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:65: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT ./libcee.la"
echo duplicate_conv.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:67: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_conv.at:67 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:67: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$LIBTOOL --mode=clean rm -f libcee.la

# Fold into library.
$at_traceoff
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"
echo duplicate_conv.at:71 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:71: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:73: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT ./libcee.la"
echo duplicate_conv.at:73 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT ./libcee.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:73: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:75: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_conv.at:75 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:75: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$LIBTOOL --mode=clean rm -f libcee.la

# Test whether this works with reloadable objects as well.
$at_traceoff
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"
echo duplicate_conv.at:79 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:79: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT cee.\$OBJEXT"
echo duplicate_conv.at:81 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT cee.$OBJEXT" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT cee.$OBJEXT ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT cee.$OBJEXT ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:81: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_conv.at:83: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_conv.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_conv.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



# TODO: test dlpreloading of duplicates (when it is implemented)

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  13 ) # 13. duplicate_deps.at:25: preserve duplicate convenience deps
    at_setup_line='duplicate_deps.at:25'
    at_desc="preserve duplicate convenience deps"
    $at_quiet $ECHO_N " 13: preserve duplicate convenience deps            $ECHO_C"
    at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "13. 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
$at_traceoff
echo "$at_srcdir/duplicate_deps.at:58: \$LIBTOOL --mode=link --tag=CC \\
	  \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT liba.la libb.la"
echo duplicate_deps.at:58 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_deps.at:58: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/duplicate_deps.at:61: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo duplicate_deps.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_deps.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
echo "$at_srcdir/duplicate_deps.at:66: \$LIBTOOL --mode=link --tag=CC \\
	  \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT liba.la libb.la liba.la \\
	  && exit 77"
echo duplicate_deps.at:66 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la liba.la \
	  && exit 77 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la liba.la \
	  && exit 77 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/duplicate_deps.at:66: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

# Other systems need special treatment, which currently fails.

$at_traceoff
echo "$at_srcdir/duplicate_deps.at:72: \$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \\
	  \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT liba.la libb.la liba.la"
echo duplicate_deps.at:72 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \
	  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/duplicate_deps.at:72: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  14 ) # 14. inherited_flags.at:26: inherited_linker_flags
    at_setup_line='inherited_flags.at:26'
    at_desc="inherited_linker_flags"
    $at_quiet $ECHO_N " 14: inherited_linker_flags                         $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "14. 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 /usr/local/lib -no-undefined
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /usr/local/lib -no-undefined
$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libboth.la both.lo -rpath /usr/local/lib -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

$at_traceoff
echo "$at_srcdir/inherited_flags.at:76: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la"
echo inherited_flags.at:76 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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'.
$at_traceoff
echo "$at_srcdir/inherited_flags.at:82: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
echo inherited_flags.at:82 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:82: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:83: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
echo inherited_flags.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/inherited_flags.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:85: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la"
echo inherited_flags.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:87: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
echo inherited_flags.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/inherited_flags.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# now check for duplicates
$at_traceoff
echo "$at_srcdir/inherited_flags.at:91: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ./libboth.la"
echo inherited_flags.at:91 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ./libboth.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ./libboth.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /usr/local/lib ./libfoo.la ./libbar.la ./libboth.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:93: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
echo inherited_flags.at:93 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:93: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:95: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
echo inherited_flags.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:95: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:97: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ./libboth.la"
echo inherited_flags.at:97 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ./libboth.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ./libboth.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main main.lo -no-undefined -rpath /usr/local/lib  ./libfoo.la ./libbar.la ./libboth.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:99: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
echo inherited_flags.at:99 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:99: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:101: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
echo inherited_flags.at:101 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:101: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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

$at_traceoff
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 /usr/local/lib"
echo inherited_flags.at:108 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /usr/local/lib" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /usr/local/lib ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /usr/local/lib ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/inherited_flags.at:108: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:110: grep Cocoa.ltframework stdout"
echo inherited_flags.at:110 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep Cocoa.ltframework stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep Cocoa.ltframework stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/inherited_flags.at:110: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/inherited_flags.at:111: grep ' -framework Cocoa' stdout"
echo inherited_flags.at:111 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep ' -framework Cocoa' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep ' -framework Cocoa' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/inherited_flags.at:111: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  15 ) # 15. convenience.at:30: C convenience archives
    at_setup_line='convenience.at:30'
    at_desc="C convenience archives"
    $at_quiet $ECHO_N " 15: C convenience archives                         $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "15. 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
$at_traceoff
echo "$at_srcdir/convenience.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
echo convenience.at:51 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:51: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/convenience.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
echo convenience.at:53 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:53: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


conv=
for i in 1 2 3; do
  conv=$conv$i
  $at_traceoff
echo "$at_srcdir/convenience.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -static -o main_static main\$i.lo liba\$conv.la"
echo convenience.at:59 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:59: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:61: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main\$i.lo liba\$conv.la"
echo convenience.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:63: ./main_static; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main_static\" || test -x \"./main_static\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:63 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:63: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/convenience.at:64: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:64 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:64: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done
      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  16 ) # 16. convenience.at:69: C++ convenience archives
    at_setup_line='convenience.at:69'
    at_desc="C++ convenience archives"
    $at_quiet $ECHO_N " 16: C++ convenience archives                       $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "16. convenience.at:69: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/convenience.at:70: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
echo convenience.at:70 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:70: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/convenience.at:70: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
echo convenience.at:70 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:70: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
$at_traceoff
echo "$at_srcdir/convenience.at:91: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
echo convenience.at:91 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:91: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
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"
echo convenience.at:93 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:93: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


conv=
for i in 1 2 3; do
  conv=$conv$i
  $at_traceoff
echo "$at_srcdir/convenience.at:99: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -static -o main_static main\$i.lo liba\$conv.la"
echo convenience.at:99 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:99: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:101: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o main main\$i.lo liba\$conv.la"
echo convenience.at:101 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:101: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:103: ./main_static; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main_static\" || test -x \"./main_static\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:103 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:103: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/convenience.at:104: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:104 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:104: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done
      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  17 ) # 17. convenience.at:109: F77 convenience archives
    at_setup_line='convenience.at:109'
    at_desc="F77 convenience archives"
    $at_quiet $ECHO_N " 17: F77 convenience archives                       $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "17. convenience.at:109: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/convenience.at:110: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
echo convenience.at:110 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:110: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
$at_traceoff
echo "$at_srcdir/convenience.at:151: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
echo convenience.at:151 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:151: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
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"
echo convenience.at:153 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:153: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


conv=
for i in 1 2 3; do
  conv=$conv$i
  $at_traceoff
echo "$at_srcdir/convenience.at:159: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -static -o main_static main\$i.lo liba\$conv.la"
echo convenience.at:159 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:159: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:161: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o main main\$i.lo liba\$conv.la"
echo convenience.at:161 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:161: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:163: ./main_static; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main_static\" || test -x \"./main_static\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:163 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:163: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/convenience.at:164: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:164 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:164: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done
      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  18 ) # 18. convenience.at:169: FC convenience archives
    at_setup_line='convenience.at:169'
    at_desc="FC convenience archives"
    $at_quiet $ECHO_N " 18: FC convenience archives                        $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "18. convenience.at:169: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/convenience.at:170: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
echo convenience.at:170 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:170: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
$at_traceoff
echo "$at_srcdir/convenience.at:211: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
echo convenience.at:211 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:211: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
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"
echo convenience.at:213 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:213: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


conv=
for i in 1 2 3; do
  conv=$conv$i
  $at_traceoff
echo "$at_srcdir/convenience.at:219: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -static -o main_static main\$i.lo liba\$conv.la"
echo convenience.at:219 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:219: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:221: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o main main\$i.lo liba\$conv.la"
echo convenience.at:221 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main main$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main main$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:221: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:223: ./main_static; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main_static\" || test -x \"./main_static\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:223 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:223: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/convenience.at:224: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:224 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:224: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done
      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  19 ) # 19. convenience.at:229: Java convenience archives
    at_setup_line='convenience.at:229'
    at_desc="Java convenience archives"
    $at_quiet $ECHO_N " 19: Java convenience archives                      $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "19. convenience.at:229: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/convenience.at:230: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
echo convenience.at:230 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:230: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
  $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
$at_traceoff
echo "$at_srcdir/convenience.at:265: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
echo convenience.at:265 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:265: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/convenience.at:267: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist"
echo convenience.at:267 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:267: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


conv=
for i in 1 2 3; do
  conv=$conv$i
  $at_traceoff
echo "$at_srcdir/convenience.at:273: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -static --main=foo\$i -o main_static foo\$i.lo liba\$conv.la"
echo convenience.at:273 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static foo$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static foo$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static foo$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:273: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:275: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS --main=foo\$i -o main foo\$i.lo liba\$conv.la"
echo convenience.at:275 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main foo$i.lo liba$conv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main foo$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main foo$i.lo liba$conv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:275: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/convenience.at:277: ./main_static; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main_static\" || test -x \"./main_static\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:277 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main_static; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main_static" || test -x "./main_static"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:277: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/convenience.at:278: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo convenience.at:278 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/convenience.at:278: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done
      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  20 ) # 20. link-order.at:26: Link order test.
    at_setup_line='link-order.at:26'
    at_desc="Link order test."
    $at_quiet $ECHO_N " 20: Link order test.                               $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "20. 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
  $at_traceoff
echo "$at_srcdir/link-order.at:69: \$LIBTOOL --mode=install cp src/liba.la \$prefix/lib/liba.la"
echo link-order.at:69 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order.at:69: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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)
    $at_traceoff
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"
echo link-order.at:82 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $EGREP relinking stderr; then
         $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
       else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; 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=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order.at:82: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  echo "wrong link order"

  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    ;;
  *)
    $at_traceoff
echo "$at_srcdir/link-order.at:87: if \$EGREP relinking stderr; then
         \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout
       else :; fi"
echo link-order.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $EGREP relinking stderr; then
         $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
       else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $EGREP relinking stderr; then
         $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
       else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  echo "wrong link order"

  echo 1 > "$at_status_file"
  exit 1
fi

$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
  $at_traceoff
echo "$at_srcdir/link-order.at:103: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/main_\$i src/main_\$i.lo -L\$prefix/lib -la"
echo link-order.at:103 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i src/main_$i.lo -L$prefix/lib -la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i src/main_$i.lo -L$prefix/lib -la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i src/main_$i.lo -L$prefix/lib -la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order.at:103: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/link-order.at:105: src/main_\$i; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"src/main_\$i\" || test -x \"src/main_\$i\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo link-order.at:105 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; src/main_$i; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "src/main_$i" || test -x "src/main_$i"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; src/main_$i; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "src/main_$i" || test -x "src/main_$i"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order.at:105: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  21 ) # 21. link-order2.at:46: Link order of deplibs.
    at_setup_line='link-order2.at:46'
    at_desc="Link order of deplibs."
    $at_quiet $ECHO_N " 21: Link order of deplibs.                         $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "21. 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 ();
}
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
    $at_traceoff
echo "$at_srcdir/link-order2.at:122: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o main main.\$OBJEXT libb.la -la0"
echo link-order2.at:122 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main main.$OBJEXT libb.la -la0" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main main.$OBJEXT libb.la -la0 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main main.$OBJEXT libb.la -la0 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order2.at:122: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/link-order2.at:124: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo link-order2.at:124 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order2.at:124: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


    # Now test that if we reverse the link order, the program fails.
    $at_traceoff
echo "$at_srcdir/link-order2.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o wrong main.\$OBJEXT -la0 libb.la"
echo link-order2.at:126 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong main.$OBJEXT -la0 libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong main.$OBJEXT -la0 libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong main.$OBJEXT -la0 libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order2.at:126: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    if test $shared_fails,$static != yes,; then
      $at_traceoff
echo "$at_srcdir/link-order2.at:129: ./wrong; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./wrong\" || test -x \"./wrong\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo link-order2.at:129 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./wrong; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./wrong" || test -x "./wrong"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./wrong; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./wrong" || test -x "./wrong"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   2) ;;
   *) echo "$at_srcdir/link-order2.at:129: exit code was $at_status, expected 2"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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 $bindir/main
    $LIBTOOL --mode=install cp wrong $bindir/wrong
    $LIBTOOL --mode=clean rm -f liba1.la libb.la
    $at_traceoff
echo "$at_srcdir/link-order2.at:137: \$bindir/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/main\" || test -x \"\$bindir/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo link-order2.at:137 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/main" || test -x "$bindir/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/main" || test -x "$bindir/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order2.at:137: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


    if test $shared_fails,$static != yes,; then
      $at_traceoff
echo "$at_srcdir/link-order2.at:139: \$bindir/wrong; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/wrong\" || test -x \"\$bindir/wrong\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo link-order2.at:139 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/wrong; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/wrong" || test -x "$bindir/wrong"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/wrong; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/wrong" || test -x "$bindir/wrong"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   2) ;;
   *) echo "$at_srcdir/link-order2.at:139: exit code was $at_status, expected 2"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


    fi
  done
done

$at_traceoff
echo "$at_srcdir/link-order2.at:144: test \$shared_fails = no || (exit 77)"
echo link-order2.at:144 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test $shared_fails = no || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test $shared_fails = no || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test $shared_fails = no || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/link-order2.at:144: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# Now the converse: if both the program and the library need libm, then
# it needs to be sorted last.  (TODO)

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  22 ) # 22. fail.at:27: Failure tests
    at_setup_line='fail.at:27'
    at_desc="Failure tests"
    $at_quiet $ECHO_N " 22: Failure tests                                  $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "22. 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
$at_traceoff
echo "$at_srcdir/fail.at:49: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c; then (exit 1); else :; fi"
echo fail.at:49 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/fail.at:49: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/fail.at:50: test -f a.lo"
echo fail.at:50 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/fail.at:50: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# non-PIC compile failure
case $pic_mode in default | yes)
  case $build_old_libs,$pic_flag in yes,*-DPIC*)
    cat >a.c <<'_ATEOF'

#ifndef PIC
  choke me
#endif
_ATEOF

    $at_traceoff
echo "$at_srcdir/fail.at:60: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi"
echo fail.at:60 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/fail.at:60: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


    $at_traceoff
echo "$at_srcdir/fail.at:61: test -f a.lo"
echo fail.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/fail.at:61: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    ;;
  esac
  ;;
esac

# program creation failure
echo 'int not_main(void) { return 0; }' > a.c
$CC $CPPFLAGS $CFLAGS -c a.c
$at_traceoff
echo "$at_srcdir/fail.at:70: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a a.\$OBJEXT; then (exit 1); else :; fi"
echo fail.at:70 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT; then (exit 1); else :; fi" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/fail.at:70: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/fail.at:71: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
echo fail.at:71 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/fail.at:71: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/fail.at:72: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a a.\$OBJEXT -static; then (exit 1); else :; fi"
echo fail.at:72 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT -static; then (exit 1); else :; fi" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT -static; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT -static; then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/fail.at:72: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/fail.at:73: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
echo fail.at:73 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/fail.at:73: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# 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"
  )
  $at_traceoff
echo "$at_srcdir/fail.at:90: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi"
echo fail.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; 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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; 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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/fail.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/fail.at:91: test -f liba.la"
echo fail.at:91 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/fail.at:91: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  ;;
esac


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  23 ) # 23. shlibpath.at:25: shlibpath_overrides_runpath
    at_setup_line='shlibpath.at:25'
    at_desc="shlibpath_overrides_runpath"
    $at_quiet $ECHO_N " 23: shlibpath_overrides_runpath                    $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "23. 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
$at_traceoff
echo "$at_srcdir/shlibpath.at:38: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m m.\$OBJEXT -Lsub/lib -la -R\`pwd\`/sub/lib"
echo shlibpath.at:38 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/shlibpath.at:38: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/shlibpath.at:40: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2 m.\$OBJEXT -Lsub/lib -la"
echo shlibpath.at:40 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT -Lsub/lib -la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT -Lsub/lib -la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT -Lsub/lib -la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/shlibpath.at:40: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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:
$at_traceoff
echo "$at_srcdir/shlibpath.at:54: { ./m || exit 1; } && exit 77"
echo shlibpath.at:54 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { ./m || exit 1; } && exit 77 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { ./m || exit 1; } && exit 77 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/shlibpath.at:54: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
  $at_traceoff
echo "$at_srcdir/shlibpath.at:66: ./m; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m\" || test -x \"./m\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo shlibpath.at:66 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m" || test -x "./m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m" || test -x "./m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/shlibpath.at:66: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


else
  $at_traceoff
echo "$at_srcdir/shlibpath.at:68: ./m || exit 1"
echo shlibpath.at:68 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m || exit 1 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m || exit 1 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/shlibpath.at:68: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

fi
# Test that shlibpath_var is effective in adding paths at all:
$at_traceoff
echo "$at_srcdir/shlibpath.at:71: ./m2; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m2\" || test -x \"./m2\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo shlibpath.at:71 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/shlibpath.at:71: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  24 ) # 24. runpath-in-lalib.at:25: Runpath in libtool library files
    at_setup_line='runpath-in-lalib.at:25'
    at_desc="Runpath in libtool library files"
    $at_quiet $ECHO_N " 24: Runpath in libtool library files               $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "24. 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
$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir -R\$addrunpath"
echo runpath-in-lalib.at:51 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:51: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir liba.la"
echo runpath-in-lalib.at:53 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:53: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m m.\$OBJEXT libb.la"
echo runpath-in-lalib.at:55 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:55: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:57: \$LIBTOOL --mode=install cp liba.la \$libdir/liba.la"
echo runpath-in-lalib.at:57 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp liba.la $libdir/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp liba.la $libdir/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp liba.la $libdir/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:57: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:58: \$LIBTOOL --mode=install cp libb.la \$libdir/libb.la"
echo runpath-in-lalib.at:58 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp libb.la $libdir/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp libb.la $libdir/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp libb.la $libdir/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:58: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:59: \$LIBTOOL --mode=install cp m \$bindir/m"
echo runpath-in-lalib.at:59 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp m $bindir/m" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp m $bindir/m ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp m $bindir/m ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:59: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:61: grep /foobar \$libdir/liba.la"
echo runpath-in-lalib.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "grep /foobar $libdir/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep /foobar $libdir/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep /foobar $libdir/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/runpath-in-lalib.at:62: grep /foobar \$libdir/libb.la"
echo runpath-in-lalib.at:62 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "grep /foobar $libdir/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep /foobar $libdir/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep /foobar $libdir/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/runpath-in-lalib.at:62: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# TODO: check that m gets -R, too.

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  25 ) # 25. static.at:68: static linking flags for programs
    at_setup_line='static.at:68'
    at_desc="static linking flags for programs"
    $at_quiet $ECHO_N " 25: static linking flags for programs              $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "25. 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

# 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"
      $at_traceoff
echo "$at_srcdir/static.at:167: ./m\$st; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m\$st\" || test -x \"./m\$st\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo static.at:167 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m$st; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m$st" || test -x "./m$st"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m$st; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m$st" || test -x "./m$st"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:167: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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"; then
	$at_traceoff
echo "$at_srcdir/static.at:171: \$bindir/m\$st; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/m\$st\" || test -x \"\$bindir/m\$st\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo static.at:171 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/m$st; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m$st" || test -x "$bindir/m$st"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/m$st; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m$st" || test -x "$bindir/m$st"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:171: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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"
      $at_traceoff
echo "$at_srcdir/static.at:187: ./m\$st || (exit 1); lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m\$st || (exit 1)\" || test -x \"./m\$st || (exit 1)\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo static.at:187 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m$st || (exit 1); lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m$st || (exit 1)" || test -x "./m$st || (exit 1)"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m$st || (exit 1); lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m$st || (exit 1)" || test -x "./m$st || (exit 1)"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/static.at:187: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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"; then
	$at_traceoff
echo "$at_srcdir/static.at:191: \$bindir/m\$st || (exit 1); lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/m\$st || (exit 1)\" || test -x \"\$bindir/m\$st || (exit 1)\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo static.at:191 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/m$st || (exit 1); lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m$st || (exit 1)" || test -x "$bindir/m$st || (exit 1)"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/m$st || (exit 1); lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m$st || (exit 1)" || test -x "$bindir/m$st || (exit 1)"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/static.at:191: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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 -all-static; do
    $at_traceoff
echo "$at_srcdir/static.at:252: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o m\$st m.\$OBJEXT \\
	      -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
echo static.at:252 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m$st m.$OBJEXT \
	      -L$libdir1 -la1 a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m$st m.$OBJEXT \
	      -L$libdir1 -la1 a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:252: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
    $at_traceoff
echo "$at_srcdir/static.at:260: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1 m.\$OBJEXT \\
	      -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
echo static.at:260 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:260: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:263: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2 m.\$OBJEXT \\
	      -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
echo static.at:263 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT \
	      -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT \
	      -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:263: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:266: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3 m.\$OBJEXT \\
	      -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -Bstatic -la3 -Bdynamic"
echo static.at:266 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3 m.$OBJEXT \
	      -L$libdir1 -la1 a2/liba2.la -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3 m.$OBJEXT \
	      -L$libdir1 -la1 a2/liba2.la -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:266: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:269: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m12 m.\$OBJEXT \\
	      -L\$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
echo static.at:269 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:269: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:272: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m13 m.\$OBJEXT \\
	      -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \\
	      -L\$libdir3 -Bstatic -la3 -Bdynamic"
echo static.at:272 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m13 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \
	      -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m13 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \
	      -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:272: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:276: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m31 m.\$OBJEXT \\
	      -L\$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \\
	      -L\$libdir1 -Bstatic -la1 -Bdynamic"
echo static.at:276 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31 m.$OBJEXT \
	      -L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \
	      -L$libdir1 -Bstatic -la1 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31 m.$OBJEXT \
	      -L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \
	      -L$libdir1 -Bstatic -la1 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:276: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m23 m.\$OBJEXT \\
	      -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \\
	      -L\$libdir3 -Bstatic -la3 -Bdynamic"
echo static.at:280 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m23 m.$OBJEXT \
	      -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \
	      -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m23 m.$OBJEXT \
	      -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \
	      -L$libdir3 -Bstatic -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:280: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:284: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123 m.\$OBJEXT \\
	      -L\$libdir1 -Bstatic -la1 a2/liba2.la -L\$libdir3 -la3 -Bdynamic"
echo static.at:284 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123 m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:284: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
echo "$at_srcdir/static.at:287: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123a m.\$OBJEXT \\
	      -L\$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \\
	      -Bstatic -L\$libdir3 -la3 -Bdynamic"
echo static.at:287 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123a m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \
	      -Bstatic -L$libdir3 -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123a m.$OBJEXT \
	      -L$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \
	      -Bstatic -L$libdir3 -la3 -Bdynamic ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:287: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

                  fi

  ### install the programs.
  # We can't install any program that links dynamically against liba2.
  for st in -static -static-libtool-libs -all-static `$per_deplib && echo 2 12 23 123 123a`; do
    echo "# m$st"
    $at_traceoff
echo "$at_srcdir/static.at:301: \$LIBTOOL --mode=install cp m\$st \$bindir/m\$st"
echo static.at:301 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp m$st $bindir/m$st" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp m$st $bindir/m$st ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp m$st $bindir/m$st ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/static.at:301: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    if $have_static; then
      $at_traceoff
echo "$at_srcdir/static.at:303: \$EGREP 'relinking|has not been installed' stderr"
echo static.at:303 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$EGREP 'relinking|has not been installed' stderr" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $EGREP 'relinking|has not been installed' stderr ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $EGREP 'relinking|has not been installed' stderr ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/static.at:303: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  26 ) # 26. export.at:25: Export test
    at_setup_line='export.at:25'
    at_desc="Export test"
    $at_quiet $ECHO_N " 26: Export test                                    $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "26. export.at:25: testing ..."
      $at_traceon



$at_traceoff
echo "$at_srcdir/export.at:28: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
echo export.at:28 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/export.at:28: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
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"
echo export.at:30 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains a `...` command substitution)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; 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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; 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=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:30: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/export.at:148: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
echo export.at:148 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:148: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/export.at:149: \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
echo export.at:149 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:149: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/export.at:150: \$CC \$CPPFLAGS \$CFLAGS -c broken.c"
echo export.at:150 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CC $CPPFLAGS $CFLAGS -c broken.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CC $CPPFLAGS $CFLAGS -c broken.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CC $CPPFLAGS $CFLAGS -c broken.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:150: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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"; $at_traceoff
echo "$at_srcdir/export.at:155: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo \\
	       -rpath \$libdir' \$exportsyms"
echo export.at:155 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \
	       -rpath $libdir' $exportsyms ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \
	       -rpath $libdir' $exportsyms ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:155: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/export.at:157: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT liba.la"
echo export.at:157 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:157: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/export.at:159: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo export.at:159 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:159: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  if test -n "$exportsyms" && $can_hide; then
    $at_traceoff
echo "$at_srcdir/export.at:161: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken broken.\$OBJEXT liba.la
	      then (exit 1); else :; fi"
echo export.at:161 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken broken.$OBJEXT liba.la
	      then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken broken.$OBJEXT liba.la
	      then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:161: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  fi

  # case 2: shared library built from convenience archive.
  $at_traceoff
echo "$at_srcdir/export.at:166: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libconv.la a.lo"
echo export.at:166 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:166: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \\
	       -rpath $libdir' $exportsyms"; $at_traceoff
echo "$at_srcdir/export.at:168: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la libconv.la \\
	       -rpath \$libdir' \$exportsyms"
echo export.at:168 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \
	       -rpath $libdir' $exportsyms ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \
	       -rpath $libdir' $exportsyms ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:168: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/export.at:170: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT liba.la"
echo export.at:170 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:170: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/export.at:172: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo export.at:172 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:172: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  if test -n "$exportsyms" && $can_hide; then
    $at_traceoff
echo "$at_srcdir/export.at:174: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken broken.\$OBJEXT liba.la
	      then (exit 1); else :; fi"
echo export.at:174 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken broken.$OBJEXT liba.la
	      then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken broken.$OBJEXT liba.la
	      then (exit 1); else :; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:174: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  fi
done

$at_traceoff
echo "$at_srcdir/export.at:179: \$can_hide || (exit 77)"
echo export.at:179 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$can_hide || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $can_hide || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $can_hide || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/export.at:179: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  27 ) # 27. search-path.at:25: sys_lib_search_path
    at_setup_line='search-path.at:25'
    at_desc="sys_lib_search_path"
    $at_quiet $ECHO_N " 27: sys_lib_search_path                            $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "27. 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\"
for path in $sys_lib_search_path; do
  if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -L$path -lz
  then
    $at_traceoff
echo "$at_srcdir/search-path.at:47: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT -lz"
echo search-path.at:47 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -lz" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -lz ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -lz ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/search-path.at:47: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    break
  fi
done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  28 ) # 28. indirect_deps.at:25: indirect convenience
    at_setup_line='indirect_deps.at:25'
    at_desc="indirect convenience"
    $at_quiet $ECHO_N " 28: indirect convenience                           $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "28. 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
  $at_traceoff
echo "$at_srcdir/indirect_deps.at:60: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1 m.\$OBJEXT libd.la"
echo indirect_deps.at:60 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m.$OBJEXT libd.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m.$OBJEXT libd.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m.$OBJEXT libd.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:60: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/indirect_deps.at:62: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2 m.\$OBJEXT libconv.la"
echo indirect_deps.at:62 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m.$OBJEXT libconv.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m.$OBJEXT libconv.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m.$OBJEXT libconv.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:62: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/indirect_deps.at:64: ./m1; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m1\" || test -x \"./m1\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo indirect_deps.at:64 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m1; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m1" || test -x "./m1"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m1; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m1" || test -x "./m1"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:64: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/indirect_deps.at:65: ./m2; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m2\" || test -x \"./m2\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo indirect_deps.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  29 ) # 29. indirect_deps.at:71: indirect uninstalled
    at_setup_line='indirect_deps.at:71'
    at_desc="indirect uninstalled"
    $at_quiet $ECHO_N " 29: indirect uninstalled                           $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "29. 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

  $at_traceoff
echo "$at_srcdir/indirect_deps.at:109: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1 m1.\$OBJEXT b/libb.la"
echo indirect_deps.at:109 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m1.$OBJEXT b/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m1.$OBJEXT b/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1 m1.$OBJEXT b/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:109: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/indirect_deps.at:111: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2 m2.\$OBJEXT c/libcee.la"
echo indirect_deps.at:111 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m2.$OBJEXT c/libcee.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m2.$OBJEXT c/libcee.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2 m2.$OBJEXT c/libcee.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:111: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/indirect_deps.at:113: ./m1; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m1\" || test -x \"./m1\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo indirect_deps.at:113 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m1; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m1" || test -x "./m1"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m1; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m1" || test -x "./m1"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:113: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  $at_traceoff
echo "$at_srcdir/indirect_deps.at:114: ./m2; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./m2\" || test -x \"./m2\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo indirect_deps.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./m2; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./m2" || test -x "./m2"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/indirect_deps.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  30 ) # 30. archive-in-archive.at:26: static library contains static library
    at_setup_line='archive-in-archive.at:26'
    at_desc="static library contains static library"
    $at_quiet $ECHO_N " 30: static library contains static library         $ECHO_C"
    at_xfail=no
      case "$archive_contents" in *"libfoo.a"*) : ;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "30. 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
$at_traceoff
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"
echo archive-in-archive.at:45 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/archive-in-archive.at:45: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/archive-in-archive.at:48: \$LIBTOOL --mode=install cp libbar.la \$thisdir"
echo archive-in-archive.at:48 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp libbar.la $thisdir" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp libbar.la $thisdir ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp libbar.la $thisdir ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/archive-in-archive.at:48: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/archive-in-archive.at:49: ar -t libbar.a | grep libfoo.a"
echo archive-in-archive.at:49 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ar -t libbar.a | grep libfoo.a ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ar -t libbar.a | grep libfoo.a ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/archive-in-archive.at:49: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

archive_contents=`ar -t libbar.a`

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-3 ) # Banner 3. destdir.at:25
    cat <<\_ATEOF

DESTDIR tests

_ATEOF
    ;;

  31 ) # 31. destdir.at:48: Simple DESTDIR install
    at_setup_line='destdir.at:48'
    at_desc="Simple DESTDIR install"
    $at_quiet $ECHO_N " 31: Simple DESTDIR install                         $ECHO_C"
    at_xfail=no
      eval `$LIBTOOL --config | grep '^fast_install='`
           case $fast_install in no) :;; *) false;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "31. 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 m.$OBJEXT liba.la
mkdir $DESTDIR$libdir $DESTDIR$bindir
$at_traceoff
echo "$at_srcdir/destdir.at:61: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
echo destdir.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/destdir.at:63: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
echo destdir.at:63 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:63: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
echo "$at_srcdir/destdir.at:69: \$LIBTOOL --mode=finish \$libdir"
echo destdir.at:69 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=finish $libdir" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=finish $libdir ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=finish $libdir ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/destdir.at:70: \$bindir/m; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/m\" || test -x \"\$bindir/m\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo destdir.at:70 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m" || test -x "$bindir/m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m" || test -x "$bindir/m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:70: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  32 ) # 32. destdir.at:75: DESTDIR with in-package deplibs
    at_setup_line='destdir.at:75'
    at_desc="DESTDIR with in-package deplibs"
    $at_quiet $ECHO_N " 32: DESTDIR with in-package deplibs                $ECHO_C"
    at_xfail=no
      eval `$LIBTOOL --config | grep '^fast_install='`
           case $fast_install in no) :;; *) false;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "32. 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 m.$OBJEXT liba.la
mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir
$at_traceoff
echo "$at_srcdir/destdir.at:96: \$LIBTOOL --mode=install cp liba1dep.la \$DESTDIR\$libdir/liba1dep.la"
echo destdir.at:96 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:96: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/destdir.at:98: \$LIBTOOL --mode=install cp liba2dep.la \$DESTDIR\${libdir}2/liba2dep.la"
echo destdir.at:98 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:98: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/destdir.at:100: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
echo destdir.at:100 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:100: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/destdir.at:102: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
echo destdir.at:102 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:102: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
echo "$at_srcdir/destdir.at:109: \$LIBTOOL --mode=finish \$libdir \${libdir}2"
echo destdir.at:109 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=finish $libdir ${libdir}2 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=finish $libdir ${libdir}2 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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

$at_traceoff
echo "$at_srcdir/destdir.at:127: \$bindir/m; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$bindir/m\" || test -x \"\$bindir/m\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo destdir.at:127 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $bindir/m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m" || test -x "$bindir/m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $bindir/m; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$bindir/m" || test -x "$bindir/m"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/destdir.at:127: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



# TODO: make this more portable:
if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then
  $at_traceoff
echo "$at_srcdir/destdir.at:131: \$OBJDUMP -p \$bindir/m\$EXEEXT | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
echo destdir.at:131 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR" ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR" ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/destdir.at:131: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  . $libdir/liba.la
  set x $library_names
  lname=$2
  if test -n "$lname"; then
    $at_traceoff
echo "$at_srcdir/destdir.at:136: \$OBJDUMP -p \$libdir/\$lname | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
echo destdir.at:136 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$OBJDUMP -p $libdir/$lname | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR" ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR" ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/destdir.at:136: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  fi
fi

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-4 ) # Banner 4. old-m4-iface.at:26
    cat <<\_ATEOF

Support for older m4 interface.

_ATEOF
    ;;

  33 ) # 33. old-m4-iface.at:40: AM_PROG_LIBTOOL
    at_setup_line='old-m4-iface.at:40'
    at_desc="AM_PROG_LIBTOOL"
    $at_quiet $ECHO_N " 33: AM_PROG_LIBTOOL                                $ECHO_C"
    at_xfail=no
      test "$AUTOCONF" = no && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "33. old-m4-iface.at:40: testing ..."
      $at_traceon


cat >configure.in <<'_ATEOF'
AC_INIT(old.c)
AM_PROG_LIBTOOL
AC_OUTPUT(Makefile)
_ATEOF


cat >Makefile.in <<'_ATEOF'
COMPILE = @CC@ @CPPFLAGS@ @CFLAGS@
LINK      = @CC@ @CFLAGS@ @LDFLAGS@ -o $@
SHELL     = @SHELL@

all: old@EXEEXT@

old@EXEEXT@: old.@OBJEXT@
	$(LINK) old.@OBJEXT@

.SUFFIXES:
.SUFFIXES: .c .@OBJEXT@

.c.@OBJEXT@:
	$(COMPILE) -c $<
_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...
$at_traceoff
echo "$at_srcdir/old-m4-iface.at:80: 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"
echo old-m4-iface.at:80 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; 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_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; 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=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:80: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon






$at_traceoff
echo "$at_srcdir/old-m4-iface.at:85: \$AUTOCONF --force"
echo old-m4-iface.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF --force" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:85: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/old-m4-iface.at:85: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo old-m4-iface.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:85: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/old-m4-iface.at:85: \$MAKE  "
echo old-m4-iface.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:85: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/old-m4-iface.at:87: ./old; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./old\" || test -x \"./old\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo old-m4-iface.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./old; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./old" || test -x "./old"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./old; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./old" || test -x "./old"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo >>"$at_stdout"; echo "Hello, World!" | $at_diff - "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
$at_traceoff
echo "$at_srcdir/old-m4-iface.at:93: \$LIBTOOLIZE -n"
echo old-m4-iface.at:93 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOLIZE -n" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE -n ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE -n ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:93: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

# ensure no shell errors:
$at_traceoff
echo "$at_srcdir/old-m4-iface.at:95: grep -v \"^libtoolize: \" stderr"
echo old-m4-iface.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep -v "^libtoolize: " stderr ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep -v "^libtoolize: " stderr ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/old-m4-iface.at:95: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/old-m4-iface.at:96: grep \"Remember to add.*LT_INIT.*to configure.in\" stdout"
echo old-m4-iface.at:96 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep "Remember to add.*LT_INIT.*to configure.in" stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep "Remember to add.*LT_INIT.*to configure.in" stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:96: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/old-m4-iface.at:97: grep \"Consider adding.*LT_WITH_LTDL\" stdout"
echo old-m4-iface.at:97 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep "Consider adding.*LT_WITH_LTDL" stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep "Consider adding.*LT_WITH_LTDL" stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/old-m4-iface.at:97: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/old-m4-iface.at:98: grep \"Remember to add.*LT_CONFIG_LTDL_DIR\" stdout"
echo old-m4-iface.at:98 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/old-m4-iface.at:98: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  34 ) # 34. old-m4-iface.at:107: AC_WITH_LTDL
    at_setup_line='old-m4-iface.at:107'
    at_desc="AC_WITH_LTDL"
    $at_quiet $ECHO_N " 34: AC_WITH_LTDL                                   $ECHO_C"
    at_xfail=no
      test "$ACLOCAL" = no && at_xfail=yes
      test "$AUTOCONF" = no && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "34. old-m4-iface.at:107: 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@
	$(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@

.SUFFIXES:
.SUFFIXES: .c .@OBJEXT@ .lo

.c.@OBJEXT@:
	$(COMPILE) -c $<

.c.lo:
	$(LTCOMPILE) -c -o $@ $<
_ATEOF


$LIBTOOLIZE --ltdl --install


$at_traceoff
echo "$at_srcdir/old-m4-iface.at:153: \$ACLOCAL -I libltdl/m4"
echo old-m4-iface.at:153 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I libltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:153: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon






$at_traceoff
echo "$at_srcdir/old-m4-iface.at:153: \$AUTOCONF --force"
echo old-m4-iface.at:153 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF --force" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:153: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/old-m4-iface.at:153: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo old-m4-iface.at:153 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:153: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/old-m4-iface.at:153: \$MAKE  "
echo old-m4-iface.at:153 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:153: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/old-m4-iface.at:156: ./ltdldemo; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./ltdldemo\" || test -x \"./ltdldemo\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo old-m4-iface.at:156 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/old-m4-iface.at:156: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-5 ) # Banner 5. am-subdir.at:26
    cat <<\_ATEOF

Libtool subdir-objects support.

_ATEOF
    ;;

  35 ) # 35. am-subdir.at:33: C subdir-objects
    at_setup_line='am-subdir.at:33'
    at_desc="C subdir-objects"
    $at_quiet $ECHO_N " 35: C subdir-objects                               $ECHO_C"
    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"
    (
      echo "35. am-subdir.at:33: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdir-demo], 2.2, 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


$at_traceoff
echo "$at_srcdir/am-subdir.at:78: \$ACLOCAL -I m4"
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon





$at_traceoff
echo "$at_srcdir/am-subdir.at:78: \$AUTOMAKE --add-missing"
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/am-subdir.at:78: grep 'require .*but have' stderr && (exit 77)"
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/am-subdir.at:78: \$AUTOCONF "
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/am-subdir.at:78: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/am-subdir.at:78: \$MAKE  "
echo am-subdir.at:78 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:78: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/am-subdir.at:80: subdir/subdemo; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"subdir/subdemo\" || test -x \"subdir/subdemo\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo am-subdir.at:80 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; subdir/subdemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "subdir/subdemo" || test -x "subdir/subdemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; subdir/subdemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "subdir/subdemo" || test -x "subdir/subdemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:80: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/am-subdir.at:81: grep 'Welcome to GNU Libtool subdir-objects test' stdout"
echo am-subdir.at:81 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'Welcome to GNU Libtool subdir-objects test' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'Welcome to GNU Libtool subdir-objects test' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:81: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/am-subdir.at:83: grep 'This is libsub' stdout"
echo am-subdir.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'This is libsub' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'This is libsub' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  36 ) # 36. am-subdir.at:93: C++ subdir-objects
    at_setup_line='am-subdir.at:93'
    at_desc="C++ subdir-objects"
    $at_quiet $ECHO_N " 36: C++ subdir-objects                             $ECHO_C"
    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"
    (
      echo "36. am-subdir.at:93: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/am-subdir.at:94: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
echo am-subdir.at:94 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:94: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/am-subdir.at:94: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
echo am-subdir.at:94 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:94: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



cat >configure.ac <<'_ATEOF'
AC_INIT([subdir-demo], 2.2, bug-libtool@gnu.org)
AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CXXCPP

# As of the writing of this demo, GNU Autoconf's AC_OBJEXT and
# AC_EXEEXT macros only works for C compilers!
# Libtool's setup macro calls AC_OBJEXT and AC_EXEEXT without setting
# the test language to C.  We do it before any libtool setup macros are
# called so that the proper values are cached beforehand.  We also do
# it before any linker flags (LDFLAGS) are set so that C++ specific
# ones don't break the tests.
AC_LANG_PUSH([C])
AC_OBJEXT
AC_EXEEXT
AC_LANG_POP

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


$at_traceoff
echo "$at_srcdir/am-subdir.at:158: \$ACLOCAL -I m4"
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon





$at_traceoff
echo "$at_srcdir/am-subdir.at:158: \$AUTOMAKE --add-missing"
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/am-subdir.at:158: grep 'require .*but have' stderr && (exit 77)"
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/am-subdir.at:158: \$AUTOCONF "
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/am-subdir.at:158: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/am-subdir.at:158: \$MAKE  "
echo am-subdir.at:158 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:158: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/am-subdir.at:160: subdir/subdemo; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"subdir/subdemo\" || test -x \"subdir/subdemo\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo am-subdir.at:160 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; subdir/subdemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "subdir/subdemo" || test -x "subdir/subdemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; subdir/subdemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "subdir/subdemo" || test -x "subdir/subdemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/am-subdir.at:160: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-6 ) # Banner 6. lt_dlexit.at:28
    cat <<\_ATEOF

Libltdl functionality.

_ATEOF
    ;;

  37 ) # 37. lt_dlexit.at:30: lt_dlexit unloading libs
    at_setup_line='lt_dlexit.at:30'
    at_desc="lt_dlexit unloading libs"
    $at_quiet $ECHO_N " 37: lt_dlexit unloading libs                       $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "37. lt_dlexit.at:30: testing ..."
      $at_traceon



# Test for
# http://lists.gnu.org/archive/html/bug-libtool/2007-01/msg00014.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 (!(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
$at_traceoff
echo "$at_srcdir/lt_dlexit.at:125: case \$LIBLTDL in #(
 */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
echo lt_dlexit.at:125 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dlexit.at:125: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
$at_traceoff
echo "$at_srcdir/lt_dlexit.at:136: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba1.la a1.lo \\
          -rpath /foo -avoid-version"
echo lt_dlexit.at:136 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \
          -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \
          -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dlexit.at:136: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/lt_dlexit.at:138: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o modb1.la b1.lo \\
          -rpath /foo -module -avoid-version liba1.la"
echo lt_dlexit.at:138 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o modb1.la b1.lo \
          -rpath /foo -module -avoid-version liba1.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dlexit.at:138: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# TODO: test -dlpreopen
for dlopen in -dlopen; do
  $at_traceoff
echo "$at_srcdir/lt_dlexit.at:143: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \\
           \$dlopen modb1.la \$LIBLTDL"
echo lt_dlexit.at:143 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
           $dlopen modb1.la $LIBLTDL ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
           $dlopen modb1.la $LIBLTDL ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dlexit.at:143: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/lt_dlexit.at:145: \$LIBTOOL --mode=execute -dlopen modb1.la ./main; lt_status=\$?;
	   if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo lt_dlexit.at:145 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=execute -dlopen modb1.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=execute -dlopen modb1.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dlexit.at:145: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  38 ) # 38. lt_dladvise.at:28: lt_dlopenadvise library loading
    at_setup_line='lt_dladvise.at:28'
    at_desc="lt_dlopenadvise library loading"
    $at_quiet $ECHO_N " 38: lt_dlopenadvise library loading                $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "38. 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.  */
      if (info && info->is_symglobal)
        {
          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);
}

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 ();

  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 >expout <<'_ATEOF'
resident: 2
local: 3
global: 4
depend: 5
_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
$at_traceoff
echo "$at_srcdir/lt_dladvise.at:272: case \$LIBLTDL in #(
 */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
echo lt_dladvise.at:272 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dladvise.at:272: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


CPPFLAGS="$LTDLINCL $CPPFLAGS"

dlopenable='resident local global'

# ------------------------------------------------------------------------- #
# 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().    #
# ------------------------------------------------------------------------- #

case $host_os in
cygwin*)
  # These hosts do not support linking without -no-undefined
  ;;
*)
  dlopenable="$dlopen depend"
  $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
  $at_traceoff
echo "$at_srcdir/lt_dladvise.at:294: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o libdepend.la \\
            moddepend.lo -rpath /foo -avoid-version"
echo lt_dladvise.at:294 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \
            moddepend.lo -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \
            moddepend.lo -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dladvise.at:294: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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; do
  $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c
  $at_traceoff
echo "$at_srcdir/lt_dladvise.at:308: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o lib\$name.la \\
            mod\$name.lo -rpath /foo -avoid-version"
echo lt_dladvise.at:308 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \
            mod$name.lo -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \
            mod$name.lo -rpath /foo -avoid-version ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dladvise.at:308: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

done

# TODO: test -dlpreopen
for dlopen in -dlopen; do

  modules=
  for module in $dlopenable; do
    modules="${modules+$modules }$dlopen lib$module.la"
  done

  $at_traceoff
echo "$at_srcdir/lt_dladvise.at:320: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \\
           \$modules \$LIBLTDL"
echo lt_dladvise.at:320 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
           $modules $LIBLTDL ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT \
           $modules $LIBLTDL ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dladvise.at:320: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/lt_dladvise.at:322: \$LIBTOOL --mode=execute \$modules ./main; lt_status=\$?;
	   if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo lt_dladvise.at:322 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=execute $modules ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=execute $modules ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/lt_dladvise.at:322: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  39 ) # 39. need_lib_prefix.at:25: enforced lib prefix
    at_setup_line='need_lib_prefix.at:25'
    at_desc="enforced lib prefix"
    $at_quiet $ECHO_N " 39: enforced lib prefix                            $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "39. 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


: ${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
$at_traceoff
echo "$at_srcdir/need_lib_prefix.at:144: case \$LIBLTDL in #(
 */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
esac"
echo need_lib_prefix.at:144 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; case $LIBLTDL in #(
 */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
esac ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:144: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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

$at_traceoff
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"
echo need_lib_prefix.at:163 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:163: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
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"
echo need_lib_prefix.at:165 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:165: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/need_lib_prefix.at:167: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la \$LIBLTDL"
echo need_lib_prefix.at:167 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:167: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/need_lib_prefix.at:170: \$LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la ./main; lt_status=\$?;
	   if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo need_lib_prefix.at:170 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:170: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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 $instdir/bin/main

$at_traceoff
echo "$at_srcdir/need_lib_prefix.at:183: \$instdir/bin/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"\$instdir/bin/main\" || test -x \"\$instdir/bin/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo need_lib_prefix.at:183 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $instdir/bin/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$instdir/bin/main" || test -x "$instdir/bin/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $instdir/bin/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "$instdir/bin/main" || test -x "$instdir/bin/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/need_lib_prefix.at:183: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-7 ) # Banner 7. standalone.at:25
    cat <<\_ATEOF

Standalone Libltdl.

_ATEOF
    ;;

  40 ) # 40. standalone.at:31: compiling softlinked libltdl
    at_setup_line='standalone.at:31'
    at_desc="compiling softlinked libltdl"
    $at_quiet $ECHO_N " 40: compiling softlinked libltdl                   $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "40. standalone.at:31: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/standalone.at:33: $LIBTOOLIZE --ltdl=.

"
echo standalone.at:33 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --ltdl=.

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --ltdl=.

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:33: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/standalone.at:34: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo standalone.at:34 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:34: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/standalone.at:35: \$MAKE all \$tst_dist "
echo standalone.at:35 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:35: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/standalone.at:37: test -f libltdlc.la"
echo standalone.at:37 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:37: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  41 ) # 41. standalone.at:46: compiling copied libltdl
    at_setup_line='standalone.at:46'
    at_desc="compiling copied libltdl"
    $at_quiet $ECHO_N " 41: compiling copied libltdl                       $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "41. standalone.at:46: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/standalone.at:48: $LIBTOOLIZE --copy --ltdl=.

"
echo standalone.at:48 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --ltdl=.

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --ltdl=.

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:48: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/standalone.at:49: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo standalone.at:49 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:49: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/standalone.at:50: \$MAKE all \$tst_dist "
echo standalone.at:50 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:50: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/standalone.at:52: test -f libltdlc.la"
echo standalone.at:52 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:52: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  42 ) # 42. standalone.at:61: installable libltdl
    at_setup_line='standalone.at:61'
    at_desc="installable libltdl"
    $at_quiet $ECHO_N " 42: installable libltdl                            $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "42. standalone.at:61: testing ..."
      $at_traceon


prefix=`pwd`/_inst

$at_traceoff
echo "$at_srcdir/standalone.at:65: $LIBTOOLIZE --copy --ltdl=.

"
echo standalone.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --ltdl=.

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --ltdl=.

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/standalone.at:66: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
echo standalone.at:66 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:66: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/standalone.at:67: \$MAKE all install \$tst_dist "
echo standalone.at:67 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:67: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/standalone.at:69: test -f \$prefix/lib/libltdl.la"
echo standalone.at:69 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:69: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/standalone.at:70: test -f \$prefix/include/ltdl.h"
echo standalone.at:70 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:70: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  43 ) # 43. standalone.at:79: linking libltdl without autotools
    at_setup_line='standalone.at:79'
    at_desc="linking libltdl without autotools"
    $at_quiet $ECHO_N " 43: linking libltdl without autotools              $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "43. 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)

$(LIBTOOL) libltdl/libltdlc.la: 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)"

libltdl/Makefile:
	cd libltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS)

ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo
	$(LTLINK) -o ltdldemo 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



$at_traceoff
echo "$at_srcdir/standalone.at:82: $LIBTOOLIZE --copy --ltdl

"
echo standalone.at:82 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOLIZE --copy --ltdl

 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOLIZE --copy --ltdl

 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:82: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/standalone.at:83: \$MAKE  CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" \\
        CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" \\
	CONFIGURE_OPTIONS=\"\$configure_options\""
echo standalone.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE  CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \
        CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
	CONFIGURE_OPTIONS="$configure_options" ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE  CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" \
        CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
	CONFIGURE_OPTIONS="$configure_options" ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/standalone.at:87: ./ltdldemo; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./ltdldemo\" || test -x \"./ltdldemo\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo standalone.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/standalone.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-8 ) # Banner 8. subproject.at:25
    cat <<\_ATEOF

Subproject Libltdl.

_ATEOF
    ;;

  44 ) # 44. subproject.at:57: compiling softlinked libltdl
    at_setup_line='subproject.at:57'
    at_desc="compiling softlinked libltdl"
    $at_quiet $ECHO_N " 44: compiling softlinked libltdl                   $ECHO_C"
    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"
    (
      echo "44. subproject.at:57: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2, 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
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --ltdl


$at_traceoff
echo "$at_srcdir/subproject.at:61: \$ACLOCAL -I sub/ltdl/m4"
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I sub/ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon





$at_traceoff
echo "$at_srcdir/subproject.at:61: \$AUTOMAKE --add-missing --copy"
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/subproject.at:61: grep 'require .*but have' stderr && (exit 77)"
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/subproject.at:61: \$AUTOCONF "
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/subproject.at:61: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/subproject.at:61: \$MAKE all \$tst_dist "
echo subproject.at:61 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:61: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/subproject.at:64: test -f sub/ltdl/libltdlc.la"
echo subproject.at:64 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f sub/ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f sub/ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:64: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  45 ) # 45. subproject.at:73: compiling copied libltdl
    at_setup_line='subproject.at:73'
    at_desc="compiling copied libltdl"
    $at_quiet $ECHO_N " 45: compiling copied libltdl                       $ECHO_C"
    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"
    (
      echo "45. subproject.at:73: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2, 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
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/subproject.at:77: \$ACLOCAL -I sub/ltdl/m4"
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I sub/ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon





$at_traceoff
echo "$at_srcdir/subproject.at:77: \$AUTOMAKE --add-missing --copy"
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/subproject.at:77: grep 'require .*but have' stderr && (exit 77)"
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/subproject.at:77: \$AUTOCONF "
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/subproject.at:77: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/subproject.at:77: \$MAKE all \$tst_dist "
echo subproject.at:77 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:77: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/subproject.at:80: test -f sub/ltdl/libltdlc.la"
echo subproject.at:80 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f sub/ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f sub/ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:80: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  46 ) # 46. subproject.at:89: installable libltdl
    at_setup_line='subproject.at:89'
    at_desc="installable libltdl"
    $at_quiet $ECHO_N " 46: installable libltdl                            $ECHO_C"
    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"
    (
      echo "46. subproject.at:89: testing ..."
      $at_traceon


prefix=`pwd`/_inst

cat >configure.ac <<'_ATEOF'
AC_INIT([subproject-demo], 2.2, 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
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/subproject.at:95: \$ACLOCAL -I sub/ltdl/m4"
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I sub/ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I sub/ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon





$at_traceoff
echo "$at_srcdir/subproject.at:95: \$AUTOMAKE --add-missing --copy"
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/subproject.at:95: grep 'require .*but have' stderr && (exit 77)"
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/subproject.at:95: \$AUTOCONF "
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/subproject.at:95: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/subproject.at:95: \$MAKE all install \$tst_dist "
echo subproject.at:95 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:95: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/subproject.at:99: test -f \$prefix/lib/libltdl.la"
echo subproject.at:99 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:99: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/subproject.at:100: test -f \$prefix/include/ltdl.h"
echo subproject.at:100 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:100: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  47 ) # 47. subproject.at:109: linking libltdl without autotools
    at_setup_line='subproject.at:109'
    at_desc="linking libltdl without autotools"
    $at_quiet $ECHO_N " 47: linking libltdl without autotools              $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "47. 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)

$(LIBTOOL) sub/ltdl/libltdlc.la: 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)"

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 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


( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/subproject.at:113: \$MAKE  CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\"  \\
     CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" SHELL=\"\$SHELL\" MAKE=\"\${MAKE-make}\" \\
     CONFIGURE_OPTIONS=\"\$configure_options\""
echo subproject.at:113 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE  CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS"  \
     CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" SHELL="$SHELL" MAKE="${MAKE-make}" \
     CONFIGURE_OPTIONS="$configure_options" ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE  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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:113: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/subproject.at:117: ./ltdldemo; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./ltdldemo\" || test -x \"./ltdldemo\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo subproject.at:117 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/subproject.at:117: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-9 ) # Banner 9. nonrecursive.at:26
    cat <<\_ATEOF

Nonrecursive Automake Libltdl.

_ATEOF
    ;;

  48 ) # 48. nonrecursive.at:78: compiling softlinked libltdl
    at_setup_line='nonrecursive.at:78'
    at_desc="compiling softlinked libltdl"
    $at_quiet $ECHO_N " 48: compiling softlinked libltdl                   $ECHO_C"
    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"
    (
      echo "48. nonrecursive.at:78: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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.7
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
foo_la_SOURCES		= foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --ltdl


$at_traceoff
echo "$at_srcdir/nonrecursive.at:83: if test -f ltdl/configure.ac; then false; fi"
echo nonrecursive.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/nonrecursive.at:90: \$ACLOCAL -I ltdl/m4"
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:90: \$AUTOHEADER "
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:90: \$AUTOMAKE --add-missing --copy"
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/nonrecursive.at:90: grep 'require .*but have' stderr && (exit 77)"
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:90: \$AUTOCONF "
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:90: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:90: \$MAKE all \$tst_dist "
echo nonrecursive.at:90 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:90: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/nonrecursive.at:93: test -f ltdl/libltdlc.la"
echo nonrecursive.at:93 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:93: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  49 ) # 49. nonrecursive.at:102: compiling copied libltdl
    at_setup_line='nonrecursive.at:102'
    at_desc="compiling copied libltdl"
    $at_quiet $ECHO_N " 49: compiling copied libltdl                       $ECHO_C"
    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"
    (
      echo "49. nonrecursive.at:102: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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.7
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
foo_la_SOURCES		= foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/nonrecursive.at:107: if test -f ltdl/configure.ac; then false; fi"
echo nonrecursive.at:107 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:107: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/nonrecursive.at:114: \$ACLOCAL -I ltdl/m4"
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:114: \$AUTOHEADER "
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:114: \$AUTOMAKE --add-missing --copy"
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/nonrecursive.at:114: grep 'require .*but have' stderr && (exit 77)"
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:114: \$AUTOCONF "
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:114: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:114: \$MAKE all \$tst_dist "
echo nonrecursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/nonrecursive.at:117: test -f ltdl/libltdlc.la"
echo nonrecursive.at:117 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:117: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  50 ) # 50. nonrecursive.at:126: installable libltdl
    at_setup_line='nonrecursive.at:126'
    at_desc="installable libltdl"
    $at_quiet $ECHO_N " 50: installable libltdl                            $ECHO_C"
    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"
    (
      echo "50. nonrecursive.at:126: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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.7
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
foo_la_SOURCES		= foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


prefix=`pwd`/_inst

$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/nonrecursive.at:133: if test -f ltdl/configure.ac; then false; fi"
echo nonrecursive.at:133 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:133: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/nonrecursive.at:140: \$ACLOCAL -I ltdl/m4"
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I ltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I ltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:140: \$AUTOHEADER "
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:140: \$AUTOMAKE --add-missing --copy"
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing --copy" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing --copy ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/nonrecursive.at:140: grep 'require .*but have' stderr && (exit 77)"
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/nonrecursive.at:140: \$AUTOCONF "
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:140: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/nonrecursive.at:140: \$MAKE all install \$tst_dist "
echo nonrecursive.at:140 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:140: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



$at_traceoff
echo "$at_srcdir/nonrecursive.at:143: test -f \$prefix/lib/libltdl.la"
echo nonrecursive.at:143 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:143: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/nonrecursive.at:144: test -f \$prefix/include/ltdl.h"
echo nonrecursive.at:144 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/nonrecursive.at:144: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-10 ) # Banner 10. recursive.at:25
    cat <<\_ATEOF

Recursive Automake Libltdl.

_ATEOF
    ;;

  51 ) # 51. recursive.at:60: compiling softlinked libltdl
    at_setup_line='recursive.at:60'
    at_desc="compiling softlinked libltdl"
    $at_quiet $ECHO_N " 51: compiling softlinked libltdl                   $ECHO_C"
    at_xfail=no
      case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "51. recursive.at:60: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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
foo_la_SOURCES = foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --ltdl


$at_traceoff
echo "$at_srcdir/recursive.at:65: if test -f ltdl/configure.ac; then false; fi"
echo recursive.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/recursive.at:67: \$AUTORECONF --force --verbose --install"
echo recursive.at:67 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTORECONF --force --verbose --install" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:67: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/recursive.at:67: grep 'require .*but have' stderr && (exit 77)"
echo recursive.at:67 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/recursive.at:67: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/recursive.at:68: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo recursive.at:68 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:68: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/recursive.at:69: \$MAKE all \$tst_dist "
echo recursive.at:69 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:69: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/recursive.at:71: test -f ltdl/libltdlc.la"
echo recursive.at:71 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:71: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  52 ) # 52. recursive.at:80: compiling copied libltdl
    at_setup_line='recursive.at:80'
    at_desc="compiling copied libltdl"
    $at_quiet $ECHO_N " 52: compiling copied libltdl                       $ECHO_C"
    at_xfail=no
      case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "52. recursive.at:80: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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
foo_la_SOURCES = foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/recursive.at:85: if test -f ltdl/configure.ac; then false; fi"
echo recursive.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:85: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/recursive.at:87: \$AUTORECONF --force --verbose --install"
echo recursive.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTORECONF --force --verbose --install" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/recursive.at:87: grep 'require .*but have' stderr && (exit 77)"
echo recursive.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/recursive.at:87: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/recursive.at:88: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo recursive.at:88 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:88: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/recursive.at:89: \$MAKE all \$tst_dist "
echo recursive.at:89 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:89: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/recursive.at:91: test -f ltdl/libltdlc.la"
echo recursive.at:91 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f ltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:91: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  53 ) # 53. recursive.at:100: installable libltdl
    at_setup_line='recursive.at:100'
    at_desc="installable libltdl"
    $at_quiet $ECHO_N " 53: installable libltdl                            $ECHO_C"
    at_xfail=no
      case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "53. recursive.at:100: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([subdirectory-demo], 2.2, 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
foo_la_SOURCES = foo.c
_ATEOF


echo 'int dummy = 0;' > foo.c


prefix=`pwd`/_inst

$LIBTOOLIZE --copy --ltdl


$at_traceoff
echo "$at_srcdir/recursive.at:107: if test -f ltdl/configure.ac; then false; fi"
echo recursive.at:107 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; if test -f ltdl/configure.ac; then false; fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:107: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/recursive.at:109: \$AUTORECONF --force --verbose --install"
echo recursive.at:109 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTORECONF --force --verbose --install" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTORECONF --force --verbose --install ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:109: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/recursive.at:109: grep 'require .*but have' stderr && (exit 77)"
echo recursive.at:109 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/recursive.at:109: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/recursive.at:110: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
echo recursive.at:110 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:110: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/recursive.at:111: \$MAKE all install \$tst_dist "
echo recursive.at:111 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install $tst_dist " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install $tst_dist  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:111: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/recursive.at:113: test -f \$prefix/lib/libltdl.la"
echo recursive.at:113 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:113: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/recursive.at:114: test -f \$prefix/include/ltdl.h"
echo recursive.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/recursive.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-11 ) # Banner 11. template.at:25
    cat <<\_ATEOF

C++ template tests.

_ATEOF
    ;;

  54 ) # 54. template.at:27: simple template test
    at_setup_line='template.at:27'
    at_desc="simple template test"
    $at_quiet $ECHO_N " 54: simple template test                           $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "54. template.at:27: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/template.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
echo template.at:28 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:28: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
echo template.at:28 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:28: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/template.at:79: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o alib.lo alib.cpp"
echo template.at:79 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:79: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:81: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o aclib.lo aclib.cpp"
echo template.at:81 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:81: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:83: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libaclib.la aclib.lo"
echo template.at:83 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:83: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:85: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libalib.la -rpath /usr/local/lib alib.lo libaclib.la"
echo template.at:85 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /usr/local/lib alib.lo libaclib.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /usr/local/lib alib.lo libaclib.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /usr/local/lib alib.lo libaclib.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:85: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:87: \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c prog.cpp"
echo template.at:87 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:87: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:89: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o prog prog.\$OBJEXT libalib.la"
echo template.at:89 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog prog.$OBJEXT libalib.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog prog.$OBJEXT libalib.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog prog.$OBJEXT libalib.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:89: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/template.at:92: ./prog; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./prog\" || test -x \"./prog\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:92 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./prog; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./prog" || test -x "./prog"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./prog; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./prog" || test -x "./prog"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:92: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon







      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  55 ) # 55. template.at:126: template test with subdirs
    at_setup_line='template.at:126'
    at_desc="template test with subdirs"
    $at_quiet $ECHO_N " 55: template test with subdirs                     $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "55. template.at:126: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/template.at:127: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
echo template.at:127 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:127: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:127: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
echo template.at:127 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:127: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
  $at_traceoff
echo "$at_srcdir/template.at:220: \$CXX \$CPPFLAGS \$CXXFLAGS -c -o \$main_o ../src/sub/main.cpp"
echo template.at:220 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:220: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  ;;
*)
  main_o=main.$OBJEXT
  $at_traceoff
echo "$at_srcdir/template.at:225: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
echo template.at:225 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:225: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  ;;
esac

$at_traceoff
echo "$at_srcdir/template.at:230: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp"
echo template.at:230 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:230: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:232: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp"
echo template.at:232 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:232: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:234: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
echo template.at:234 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:234: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

# both convenience
$at_traceoff
echo "$at_srcdir/template.at:237: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
echo template.at:237 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:237: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:239: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo"
echo template.at:239 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:239: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:241: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la lib/liba.la"
echo template.at:241 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:241: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:243: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:243 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   *);;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# lib convenience
if $noskip; then
  $at_traceoff
echo "$at_srcdir/template.at:246: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo"
echo template.at:246 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:246: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:248: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la lib/liba.la"
echo template.at:248 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:248: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:250: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:250 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:250: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


fi

# both installed
$at_traceoff
echo "$at_srcdir/template.at:254: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo"
echo template.at:254 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:254: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:256: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar"
echo template.at:256 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:256: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:258: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la lib/liba.la"
echo template.at:258 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la lib/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:258: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:260: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:260 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:260: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# both convenience, libb depending on liba
$at_traceoff
echo "$at_srcdir/template.at:262: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
echo template.at:262 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:262: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:264: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la"
echo template.at:264 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:264: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:266: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la"
echo template.at:266 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:266: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/template.at:268: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:268 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:268: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# lib convenience
if $noskip; then

  $at_traceoff
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"
echo template.at:272 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:272: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:274: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la"
echo template.at:274 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:274: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:276: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:276 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:276: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


fi
# both installed
if $noskip; then
  $at_traceoff
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"
echo template.at:280 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:280: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:282: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main \$main_o lib2/libb.la"
echo template.at:282 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main $main_o lib2/libb.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:282: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/template.at:284: ./sub/main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub/main\" || test -x \"./sub/main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo template.at:284 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub/main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub/main" || test -x "./sub/main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:284: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


fi

cd ..

$at_traceoff
echo "$at_srcdir/template.at:289: \$noskip || (exit 77)"
echo template.at:289 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$noskip || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $noskip || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $noskip || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/template.at:289: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-12 ) # Banner 12. ctor.at:25
    cat <<\_ATEOF

Constructors.

_ATEOF
    ;;

  56 ) # 56. ctor.at:27: C++ static constructors
    at_setup_line='ctor.at:27'
    at_desc="C++ static constructors"
    $at_quiet $ECHO_N " 56: C++ static constructors                        $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "56. ctor.at:27: testing ..."
      $at_traceon


$at_traceoff
echo "$at_srcdir/ctor.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
echo ctor.at:28 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:28: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/ctor.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
echo ctor.at:28 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:28: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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


$at_traceoff
echo "$at_srcdir/ctor.at:56: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
	  -c libctor.cpp -o libctor.lo"
echo ctor.at:56 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
	  -c libctor.cpp -o libctor.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
	  -c libctor.cpp -o libctor.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:56: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/ctor.at:58: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
	  -c main.cpp -o main.lo"
echo ctor.at:58 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
	  -c main.cpp -o main.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
	  -c main.cpp -o main.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:58: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/ctor.at:60: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
	  libctor.lo -o libctor.la -rpath /none"
echo ctor.at:60 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
	  libctor.lo -o libctor.la -rpath /none ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
	  libctor.lo -o libctor.la -rpath /none ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:60: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/ctor.at:62: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
	  main.lo libctor.la -o main"
echo ctor.at:62 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
	  main.lo libctor.la -o main ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
	  main.lo libctor.la -o main ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:62: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/ctor.at:65: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo ctor.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/ctor.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-13 ) # Banner 13. early-libtool.at:25
    cat <<\_ATEOF

libtool script generation.

_ATEOF
    ;;

  57 ) # 57. early-libtool.at:32: config.status
    at_setup_line='early-libtool.at:32'
    at_desc="config.status"
    $at_quiet $ECHO_N " 57: config.status                                  $ECHO_C"
    at_xfail=no
      test "$ACLOCAL" = no && at_xfail=yes
      test "$AUTOCONF" = no && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "57. early-libtool.at:32: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtool-demo], 2.2, 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


$at_traceoff
echo "$at_srcdir/early-libtool.at:109: \$ACLOCAL -I m4"
echo early-libtool.at:109 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:109: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/early-libtool.at:110: \$AUTOCONF --force"
echo early-libtool.at:110 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF --force" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:110: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/early-libtool.at:111: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo early-libtool.at:111 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:111: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/early-libtool.at:112: \$MAKE  "
echo early-libtool.at:112 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:112: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/early-libtool.at:114: ./hell; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./hell\" || test -x \"./hell\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo early-libtool.at:114 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./hell; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./hell" || test -x "./hell"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./hell; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./hell" || test -x "./hell"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:114: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/early-libtool.at:115: grep 'Welcome to GNU Hell' stdout"
echo early-libtool.at:115 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'Welcome to GNU Hell' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'Welcome to GNU Hell' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:115: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/early-libtool.at:116: grep 'This is not GNU Hello.' stdout"
echo early-libtool.at:116 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'This is not GNU Hello.' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'This is not GNU Hello.' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:116: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  58 ) # 58. early-libtool.at:126: config.lt
    at_setup_line='early-libtool.at:126'
    at_desc="config.lt"
    $at_quiet $ECHO_N " 58: config.lt                                      $ECHO_C"
    at_xfail=no
      test "$ACLOCAL" = no && at_xfail=yes
      test "$AUTOCONF" = no && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "58. early-libtool.at:126: testing ..."
      $at_traceon


cat >configure.ac <<'_ATEOF'
AC_INIT([libtool-demo], 2.2, 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 $@

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


$at_traceoff
echo "$at_srcdir/early-libtool.at:214: \$ACLOCAL -I m4"
echo early-libtool.at:214 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:214: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/early-libtool.at:215: \$AUTOCONF --force"
echo early-libtool.at:215 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF --force" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF --force ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:215: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/early-libtool.at:216: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options "
echo early-libtool.at:216 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:216: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/early-libtool.at:217: \$MAKE  "
echo early-libtool.at:217 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE  " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE   ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE   ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:217: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )


$at_traceoff
echo "$at_srcdir/early-libtool.at:219: ./hell; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./hell\" || test -x \"./hell\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo early-libtool.at:219 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./hell; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./hell" || test -x "./hell"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./hell; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./hell" || test -x "./hell"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:219: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


$at_traceoff
echo "$at_srcdir/early-libtool.at:220: grep 'Welcome to GNU Hell' stdout"
echo early-libtool.at:220 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'Welcome to GNU Hell' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'Welcome to GNU Hell' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:220: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/early-libtool.at:221: grep 'This is not GNU Hello.' stdout"
echo early-libtool.at:221 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'This is not GNU Hello.' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'This is not GNU Hello.' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/early-libtool.at:221: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-14 ) # Banner 14. deplibs-ident.at:25
    cat <<\_ATEOF

Detecting identical deplibs.

_ATEOF
    ;;

  59 ) # 59. deplibs-ident.at:32: build tree relpaths
    at_setup_line='deplibs-ident.at:32'
    at_desc="build tree relpaths"
    $at_quiet $ECHO_N " 59: build tree relpaths                            $ECHO_C"
    at_xfail=no
      case $host in
                 *-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;;
                 *):;;
               esac && at_xfail=yes
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "59. deplibs-ident.at:32: testing ..."
      $at_traceon



mkdir a a/b c
echo 'int c() { return 0; }' > c/libcee.c
$at_traceoff
echo "$at_srcdir/deplibs-ident.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c c/libcee.c -o c/libcee.lo"
echo deplibs-ident.at:37 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:37: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/deplibs-ident.at:39: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere"
echo deplibs-ident.at:39 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:39: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
    $at_traceoff
echo "$at_srcdir/deplibs-ident.at:51: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba\$i.c"
echo deplibs-ident.at:51 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:51: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

    $at_traceoff
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"
echo deplibs-ident.at:53 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $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=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:53: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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
  $at_traceoff
echo "$at_srcdir/deplibs-ident.at:65: \$CC \$CFLAGS -c b.c"
echo deplibs-ident.at:65 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CC $CFLAGS -c b.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CC $CFLAGS -c b.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CC $CFLAGS -c b.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:65: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/deplibs-ident.at:66: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o b b.\$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere"
echo deplibs-ident.at:66 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; tee stdout <"$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/deplibs-ident.at:66: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

  $at_traceoff
echo "$at_srcdir/deplibs-ident.at:68: \$EGREP 'cee.*cee' stdout"
echo deplibs-ident.at:68 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$EGREP 'cee.*cee' stdout" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $EGREP 'cee.*cee' stdout ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $EGREP 'cee.*cee' stdout ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/deplibs-ident.at:68: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  )

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-15 ) # Banner 15. configure-iface.at:25
    cat <<\_ATEOF

configure interface to libltdl.

_ATEOF
    ;;

  60 ) # 60. configure-iface.at:102: installable libltdl
    at_setup_line='configure-iface.at:102'
    at_desc="installable libltdl"
    $at_quiet $ECHO_N " 60: installable libltdl                            $ECHO_C"
    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"
    (
      echo "60. 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



cat >configure.ac <<'_ATEOF'
AC_INIT([installable-ltdl-demo], 2.2, 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
libmodule_la_LDFLAGS	= -module

bin_PROGRAMS		= main
main_LDFLAGS		= -dlopen libmodule.la
main_LDADD		= $(LIBLTDL)
main_DEPENDENCIES	= $(LTDLDEPS)
_ATEOF


# Install everything!
prefix=`pwd`/_inst

$LIBTOOLIZE --ltdl


$at_traceoff
echo "$at_srcdir/configure-iface.at:141: \$ACLOCAL -I libltdl/m4"
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I libltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:141: \$AUTOHEADER "
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:141: \$AUTOMAKE --add-missing"
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/configure-iface.at:141: grep 'require .*but have' stderr && (exit 77)"
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:141: \$AUTOCONF "
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/configure-iface.at:141: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --with-included-ltdl --prefix=\$prefix"
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/configure-iface.at:141: \$MAKE all install "
echo configure-iface.at:141 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:141: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



# TODO: Check that the installed program `main' is linked against our libltdl
$at_traceoff
echo "$at_srcdir/configure-iface.at:145: test -f \$prefix/lib/libltdl.la"
echo configure-iface.at:145 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:145: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/configure-iface.at:146: test -f \$prefix/include/ltdl.h"
echo configure-iface.at:146 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:146: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


# Check that main is rebuilt if libltdl.la is newer
rm -f libltdl/libltdl.la
$at_traceoff
echo "$at_srcdir/configure-iface.at:150: \$MAKE -q main\$EXEEXT || exit 1"
echo configure-iface.at:150 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE -q main$EXEEXT || exit 1" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE -q main$EXEEXT || exit 1 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE -q main$EXEEXT || exit 1 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/configure-iface.at:150: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  61 ) # 61. configure-iface.at:159: --with-ltdl-include/lib
    at_setup_line='configure-iface.at:159'
    at_desc="--with-ltdl-include/lib"
    $at_quiet $ECHO_N " 61: --with-ltdl-include/lib                        $ECHO_C"
    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"
    (
      echo "61. configure-iface.at:159: testing ..."
      $at_traceon



# Install libltdl
prefix=`pwd`/_inst

$LIBTOOLIZE --copy --ltdl=ltdl



(cd ltdl
( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/configure-iface.at:168: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
echo configure-iface.at:168 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:168: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/configure-iface.at:169: \$MAKE all install "
echo configure-iface.at:169 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all install " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all install  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all install  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:169: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )

)

# Remove build files
rm -rf ltdl/

$at_traceoff
echo "$at_srcdir/configure-iface.at:175: test -f \$prefix/lib/libltdl.la"
echo configure-iface.at:175 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/lib/libltdl.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/lib/libltdl.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:175: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/configure-iface.at:176: test -f \$prefix/include/ltdl.h"
echo configure-iface.at:176 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "test -f $prefix/include/ltdl.h" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f $prefix/include/ltdl.h ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:176: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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



cat >configure.ac <<'_ATEOF'
AC_INIT([configure-iface-demo], 2.2, 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
libmodule_la_LDFLAGS	= -module

bin_PROGRAMS		= main
main_LDFLAGS		= -dlopen libmodule.la
main_LDADD		= $(LIBLTDL)
main_DEPENDENCIES	= $(LTDLDEPS)
_ATEOF


# 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


$at_traceoff
echo "$at_srcdir/configure-iface.at:209: \$ACLOCAL -I _inst/aclocal"
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I _inst/aclocal" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I _inst/aclocal ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I _inst/aclocal ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:209: \$AUTOHEADER "
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:209: \$AUTOMAKE --add-missing"
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/configure-iface.at:209: grep 'require .*but have' stderr && (exit 77)"
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:209: \$AUTOCONF "
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/configure-iface.at:209: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --with-ltdl-lib=\$prefix/lib --with-ltdl-include=\$prefix/include"
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/configure-iface.at:209: \$MAKE all "
echo configure-iface.at:209 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:209: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
echo "$at_srcdir/configure-iface.at:216: \$LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=\$?;
	   if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo configure-iface.at:216 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:216: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  62 ) # 62. configure-iface.at:225: --with-included-ltdl
    at_setup_line='configure-iface.at:225'
    at_desc="--with-included-ltdl"
    $at_quiet $ECHO_N " 62: --with-included-ltdl                           $ECHO_C"
    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"
    (
      echo "62. configure-iface.at:225: 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



cat >configure.ac <<'_ATEOF'
AC_INIT([configure-iface-demo], 2.2, 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
libmodule_la_LDFLAGS	= -module

bin_PROGRAMS		= main
main_LDFLAGS		= -dlopen libmodule.la
main_LDADD		= $(LIBLTDL)
main_DEPENDENCIES	= $(LTDLDEPS)
_ATEOF


$LIBTOOLIZE --ltdl


$at_traceoff
echo "$at_srcdir/configure-iface.at:261: \$ACLOCAL -I libltdl/m4"
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$ACLOCAL -I libltdl/m4" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $ACLOCAL -I libltdl/m4 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:261: \$AUTOHEADER "
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOHEADER " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOHEADER  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:261: \$AUTOMAKE --add-missing"
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOMAKE --add-missing" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOMAKE --add-missing ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; tee stderr <"$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then
  $at_traceoff
echo "$at_srcdir/configure-iface.at:261: grep 'require .*but have' stderr && (exit 77)"
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; grep 'require .*but have' stderr && (exit 77) ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




$at_traceoff
echo "$at_srcdir/configure-iface.at:261: \$AUTOCONF "
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$AUTOCONF " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $AUTOCONF  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $AUTOCONF  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon




( SHELL=${CONFIG_SHELL-/bin/sh}
   $at_traceoff
echo "$at_srcdir/configure-iface.at:261: CONFIG_SHELL=\$SHELL \$SHELL ./configure \$configure_options --with-included-ltdl"
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options --with-included-ltdl ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

 )

( $unset LIBTOOL LIBTOOLIZE
   $at_traceoff
echo "$at_srcdir/configure-iface.at:261: \$MAKE all "
echo configure-iface.at:261 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE all " in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE all  ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE all  ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:261: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon
 )



# --with-included-ltdl should build a convenience lib by default
$at_traceoff
echo "$at_srcdir/configure-iface.at:265: test -f libltdl/libltdlc.la"
echo configure-iface.at:265 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    at_trace_this=yes
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; test -f libltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; test -f libltdl/libltdlc.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:265: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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.
$at_traceoff
echo "$at_srcdir/configure-iface.at:270: \$LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=\$?;
	   if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo configure-iface.at:270 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=execute -dlopen libmodule.la ./main; lt_status=$?;
	   if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff expout "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/configure-iface.at:270: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon



# Check that main is rebuilt if libltdlc.la is newer
rm -f libltdl/libltdlc.la
$at_traceoff
echo "$at_srcdir/configure-iface.at:274: \$MAKE -q main\$EXEEXT || exit 1"
echo configure-iface.at:274 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$MAKE -q main$EXEEXT || exit 1" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $MAKE -q main$EXEEXT || exit 1 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $MAKE -q main$EXEEXT || exit 1 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   1) ;;
   *) echo "$at_srcdir/configure-iface.at:274: exit code was $at_status, expected 1"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  banner-16 ) # Banner 16. stresstest.at:30
    cat <<\_ATEOF

Libtool stress test.

_ATEOF
    ;;

  63 ) # 63. stresstest.at:31: Link option thorough search test
    at_setup_line='stresstest.at:31'
    at_desc="Link option thorough search test"
    $at_quiet $ECHO_N " 63: Link option thorough search test               $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "63. 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



$at_traceoff
echo "$at_srcdir/stresstest.at:221: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c -o sub/a.lo"
echo stresstest.at:221 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:221: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/stresstest.at:223: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c -o sub/b.lo"
echo stresstest.at:223 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:223: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/stresstest.at:225: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
echo stresstest.at:225 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:225: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/stresstest.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c -o main-static.lo"
echo stresstest.at:227 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:227: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/stresstest.at:229: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c dlself.c -o sub3/dlself.lo"
echo stresstest.at:229 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:229: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

$at_traceoff
echo "$at_srcdir/stresstest.at:231: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c dlself.c -o sub3/dlself-static.lo"
echo stresstest.at:231 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:231: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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"; $at_traceoff
echo "$at_srcdir/stresstest.at:251: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o \"\$rel\"sub2/liba.la \"\$rel\"sub/a.lo' \$linkargs"
echo stresstest.at:251 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:251: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$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 \"$rel\"main$mst.lo \"$rel\"sub2/liba.la"; $at_traceoff
echo "$at_srcdir/stresstest.at:260: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"main \"\$rel\"main\$mst.lo \"\$rel\"sub2/liba.la"
echo stresstest.at:260 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main \"$rel\"main$mst.lo \"$rel\"sub2/liba.la" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main "$rel"main$mst.lo "$rel"sub2/liba.la ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main "$rel"main$mst.lo "$rel"sub2/liba.la ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:260: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

	  $at_traceoff
echo "$at_srcdir/stresstest.at:262: ./main; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./main\" || test -x \"./main\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo stresstest.at:262 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./main; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./main" || test -x "./main"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:262: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


	  for l10 in '' '-export-symbols dlselfsyms'
	  do
	    echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10"; $at_traceoff
echo "$at_srcdir/stresstest.at:265: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"sub3/dlself \"\$rel\"sub3/dlself\$mst.lo \"\$rel\"sub2/liba.la sub/b.lo -dlopen self \$l10"
echo stresstest.at:265 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10 ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10 ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:265: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon

	    $at_traceoff
echo "$at_srcdir/stresstest.at:267: ./sub3/dlself; lt_status=\$?; if test \$lt_status -eq 0; then :;
	   elif test \"X\$host\" != \"X\$build\" && \\
	        { test -x \"./sub3/dlself\" || test -x \"./sub3/dlself\"\$EXEEXT; }
	   then (exit 77); else (exit \$lt_status); fi"
echo stresstest.at:267 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    echo 'Not enabling shell tracing (command contains an embedded newline)'
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; ./sub3/dlself; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub3/dlself" || test -x "./sub3/dlself"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; ./sub3/dlself; lt_status=$?; if test $lt_status -eq 0; then :;
	   elif test "X$host" != "X$build" && \
	        { test -x "./sub3/dlself" || test -x "./sub3/dlself"$EXEEXT; }
	   then (exit 77); else (exit $lt_status); fi ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
$at_diff "$at_devnull" "$at_stderr" || at_failed=:
$at_diff "$at_devnull" "$at_stdout" || at_failed=:
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/stresstest.at:267: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then


  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


	  done
	done
      done
    done
  done
done

      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;

  64 ) # 64. cmdline_wrap.at:28: Run tests with low max_cmd_len
    at_setup_line='cmdline_wrap.at:28'
    at_desc="Run tests with low max_cmd_len"
    $at_quiet $ECHO_N " 64: Run tests with low max_cmd_len                 $ECHO_C"
    at_xfail=no
    echo "#                             -*- compilation -*-" >> "$at_group_log"
    (
      echo "64. 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"
$at_traceoff
echo "$at_srcdir/cmdline_wrap.at:43: \$CONFIG_SHELL \$abs_srcdir/testsuite -k libtool \$INNER_TESTSUITEFLAGS"
echo cmdline_wrap.at:43 >"$at_check_line_file"

at_trace_this=
if test -n "$at_traceon"; then
    case "$CONFIG_SHELL $abs_srcdir/testsuite -k libtool $INNER_TESTSUITEFLAGS" in
        *'
'*) echo 'Not enabling shell tracing (command contains an embedded newline)' ;;
 *) at_trace_this=yes ;;
    esac
fi

if test -n "$at_trace_this"; then
    ( $at_traceon; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool $INNER_TESTSUITEFLAGS ) >"$at_stdout" 2>"$at_stder1"
    at_status=$?
    grep '^ *+' "$at_stder1" >&2
    grep -v '^ *+' "$at_stder1" >"$at_stderr"
else
    ( :; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool $INNER_TESTSUITEFLAGS ) >"$at_stdout" 2>"$at_stderr"
    at_status=$?
fi

at_failed=false
echo stderr:; cat "$at_stderr"
echo stdout:; cat "$at_stdout"
case $at_status in
   77) echo 77 > "$at_status_file"; exit 77;;
   0) ;;
   *) echo "$at_srcdir/cmdline_wrap.at:43: exit code was $at_status, expected 0"
      at_failed=:;;
esac
if $at_failed; then

  for file in "testsuite.log"
     do echo "$file:"; sed 's/^/> /' "$file"; done
  echo 1 > "$at_status_file"
  exit 1
fi

$at_traceon


      $at_traceoff
      $at_times_p && times >"$at_times_file"
    ) 5>&1 2>&1 | eval $at_tee_pipe
    at_status=`cat "$at_status_file"`
    ;;


  * )
    echo "$as_me: no such test group: $at_group" >&2
    continue
    ;;
  esac

  # 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"

  case $at_group in
    banner-*) ;;
    *)
      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
	echo "$at_setup_line" >"$at_check_line_file"
      fi
      at_group_count=`expr 1 + $at_group_count`
      $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
      echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
      case $at_xfail:$at_status in
	yes:0)
	    at_msg="UNEXPECTED PASS"
	    at_xpass_list="$at_xpass_list $at_group"
	    at_errexit=$at_errexit_p
	    ;;
	no:0)
	    at_msg="ok"
	    at_pass_list="$at_pass_list $at_group"
	    at_errexit=false
	    ;;
	*:77)
	    at_msg='skipped ('`cat "$at_check_line_file"`')'
	    at_skip_list="$at_skip_list $at_group"
	    at_errexit=false
	    ;;
	yes:*)
	    at_msg='expected failure ('`cat "$at_check_line_file"`')'
	    at_xfail_list="$at_xfail_list $at_group"
	    at_errexit=false
	    ;;
	no:*)
	    at_msg='FAILED ('`cat "$at_check_line_file"`')'
	    at_fail_list="$at_fail_list $at_group"
	    at_errexit=$at_errexit_p
	    ;;
      esac
      # Make sure there is a separator even with long titles.
      echo " $at_msg"
      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
	  echo "$at_log_msg" >> "$at_group_log"
	  echo "$at_log_msg" >&5

	  # Cleanup the group directory, unless the user wants the files.
	  if $at_debug_p ; then
	    	  {
	    echo "#! /bin/sh"
	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
	    echo "cd '$at_dir'"
	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
	    echo 'exit 1'
	  } >$at_group_dir/run
	  chmod +x $at_group_dir/run

	  elif test -d "$at_group_dir"; then
	    find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
	    rm -fr "$at_group_dir"
	  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.
	  echo "$at_log_msg" >> "$at_group_log"

	  # Upon failure, keep the group directory for autopsy, and
	  # create the debugging script.
	  	  {
	    echo "#! /bin/sh"
	    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
	    echo "cd '$at_dir'"
	    echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
	         '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
	    echo 'exit 1'
	  } >$at_group_dir/run
	  chmod +x $at_group_dir/run

	  $at_errexit && break
	  ;;
      esac
      ;;
  esac
done

# Back to the top directory.
cd "$at_dir"

# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`date +%s 2>/dev/null`
echo "$as_me: ending at: $at_stop_date" >&5
case $at_start_time,$at_stop_time in
  [0-9]*,[0-9]*)
    at_duration_s=`expr $at_stop_time - $at_start_time`
    at_duration_m=`expr $at_duration_s / 60`
    at_duration_h=`expr $at_duration_m / 60`
    at_duration_s=`expr $at_duration_s % 60`
    at_duration_m=`expr $at_duration_m % 60`
    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
    echo "$as_me: test suite duration: $at_duration" >&5
    ;;
esac

# Wrap up the test suite with summary statistics.
at_skip_count=`set dummy $at_skip_list; shift; echo $#`
at_fail_count=`set dummy $at_fail_list; shift; echo $#`
at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`

at_run_count=`expr $at_group_count - $at_skip_count`
at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
at_total_fail_count=`expr $at_xfail_count + $at_fail_count`

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 "$0" $at_fail_list --list
      echo
    fi
    if test $at_skip_count != 0; then
      echo "Skipped tests:"
      $SHELL "$0" $at_skip_list --list
      echo
    fi
    if test $at_xpass_count != 0; then
      echo "Unexpected passes:"
      $SHELL "$0" $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

  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
  echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
  echo
  echo "   To: <bug-libtool@gnu.org>"
  echo "   Subject: [libtool 2.2] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
  echo
  if test $at_debug_p = false; then
    echo
    echo 'You may investigate any problem if you feel able to do so, in which'
    echo 'case the test suite provides a good starting point.  Its output may'
    echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
    echo
  fi
    exit 1
fi

exit 0



