Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / testsuite
1 #! /bin/sh
2 # Generated from testsuite.at by GNU Autoconf 2.68.
3 #
4 # Copyright (C) 2009, 2010 Free Software Foundation, Inc.
5 #
6 # This test suite is free software; the Free Software Foundation gives
7 # unlimited permission to copy, distribute and modify it.
8 ## -------------------- ##
9 ## M4sh Initialization. ##
10 ## -------------------- ##
11
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15   emulate sh
16   NULLCMD=:
17   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20   setopt NO_GLOB_SUBST
21 else
22   case `(set -o) 2>/dev/null` in #(
23   *posix*) :
24     set -o posix ;; #(
25   *) :
26      ;;
27 esac
28 fi
29
30
31 as_nl='
32 '
33 export as_nl
34 # Printing a long string crashes Solaris 7 /usr/bin/printf.
35 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
37 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38 # Prefer a ksh shell builtin over an external printf program on Solaris,
39 # but without wasting forks for bash or zsh.
40 if test -z "$BASH_VERSION$ZSH_VERSION" \
41     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
42   as_echo='print -r --'
43   as_echo_n='print -rn --'
44 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
45   as_echo='printf %s\n'
46   as_echo_n='printf %s'
47 else
48   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50     as_echo_n='/usr/ucb/echo -n'
51   else
52     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53     as_echo_n_body='eval
54       arg=$1;
55       case $arg in #(
56       *"$as_nl"*)
57         expr "X$arg" : "X\\(.*\\)$as_nl";
58         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
59       esac;
60       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
61     '
62     export as_echo_n_body
63     as_echo_n='sh -c $as_echo_n_body as_echo'
64   fi
65   export as_echo_body
66   as_echo='sh -c $as_echo_body as_echo'
67 fi
68
69 # The user is always right.
70 if test "${PATH_SEPARATOR+set}" != set; then
71   PATH_SEPARATOR=:
72   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
73     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
74       PATH_SEPARATOR=';'
75   }
76 fi
77
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.  Quoting is
81 # there to prevent editors from complaining about space-tab.
82 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
83 # splitting by setting IFS to empty value.)
84 IFS=" ""        $as_nl"
85
86 # Find who we are.  Look in the path if we contain no directory separator.
87 as_myself=
88 case $0 in #((
89   *[\\/]* ) as_myself=$0 ;;
90   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91 for as_dir in $PATH
92 do
93   IFS=$as_save_IFS
94   test -z "$as_dir" && as_dir=.
95     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
96   done
97 IFS=$as_save_IFS
98
99      ;;
100 esac
101 # We did not find ourselves, most probably we were run as `sh COMMAND'
102 # in which case we are not to be found in the path.
103 if test "x$as_myself" = x; then
104   as_myself=$0
105 fi
106 if test ! -f "$as_myself"; then
107   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
108   exit 1
109 fi
110
111 # Unset variables that we do not need and which cause bugs (e.g. in
112 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
113 # suppresses any "Segmentation fault" message there.  '((' could
114 # trigger a bug in pdksh 5.2.14.
115 for as_var in BASH_ENV ENV MAIL MAILPATH
116 do eval test x\${$as_var+set} = xset \
117   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
118 done
119 PS1='$ '
120 PS2='> '
121 PS4='+ '
122
123 # NLS nuisances.
124 LC_ALL=C
125 export LC_ALL
126 LANGUAGE=C
127 export LANGUAGE
128
129 # CDPATH.
130 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
131
132 if test "x$CONFIG_SHELL" = x; then
133   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
134   emulate sh
135   NULLCMD=:
136   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
137   # is contrary to our usage.  Disable this feature.
138   alias -g '\${1+\"\$@\"}'='\"\$@\"'
139   setopt NO_GLOB_SUBST
140 else
141   case \`(set -o) 2>/dev/null\` in #(
142   *posix*) :
143     set -o posix ;; #(
144   *) :
145      ;;
146 esac
147 fi
148 "
149   as_required="as_fn_return () { (exit \$1); }
150 as_fn_success () { as_fn_return 0; }
151 as_fn_failure () { as_fn_return 1; }
152 as_fn_ret_success () { return 0; }
153 as_fn_ret_failure () { return 1; }
154
155 exitcode=0
156 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
157 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
158 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
159 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
160 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
161
162 else
163   exitcode=1; echo positional parameters were not saved.
164 fi
165 test x\$exitcode = x0 || exit 1"
166   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
167   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
168   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
169   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
170 test \$(( 1 + 1 )) = 2 || exit 1"
171   if (eval "$as_required") 2>/dev/null; then :
172   as_have_required=yes
173 else
174   as_have_required=no
175 fi
176   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
177
178 else
179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
180 as_found=false
181 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
182 do
183   IFS=$as_save_IFS
184   test -z "$as_dir" && as_dir=.
185   as_found=:
186   case $as_dir in #(
187          /*)
188            for as_base in sh bash ksh sh5; do
189              # Try only shells that exist, to save several forks.
190              as_shell=$as_dir/$as_base
191              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
192                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
193   CONFIG_SHELL=$as_shell as_have_required=yes
194                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
195   break 2
196 fi
197 fi
198            done;;
199        esac
200   as_found=false
201 done
202 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
203               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
204   CONFIG_SHELL=$SHELL as_have_required=yes
205 fi; }
206 IFS=$as_save_IFS
207
208
209       if test "x$CONFIG_SHELL" != x; then :
210   # We cannot yet assume a decent shell, so we have to provide a
211         # neutralization value for shells without unset; and this also
212         # works around shells that cannot unset nonexistent variables.
213         # Preserve -v and -x to the replacement shell.
214         BASH_ENV=/dev/null
215         ENV=/dev/null
216         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
217         export CONFIG_SHELL
218         case $- in # ((((
219           *v*x* | *x*v* ) as_opts=-vx ;;
220           *v* ) as_opts=-v ;;
221           *x* ) as_opts=-x ;;
222           * ) as_opts= ;;
223         esac
224         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
225 fi
226
227     if test x$as_have_required = xno; then :
228   $as_echo "$0: This script requires a shell more modern than all"
229   $as_echo "$0: the shells that I found on your system."
230   if test x${ZSH_VERSION+set} = xset ; then
231     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233   else
234     $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
235 $0: including any error possibly output before this
236 $0: message. Then install a modern shell, or manually run
237 $0: the script under such a shell if you do have one."
238   fi
239   exit 1
240 fi
241 fi
242 fi
243 SHELL=${CONFIG_SHELL-/bin/sh}
244 export SHELL
245 # Unset more variables known to interfere with behavior of common tools.
246 CLICOLOR_FORCE= GREP_OPTIONS=
247 unset CLICOLOR_FORCE GREP_OPTIONS
248
249 ## --------------------- ##
250 ## M4sh Shell Functions. ##
251 ## --------------------- ##
252 # as_fn_unset VAR
253 # ---------------
254 # Portably unset VAR.
255 as_fn_unset ()
256 {
257   { eval $1=; unset $1;}
258 }
259 as_unset=as_fn_unset
260
261 # as_fn_set_status STATUS
262 # -----------------------
263 # Set $? to STATUS, without forking.
264 as_fn_set_status ()
265 {
266   return $1
267 } # as_fn_set_status
268
269 # as_fn_exit STATUS
270 # -----------------
271 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272 as_fn_exit ()
273 {
274   set +e
275   as_fn_set_status $1
276   exit $1
277 } # as_fn_exit
278
279 # as_fn_mkdir_p
280 # -------------
281 # Create "$as_dir" as a directory, including parents if necessary.
282 as_fn_mkdir_p ()
283 {
284
285   case $as_dir in #(
286   -*) as_dir=./$as_dir;;
287   esac
288   test -d "$as_dir" || eval $as_mkdir_p || {
289     as_dirs=
290     while :; do
291       case $as_dir in #(
292       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293       *) as_qdir=$as_dir;;
294       esac
295       as_dirs="'$as_qdir' $as_dirs"
296       as_dir=`$as_dirname -- "$as_dir" ||
297 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298          X"$as_dir" : 'X\(//\)[^/]' \| \
299          X"$as_dir" : 'X\(//\)$' \| \
300          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301 $as_echo X"$as_dir" |
302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303             s//\1/
304             q
305           }
306           /^X\(\/\/\)[^/].*/{
307             s//\1/
308             q
309           }
310           /^X\(\/\/\)$/{
311             s//\1/
312             q
313           }
314           /^X\(\/\).*/{
315             s//\1/
316             q
317           }
318           s/.*/./; q'`
319       test -d "$as_dir" && break
320     done
321     test -z "$as_dirs" || eval "mkdir $as_dirs"
322   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325 } # as_fn_mkdir_p
326 # as_fn_append VAR VALUE
327 # ----------------------
328 # Append the text in VALUE to the end of the definition contained in VAR. Take
329 # advantage of any shell optimizations that allow amortized linear growth over
330 # repeated appends, instead of the typical quadratic growth present in naive
331 # implementations.
332 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333   eval 'as_fn_append ()
334   {
335     eval $1+=\$2
336   }'
337 else
338   as_fn_append ()
339   {
340     eval $1=\$$1\$2
341   }
342 fi # as_fn_append
343
344 # as_fn_arith ARG...
345 # ------------------
346 # Perform arithmetic evaluation on the ARGs, and store the result in the
347 # global $as_val. Take advantage of shells that can avoid forks. The arguments
348 # must be portable across $(()) and expr.
349 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350   eval 'as_fn_arith ()
351   {
352     as_val=$(( $* ))
353   }'
354 else
355   as_fn_arith ()
356   {
357     as_val=`expr "$@" || test $? -eq 1`
358   }
359 fi # as_fn_arith
360
361
362 # as_fn_error STATUS ERROR [LINENO LOG_FD]
363 # ----------------------------------------
364 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366 # script with STATUS, using 1 if that was 0.
367 as_fn_error ()
368 {
369   as_status=$1; test $as_status -eq 0 && as_status=1
370   if test "$4"; then
371     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373   fi
374   $as_echo "$as_me: error: $2" >&2
375   as_fn_exit $as_status
376 } # as_fn_error
377
378 if expr a : '\(a\)' >/dev/null 2>&1 &&
379    test "X`expr 00001 : '.*\(...\)'`" = X001; then
380   as_expr=expr
381 else
382   as_expr=false
383 fi
384
385 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386   as_basename=basename
387 else
388   as_basename=false
389 fi
390
391 as_me=`$as_basename -- "$0" ||
392 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
393          X"$0" : 'X\(//\)$' \| \
394          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
395 $as_echo X/"$0" |
396     sed '/^.*\/\([^/][^/]*\)\/*$/{
397             s//\1/
398             q
399           }
400           /^X\/\(\/\/\)$/{
401             s//\1/
402             q
403           }
404           /^X\/\(\/\).*/{
405             s//\1/
406             q
407           }
408           s/.*/./; q'`
409
410 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
411   as_dirname=dirname
412 else
413   as_dirname=false
414 fi
415
416 # Avoid depending upon Character Ranges.
417 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420 as_cr_digits='0123456789'
421 as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424   as_lineno_1=$LINENO as_lineno_1a=$LINENO
425   as_lineno_2=$LINENO as_lineno_2a=$LINENO
426   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429   sed -n '
430     p
431     /[$]LINENO/=
432   ' <$as_myself |
433     sed '
434       s/[$]LINENO.*/&-/
435       t lineno
436       b
437       :lineno
438       N
439       :loop
440       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441       t loop
442       s/-\n.*//
443     ' >$as_me.lineno &&
444   chmod +x "$as_me.lineno" ||
445     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447   # Don't try to exec as it changes $[0], causing all sort of problems
448   # (the dirname of $[0] is not the place where we might find the
449   # original and so on.  Autoconf is especially sensitive to this).
450   . "./$as_me.lineno"
451   # Exit status is that of the last command.
452   exit
453 }
454
455 ECHO_C= ECHO_N= ECHO_T=
456 case `echo -n x` in #(((((
457 -n*)
458   case `echo 'xy\c'` in
459   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
460   xy)  ECHO_C='\c';;
461   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462        ECHO_T=' ';;
463   esac;;
464 *)
465   ECHO_N='-n';;
466 esac
467
468 rm -f conf$$ conf$$.exe conf$$.file
469 if test -d conf$$.dir; then
470   rm -f conf$$.dir/conf$$.file
471 else
472   rm -f conf$$.dir
473   mkdir conf$$.dir 2>/dev/null
474 fi
475 if (echo >conf$$.file) 2>/dev/null; then
476   if ln -s conf$$.file conf$$ 2>/dev/null; then
477     as_ln_s='ln -s'
478     # ... but there are two gotchas:
479     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481     # In both cases, we have to default to `cp -p'.
482     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483       as_ln_s='cp -p'
484   elif ln conf$$.file conf$$ 2>/dev/null; then
485     as_ln_s=ln
486   else
487     as_ln_s='cp -p'
488   fi
489 else
490   as_ln_s='cp -p'
491 fi
492 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493 rmdir conf$$.dir 2>/dev/null
494
495 if mkdir -p . 2>/dev/null; then
496   as_mkdir_p='mkdir -p "$as_dir"'
497 else
498   test -d ./-p && rmdir ./-p
499   as_mkdir_p=false
500 fi
501
502 if test -x / >/dev/null 2>&1; then
503   as_test_x='test -x'
504 else
505   if ls -dL / >/dev/null 2>&1; then
506     as_ls_L_option=L
507   else
508     as_ls_L_option=
509   fi
510   as_test_x='
511     eval sh -c '\''
512       if test -d "$1"; then
513         test -d "$1/.";
514       else
515         case $1 in #(
516         -*)set "./$1";;
517         esac;
518         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519         ???[sx]*):;;*)false;;esac;fi
520     '\'' sh
521   '
522 fi
523 as_executable_p=$as_test_x
524
525 # Sed expression to map a string onto a valid CPP name.
526 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528 # Sed expression to map a string onto a valid variable name.
529 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532
533
534
535 SHELL=${CONFIG_SHELL-/bin/sh}
536
537 # How were we run?
538 at_cli_args="$@"
539
540
541 # Not all shells have the 'times' builtin; the subshell is needed to make
542 # sure we discard the 'times: not found' message from the shell.
543 at_times_p=false
544 (times) >/dev/null 2>&1 && at_times_p=:
545
546 # CLI Arguments to pass to the debugging scripts.
547 at_debug_args=
548 # -e sets to true
549 at_errexit_p=false
550 # Shall we be verbose?  ':' means no, empty means yes.
551 at_verbose=:
552 at_quiet=
553 # Running several jobs in parallel, 0 means as many as test groups.
554 at_jobs=1
555 at_traceon=:
556 at_trace_echo=:
557 at_check_filter_trace=:
558
559 # Shall we keep the debug scripts?  Must be `:' when the suite is
560 # run by a debug script, so that the script doesn't remove itself.
561 at_debug_p=false
562 # Display help message?
563 at_help_p=false
564 # Display the version message?
565 at_version_p=false
566 # List test groups?
567 at_list_p=false
568 # --clean
569 at_clean=false
570 # Test groups to run
571 at_groups=
572 # Whether to rerun failed tests.
573 at_recheck=
574 # Whether a write failure occurred
575 at_write_fail=0
576
577 # The directory we run the suite in.  Default to . if no -C option.
578 at_dir=`pwd`
579 # An absolute reference to this testsuite script.
580 case $as_myself in
581   [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
582   * ) at_myself=$at_dir/$as_myself ;;
583 esac
584 # Whether -C is in effect.
585 at_change_dir=false
586
587 # Whether to enable colored test results.
588 at_color=auto
589 # List of the tested programs.
590 at_tested=''
591 # As many question marks as there are digits in the last test group number.
592 # Used to normalize the test group numbers so that `ls' lists them in
593 # numerical order.
594 at_format='???'
595 # Description of all the test groups.
596 at_help_all="1;getopt-m4sh.at:85;short option splitting;;
597 2;getopt-m4sh.at:98;enhanced shell short option splitting;;
598 3;getopt-m4sh.at:119;long option splitting;;
599 4;getopt-m4sh.at:132;XSI long option splitting;;
600 5;getopt-m4sh.at:153;option appending;;
601 6;getopt-m4sh.at:169;enhanced shell option appending;;
602 7;libtoolize.at:83;libtoolize macro installation;libtoolize;
603 8;libtoolize.at:108;libtoolize macro directory mismatch error;libtoolize;
604 9;libtoolize.at:128;libtoolize macro serial update;libtoolize;
605 10;libtoolize.at:201;libtoolize config files serial update;libtoolize;
606 11;libtoolize.at:281;diagnose missing LT_CONFIG_LTDL_DIR;libtoolize;
607 12;libtoolize.at:426;copy ltdl.m4 with shared macro directory;libtoolize;
608 13;libtoolize.at:438;correctly parse LTDL_INIT from configure.ac;libtoolize;
609 14;libtoolize.at:450;diagnose missing LTDL_INIT invocation;libtoolize;
610 15;libtoolize.at:527;upgrading verbatim style aclocal.m4;libtoolize automake;
611 16;libtoolize.at:651;verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR;libtoolize automake;
612 17;libtoolize.at:783;nonrecursive ltdl with AC_CONFIG_MACRO_DIR;libtoolize;
613 18;libtoolize.at:854;subproject ltdl with non-shared directories;libtoolize;
614 19;libtoolize.at:945;LIBTOOLIZE_OPTIONS;libtoolize;
615 20;libtoolize.at:992;cleanup old installation;libtoolize;
616 21;help.at:26;standard command line options;libtool libtoolize;
617 22;help.at:45;mode short-hands;;
618 23;help.at:97;debug tracing;;
619 24;duplicate_members.at:25;duplicate members in archive tests;libtool;
620 25;duplicate_conv.at:25;duplicate convenience archive names;libtool;
621 26;duplicate_deps.at:25;preserve duplicate convenience deps;libtool;
622 27;flags.at:24;passing CC flags through libtool;libtool cc;
623 28;flags.at:24;passing CXX flags through libtool;libtool cxx;
624 29;flags.at:24;passing F77 flags through libtool;libtool f77;
625 30;flags.at:24;passing FC flags through libtool;libtool fc;
626 31;flags.at:24;passing GCJ flags through libtool;libtool gcj;
627 32;inherited_flags.at:26;inherited_linker_flags;libtool;
628 33;convenience.at:31;C convenience archives;libtool;
629 34;convenience.at:70;C++ convenience archives;cxx libtool;
630 35;convenience.at:110;F77 convenience archives;f77 libtool;
631 36;convenience.at:170;FC convenience archives;fc libtool;
632 37;convenience.at:230;Java convenience archives;gcj libtool;
633 38;link-order.at:26;Link order test;libtool;
634 39;link-order2.at:46;Link order of deplibs;libtool interactive;
635 40;fail.at:27;Failure tests;libtool;
636 41;shlibpath.at:25;shlibpath_overrides_runpath;libtool;
637 42;runpath-in-lalib.at:25;Runpath in libtool library files;libtool;
638 43;static.at:68;static linking flags for programs;libtool interactive;
639 44;static.at:358;ccache -all-static;;
640 45;export.at:25;Export test;libtool;
641 46;search-path.at:24;sys_lib_search_path;libtool;
642 47;search-path.at:62;sys_lib_search_path on w32;libtool;
643 48;indirect_deps.at:25;indirect convenience;libtool;
644 49;indirect_deps.at:71;indirect uninstalled;libtool;
645 50;archive-in-archive.at:26;static library contains static library;libtool;
646 51;exeext.at:26;both of -o prog and -o prog\$EXEEXT work;libtool;
647 52;execute-mode.at:25;execute mode;libtool;
648 53;bindir.at:64;bindir basic lib test;;
649 54;bindir.at:173;bindir install tests;;
650 55;cwrapper.at:25;cwrapper for uninstalled executables;libtool;
651 56;cwrapper.at:138;cwrapper string length;;
652 57;cwrapper.at:201;cwrapper and installed shared libraries;libtool;
653 58;deplib-in-subdir.at:34;deplib in subdir;libtool;
654 59;infer-tag.at:30;inferred tag;libtool;
655 60;infer-tag.at:42;CXX inferred tag;cxx libtool;
656 61;infer-tag.at:55;F77 inferred tag;f77 libtool;
657 62;infer-tag.at:69;FC inferred tag;fc libtool;
658 63;infer-tag.at:83;GCJ inferred tag;gcj libtool;
659 64;localization.at:24;localized compiler messages;libtool;
660 65;nocase.at:26;nocase library search;libtool;
661 66;install.at:25;Install tests;libtool;
662 67;versioning.at:24;versioning;libtool;
663 68;destdir.at:48;Simple DESTDIR install;libtool;
664 69;destdir.at:75;DESTDIR with in-package deplibs;libtool;
665 70;old-m4-iface.at:40;AM_PROG_LIBTOOL;libtoolize autoconf;
666 71;old-m4-iface.at:112;AC_WITH_LTDL;libtoolize automake autoconf;
667 72;am-subdir.at:33;C subdir-objects;libtoolize automake autoconf;
668 73;am-subdir.at:93;C++ subdir-objects;cxx libtoolize automake autoconf;
669 74;lt_dlexit.at:30;lt_dlexit unloading libs;libltdl;
670 75;lt_dladvise.at:28;lt_dlopenadvise library loading;libltdl;
671 76;lt_dlopen.at:23;lt_dlopen error messages;libltdl;
672 77;lt_dlopen_a.at:23;lt_dlopen archive;libltdl lt_dlopen_a;
673 78;lt_dlopenext.at:23;lt_dlopenext error messages;libltdl;
674 79;ltdl-libdir.at:23;libdir of installed modules;libltdl;
675 80;ltdl-api.at:25;ltdl API;libltdl;
676 81;dlloader-api.at:23;dlloader API;libltdl;
677 82;loadlibrary.at:23;loadlibrary error messages;libltdl;
678 83;lalib-syntax.at:24;syntax of .la files;libtool libltdl;
679 84;resident.at:27;resident modules;libltdl;
680 85;slist.at:24;SList functionality;;
681 86;need_lib_prefix.at:25;enforced lib prefix;libltdl libtool;
682 87;standalone.at:31;compiling softlinked libltdl;libtoolize;
683 88;standalone.at:46;compiling copied libltdl;libtoolize;
684 89;standalone.at:61;installable libltdl;libtoolize;
685 90;standalone.at:79;linking libltdl without autotools;libtoolize;
686 91;subproject.at:57;compiling softlinked libltdl;libtoolize automake autoconf;
687 92;subproject.at:73;compiling copied libltdl;libtoolize automake autoconf;
688 93;subproject.at:89;installable libltdl;libtoolize automake autoconf;
689 94;subproject.at:109;linking libltdl without autotools;libtoolize;
690 95;nonrecursive.at:78;compiling softlinked libltdl;libtoolize automake autoconf;
691 96;nonrecursive.at:102;compiling copied libltdl;libtoolize automake autoconf;
692 97;nonrecursive.at:126;installable libltdl;libtoolize automake autoconf;
693 98;recursive.at:60;compiling softlinked libltdl;libtoolize autoconf automake;
694 99;recursive.at:80;compiling copied libltdl;libtoolize autoconf automake;
695 100;recursive.at:100;installable libltdl;libtoolize autoconf automake;
696 101;template.at:27;simple template test;cxx libtool;
697 102;template.at:126;template test with subdirs;cxx libtool;
698 103;ctor.at:27;C++ static constructors;cxx libtool;
699 104;exceptions.at:24;C++ exception handling;libtool libltdl;
700 105;early-libtool.at:32;config.status;libtoolize automake autoconf;
701 106;early-libtool.at:126;config.lt;libtoolize automake autoconf;
702 107;with-pic.at:24;test --with-pic;;
703 108;no-executables.at:25;AC_NO_EXECUTABLES;libtoolize automake autoconf;
704 109;deplibs-ident.at:32;build tree relpaths;libtool;
705 110;configure-iface.at:102;installable libltdl;libltdl libtoolize automake autoconf;
706 111;configure-iface.at:162;--with-ltdl-include/lib;libltdl libtoolize automake autoconf;
707 112;configure-iface.at:243;--with-included-ltdl;libltdl libtoolize automake autoconf;
708 113;configure-iface.at:304;convenience libltdl;libtoolize automake autoconf;
709 114;stresstest.at:31;Link option thorough search test;libtool;
710 115;cmdline_wrap.at:28;Run tests with low max_cmd_len;recursive;
711 116;pic_flag.at:24;override pic_flag at configure time;;
712 117;darwin.at:26;darwin fat compile;;
713 118;darwin.at:103;darwin concurrent library extraction;;
714 119;darwin.at:152;darwin gdb debug information;;
715 120;darwin.at:208;darwin ld warnings changing configure results;libtoolize autoconf automake;
716 121;darwin.at:232;darwin can lt_dlopen .dylib and .so files;libltdl dylib;
717 122;dumpbin-symbols.at:25;dumpbin -symbols section hiding;;
718 123;deplibs-mingw.at:27;deplibs without file command;libtool;
719 124;sysroot.at:203;-L=.../lib -l;libtool sysroot libtoolize automake autoconf;
720 125;sysroot.at:204;-L SYSROOT/.../lib -l;libtool sysroot libtoolize automake autoconf;
721 126;sysroot.at:205;SYSROOT/.../*.la;libtool sysroot libtoolize automake autoconf;
722 "
723 # List of the all the test groups.
724 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
725
726 # at_fn_validate_ranges NAME...
727 # -----------------------------
728 # Validate and normalize the test group number contained in each variable
729 # NAME. Leading zeroes are treated as decimal.
730 at_fn_validate_ranges ()
731 {
732   for at_grp
733   do
734     eval at_value=\$$at_grp
735     if test $at_value -lt 1 || test $at_value -gt 126; then
736       $as_echo "invalid test group: $at_value" >&2
737       exit 1
738     fi
739     case $at_value in
740       0*) # We want to treat leading 0 as decimal, like expr and test, but
741           # AS_VAR_ARITH treats it as octal if it uses $(( )).
742           # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
743           # expr fork, but it is not worth the effort to determine if the
744           # shell supports XSI when the user can just avoid leading 0.
745           eval $at_grp='`expr $at_value + 0`' ;;
746     esac
747   done
748 }
749
750 at_prev=
751 for at_option
752 do
753   # If the previous option needs an argument, assign it.
754   if test -n "$at_prev"; then
755     at_option=$at_prev=$at_option
756     at_prev=
757   fi
758
759   case $at_option in
760   *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
761   *)    at_optarg= ;;
762   esac
763
764   # Accept the important Cygnus configure options, so we can diagnose typos.
765
766   case $at_option in
767     --help | -h )
768         at_help_p=:
769         ;;
770
771     --list | -l )
772         at_list_p=:
773         ;;
774
775     --version | -V )
776         at_version_p=:
777         ;;
778
779     --clean | -c )
780         at_clean=:
781         ;;
782
783     --color )
784         at_color=always
785         ;;
786     --color=* )
787         case $at_optarg in
788         no | never | none) at_color=never ;;
789         auto | tty | if-tty) at_color=auto ;;
790         always | yes | force) at_color=always ;;
791         *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
792            as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
793         esac
794         ;;
795
796     --debug | -d )
797         at_debug_p=:
798         ;;
799
800     --errexit | -e )
801         at_debug_p=:
802         at_errexit_p=:
803         ;;
804
805     --verbose | -v )
806         at_verbose=; at_quiet=:
807         ;;
808
809     --trace | -x )
810         at_traceon='set -x'
811         at_trace_echo=echo
812         at_check_filter_trace=at_fn_filter_trace
813         ;;
814
815     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
816         at_fn_validate_ranges at_option
817         as_fn_append at_groups "$at_option$as_nl"
818         ;;
819
820     # Ranges
821     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
822         at_range_start=`echo $at_option |tr -d X-`
823         at_fn_validate_ranges at_range_start
824         at_range=`$as_echo "$at_groups_all" | \
825           sed -ne '/^'$at_range_start'$/,$p'`
826         as_fn_append at_groups "$at_range$as_nl"
827         ;;
828
829     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
830         at_range_end=`echo $at_option |tr -d X-`
831         at_fn_validate_ranges at_range_end
832         at_range=`$as_echo "$at_groups_all" | \
833           sed -ne '1,/^'$at_range_end'$/p'`
834         as_fn_append at_groups "$at_range$as_nl"
835         ;;
836
837     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
838     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
839     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
840     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
841     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
842     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
843         at_range_start=`expr $at_option : '\(.*\)-'`
844         at_range_end=`expr $at_option : '.*-\(.*\)'`
845         if test $at_range_start -gt $at_range_end; then
846           at_tmp=$at_range_end
847           at_range_end=$at_range_start
848           at_range_start=$at_tmp
849         fi
850         at_fn_validate_ranges at_range_start at_range_end
851         at_range=`$as_echo "$at_groups_all" | \
852           sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
853         as_fn_append at_groups "$at_range$as_nl"
854         ;;
855
856     # Directory selection.
857     --directory | -C )
858         at_prev=--directory
859         ;;
860     --directory=* )
861         at_change_dir=:
862         at_dir=$at_optarg
863         if test x- = "x$at_dir" ; then
864           at_dir=./-
865         fi
866         ;;
867
868     # Parallel execution.
869     --jobs | -j )
870         at_jobs=0
871         ;;
872     --jobs=* | -j[0-9]* )
873         if test -n "$at_optarg"; then
874           at_jobs=$at_optarg
875         else
876           at_jobs=`expr X$at_option : 'X-j\(.*\)'`
877         fi
878         case $at_jobs in *[!0-9]*)
879           at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
880           as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
881         esac
882         ;;
883
884     # Keywords.
885     --keywords | -k )
886         at_prev=--keywords
887         ;;
888     --keywords=* )
889         at_groups_selected=$at_help_all
890         at_save_IFS=$IFS
891         IFS=,
892         set X $at_optarg
893         shift
894         IFS=$at_save_IFS
895         for at_keyword
896         do
897           at_invert=
898           case $at_keyword in
899           '!'*)
900             at_invert="-v"
901             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
902             ;;
903           esac
904           # It is on purpose that we match the test group titles too.
905           at_groups_selected=`$as_echo "$at_groups_selected" |
906               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
907         done
908         # Smash the keywords.
909         at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
910         as_fn_append at_groups "$at_groups_selected$as_nl"
911         ;;
912     --recheck)
913         at_recheck=:
914         ;;
915
916     *=*)
917         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
918         # Reject names that are not valid shell variable names.
919         case $at_envvar in
920           '' | [0-9]* | *[!_$as_cr_alnum]* )
921             as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
922         esac
923         at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
924         # Export now, but save eval for later and for debug scripts.
925         export $at_envvar
926         as_fn_append at_debug_args " $at_envvar='$at_value'"
927         ;;
928
929      *) $as_echo "$as_me: invalid option: $at_option" >&2
930         $as_echo "Try \`$0 --help' for more information." >&2
931         exit 1
932         ;;
933   esac
934 done
935
936 # Verify our last option didn't require an argument
937 if test -n "$at_prev"; then :
938   as_fn_error $? "\`$at_prev' requires an argument"
939 fi
940
941 # The file containing the suite.
942 at_suite_log=$at_dir/$as_me.log
943
944 # Selected test groups.
945 if test -z "$at_groups$at_recheck"; then
946   at_groups=$at_groups_all
947 else
948   if test -n "$at_recheck" && test -r "$at_suite_log"; then
949     at_oldfails=`sed -n '
950       /^Failed tests:$/,/^Skipped tests:$/{
951         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
952       }
953       /^Unexpected passes:$/,/^## Detailed failed tests/{
954         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
955       }
956       /^## Detailed failed tests/q
957       ' "$at_suite_log"`
958     as_fn_append at_groups "$at_oldfails$as_nl"
959   fi
960   # Sort the tests, removing duplicates.
961   at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
962 fi
963
964 if test x"$at_color" = xalways \
965    || { test x"$at_color" = xauto && test -t 1; }; then
966   at_red=`printf '\033[0;31m'`
967   at_grn=`printf '\033[0;32m'`
968   at_lgn=`printf '\033[1;32m'`
969   at_blu=`printf '\033[1;34m'`
970   at_std=`printf '\033[m'`
971 else
972   at_red= at_grn= at_lgn= at_blu= at_std=
973 fi
974
975 # Help message.
976 if $at_help_p; then
977   cat <<_ATEOF || at_write_fail=1
978 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
979
980 Run all the tests, or the selected TESTS, given by numeric ranges, and
981 save a detailed log file.  Upon failure, create debugging scripts.
982
983 Do not change environment variables directly.  Instead, set them via
984 command line arguments.  Set \`AUTOTEST_PATH' to select the executables
985 to exercise.  Each relative directory is expanded as build and source
986 directories relative to the top level of this distribution.
987 E.g., from within the build directory /tmp/foo-1.0, invoking this:
988
989   $ $0 AUTOTEST_PATH=bin
990
991 is equivalent to the following, assuming the source directory is /src/foo-1.0:
992
993   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
994 _ATEOF
995 cat <<_ATEOF || at_write_fail=1
996
997 Operation modes:
998   -h, --help     print the help message, then exit
999   -V, --version  print version number, then exit
1000   -c, --clean    remove all the files this test suite might create and exit
1001   -l, --list     describes all the tests, or the selected TESTS
1002 _ATEOF
1003 cat <<_ATEOF || at_write_fail=1
1004
1005 Execution tuning:
1006   -C, --directory=DIR
1007                  change to directory DIR before starting
1008       --color[=never|auto|always]
1009                  disable colored test results, or enable even without terminal
1010   -j, --jobs[=N]
1011                  Allow N jobs at once; infinite jobs with no arg (default 1)
1012   -k, --keywords=KEYWORDS
1013                  select the tests matching all the comma-separated KEYWORDS
1014                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
1015       --recheck  select all tests that failed or passed unexpectedly last time
1016   -e, --errexit  abort as soon as a test fails; implies --debug
1017   -v, --verbose  force more detailed output
1018                  default for debugging scripts
1019   -d, --debug    inhibit clean up and top-level logging
1020                  default for debugging scripts
1021   -x, --trace    enable tests shell tracing
1022 _ATEOF
1023 cat <<_ATEOF || at_write_fail=1
1024
1025 Report bugs to <bug-libtool@gnu.org>.
1026 GNU Libtool home page: <http://www.gnu.org/software/libtool/>.
1027 General help using GNU software: <http://www.gnu.org/gethelp/>.
1028 _ATEOF
1029   exit $at_write_fail
1030 fi
1031
1032 # List of tests.
1033 if $at_list_p; then
1034   cat <<_ATEOF || at_write_fail=1
1035 GNU Libtool 2.4.2 test suite test groups:
1036
1037  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
1038       KEYWORDS
1039
1040 _ATEOF
1041   # Pass an empty line as separator between selected groups and help.
1042   $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
1043     awk 'NF == 1 && FS != ";" {
1044            selected[$ 1] = 1
1045            next
1046          }
1047          /^$/ { FS = ";" }
1048          NF > 0 {
1049            if (selected[$ 1]) {
1050              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
1051              if ($ 4) {
1052                lmax = 79
1053                indent = "     "
1054                line = indent
1055                len = length (line)
1056                n = split ($ 4, a, " ")
1057                for (i = 1; i <= n; i++) {
1058                  l = length (a[i]) + 1
1059                  if (i > 1 && len + l > lmax) {
1060                    print line
1061                    line = indent " " a[i]
1062                    len = length (line)
1063                  } else {
1064                    line = line " " a[i]
1065                    len += l
1066                  }
1067                }
1068                if (n)
1069                  print line
1070              }
1071            }
1072          }' || at_write_fail=1
1073   exit $at_write_fail
1074 fi
1075 if $at_version_p; then
1076   $as_echo "$as_me (GNU Libtool 2.4.2)" &&
1077   cat <<\_ATEOF || at_write_fail=1
1078
1079 Copyright (C) 2010 Free Software Foundation, Inc.
1080 This test suite is free software; the Free Software Foundation gives
1081 unlimited permission to copy, distribute and modify it.
1082 _ATEOF
1083   exit $at_write_fail
1084 fi
1085
1086 # Should we print banners?  Yes if more than one test is run.
1087 case $at_groups in #(
1088   *$as_nl* )
1089       at_print_banners=: ;; #(
1090   * ) at_print_banners=false ;;
1091 esac
1092 # Text for banner N, set to a single space once printed.
1093 # Banner 1. getopt-m4sh.at:25
1094 # Category starts at test group 1.
1095 at_banner_text_1="Shell option parser generator."
1096 # Banner 2. libtoolize.at:26
1097 # Category starts at test group 7.
1098 at_banner_text_2="Libtoolize operation."
1099 # Banner 3. help.at:24
1100 # Category starts at test group 21.
1101 at_banner_text_3="Testing libtool functions."
1102 # Banner 4. destdir.at:25
1103 # Category starts at test group 68.
1104 at_banner_text_4="DESTDIR tests"
1105 # Banner 5. old-m4-iface.at:26
1106 # Category starts at test group 70.
1107 at_banner_text_5="Support for older m4 interface."
1108 # Banner 6. am-subdir.at:26
1109 # Category starts at test group 72.
1110 at_banner_text_6="Libtool subdir-objects support."
1111 # Banner 7. lt_dlexit.at:28
1112 # Category starts at test group 74.
1113 at_banner_text_7="Libltdl functionality."
1114 # Banner 8. standalone.at:25
1115 # Category starts at test group 87.
1116 at_banner_text_8="Standalone Libltdl."
1117 # Banner 9. subproject.at:25
1118 # Category starts at test group 91.
1119 at_banner_text_9="Subproject Libltdl."
1120 # Banner 10. nonrecursive.at:26
1121 # Category starts at test group 95.
1122 at_banner_text_10="Nonrecursive Automake Libltdl."
1123 # Banner 11. recursive.at:25
1124 # Category starts at test group 98.
1125 at_banner_text_11="Recursive Automake Libltdl."
1126 # Banner 12. template.at:25
1127 # Category starts at test group 101.
1128 at_banner_text_12="C++ template tests."
1129 # Banner 13. ctor.at:25
1130 # Category starts at test group 103.
1131 at_banner_text_13="Constructors."
1132 # Banner 14. early-libtool.at:25
1133 # Category starts at test group 105.
1134 at_banner_text_14="libtool script generation."
1135 # Banner 15. no-executables.at:24
1136 # Category starts at test group 108.
1137 at_banner_text_15="Libtool usage in GCC"
1138 # Banner 16. deplibs-ident.at:25
1139 # Category starts at test group 109.
1140 at_banner_text_16="Detecting identical deplibs."
1141 # Banner 17. configure-iface.at:25
1142 # Category starts at test group 110.
1143 at_banner_text_17="configure interface to libltdl."
1144 # Banner 18. stresstest.at:30
1145 # Category starts at test group 114.
1146 at_banner_text_18="Libtool stress test."
1147 # Banner 19. darwin.at:25
1148 # Category starts at test group 117.
1149 at_banner_text_19="Mac OS X tests"
1150 # Banner 20. dumpbin-symbols.at:24
1151 # Category starts at test group 122.
1152 at_banner_text_20="Windows tests."
1153 # Banner 21. sysroot.at:202
1154 # Category starts at test group 124.
1155 at_banner_text_21="sysroot tests"
1156
1157 # Take any -C into account.
1158 if $at_change_dir ; then
1159   test x != "x$at_dir" && cd "$at_dir" \
1160     || as_fn_error $? "unable to change directory"
1161   at_dir=`pwd`
1162 fi
1163
1164 # Load the config files for any default variable assignments.
1165 for at_file in atconfig atlocal
1166 do
1167   test -r $at_file || continue
1168   . ./$at_file || as_fn_error $? "invalid content: $at_file"
1169 done
1170
1171 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1172 : "${at_top_build_prefix=$at_top_builddir}"
1173
1174 # Perform any assignments requested during argument parsing.
1175 eval "$at_debug_args"
1176
1177 # atconfig delivers names relative to the directory the test suite is
1178 # in, but the groups themselves are run in testsuite-dir/group-dir.
1179 if test -n "$at_top_srcdir"; then
1180   builddir=../..
1181   for at_dir_var in srcdir top_srcdir top_build_prefix
1182   do
1183     eval at_val=\$at_$at_dir_var
1184     case $at_val in
1185       [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1186       *) at_prefix=../../ ;;
1187     esac
1188     eval "$at_dir_var=\$at_prefix\$at_val"
1189   done
1190 fi
1191
1192 ## -------------------- ##
1193 ## Directory structure. ##
1194 ## -------------------- ##
1195
1196 # This is the set of directories and files used by this script
1197 # (non-literals are capitalized):
1198 #
1199 # TESTSUITE         - the testsuite
1200 # TESTSUITE.log     - summarizes the complete testsuite run
1201 # TESTSUITE.dir/    - created during a run, remains after -d or failed test
1202 # + at-groups/      - during a run: status of all groups in run
1203 # | + NNN/          - during a run: meta-data about test group NNN
1204 # | | + check-line  - location (source file and line) of current AT_CHECK
1205 # | | + status      - exit status of current AT_CHECK
1206 # | | + stdout      - stdout of current AT_CHECK
1207 # | | + stder1      - stderr, including trace
1208 # | | + stderr      - stderr, with trace filtered out
1209 # | | + test-source - portion of testsuite that defines group
1210 # | | + times       - timestamps for computing duration
1211 # | | + pass        - created if group passed
1212 # | | + xpass       - created if group xpassed
1213 # | | + fail        - created if group failed
1214 # | | + xfail       - created if group xfailed
1215 # | | + skip        - created if group skipped
1216 # + at-stop         - during a run: end the run if this file exists
1217 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1218 # + 0..NNN/         - created for each group NNN, remains after -d or failed test
1219 # | + TESTSUITE.log - summarizes the group results
1220 # | + ...           - files created during the group
1221
1222 # The directory the whole suite works in.
1223 # Should be absolute to let the user `cd' at will.
1224 at_suite_dir=$at_dir/$as_me.dir
1225 # The file containing the suite ($at_dir might have changed since earlier).
1226 at_suite_log=$at_dir/$as_me.log
1227 # The directory containing helper files per test group.
1228 at_helper_dir=$at_suite_dir/at-groups
1229 # Stop file: if it exists, do not start new jobs.
1230 at_stop_file=$at_suite_dir/at-stop
1231 # The fifo used for the job dispatcher.
1232 at_job_fifo=$at_suite_dir/at-job-fifo
1233
1234 if $at_clean; then
1235   test -d "$at_suite_dir" &&
1236     find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1237   rm -f -r "$at_suite_dir" "$at_suite_log"
1238   exit $?
1239 fi
1240
1241 # Don't take risks: use only absolute directories in PATH.
1242 #
1243 # For stand-alone test suites (ie. atconfig was not found),
1244 # AUTOTEST_PATH is relative to `.'.
1245 #
1246 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1247 # of the package.  Then expand it into build/src parts, since users
1248 # may create executables in both places.
1249 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1250 at_path=
1251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1252 for as_dir in $AUTOTEST_PATH $PATH
1253 do
1254   IFS=$as_save_IFS
1255   test -z "$as_dir" && as_dir=.
1256     test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1257 case $as_dir in
1258   [\\/]* | ?:[\\/]* )
1259     as_fn_append at_path "$as_dir"
1260     ;;
1261   * )
1262     if test -z "$at_top_build_prefix"; then
1263       # Stand-alone test suite.
1264       as_fn_append at_path "$as_dir"
1265     else
1266       # Embedded test suite.
1267       as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1268       as_fn_append at_path "$at_top_srcdir/$as_dir"
1269     fi
1270     ;;
1271 esac
1272   done
1273 IFS=$as_save_IFS
1274
1275
1276 # Now build and simplify PATH.
1277 #
1278 # There might be directories that don't exist, but don't redirect
1279 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1280 at_new_path=
1281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1282 for as_dir in $at_path
1283 do
1284   IFS=$as_save_IFS
1285   test -z "$as_dir" && as_dir=.
1286     test -d "$as_dir" || continue
1287 case $as_dir in
1288   [\\/]* | ?:[\\/]* ) ;;
1289   * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1290 esac
1291 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1292   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1293   $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1294   *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1295 esac
1296   done
1297 IFS=$as_save_IFS
1298
1299 PATH=$at_new_path
1300 export PATH
1301
1302 # Setting up the FDs.
1303
1304
1305
1306 # 5 is the log file.  Not to be overwritten if `-d'.
1307 if $at_debug_p; then
1308   at_suite_log=/dev/null
1309 else
1310   : >"$at_suite_log"
1311 fi
1312 exec 5>>"$at_suite_log"
1313
1314 # Banners and logs.
1315 $as_echo "## ----------------------------- ##
1316 ## GNU Libtool 2.4.2 test suite. ##
1317 ## ----------------------------- ##"
1318 {
1319   $as_echo "## ----------------------------- ##
1320 ## GNU Libtool 2.4.2 test suite. ##
1321 ## ----------------------------- ##"
1322   echo
1323
1324   $as_echo "$as_me: command line was:"
1325   $as_echo "  \$ $0 $at_cli_args"
1326   echo
1327
1328   # If ChangeLog exists, list a few lines in case it might help determining
1329   # the exact version.
1330   if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1331     $as_echo "## ---------- ##
1332 ## ChangeLog. ##
1333 ## ---------- ##"
1334     echo
1335     sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1336     echo
1337   fi
1338
1339   {
1340 cat <<_ASUNAME
1341 ## --------- ##
1342 ## Platform. ##
1343 ## --------- ##
1344
1345 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1346 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1347 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1348 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1349 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1350
1351 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1352 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1353
1354 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1355 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1356 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1357 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1358 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1359 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1360 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1361
1362 _ASUNAME
1363
1364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1365 for as_dir in $PATH
1366 do
1367   IFS=$as_save_IFS
1368   test -z "$as_dir" && as_dir=.
1369     $as_echo "PATH: $as_dir"
1370   done
1371 IFS=$as_save_IFS
1372
1373 }
1374   echo
1375
1376   # Contents of the config files.
1377   for at_file in atconfig atlocal
1378   do
1379     test -r $at_file || continue
1380     $as_echo "$as_me: $at_file:"
1381     sed 's/^/| /' $at_file
1382     echo
1383   done
1384 } >&5
1385
1386 : ${tst_dist=dist}
1387 : ${ACLOCAL=aclocal}
1388 : ${AUTOHEADER=autoheader}
1389 : ${AUTOCONF=autoconf}
1390 : ${AUTOMAKE=automake}
1391 : ${AUTORECONF=autoreconf}
1392 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
1393 : ${ECHO=$as_echo}
1394 for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do
1395   if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi
1396 done
1397 export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF
1398 eval `$LIBTOOL --config | grep '^EGREP='`
1399 eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias|to_host_file_cmd|to_tool_file_cmd)='`
1400 configure_options=--prefix=/nonexistent
1401 if test -n "$host_alias"; then
1402   configure_options="$configure_options --host $host_alias"
1403 fi
1404 if test -n "$build_alias"; then
1405   configure_options="$configure_options --build $build_alias"
1406 fi
1407 if test -n "$to_host_file_cmd"; then
1408   configure_options="$configure_options lt_cv_to_host_file_cmd=$to_host_file_cmd"
1409 fi
1410 if test -n "$to_tool_file_cmd"; then
1411   configure_options="$configure_options lt_cv_to_tool_file_cmd=$to_tool_file_cmd"
1412 fi
1413 if (FOO=bar; unset FOO) >/dev/null 2>&1; then
1414   unset=unset
1415 else
1416   unset=false
1417 fi
1418 : ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
1419 # Fix relative paths in $lt_INSTALL
1420 case $lt_INSTALL in
1421   *libltdl/config/install-sh*)
1422     lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh
1423     ;;
1424 esac
1425
1426 # Unset some MAKE... variables that may cause $MAKE to act like a
1427 # recursively invoked sub-make.  Any $MAKE invocation in a test is
1428 # conceptually an independent invocation.
1429 unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
1430
1431 # On AIX, shared libraries remain loaded in memory after use if they
1432 # are world-readable, until root issues slibclean.  On NFS, this causes
1433 # a testsuite rerun to fail to clean up test group directories.  Avoid
1434 # this with a suitable umask.  Do not do this on other systems, for
1435 # example HP-UX suffers unless shared libraries are mode 555.
1436 case $host_os in
1437 aix*) umask o-rwx ;;
1438 esac
1439
1440 ## ------------------------- ##
1441 ## Autotest shell functions. ##
1442 ## ------------------------- ##
1443
1444 # at_fn_banner NUMBER
1445 # -------------------
1446 # Output banner NUMBER, provided the testsuite is running multiple groups and
1447 # this particular banner has not yet been printed.
1448 at_fn_banner ()
1449 {
1450   $at_print_banners || return 0
1451   eval at_banner_text=\$at_banner_text_$1
1452   test "x$at_banner_text" = "x " && return 0
1453   eval "at_banner_text_$1=\" \""
1454   if test -z "$at_banner_text"; then
1455     $at_first || echo
1456   else
1457     $as_echo "$as_nl$at_banner_text$as_nl"
1458   fi
1459 } # at_fn_banner
1460
1461 # at_fn_check_prepare_notrace REASON LINE
1462 # ---------------------------------------
1463 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1464 # command; REASON is the reason for disabling tracing.
1465 at_fn_check_prepare_notrace ()
1466 {
1467   $at_trace_echo "Not enabling shell tracing (command contains $1)"
1468   $as_echo "$2" >"$at_check_line_file"
1469   at_check_trace=: at_check_filter=:
1470   : >"$at_stdout"; : >"$at_stderr"
1471 }
1472
1473 # at_fn_check_prepare_trace LINE
1474 # ------------------------------
1475 # Perform AT_CHECK preparations for the command at LINE for a traceable
1476 # command.
1477 at_fn_check_prepare_trace ()
1478 {
1479   $as_echo "$1" >"$at_check_line_file"
1480   at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1481   : >"$at_stdout"; : >"$at_stderr"
1482 }
1483
1484 # at_fn_check_prepare_dynamic COMMAND LINE
1485 # ----------------------------------------
1486 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1487 # preparation function.
1488 at_fn_check_prepare_dynamic ()
1489 {
1490   case $1 in
1491     *$as_nl*)
1492       at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1493     *)
1494       at_fn_check_prepare_trace "$2" ;;
1495   esac
1496 }
1497
1498 # at_fn_filter_trace
1499 # ------------------
1500 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1501 # them to stderr.
1502 at_fn_filter_trace ()
1503 {
1504   mv "$at_stderr" "$at_stder1"
1505   grep '^ *+' "$at_stder1" >&2
1506   grep -v '^ *+' "$at_stder1" >"$at_stderr"
1507 }
1508
1509 # at_fn_log_failure FILE-LIST
1510 # ---------------------------
1511 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1512 # with a failure exit code.
1513 at_fn_log_failure ()
1514 {
1515   for file
1516     do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1517   echo 1 > "$at_status_file"
1518   exit 1
1519 }
1520
1521 # at_fn_check_skip EXIT-CODE LINE
1522 # -------------------------------
1523 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1524 # the test group subshell with that same exit code. Use LINE in any report
1525 # about test failure.
1526 at_fn_check_skip ()
1527 {
1528   case $1 in
1529     99) echo 99 > "$at_status_file"; at_failed=:
1530         $as_echo "$2: hard failure"; exit 99;;
1531     77) echo 77 > "$at_status_file"; exit 77;;
1532   esac
1533 }
1534
1535 # at_fn_check_status EXPECTED EXIT-CODE LINE
1536 # ------------------------------------------
1537 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1538 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1539 # exit code; if it is anything else print an error message referring to LINE,
1540 # and fail the test.
1541 at_fn_check_status ()
1542 {
1543   case $2 in
1544     $1 ) ;;
1545     77) echo 77 > "$at_status_file"; exit 77;;
1546     99) echo 99 > "$at_status_file"; at_failed=:
1547         $as_echo "$3: hard failure"; exit 99;;
1548     *) $as_echo "$3: exit code was $2, expected $1"
1549       at_failed=:;;
1550   esac
1551 }
1552
1553 # at_fn_diff_devnull FILE
1554 # -----------------------
1555 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1556 # invocations.
1557 at_fn_diff_devnull ()
1558 {
1559   test -s "$1" || return 0
1560   $at_diff "$at_devnull" "$1"
1561 }
1562
1563 # at_fn_test NUMBER
1564 # -----------------
1565 # Parse out test NUMBER from the tail of this file.
1566 at_fn_test ()
1567 {
1568   eval at_sed=\$at_sed$1
1569   sed "$at_sed" "$at_myself" > "$at_test_source"
1570 }
1571
1572 # at_fn_create_debugging_script
1573 # -----------------------------
1574 # Create the debugging script $at_group_dir/run which will reproduce the
1575 # current test group.
1576 at_fn_create_debugging_script ()
1577 {
1578   {
1579     echo "#! /bin/sh" &&
1580     echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1581     $as_echo "cd '$at_dir'" &&
1582     $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1583     echo 'exit 1'
1584   } >"$at_group_dir/run" &&
1585   chmod +x "$at_group_dir/run"
1586 }
1587
1588 ## -------------------------------- ##
1589 ## End of autotest shell functions. ##
1590 ## -------------------------------- ##
1591 {
1592   $as_echo "## ---------------- ##
1593 ## Tested programs. ##
1594 ## ---------------- ##"
1595   echo
1596 } >&5
1597
1598 # Report what programs are being tested.
1599 for at_program in : $at_tested
1600 do
1601   test "$at_program" = : && continue
1602   case $at_program in
1603     [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1604     * )
1605     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1606 for as_dir in $PATH
1607 do
1608   IFS=$as_save_IFS
1609   test -z "$as_dir" && as_dir=.
1610     test -f "$as_dir/$at_program" && break
1611   done
1612 IFS=$as_save_IFS
1613
1614     at_program_=$as_dir/$at_program ;;
1615   esac
1616   if test -f "$at_program_"; then
1617     {
1618       $as_echo "$at_srcdir/testsuite.at:461: $at_program_ --version"
1619       "$at_program_" --version </dev/null
1620       echo
1621     } >&5 2>&1
1622   else
1623     as_fn_error $? "cannot find $at_program" "$LINENO" 5
1624   fi
1625 done
1626
1627 {
1628   $as_echo "## ------------------ ##
1629 ## Running the tests. ##
1630 ## ------------------ ##"
1631 } >&5
1632
1633 at_start_date=`date`
1634 at_start_time=`date +%s 2>/dev/null`
1635 $as_echo "$as_me: starting at: $at_start_date" >&5
1636
1637 # Create the master directory if it doesn't already exist.
1638 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1639   as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1640
1641 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1642 if diff /dev/null /dev/null >/dev/null 2>&1; then
1643   at_devnull=/dev/null
1644 else
1645   at_devnull=$at_suite_dir/devnull
1646   >"$at_devnull"
1647 fi
1648
1649 # Use `diff -u' when possible.
1650 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1651 then
1652   at_diff='diff -u'
1653 else
1654   at_diff=diff
1655 fi
1656
1657 # Get the last needed group.
1658 for at_group in : $at_groups; do :; done
1659
1660 # Extract the start and end lines of each test group at the tail
1661 # of this file
1662 awk '
1663 BEGIN { FS="\a" }
1664 /^#AT_START_/ {
1665   start = NR
1666 }
1667 /^#AT_STOP_/ {
1668   test = substr ($ 0, 10)
1669   print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1670   if (test == "'"$at_group"'") exit
1671 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1672 . "$at_suite_dir/at-source-lines" ||
1673   as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1674 rm -f "$at_suite_dir/at-source-lines"
1675
1676 # Set number of jobs for `-j'; avoid more jobs than test groups.
1677 set X $at_groups; shift; at_max_jobs=$#
1678 if test $at_max_jobs -eq 0; then
1679   at_jobs=1
1680 fi
1681 if test $at_jobs -ne 1 &&
1682    { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1683   at_jobs=$at_max_jobs
1684 fi
1685
1686 # If parallel mode, don't output banners, don't split summary lines.
1687 if test $at_jobs -ne 1; then
1688   at_print_banners=false
1689   at_quiet=:
1690 fi
1691
1692 # Set up helper dirs.
1693 rm -rf "$at_helper_dir" &&
1694 mkdir "$at_helper_dir" &&
1695 cd "$at_helper_dir" &&
1696 { test -z "$at_groups" || mkdir $at_groups; } ||
1697 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1698
1699 # Functions for running a test group.  We leave the actual
1700 # test group execution outside of a shell function in order
1701 # to avoid hitting zsh 4.x exit status bugs.
1702
1703 # at_fn_group_prepare
1704 # -------------------
1705 # Prepare for running a test group.
1706 at_fn_group_prepare ()
1707 {
1708   # The directory for additional per-group helper files.
1709   at_job_dir=$at_helper_dir/$at_group
1710   # The file containing the location of the last AT_CHECK.
1711   at_check_line_file=$at_job_dir/check-line
1712   # The file containing the exit status of the last command.
1713   at_status_file=$at_job_dir/status
1714   # The files containing the output of the tested commands.
1715   at_stdout=$at_job_dir/stdout
1716   at_stder1=$at_job_dir/stder1
1717   at_stderr=$at_job_dir/stderr
1718   # The file containing the code for a test group.
1719   at_test_source=$at_job_dir/test-source
1720   # The file containing dates.
1721   at_times_file=$at_job_dir/times
1722
1723   # Be sure to come back to the top test directory.
1724   cd "$at_suite_dir"
1725
1726   # Clearly separate the test groups when verbose.
1727   $at_first || $at_verbose echo
1728
1729   at_group_normalized=$at_group
1730
1731   eval 'while :; do
1732     case $at_group_normalized in #(
1733     '"$at_format"'*) break;;
1734     esac
1735     at_group_normalized=0$at_group_normalized
1736   done'
1737
1738
1739   # Create a fresh directory for the next test group, and enter.
1740   # If one already exists, the user may have invoked ./run from
1741   # within that directory; we remove the contents, but not the
1742   # directory itself, so that we aren't pulling the rug out from
1743   # under the shell's notion of the current directory.
1744   at_group_dir=$at_suite_dir/$at_group_normalized
1745   at_group_log=$at_group_dir/$as_me.log
1746   if test -d "$at_group_dir"; then
1747   find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1748   rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1749 fi ||
1750     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1751 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1752   # Be tolerant if the above `rm' was not able to remove the directory.
1753   as_dir="$at_group_dir"; as_fn_mkdir_p
1754
1755   echo 0 > "$at_status_file"
1756
1757   # In verbose mode, append to the log file *and* show on
1758   # the standard output; in quiet mode only write to the log.
1759   if test -z "$at_verbose"; then
1760     at_tee_pipe='tee -a "$at_group_log"'
1761   else
1762     at_tee_pipe='cat >> "$at_group_log"'
1763   fi
1764 }
1765
1766 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1767 # -------------------------------------------------
1768 # Declare the test group ORDINAL, located at LINE with group description DESC,
1769 # and residing under BANNER. Use PAD to align the status column.
1770 at_fn_group_banner ()
1771 {
1772   at_setup_line="$2"
1773   test -n "$5" && at_fn_banner $5
1774   at_desc="$3"
1775   case $1 in
1776     [0-9])      at_desc_line="  $1: ";;
1777     [0-9][0-9]) at_desc_line=" $1: " ;;
1778     *)          at_desc_line="$1: "  ;;
1779   esac
1780   as_fn_append at_desc_line "$3$4"
1781   $at_quiet $as_echo_n "$at_desc_line"
1782   echo "#                             -*- compilation -*-" >> "$at_group_log"
1783 }
1784
1785 # at_fn_group_postprocess
1786 # -----------------------
1787 # Perform cleanup after running a test group.
1788 at_fn_group_postprocess ()
1789 {
1790   # Be sure to come back to the suite directory, in particular
1791   # since below we might `rm' the group directory we are in currently.
1792   cd "$at_suite_dir"
1793
1794   if test ! -f "$at_check_line_file"; then
1795     sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1796       A failure happened in a test group before any test could be
1797       run. This means that test suite is improperly designed.  Please
1798       report this failure to <bug-libtool@gnu.org>.
1799 _ATEOF
1800     $as_echo "$at_setup_line" >"$at_check_line_file"
1801     at_status=99
1802   fi
1803   $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1804   $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1805   case $at_xfail:$at_status in
1806     yes:0)
1807         at_msg="UNEXPECTED PASS"
1808         at_res=xpass
1809         at_errexit=$at_errexit_p
1810         at_color=$at_red
1811         ;;
1812     no:0)
1813         at_msg="ok"
1814         at_res=pass
1815         at_errexit=false
1816         at_color=$at_grn
1817         ;;
1818     *:77)
1819         at_msg='skipped ('`cat "$at_check_line_file"`')'
1820         at_res=skip
1821         at_errexit=false
1822         at_color=$at_blu
1823         ;;
1824     no:* | *:99)
1825         at_msg='FAILED ('`cat "$at_check_line_file"`')'
1826         at_res=fail
1827         at_errexit=$at_errexit_p
1828         at_color=$at_red
1829         ;;
1830     yes:*)
1831         at_msg='expected failure ('`cat "$at_check_line_file"`')'
1832         at_res=xfail
1833         at_errexit=false
1834         at_color=$at_lgn
1835         ;;
1836   esac
1837   echo "$at_res" > "$at_job_dir/$at_res"
1838   # In parallel mode, output the summary line only afterwards.
1839   if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1840     $as_echo "$at_desc_line $at_color$at_msg$at_std"
1841   else
1842     # Make sure there is a separator even with long titles.
1843     $as_echo " $at_color$at_msg$at_std"
1844   fi
1845   at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1846   case $at_status in
1847     0|77)
1848       # $at_times_file is only available if the group succeeded.
1849       # We're not including the group log, so the success message
1850       # is written in the global log separately.  But we also
1851       # write to the group log in case they're using -d.
1852       if test -f "$at_times_file"; then
1853         at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1854         rm -f "$at_times_file"
1855       fi
1856       $as_echo "$at_log_msg" >> "$at_group_log"
1857       $as_echo "$at_log_msg" >&5
1858
1859       # Cleanup the group directory, unless the user wants the files
1860       # or the success was unexpected.
1861       if $at_debug_p || test $at_res = xpass; then
1862         at_fn_create_debugging_script
1863         if test $at_res = xpass && $at_errexit; then
1864           echo stop > "$at_stop_file"
1865         fi
1866       else
1867         if test -d "$at_group_dir"; then
1868           find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1869           rm -fr "$at_group_dir"
1870         fi
1871         rm -f "$at_test_source"
1872       fi
1873       ;;
1874     *)
1875       # Upon failure, include the log into the testsuite's global
1876       # log.  The failure message is written in the group log.  It
1877       # is later included in the global log.
1878       $as_echo "$at_log_msg" >> "$at_group_log"
1879
1880       # Upon failure, keep the group directory for autopsy, and create
1881       # the debugging script.  With -e, do not start any further tests.
1882       at_fn_create_debugging_script
1883       if $at_errexit; then
1884         echo stop > "$at_stop_file"
1885       fi
1886       ;;
1887   esac
1888 }
1889
1890
1891 ## ------------ ##
1892 ## Driver loop. ##
1893 ## ------------ ##
1894
1895
1896 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1897   set +b
1898   at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1899 else
1900   at_job_control_on=: at_job_control_off=: at_job_group=
1901 fi
1902
1903 for at_signal in 1 2 15; do
1904   trap 'set +x; set +e
1905         $at_job_control_off
1906         at_signal='"$at_signal"'
1907         echo stop > "$at_stop_file"
1908         trap "" $at_signal
1909         at_pgids=
1910         for at_pgid in `jobs -p 2>/dev/null`; do
1911           at_pgids="$at_pgids $at_job_group$at_pgid"
1912         done
1913         test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1914         wait
1915         if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1916           echo >&2
1917         fi
1918         at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1919         set x $at_signame
1920         test 0 -gt 2 && at_signame=$at_signal
1921         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1922 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1923         as_fn_arith 128 + $at_signal && exit_status=$as_val
1924         as_fn_exit $exit_status' $at_signal
1925 done
1926
1927 rm -f "$at_stop_file"
1928 at_first=:
1929
1930 if test $at_jobs -ne 1 &&
1931      rm -f "$at_job_fifo" &&
1932      test -n "$at_job_group" &&
1933      ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1934 then
1935   # FIFO job dispatcher.
1936
1937   trap 'at_pids=
1938         for at_pid in `jobs -p`; do
1939           at_pids="$at_pids $at_job_group$at_pid"
1940         done
1941         if test -n "$at_pids"; then
1942           at_sig=TSTP
1943           test "${TMOUT+set}" = set && at_sig=STOP
1944           kill -$at_sig $at_pids 2>/dev/null
1945         fi
1946         kill -STOP $$
1947         test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1948
1949   echo
1950   # Turn jobs into a list of numbers, starting from 1.
1951   at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1952
1953   set X $at_joblist
1954   shift
1955   for at_group in $at_groups; do
1956     $at_job_control_on 2>/dev/null
1957     (
1958       # Start one test group.
1959       $at_job_control_off
1960       if $at_first; then
1961         exec 7>"$at_job_fifo"
1962       else
1963         exec 6<&-
1964       fi
1965       trap 'set +x; set +e
1966             trap "" PIPE
1967             echo stop > "$at_stop_file"
1968             echo >&7
1969             as_fn_exit 141' PIPE
1970       at_fn_group_prepare
1971       if cd "$at_group_dir" &&
1972          at_fn_test $at_group &&
1973          . "$at_test_source"
1974       then :; else
1975         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1976 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1977         at_failed=:
1978       fi
1979       at_fn_group_postprocess
1980       echo >&7
1981     ) &
1982     $at_job_control_off
1983     if $at_first; then
1984       at_first=false
1985       exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1986     fi
1987     shift # Consume one token.
1988     if test $# -gt 0; then :; else
1989       read at_token <&6 || break
1990       set x $*
1991     fi
1992     test -f "$at_stop_file" && break
1993   done
1994   exec 7>&-
1995   # Read back the remaining ($at_jobs - 1) tokens.
1996   set X $at_joblist
1997   shift
1998   if test $# -gt 0; then
1999     shift
2000     for at_job
2001     do
2002       read at_token
2003     done <&6
2004   fi
2005   exec 6<&-
2006   wait
2007 else
2008   # Run serially, avoid forks and other potential surprises.
2009   for at_group in $at_groups; do
2010     at_fn_group_prepare
2011     if cd "$at_group_dir" &&
2012        at_fn_test $at_group &&
2013        . "$at_test_source"; then :; else
2014       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2015 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2016       at_failed=:
2017     fi
2018     at_fn_group_postprocess
2019     test -f "$at_stop_file" && break
2020     at_first=false
2021   done
2022 fi
2023
2024 # Wrap up the test suite with summary statistics.
2025 cd "$at_helper_dir"
2026
2027 # Use ?..???? when the list must remain sorted, the faster * otherwise.
2028 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
2029 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
2030 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
2031 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
2032                  echo $f; done | sed '/?/d; s,/xpass,,'`
2033 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
2034                 echo $f; done | sed '/?/d; s,/fail,,'`
2035
2036 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
2037 shift; at_group_count=$#
2038 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
2039 set X $at_xfail_list; shift; at_xfail_count=$#
2040 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
2041 set X $at_skip_list; shift; at_skip_count=$#
2042
2043 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
2044 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
2045 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
2046
2047 # Back to the top directory.
2048 cd "$at_dir"
2049 rm -rf "$at_helper_dir"
2050
2051 # Compute the duration of the suite.
2052 at_stop_date=`date`
2053 at_stop_time=`date +%s 2>/dev/null`
2054 $as_echo "$as_me: ending at: $at_stop_date" >&5
2055 case $at_start_time,$at_stop_time in
2056   [0-9]*,[0-9]*)
2057     as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
2058     as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
2059     as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
2060     as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
2061     as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
2062     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
2063     $as_echo "$as_me: test suite duration: $at_duration" >&5
2064     ;;
2065 esac
2066
2067 echo
2068 $as_echo "## ------------- ##
2069 ## Test results. ##
2070 ## ------------- ##"
2071 echo
2072 {
2073   echo
2074   $as_echo "## ------------- ##
2075 ## Test results. ##
2076 ## ------------- ##"
2077   echo
2078 } >&5
2079
2080 if test $at_run_count = 1; then
2081   at_result="1 test"
2082   at_were=was
2083 else
2084   at_result="$at_run_count tests"
2085   at_were=were
2086 fi
2087 if $at_errexit_p && test $at_unexpected_count != 0; then
2088   if test $at_xpass_count = 1; then
2089     at_result="$at_result $at_were run, one passed"
2090   else
2091     at_result="$at_result $at_were run, one failed"
2092   fi
2093   at_result="$at_result unexpectedly and inhibited subsequent tests."
2094   at_color=$at_red
2095 else
2096   # Don't you just love exponential explosion of the number of cases?
2097   at_color=$at_red
2098   case $at_xpass_count:$at_fail_count:$at_xfail_count in
2099     # So far, so good.
2100     0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
2101     0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
2102
2103     # Some unexpected failures
2104     0:*:0) at_result="$at_result $at_were run,
2105 $at_fail_count failed unexpectedly." ;;
2106
2107     # Some failures, both expected and unexpected
2108     0:*:1) at_result="$at_result $at_were run,
2109 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2110     0:*:*) at_result="$at_result $at_were run,
2111 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2112
2113     # No unexpected failures, but some xpasses
2114     *:0:*) at_result="$at_result $at_were run,
2115 $at_xpass_count passed unexpectedly." ;;
2116
2117     # No expected failures, but failures and xpasses
2118     *:1:0) at_result="$at_result $at_were run,
2119 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
2120     *:*:0) at_result="$at_result $at_were run,
2121 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
2122
2123     # All of them.
2124     *:*:1) at_result="$at_result $at_were run,
2125 $at_xpass_count passed unexpectedly,
2126 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2127     *:*:*) at_result="$at_result $at_were run,
2128 $at_xpass_count passed unexpectedly,
2129 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2130   esac
2131
2132   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
2133     at_result="All $at_result"
2134   fi
2135 fi
2136
2137 # Now put skips in the mix.
2138 case $at_skip_count in
2139   0) ;;
2140   1) at_result="$at_result
2141 1 test was skipped." ;;
2142   *) at_result="$at_result
2143 $at_skip_count tests were skipped." ;;
2144 esac
2145
2146 if test $at_unexpected_count = 0; then
2147   echo "$at_color$at_result$at_std"
2148   echo "$at_result" >&5
2149 else
2150   echo "${at_color}ERROR: $at_result$at_std" >&2
2151   echo "ERROR: $at_result" >&5
2152   {
2153     echo
2154     $as_echo "## ------------------------ ##
2155 ## Summary of the failures. ##
2156 ## ------------------------ ##"
2157
2158     # Summary of failed and skipped tests.
2159     if test $at_fail_count != 0; then
2160       echo "Failed tests:"
2161       $SHELL "$at_myself" $at_fail_list --list
2162       echo
2163     fi
2164     if test $at_skip_count != 0; then
2165       echo "Skipped tests:"
2166       $SHELL "$at_myself" $at_skip_list --list
2167       echo
2168     fi
2169     if test $at_xpass_count != 0; then
2170       echo "Unexpected passes:"
2171       $SHELL "$at_myself" $at_xpass_list --list
2172       echo
2173     fi
2174     if test $at_fail_count != 0; then
2175       $as_echo "## ---------------------- ##
2176 ## Detailed failed tests. ##
2177 ## ---------------------- ##"
2178       echo
2179       for at_group in $at_fail_list
2180       do
2181         at_group_normalized=$at_group
2182
2183   eval 'while :; do
2184     case $at_group_normalized in #(
2185     '"$at_format"'*) break;;
2186     esac
2187     at_group_normalized=0$at_group_normalized
2188   done'
2189
2190         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2191         echo
2192       done
2193       echo
2194     fi
2195     if test -n "$at_top_srcdir"; then
2196       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2197 ## ${at_top_build_prefix}config.log ##
2198 _ASBOX
2199       sed 's/^/| /' ${at_top_build_prefix}config.log
2200       echo
2201     fi
2202   } >&5
2203
2204   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2205 ## $as_me.log was created. ##
2206 _ASBOX
2207
2208   echo
2209   if $at_debug_p; then
2210     at_msg='per-test log files'
2211   else
2212     at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2213   fi
2214   $as_echo "Please send $at_msg and all information you think might help:
2215
2216    To: <bug-libtool@gnu.org>
2217    Subject: [GNU Libtool 2.4.2] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2218
2219 You may investigate any problem if you feel able to do so, in which
2220 case the test suite provides a good starting point.  Its output may
2221 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2222 "
2223   exit 1
2224 fi
2225
2226 exit 0
2227
2228 ## ------------- ##
2229 ## Actual tests. ##
2230 ## ------------- ##
2231 #AT_START_1
2232 at_fn_group_banner 1 'getopt-m4sh.at:85' \
2233   "short option splitting" "                         " 1
2234 at_xfail=no
2235 (
2236   $as_echo "1. $at_setup_line: testing $at_desc ..."
2237   $at_traceon
2238
2239
2240 cat >expout <<'_ATEOF'
2241  force verbose install
2242 _ATEOF
2243
2244
2245
2246
2247 cat >options.m4sh <<'_ATEOF'
2248 AS_INIT[]m4_include([getopt.m4sh])
2249 nl='
2250 '
2251 list=
2252 opts=
2253 M4SH_GETOPTS(
2254   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2255   [f],  [--force],      [],     [opts="$opts force"],
2256   [i],  [--install],    [],     [opts="$opts install"],
2257   [v],  [--verbose],    [],     [opts="$opts verbose"],
2258   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2259 [echo "$list" $opts])
2260 _ATEOF
2261
2262
2263
2264 { set +x
2265 $as_echo "$at_srcdir/getopt-m4sh.at:91: \$M4SH --version || exit 77"
2266 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:91"
2267 ( $at_check_trace; $M4SH --version || exit 77
2268 ) >>"$at_stdout" 2>>"$at_stderr"
2269 at_status=$? at_failed=false
2270 $at_check_filter
2271 echo stderr:; cat "$at_stderr"
2272 echo stdout:; cat "$at_stdout"
2273 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91"
2274 $at_failed && at_fn_log_failure
2275 $at_traceon; }
2276
2277 { set +x
2278 $as_echo "$at_srcdir/getopt-m4sh.at:91: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2279 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:91"
2280 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2281 ) >>"$at_stdout" 2>>"$at_stderr"
2282 at_status=$? at_failed=false
2283 $at_check_filter
2284 at_fn_diff_devnull "$at_stderr" || at_failed=:
2285 at_fn_diff_devnull "$at_stdout" || at_failed=:
2286 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91"
2287 if $at_failed; then :
2288   { set +x
2289 $as_echo "$at_srcdir/getopt-m4sh.at:91: test \$at_status -eq 63 && exit 77"
2290 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:91"
2291 ( $at_check_trace; test $at_status -eq 63 && exit 77
2292 ) >>"$at_stdout" 2>>"$at_stderr"
2293 at_status=$? at_failed=false
2294 $at_check_filter
2295 at_fn_diff_devnull "$at_stderr" || at_failed=:
2296 at_fn_diff_devnull "$at_stdout" || at_failed=:
2297 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91"
2298 $at_failed && at_fn_log_failure
2299 $at_traceon; }
2300
2301 fi
2302 $at_failed && at_fn_log_failure
2303 $at_traceon; }
2304
2305 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2306
2307
2308 { set +x
2309 $as_echo "$at_srcdir/getopt-m4sh.at:93: \$SHELL ./options -fvi"
2310 at_fn_check_prepare_dynamic "$SHELL ./options -fvi" "getopt-m4sh.at:93"
2311 ( $at_check_trace; $SHELL ./options -fvi
2312 ) >>"$at_stdout" 2>>"$at_stderr"
2313 at_status=$? at_failed=false
2314 $at_check_filter
2315 at_fn_diff_devnull "$at_stderr" || at_failed=:
2316 $at_diff expout "$at_stdout" || at_failed=:
2317 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:93"
2318 $at_failed && at_fn_log_failure
2319 $at_traceon; }
2320
2321
2322   set +x
2323   $at_times_p && times >"$at_times_file"
2324 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2325 read at_status <"$at_status_file"
2326 #AT_STOP_1
2327 #AT_START_2
2328 at_fn_group_banner 2 'getopt-m4sh.at:98' \
2329   "enhanced shell short option splitting" "          " 1
2330 at_xfail=no
2331 (
2332   $as_echo "2. $at_setup_line: testing $at_desc ..."
2333   $at_traceon
2334
2335
2336 # Don't bother with additional XSI checks unless functions were substituted
2337 { set +x
2338 $as_echo "$at_srcdir/getopt-m4sh.at:101: fgrep '# Extended-shell func_split_short_opt' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)"
2339 at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_split_short_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:101"
2340 ( $at_check_trace; fgrep '# Extended-shell func_split_short_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)
2341 ) >>"$at_stdout" 2>>"$at_stderr"
2342 at_status=$? at_failed=false
2343 $at_check_filter
2344 at_fn_diff_devnull "$at_stderr" || at_failed=:
2345 at_fn_diff_devnull "$at_stdout" || at_failed=:
2346 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:101"
2347 $at_failed && at_fn_log_failure
2348 $at_traceon; }
2349
2350
2351 cat >expout <<'_ATEOF'
2352  force verbose install
2353 _ATEOF
2354
2355
2356
2357
2358 cat >options.m4sh <<'_ATEOF'
2359 AS_INIT[]m4_include([getopt.m4sh])
2360 nl='
2361 '
2362 list=
2363 opts=
2364 M4SH_GETOPTS(
2365   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2366   [f],  [--force],      [],     [opts="$opts force"],
2367   [i],  [--install],    [],     [opts="$opts install"],
2368   [v],  [--verbose],    [],     [opts="$opts verbose"],
2369   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2370 [echo "$list" $opts])
2371 _ATEOF
2372
2373
2374
2375 { set +x
2376 $as_echo "$at_srcdir/getopt-m4sh.at:107: \$M4SH --version || exit 77"
2377 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:107"
2378 ( $at_check_trace; $M4SH --version || exit 77
2379 ) >>"$at_stdout" 2>>"$at_stderr"
2380 at_status=$? at_failed=false
2381 $at_check_filter
2382 echo stderr:; cat "$at_stderr"
2383 echo stdout:; cat "$at_stdout"
2384 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107"
2385 $at_failed && at_fn_log_failure
2386 $at_traceon; }
2387
2388 { set +x
2389 $as_echo "$at_srcdir/getopt-m4sh.at:107: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2390 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:107"
2391 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2392 ) >>"$at_stdout" 2>>"$at_stderr"
2393 at_status=$? at_failed=false
2394 $at_check_filter
2395 at_fn_diff_devnull "$at_stderr" || at_failed=:
2396 at_fn_diff_devnull "$at_stdout" || at_failed=:
2397 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107"
2398 if $at_failed; then :
2399   { set +x
2400 $as_echo "$at_srcdir/getopt-m4sh.at:107: test \$at_status -eq 63 && exit 77"
2401 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:107"
2402 ( $at_check_trace; test $at_status -eq 63 && exit 77
2403 ) >>"$at_stdout" 2>>"$at_stderr"
2404 at_status=$? at_failed=false
2405 $at_check_filter
2406 at_fn_diff_devnull "$at_stderr" || at_failed=:
2407 at_fn_diff_devnull "$at_stdout" || at_failed=:
2408 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107"
2409 $at_failed && at_fn_log_failure
2410 $at_traceon; }
2411
2412 fi
2413 $at_failed && at_fn_log_failure
2414 $at_traceon; }
2415
2416 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2417
2418 $SED '/^# func_split_short_opt/q' options > options.tmp
2419 $SED -n '/^func_split_short_opt ()/,/^} # Extended-shell func_split_short_opt /p' $abs_top_builddir/libtool >> options.tmp
2420 $SED '1,/^} # func_split_short_opt /d' options >> options.tmp
2421 rm -f options && mv options.tmp options
2422
2423 { set +x
2424 $as_echo "$at_srcdir/getopt-m4sh.at:110: \$SHELL ./options -fvi"
2425 at_fn_check_prepare_dynamic "$SHELL ./options -fvi" "getopt-m4sh.at:110"
2426 ( $at_check_trace; $SHELL ./options -fvi
2427 ) >>"$at_stdout" 2>>"$at_stderr"
2428 at_status=$? at_failed=false
2429 $at_check_filter
2430 at_fn_diff_devnull "$at_stderr" || at_failed=:
2431 $at_diff expout "$at_stdout" || at_failed=:
2432 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:110"
2433 $at_failed && at_fn_log_failure
2434 $at_traceon; }
2435
2436
2437   set +x
2438   $at_times_p && times >"$at_times_file"
2439 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2440 read at_status <"$at_status_file"
2441 #AT_STOP_2
2442 #AT_START_3
2443 at_fn_group_banner 3 'getopt-m4sh.at:119' \
2444   "long option splitting" "                          " 1
2445 at_xfail=no
2446 (
2447   $as_echo "3. $at_setup_line: testing $at_desc ..."
2448   $at_traceon
2449
2450
2451 cat >expout <<'_ATEOF'
2452  ltdl=long
2453 _ATEOF
2454
2455
2456
2457
2458 cat >options.m4sh <<'_ATEOF'
2459 AS_INIT[]m4_include([getopt.m4sh])
2460 nl='
2461 '
2462 list=
2463 opts=
2464 M4SH_GETOPTS(
2465   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2466   [f],  [--force],      [],     [opts="$opts force"],
2467   [i],  [--install],    [],     [opts="$opts install"],
2468   [v],  [--verbose],    [],     [opts="$opts verbose"],
2469   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2470 [echo "$list" $opts])
2471 _ATEOF
2472
2473
2474
2475 { set +x
2476 $as_echo "$at_srcdir/getopt-m4sh.at:125: \$M4SH --version || exit 77"
2477 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:125"
2478 ( $at_check_trace; $M4SH --version || exit 77
2479 ) >>"$at_stdout" 2>>"$at_stderr"
2480 at_status=$? at_failed=false
2481 $at_check_filter
2482 echo stderr:; cat "$at_stderr"
2483 echo stdout:; cat "$at_stdout"
2484 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125"
2485 $at_failed && at_fn_log_failure
2486 $at_traceon; }
2487
2488 { set +x
2489 $as_echo "$at_srcdir/getopt-m4sh.at:125: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2490 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:125"
2491 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2492 ) >>"$at_stdout" 2>>"$at_stderr"
2493 at_status=$? at_failed=false
2494 $at_check_filter
2495 at_fn_diff_devnull "$at_stderr" || at_failed=:
2496 at_fn_diff_devnull "$at_stdout" || at_failed=:
2497 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125"
2498 if $at_failed; then :
2499   { set +x
2500 $as_echo "$at_srcdir/getopt-m4sh.at:125: test \$at_status -eq 63 && exit 77"
2501 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:125"
2502 ( $at_check_trace; test $at_status -eq 63 && exit 77
2503 ) >>"$at_stdout" 2>>"$at_stderr"
2504 at_status=$? at_failed=false
2505 $at_check_filter
2506 at_fn_diff_devnull "$at_stderr" || at_failed=:
2507 at_fn_diff_devnull "$at_stdout" || at_failed=:
2508 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125"
2509 $at_failed && at_fn_log_failure
2510 $at_traceon; }
2511
2512 fi
2513 $at_failed && at_fn_log_failure
2514 $at_traceon; }
2515
2516 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2517
2518
2519 { set +x
2520 $as_echo "$at_srcdir/getopt-m4sh.at:127: \$SHELL ./options --ltdl=long"
2521 at_fn_check_prepare_dynamic "$SHELL ./options --ltdl=long" "getopt-m4sh.at:127"
2522 ( $at_check_trace; $SHELL ./options --ltdl=long
2523 ) >>"$at_stdout" 2>>"$at_stderr"
2524 at_status=$? at_failed=false
2525 $at_check_filter
2526 at_fn_diff_devnull "$at_stderr" || at_failed=:
2527 $at_diff expout "$at_stdout" || at_failed=:
2528 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:127"
2529 $at_failed && at_fn_log_failure
2530 $at_traceon; }
2531
2532
2533   set +x
2534   $at_times_p && times >"$at_times_file"
2535 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2536 read at_status <"$at_status_file"
2537 #AT_STOP_3
2538 #AT_START_4
2539 at_fn_group_banner 4 'getopt-m4sh.at:132' \
2540   "XSI long option splitting" "                      " 1
2541 at_xfail=no
2542 (
2543   $as_echo "4. $at_setup_line: testing $at_desc ..."
2544   $at_traceon
2545
2546
2547 # Don't bother with additional XSI checks unless functions were substituted
2548 { set +x
2549 $as_echo "$at_srcdir/getopt-m4sh.at:135: fgrep '# Extended-shell func_split_long_opt' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)"
2550 at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_split_long_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:135"
2551 ( $at_check_trace; fgrep '# Extended-shell func_split_long_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)
2552 ) >>"$at_stdout" 2>>"$at_stderr"
2553 at_status=$? at_failed=false
2554 $at_check_filter
2555 at_fn_diff_devnull "$at_stderr" || at_failed=:
2556 at_fn_diff_devnull "$at_stdout" || at_failed=:
2557 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:135"
2558 $at_failed && at_fn_log_failure
2559 $at_traceon; }
2560
2561
2562 cat >expout <<'_ATEOF'
2563  ltdl=long
2564 _ATEOF
2565
2566
2567
2568
2569 cat >options.m4sh <<'_ATEOF'
2570 AS_INIT[]m4_include([getopt.m4sh])
2571 nl='
2572 '
2573 list=
2574 opts=
2575 M4SH_GETOPTS(
2576   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2577   [f],  [--force],      [],     [opts="$opts force"],
2578   [i],  [--install],    [],     [opts="$opts install"],
2579   [v],  [--verbose],    [],     [opts="$opts verbose"],
2580   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2581 [echo "$list" $opts])
2582 _ATEOF
2583
2584
2585
2586 { set +x
2587 $as_echo "$at_srcdir/getopt-m4sh.at:141: \$M4SH --version || exit 77"
2588 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:141"
2589 ( $at_check_trace; $M4SH --version || exit 77
2590 ) >>"$at_stdout" 2>>"$at_stderr"
2591 at_status=$? at_failed=false
2592 $at_check_filter
2593 echo stderr:; cat "$at_stderr"
2594 echo stdout:; cat "$at_stdout"
2595 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141"
2596 $at_failed && at_fn_log_failure
2597 $at_traceon; }
2598
2599 { set +x
2600 $as_echo "$at_srcdir/getopt-m4sh.at:141: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2601 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:141"
2602 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2603 ) >>"$at_stdout" 2>>"$at_stderr"
2604 at_status=$? at_failed=false
2605 $at_check_filter
2606 at_fn_diff_devnull "$at_stderr" || at_failed=:
2607 at_fn_diff_devnull "$at_stdout" || at_failed=:
2608 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141"
2609 if $at_failed; then :
2610   { set +x
2611 $as_echo "$at_srcdir/getopt-m4sh.at:141: test \$at_status -eq 63 && exit 77"
2612 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:141"
2613 ( $at_check_trace; test $at_status -eq 63 && exit 77
2614 ) >>"$at_stdout" 2>>"$at_stderr"
2615 at_status=$? at_failed=false
2616 $at_check_filter
2617 at_fn_diff_devnull "$at_stderr" || at_failed=:
2618 at_fn_diff_devnull "$at_stdout" || at_failed=:
2619 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141"
2620 $at_failed && at_fn_log_failure
2621 $at_traceon; }
2622
2623 fi
2624 $at_failed && at_fn_log_failure
2625 $at_traceon; }
2626
2627 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2628
2629 $SED '/^# func_split_long_opt/q' options > options.tmp
2630 $SED -n '/^func_split_long_opt ()/,/^} # Extended-shell func_split_long_opt /p' $abs_top_builddir/libtool >> options.tmp
2631 $SED '1,/^} # func_split_long_opt /d' options >> options.tmp
2632 rm -f options && mv options.tmp options
2633
2634 { set +x
2635 $as_echo "$at_srcdir/getopt-m4sh.at:144: \$SHELL ./options --ltdl=long"
2636 at_fn_check_prepare_dynamic "$SHELL ./options --ltdl=long" "getopt-m4sh.at:144"
2637 ( $at_check_trace; $SHELL ./options --ltdl=long
2638 ) >>"$at_stdout" 2>>"$at_stderr"
2639 at_status=$? at_failed=false
2640 $at_check_filter
2641 at_fn_diff_devnull "$at_stderr" || at_failed=:
2642 $at_diff expout "$at_stdout" || at_failed=:
2643 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:144"
2644 $at_failed && at_fn_log_failure
2645 $at_traceon; }
2646
2647
2648   set +x
2649   $at_times_p && times >"$at_times_file"
2650 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2651 read at_status <"$at_status_file"
2652 #AT_STOP_4
2653 #AT_START_5
2654 at_fn_group_banner 5 'getopt-m4sh.at:153' \
2655   "option appending" "                               " 1
2656 at_xfail=no
2657 (
2658   $as_echo "5. $at_setup_line: testing $at_desc ..."
2659   $at_traceon
2660
2661
2662 cat >expout <<'_ATEOF'
2663 first   --append second
2664 third
2665
2666 _ATEOF
2667
2668
2669
2670
2671 cat >options.m4sh <<'_ATEOF'
2672 AS_INIT[]m4_include([getopt.m4sh])
2673 nl='
2674 '
2675 list=
2676 opts=
2677 M4SH_GETOPTS(
2678   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2679   [f],  [--force],      [],     [opts="$opts force"],
2680   [i],  [--install],    [],     [opts="$opts install"],
2681   [v],  [--verbose],    [],     [opts="$opts verbose"],
2682   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2683 [echo "$list" $opts])
2684 _ATEOF
2685
2686
2687
2688 { set +x
2689 $as_echo "$at_srcdir/getopt-m4sh.at:161: \$M4SH --version || exit 77"
2690 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:161"
2691 ( $at_check_trace; $M4SH --version || exit 77
2692 ) >>"$at_stdout" 2>>"$at_stderr"
2693 at_status=$? at_failed=false
2694 $at_check_filter
2695 echo stderr:; cat "$at_stderr"
2696 echo stdout:; cat "$at_stdout"
2697 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161"
2698 $at_failed && at_fn_log_failure
2699 $at_traceon; }
2700
2701 { set +x
2702 $as_echo "$at_srcdir/getopt-m4sh.at:161: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2703 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:161"
2704 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2705 ) >>"$at_stdout" 2>>"$at_stderr"
2706 at_status=$? at_failed=false
2707 $at_check_filter
2708 at_fn_diff_devnull "$at_stderr" || at_failed=:
2709 at_fn_diff_devnull "$at_stdout" || at_failed=:
2710 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161"
2711 if $at_failed; then :
2712   { set +x
2713 $as_echo "$at_srcdir/getopt-m4sh.at:161: test \$at_status -eq 63 && exit 77"
2714 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:161"
2715 ( $at_check_trace; test $at_status -eq 63 && exit 77
2716 ) >>"$at_stdout" 2>>"$at_stderr"
2717 at_status=$? at_failed=false
2718 $at_check_filter
2719 at_fn_diff_devnull "$at_stderr" || at_failed=:
2720 at_fn_diff_devnull "$at_stdout" || at_failed=:
2721 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161"
2722 $at_failed && at_fn_log_failure
2723 $at_traceon; }
2724
2725 fi
2726 $at_failed && at_fn_log_failure
2727 $at_traceon; }
2728
2729 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2730
2731 $SED '/^# func_dirname /q' options > options.tmp
2732 echo '# func_append var value' >> options.tmp
2733 $SED -n '/^func_append ()/,/^} # func_append /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp
2734 $SED '1,/^# func_dirname/d' options >> options.tmp
2735 rm -f options && mv options.tmp options
2736
2737 { set +x
2738 $as_echo "$at_srcdir/getopt-m4sh.at:164: \$SHELL ./options -a \"first   --append second\" -athird"
2739 at_fn_check_prepare_dynamic "$SHELL ./options -a \"first   --append second\" -athird" "getopt-m4sh.at:164"
2740 ( $at_check_trace; $SHELL ./options -a "first   --append second" -athird
2741 ) >>"$at_stdout" 2>>"$at_stderr"
2742 at_status=$? at_failed=false
2743 $at_check_filter
2744 at_fn_diff_devnull "$at_stderr" || at_failed=:
2745 $at_diff expout "$at_stdout" || at_failed=:
2746 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:164"
2747 $at_failed && at_fn_log_failure
2748 $at_traceon; }
2749
2750
2751   set +x
2752   $at_times_p && times >"$at_times_file"
2753 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2754 read at_status <"$at_status_file"
2755 #AT_STOP_5
2756 #AT_START_6
2757 at_fn_group_banner 6 'getopt-m4sh.at:169' \
2758   "enhanced shell option appending" "                " 1
2759 at_xfail=no
2760 (
2761   $as_echo "6. $at_setup_line: testing $at_desc ..."
2762   $at_traceon
2763
2764
2765 # Don't bother with additional += check unless functions were substituted
2766 { set +x
2767 $as_echo "$at_srcdir/getopt-m4sh.at:172: fgrep '# Extended-shell func_append ' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)"
2768 at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_append ' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:172"
2769 ( $at_check_trace; fgrep '# Extended-shell func_append ' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)
2770 ) >>"$at_stdout" 2>>"$at_stderr"
2771 at_status=$? at_failed=false
2772 $at_check_filter
2773 at_fn_diff_devnull "$at_stderr" || at_failed=:
2774 at_fn_diff_devnull "$at_stdout" || at_failed=:
2775 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:172"
2776 $at_failed && at_fn_log_failure
2777 $at_traceon; }
2778
2779
2780 cat >expout <<'_ATEOF'
2781 first   --append second
2782 third
2783
2784 _ATEOF
2785
2786
2787
2788
2789 cat >options.m4sh <<'_ATEOF'
2790 AS_INIT[]m4_include([getopt.m4sh])
2791 nl='
2792 '
2793 list=
2794 opts=
2795 M4SH_GETOPTS(
2796   [a!], [--append],     [],     [func_append list "$optarg$nl"],
2797   [f],  [--force],      [],     [opts="$opts force"],
2798   [i],  [--install],    [],     [opts="$opts install"],
2799   [v],  [--verbose],    [],     [opts="$opts verbose"],
2800   [!],  [--ltdl],       [false],[opts="$opts ltdl=$optarg"],
2801 [echo "$list" $opts])
2802 _ATEOF
2803
2804
2805
2806 { set +x
2807 $as_echo "$at_srcdir/getopt-m4sh.at:180: \$M4SH --version || exit 77"
2808 at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:180"
2809 ( $at_check_trace; $M4SH --version || exit 77
2810 ) >>"$at_stdout" 2>>"$at_stderr"
2811 at_status=$? at_failed=false
2812 $at_check_filter
2813 echo stderr:; cat "$at_stderr"
2814 echo stdout:; cat "$at_stdout"
2815 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180"
2816 $at_failed && at_fn_log_failure
2817 $at_traceon; }
2818
2819 { set +x
2820 $as_echo "$at_srcdir/getopt-m4sh.at:180: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options"
2821 at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:180"
2822 ( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options
2823 ) >>"$at_stdout" 2>>"$at_stderr"
2824 at_status=$? at_failed=false
2825 $at_check_filter
2826 at_fn_diff_devnull "$at_stderr" || at_failed=:
2827 at_fn_diff_devnull "$at_stdout" || at_failed=:
2828 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180"
2829 if $at_failed; then :
2830   { set +x
2831 $as_echo "$at_srcdir/getopt-m4sh.at:180: test \$at_status -eq 63 && exit 77"
2832 at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:180"
2833 ( $at_check_trace; test $at_status -eq 63 && exit 77
2834 ) >>"$at_stdout" 2>>"$at_stderr"
2835 at_status=$? at_failed=false
2836 $at_check_filter
2837 at_fn_diff_devnull "$at_stderr" || at_failed=:
2838 at_fn_diff_devnull "$at_stdout" || at_failed=:
2839 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180"
2840 $at_failed && at_fn_log_failure
2841 $at_traceon; }
2842
2843 fi
2844 $at_failed && at_fn_log_failure
2845 $at_traceon; }
2846
2847 $SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options
2848
2849 $SED '/^# func_dirname /q' options > options.tmp
2850 echo '# func_append var value' >> options.tmp
2851 $SED -n '/^func_append ()/,/^} # func_append /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp
2852 $SED '1,/^# func_dirname/d' options >> options.tmp
2853 rm -f options && mv options.tmp options
2854 $SED '/^# func_append/q' options > options.tmp
2855 $SED -n '/^func_append ()/,/^} # Extended-shell func_append /p' $abs_top_builddir/libtool >> options.tmp
2856 $SED '1,/^} # func_append /d' options >> options.tmp
2857 rm -f options && mv options.tmp options
2858
2859 { set +x
2860 $as_echo "$at_srcdir/getopt-m4sh.at:184: \$SHELL ./options -a \"first   --append second\" -athird"
2861 at_fn_check_prepare_dynamic "$SHELL ./options -a \"first   --append second\" -athird" "getopt-m4sh.at:184"
2862 ( $at_check_trace; $SHELL ./options -a "first   --append second" -athird
2863 ) >>"$at_stdout" 2>>"$at_stderr"
2864 at_status=$? at_failed=false
2865 $at_check_filter
2866 at_fn_diff_devnull "$at_stderr" || at_failed=:
2867 $at_diff expout "$at_stdout" || at_failed=:
2868 at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:184"
2869 $at_failed && at_fn_log_failure
2870 $at_traceon; }
2871
2872
2873   set +x
2874   $at_times_p && times >"$at_times_file"
2875 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2876 read at_status <"$at_status_file"
2877 #AT_STOP_6
2878 #AT_START_7
2879 at_fn_group_banner 7 'libtoolize.at:83' \
2880   "libtoolize macro installation" "                  " 2
2881 at_xfail=no
2882 (
2883   $as_echo "7. $at_setup_line: testing $at_desc ..."
2884   $at_traceon
2885
2886
2887 cat >configure.ac <<'_ATEOF'
2888 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
2889 AC_CONFIG_AUX_DIR([build-aux])
2890 AC_CONFIG_MACRO_DIR([m4])
2891 LT_INIT
2892 AC_OUTPUT
2893 _ATEOF
2894
2895
2896
2897 cat >expout <<'_ATEOF'
2898 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
2899 libtoolize: copying file `build-aux/ltmain.sh'
2900 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
2901 libtoolize: copying file `m4/libtool.m4'
2902 libtoolize: copying file `m4/ltoptions.m4'
2903 libtoolize: copying file `m4/ltsugar.m4'
2904 libtoolize: copying file `m4/ltversion.m4'
2905 libtoolize: copying file `m4/lt~obsolete.m4'
2906 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
2907 _ATEOF
2908
2909
2910 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
2911 sed "s/libtoolize/$lt_name/g
2912 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
2913 mv -f expout.t expout
2914 { set +x
2915 $as_echo "$at_srcdir/libtoolize.at:99: \$LIBTOOLIZE --copy
2916
2917 "
2918 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:99"
2919 ( $at_check_trace; $LIBTOOLIZE --copy
2920
2921
2922 ) >>"$at_stdout" 2>>"$at_stderr"
2923 at_status=$? at_failed=false
2924 $at_check_filter
2925 at_fn_diff_devnull "$at_stderr" || at_failed=:
2926 $at_diff expout "$at_stdout" || at_failed=:
2927 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:99"
2928 $at_failed && at_fn_log_failure
2929 $at_traceon; }
2930
2931
2932
2933   set +x
2934   $at_times_p && times >"$at_times_file"
2935 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2936 read at_status <"$at_status_file"
2937 #AT_STOP_7
2938 #AT_START_8
2939 at_fn_group_banner 8 'libtoolize.at:108' \
2940   "libtoolize macro directory mismatch error" "      " 2
2941 at_xfail=no
2942 (
2943   $as_echo "8. $at_setup_line: testing $at_desc ..."
2944   $at_traceon
2945
2946
2947 cat >configure.ac <<'_ATEOF'
2948 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
2949 AC_CONFIG_AUX_DIR([build-aux])
2950 AC_CONFIG_MACRO_DIR([m4])
2951 LT_INIT
2952 AC_OUTPUT
2953 _ATEOF
2954
2955
2956
2957 cat >Makefile.am <<'_ATEOF'
2958 ACLOCAL_AMFLAGS = -I me2
2959 _ATEOF
2960
2961
2962 cat >experr <<'_ATEOF'
2963 libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I me2.
2964 _ATEOF
2965
2966
2967 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
2968 sed "s/libtoolize/$lt_name/g
2969 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
2970 mv -f experr.t experr
2971 { set +x
2972 $as_echo "$at_srcdir/libtoolize.at:120: \$LIBTOOLIZE --copy
2973
2974 "
2975 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:120"
2976 ( $at_check_trace; $LIBTOOLIZE --copy
2977
2978
2979 ) >>"$at_stdout" 2>>"$at_stderr"
2980 at_status=$? at_failed=false
2981 $at_check_filter
2982 $at_diff experr "$at_stderr" || at_failed=:
2983 echo stdout:; cat "$at_stdout"
2984 at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:120"
2985 $at_failed && at_fn_log_failure
2986 $at_traceon; }
2987
2988
2989
2990   set +x
2991   $at_times_p && times >"$at_times_file"
2992 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2993 read at_status <"$at_status_file"
2994 #AT_STOP_8
2995 #AT_START_9
2996 at_fn_group_banner 9 'libtoolize.at:128' \
2997   "libtoolize macro serial update" "                 " 2
2998 at_xfail=no
2999 (
3000   $as_echo "9. $at_setup_line: testing $at_desc ..."
3001   $at_traceon
3002
3003
3004 cat >configure.ac <<'_ATEOF'
3005 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3006 AC_CONFIG_AUX_DIR([build-aux])
3007 AC_CONFIG_MACRO_DIR([m4])
3008 LT_INIT
3009 AC_OUTPUT
3010 _ATEOF
3011
3012
3013
3014 test -d m4 || { rm -f m4 && mkdir m4; }
3015
3016 rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh
3017
3018 cat >Makefile.am <<'_ATEOF'
3019 ACLOCAL_AMFLAGS = -I m4
3020 _ATEOF
3021
3022
3023 # This file should be upgraded.
3024 cat >m4/libtool.m4 <<'_ATEOF'
3025
3026 # serial 25 LT_INIT
3027 _ATEOF
3028
3029
3030 # This file has a very high serial number, and should be left unchanged
3031 # until --force is passed.
3032 cat >m4/ltoptions.m4 <<'_ATEOF'
3033
3034 # serial 99999 ltoptions.m4
3035 _ATEOF
3036
3037
3038 test -d build-aux || { rm -f build-aux && mkdir build-aux; }
3039
3040 # This file has a very high serial number, and needs --force to be updated.
3041 cat >build-aux/ltmain.sh <<'_ATEOF'
3042
3043 package_revision=9999.9999
3044 _ATEOF
3045
3046
3047 # This file has a very old serial number, but should be left unchanged
3048 # unless the --install flag is invoked.
3049 cat >build-aux/config.guess <<'_ATEOF'
3050
3051 timestamp='1970-01-01'
3052 _ATEOF
3053
3054
3055
3056
3057
3058 ## -------------------------------------------------------------------- ##
3059 ## First we try to update with some newer files in the destination dir. ##
3060 ## -------------------------------------------------------------------- ##
3061
3062 cat >expout <<'_ATEOF'
3063 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3064 libtoolize: copying file `m4/libtool.m4'
3065 libtoolize: copying file `m4/ltsugar.m4'
3066 libtoolize: copying file `m4/ltversion.m4'
3067 libtoolize: copying file `m4/lt~obsolete.m4'
3068 _ATEOF
3069
3070
3071 cat >experr <<'_ATEOF'
3072 libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
3073 libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
3074 _ATEOF
3075
3076
3077 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3078 sed "s/libtoolize/$lt_name/g
3079 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3080 mv -f expout.t expout
3081 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3082 sed "s/libtoolize/$lt_name/g
3083 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
3084 mv -f experr.t experr
3085 { set +x
3086 $as_echo "$at_srcdir/libtoolize.at:151: \$LIBTOOLIZE --copy
3087
3088 "
3089 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:151"
3090 ( $at_check_trace; $LIBTOOLIZE --copy
3091
3092
3093 ) >>"$at_stdout" 2>>"$at_stderr"
3094 at_status=$? at_failed=false
3095 $at_check_filter
3096 $at_diff experr "$at_stderr" || at_failed=:
3097 $at_diff expout "$at_stdout" || at_failed=:
3098 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:151"
3099 $at_failed && at_fn_log_failure
3100 $at_traceon; }
3101
3102
3103
3104
3105 ## ---------------------------------------------------------- ##
3106 ## Next, a second update attempt with everything now updated. ##
3107 ## ---------------------------------------------------------- ##
3108
3109 : >expout
3110
3111 cat >experr <<'_ATEOF'
3112 libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
3113 libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
3114 _ATEOF
3115
3116
3117 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3118 sed "s/libtoolize/$lt_name/g
3119 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3120 mv -f expout.t expout
3121 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3122 sed "s/libtoolize/$lt_name/g
3123 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
3124 mv -f experr.t experr
3125 { set +x
3126 $as_echo "$at_srcdir/libtoolize.at:165: \$LIBTOOLIZE --copy
3127
3128 "
3129 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:165"
3130 ( $at_check_trace; $LIBTOOLIZE --copy
3131
3132
3133 ) >>"$at_stdout" 2>>"$at_stderr"
3134 at_status=$? at_failed=false
3135 $at_check_filter
3136 $at_diff experr "$at_stderr" || at_failed=:
3137 $at_diff expout "$at_stdout" || at_failed=:
3138 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:165"
3139 $at_failed && at_fn_log_failure
3140 $at_traceon; }
3141
3142
3143
3144
3145 ## ----------------------------------------------------------- ##
3146 ## Now, a forced update to downgrade files with newer serials. ##
3147 ## ----------------------------------------------------------- ##
3148
3149 cat >expout <<'_ATEOF'
3150 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
3151 libtoolize: copying file `build-aux/ltmain.sh'
3152 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3153 libtoolize: copying file `m4/libtool.m4'
3154 libtoolize: copying file `m4/ltoptions.m4'
3155 libtoolize: copying file `m4/ltsugar.m4'
3156 libtoolize: copying file `m4/ltversion.m4'
3157 libtoolize: copying file `m4/lt~obsolete.m4'
3158 _ATEOF
3159
3160
3161 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3162 sed "s/libtoolize/$lt_name/g
3163 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3164 mv -f expout.t expout
3165 { set +x
3166 $as_echo "$at_srcdir/libtoolize.at:183: \$LIBTOOLIZE --copy --force
3167
3168 "
3169 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:183"
3170 ( $at_check_trace; $LIBTOOLIZE --copy --force
3171
3172
3173 ) >>"$at_stdout" 2>>"$at_stderr"
3174 at_status=$? at_failed=false
3175 $at_check_filter
3176 at_fn_diff_devnull "$at_stderr" || at_failed=:
3177 $at_diff expout "$at_stdout" || at_failed=:
3178 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:183"
3179 $at_failed && at_fn_log_failure
3180 $at_traceon; }
3181
3182
3183
3184
3185 ## ---------------------------------------------------------------- ##
3186 ## A final update attempt with everything previously force updated. ##
3187 ## ---------------------------------------------------------------- ##
3188
3189 : >expout
3190
3191 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3192 sed "s/libtoolize/$lt_name/g
3193 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3194 mv -f expout.t expout
3195 { set +x
3196 $as_echo "$at_srcdir/libtoolize.at:192: \$LIBTOOLIZE --copy
3197
3198 "
3199 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:192"
3200 ( $at_check_trace; $LIBTOOLIZE --copy
3201
3202
3203 ) >>"$at_stdout" 2>>"$at_stderr"
3204 at_status=$? at_failed=false
3205 $at_check_filter
3206 at_fn_diff_devnull "$at_stderr" || at_failed=:
3207 $at_diff expout "$at_stdout" || at_failed=:
3208 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:192"
3209 $at_failed && at_fn_log_failure
3210 $at_traceon; }
3211
3212
3213
3214   set +x
3215   $at_times_p && times >"$at_times_file"
3216 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3217 read at_status <"$at_status_file"
3218 #AT_STOP_9
3219 #AT_START_10
3220 at_fn_group_banner 10 'libtoolize.at:201' \
3221   "libtoolize config files serial update" "          " 2
3222 at_xfail=no
3223 (
3224   $as_echo "10. $at_setup_line: testing $at_desc ..."
3225   $at_traceon
3226
3227
3228 cat >configure.ac <<'_ATEOF'
3229 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3230 AC_CONFIG_AUX_DIR([build-aux])
3231 AC_CONFIG_MACRO_DIR([m4])
3232 LT_INIT
3233 AC_OUTPUT
3234 _ATEOF
3235
3236
3237
3238 test -d m4 || { rm -f m4 && mkdir m4; }
3239
3240 rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh
3241
3242 cat >Makefile.am <<'_ATEOF'
3243 ACLOCAL_AMFLAGS = -I m4
3244 _ATEOF
3245
3246
3247 # This file should be upgraded.
3248 cat >m4/libtool.m4 <<'_ATEOF'
3249
3250 # serial 25 LT_INIT
3251 _ATEOF
3252
3253
3254 # This file has a very high serial number, and should be left unchanged
3255 # until --force is passed.
3256 cat >m4/ltoptions.m4 <<'_ATEOF'
3257
3258 # serial 99999 ltoptions.m4
3259 _ATEOF
3260
3261
3262 test -d build-aux || { rm -f build-aux && mkdir build-aux; }
3263
3264 # This file has a very high serial number, and needs --force to be updated.
3265 cat >build-aux/ltmain.sh <<'_ATEOF'
3266
3267 package_revision=9999.9999
3268 _ATEOF
3269
3270
3271 # This file has a very old serial number, but should be left unchanged
3272 # unless the --install flag is invoked.
3273 cat >build-aux/config.guess <<'_ATEOF'
3274
3275 timestamp='1970-01-01'
3276 _ATEOF
3277
3278
3279
3280
3281
3282 ## -------------------------------------------------------------------- ##
3283 ## First we try to update with some newer files in the destination dir. ##
3284 ## -------------------------------------------------------------------- ##
3285
3286 cat >expout <<'_ATEOF'
3287 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
3288 libtoolize: copying file `build-aux/config.guess'
3289 libtoolize: copying file `build-aux/config.sub'
3290 libtoolize: copying file `build-aux/install-sh'
3291 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3292 libtoolize: copying file `m4/libtool.m4'
3293 libtoolize: copying file `m4/ltsugar.m4'
3294 libtoolize: copying file `m4/ltversion.m4'
3295 libtoolize: copying file `m4/lt~obsolete.m4'
3296 _ATEOF
3297
3298
3299 cat >experr <<'_ATEOF'
3300 libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
3301 libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
3302 _ATEOF
3303
3304
3305 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3306 sed "s/libtoolize/$lt_name/g
3307 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3308 mv -f expout.t expout
3309 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3310 sed "s/libtoolize/$lt_name/g
3311 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
3312 mv -f experr.t experr
3313 { set +x
3314 $as_echo "$at_srcdir/libtoolize.at:228: \$LIBTOOLIZE --copy --install
3315
3316 "
3317 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:228"
3318 ( $at_check_trace; $LIBTOOLIZE --copy --install
3319
3320
3321 ) >>"$at_stdout" 2>>"$at_stderr"
3322 at_status=$? at_failed=false
3323 $at_check_filter
3324 $at_diff experr "$at_stderr" || at_failed=:
3325 $at_diff expout "$at_stdout" || at_failed=:
3326 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:228"
3327 $at_failed && at_fn_log_failure
3328 $at_traceon; }
3329
3330
3331
3332
3333 ## ---------------------------------------------------------- ##
3334 ## Next, a second update attempt with everything now updated. ##
3335 ## ---------------------------------------------------------- ##
3336
3337 : >expout
3338
3339 cat >experr <<'_ATEOF'
3340 libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite
3341 libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
3342 _ATEOF
3343
3344
3345 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3346 sed "s/libtoolize/$lt_name/g
3347 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3348 mv -f expout.t expout
3349 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3350 sed "s/libtoolize/$lt_name/g
3351 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
3352 mv -f experr.t experr
3353 { set +x
3354 $as_echo "$at_srcdir/libtoolize.at:242: \$LIBTOOLIZE --copy --install
3355
3356 "
3357 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:242"
3358 ( $at_check_trace; $LIBTOOLIZE --copy --install
3359
3360
3361 ) >>"$at_stdout" 2>>"$at_stderr"
3362 at_status=$? at_failed=false
3363 $at_check_filter
3364 $at_diff experr "$at_stderr" || at_failed=:
3365 $at_diff expout "$at_stdout" || at_failed=:
3366 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:242"
3367 $at_failed && at_fn_log_failure
3368 $at_traceon; }
3369
3370
3371
3372
3373 ## ----------------------------------------------------------- ##
3374 ## Now, a forced update to downgrade files with newer serials. ##
3375 ## ----------------------------------------------------------- ##
3376
3377 cat >expout <<'_ATEOF'
3378 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
3379 libtoolize: copying file `build-aux/config.guess'
3380 libtoolize: copying file `build-aux/config.sub'
3381 libtoolize: copying file `build-aux/install-sh'
3382 libtoolize: copying file `build-aux/ltmain.sh'
3383 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3384 libtoolize: copying file `m4/libtool.m4'
3385 libtoolize: copying file `m4/ltoptions.m4'
3386 libtoolize: copying file `m4/ltsugar.m4'
3387 libtoolize: copying file `m4/ltversion.m4'
3388 libtoolize: copying file `m4/lt~obsolete.m4'
3389 _ATEOF
3390
3391
3392 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3393 sed "s/libtoolize/$lt_name/g
3394 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3395 mv -f expout.t expout
3396 { set +x
3397 $as_echo "$at_srcdir/libtoolize.at:263: \$LIBTOOLIZE --copy --force --install
3398
3399 "
3400 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:263"
3401 ( $at_check_trace; $LIBTOOLIZE --copy --force --install
3402
3403
3404 ) >>"$at_stdout" 2>>"$at_stderr"
3405 at_status=$? at_failed=false
3406 $at_check_filter
3407 at_fn_diff_devnull "$at_stderr" || at_failed=:
3408 $at_diff expout "$at_stdout" || at_failed=:
3409 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:263"
3410 $at_failed && at_fn_log_failure
3411 $at_traceon; }
3412
3413
3414
3415
3416 ## ---------------------------------------------------------------- ##
3417 ## A final update attempt with everything previously force updated. ##
3418 ## ---------------------------------------------------------------- ##
3419
3420 : >expout
3421
3422 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3423 sed "s/libtoolize/$lt_name/g
3424 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3425 mv -f expout.t expout
3426 { set +x
3427 $as_echo "$at_srcdir/libtoolize.at:272: \$LIBTOOLIZE --copy --install
3428
3429 "
3430 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:272"
3431 ( $at_check_trace; $LIBTOOLIZE --copy --install
3432
3433
3434 ) >>"$at_stdout" 2>>"$at_stderr"
3435 at_status=$? at_failed=false
3436 $at_check_filter
3437 at_fn_diff_devnull "$at_stderr" || at_failed=:
3438 $at_diff expout "$at_stdout" || at_failed=:
3439 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:272"
3440 $at_failed && at_fn_log_failure
3441 $at_traceon; }
3442
3443
3444
3445   set +x
3446   $at_times_p && times >"$at_times_file"
3447 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3448 read at_status <"$at_status_file"
3449 #AT_STOP_10
3450 #AT_START_11
3451 at_fn_group_banner 11 'libtoolize.at:281' \
3452   "diagnose missing LT_CONFIG_LTDL_DIR" "            " 2
3453 at_xfail=no
3454 (
3455   $as_echo "11. $at_setup_line: testing $at_desc ..."
3456   $at_traceon
3457
3458
3459 cat >expout <<'_ATEOF'
3460 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
3461 libtoolize: copying file `build-aux/config.guess'
3462 libtoolize: copying file `build-aux/config.sub'
3463 libtoolize: copying file `build-aux/install-sh'
3464 libtoolize: copying file `build-aux/ltmain.sh'
3465 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3466 libtoolize: copying file `m4/argz.m4'
3467 libtoolize: copying file `m4/libtool.m4'
3468 libtoolize: copying file `m4/ltdl.m4'
3469 libtoolize: copying file `m4/ltoptions.m4'
3470 libtoolize: copying file `m4/ltsugar.m4'
3471 libtoolize: copying file `m4/ltversion.m4'
3472 libtoolize: copying file `m4/lt~obsolete.m4'
3473 libtoolize: putting libltdl files in `ltdl'.
3474 libtoolize: copying file `ltdl/COPYING.LIB'
3475 libtoolize: copying file `ltdl/README'
3476 libtoolize: copying file `ltdl/argz_.h'
3477 libtoolize: copying file `ltdl/argz.c'
3478 libtoolize: copying file `ltdl/loaders/dld_link.c'
3479 libtoolize: copying file `ltdl/loaders/dlopen.c'
3480 libtoolize: copying file `ltdl/loaders/dyld.c'
3481 libtoolize: copying file `ltdl/loaders/load_add_on.c'
3482 libtoolize: copying file `ltdl/loaders/loadlibrary.c'
3483 libtoolize: copying file `ltdl/loaders/shl_load.c'
3484 libtoolize: copying file `ltdl/lt__dirent.c'
3485 libtoolize: copying file `ltdl/lt__strl.c'
3486 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
3487 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
3488 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
3489 libtoolize: copying file `ltdl/libltdl/lt__private.h'
3490 libtoolize: copying file `ltdl/libltdl/lt__strl.h'
3491 libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
3492 libtoolize: copying file `ltdl/libltdl/lt_error.h'
3493 libtoolize: copying file `ltdl/libltdl/lt_system.h'
3494 libtoolize: copying file `ltdl/libltdl/slist.h'
3495 libtoolize: copying file `ltdl/loaders/preopen.c'
3496 libtoolize: copying file `ltdl/lt__alloc.c'
3497 libtoolize: copying file `ltdl/lt_dlloader.c'
3498 libtoolize: copying file `ltdl/lt_error.c'
3499 libtoolize: copying file `ltdl/ltdl.c'
3500 libtoolize: copying file `ltdl/ltdl.h'
3501 libtoolize: copying file `ltdl/slist.c'
3502 libtoolize: creating file `ltdl/Makefile.inc'
3503 libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'.
3504 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
3505 _ATEOF
3506
3507
3508 cat >configure.ac <<'_ATEOF'
3509 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3510 AC_CONFIG_AUX_DIR([build-aux])
3511 AC_CONFIG_MACRO_DIR([m4])
3512 LT_INIT
3513 LTDL_INIT([nonrecursive])
3514 AC_OUTPUT
3515 _ATEOF
3516
3517
3518 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3519 sed "s/libtoolize/$lt_name/g
3520 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3521 mv -f expout.t expout
3522 { set +x
3523 $as_echo "$at_srcdir/libtoolize.at:340: \$LIBTOOLIZE --copy --install --ltdl=ltdl
3524
3525 "
3526 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:340"
3527 ( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl
3528
3529
3530 ) >>"$at_stdout" 2>>"$at_stderr"
3531 at_status=$? at_failed=false
3532 $at_check_filter
3533 at_fn_diff_devnull "$at_stderr" || at_failed=:
3534 $at_diff expout "$at_stdout" || at_failed=:
3535 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:340"
3536 $at_failed && at_fn_log_failure
3537 $at_traceon; }
3538
3539
3540
3541   set +x
3542   $at_times_p && times >"$at_times_file"
3543 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3544 read at_status <"$at_status_file"
3545 #AT_STOP_11
3546 #AT_START_12
3547 at_fn_group_banner 12 'libtoolize.at:426' \
3548   "copy ltdl.m4 with shared macro directory" "       " 2
3549 at_xfail=no
3550 (
3551   $as_echo "12. $at_setup_line: testing $at_desc ..."
3552   $at_traceon
3553
3554
3555 cat >expout <<'_ATEOF'
3556 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
3557 libtoolize: linking file `ltdl/config/compile'
3558 libtoolize: linking file `ltdl/config/config.guess'
3559 libtoolize: linking file `ltdl/config/config.sub'
3560 libtoolize: linking file `ltdl/config/depcomp'
3561 libtoolize: linking file `ltdl/config/install-sh'
3562 libtoolize: linking file `ltdl/config/missing'
3563 libtoolize: linking file `ltdl/config/ltmain.sh'
3564 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
3565 libtoolize: linking file `ltdl/m4/argz.m4'
3566 libtoolize: linking file `ltdl/m4/libtool.m4'
3567 libtoolize: linking file `ltdl/m4/ltdl.m4'
3568 libtoolize: linking file `ltdl/m4/ltoptions.m4'
3569 libtoolize: linking file `ltdl/m4/ltsugar.m4'
3570 libtoolize: linking file `ltdl/m4/ltversion.m4'
3571 libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
3572 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
3573 libtoolize: linking file `ltdl/COPYING.LIB'
3574 libtoolize: linking file `ltdl/README'
3575 libtoolize: linking file `ltdl/Makefile.am'
3576 libtoolize: linking file `ltdl/configure.ac'
3577 libtoolize: copying file `ltdl/aclocal.m4'
3578 libtoolize: linking file `ltdl/Makefile.in'
3579 libtoolize: linking file `ltdl/config-h.in'
3580 libtoolize: linking file `ltdl/configure'
3581 libtoolize: linking file `ltdl/argz_.h'
3582 libtoolize: linking file `ltdl/argz.c'
3583 libtoolize: linking file `ltdl/loaders/dld_link.c'
3584 libtoolize: linking file `ltdl/loaders/dlopen.c'
3585 libtoolize: linking file `ltdl/loaders/dyld.c'
3586 libtoolize: linking file `ltdl/loaders/load_add_on.c'
3587 libtoolize: linking file `ltdl/loaders/loadlibrary.c'
3588 libtoolize: linking file `ltdl/loaders/shl_load.c'
3589 libtoolize: linking file `ltdl/lt__dirent.c'
3590 libtoolize: linking file `ltdl/lt__strl.c'
3591 libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
3592 libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
3593 libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
3594 libtoolize: linking file `ltdl/libltdl/lt__private.h'
3595 libtoolize: linking file `ltdl/libltdl/lt__strl.h'
3596 libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
3597 libtoolize: linking file `ltdl/libltdl/lt_error.h'
3598 libtoolize: linking file `ltdl/libltdl/lt_system.h'
3599 libtoolize: linking file `ltdl/libltdl/slist.h'
3600 libtoolize: linking file `ltdl/loaders/preopen.c'
3601 libtoolize: linking file `ltdl/lt__alloc.c'
3602 libtoolize: linking file `ltdl/lt_dlloader.c'
3603 libtoolize: linking file `ltdl/lt_error.c'
3604 libtoolize: linking file `ltdl/ltdl.c'
3605 libtoolize: linking file `ltdl/ltdl.h'
3606 libtoolize: linking file `ltdl/slist.c'
3607 _ATEOF
3608
3609
3610 cat >configure.ac <<'_ATEOF'
3611 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3612 LT_CONFIG_LTDL_DIR([ltdl])
3613 AC_CONFIG_AUX_DIR([ltdl/config])
3614 AC_CONFIG_MACRO_DIR([ltdl/m4])
3615 LT_INIT
3616 LTDL_INIT
3617 AC_OUTPUT
3618 _ATEOF
3619
3620
3621 cat >Makefile.am <<'_ATEOF'
3622 ACLOCAL_AMFLAGS = -I ltdl/m4
3623 _ATEOF
3624
3625
3626
3627 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3628 sed "s/libtoolize/$lt_name/g
3629 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3630 mv -f expout.t expout
3631 { set +x
3632 $as_echo "$at_srcdir/libtoolize.at:430: \$LIBTOOLIZE --ltdl
3633
3634 "
3635 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:430"
3636 ( $at_check_trace; $LIBTOOLIZE --ltdl
3637
3638
3639 ) >>"$at_stdout" 2>>"$at_stderr"
3640 at_status=$? at_failed=false
3641 $at_check_filter
3642 at_fn_diff_devnull "$at_stderr" || at_failed=:
3643 $at_diff expout "$at_stdout" || at_failed=:
3644 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:430"
3645 $at_failed && at_fn_log_failure
3646 $at_traceon; }
3647
3648
3649
3650   set +x
3651   $at_times_p && times >"$at_times_file"
3652 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3653 read at_status <"$at_status_file"
3654 #AT_STOP_12
3655 #AT_START_13
3656 at_fn_group_banner 13 'libtoolize.at:438' \
3657   "correctly parse LTDL_INIT from configure.ac" "    " 2
3658 at_xfail=no
3659 (
3660   $as_echo "13. $at_setup_line: testing $at_desc ..."
3661   $at_traceon
3662
3663
3664 cat >expout <<'_ATEOF'
3665 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
3666 libtoolize: linking file `ltdl/config/compile'
3667 libtoolize: linking file `ltdl/config/config.guess'
3668 libtoolize: linking file `ltdl/config/config.sub'
3669 libtoolize: linking file `ltdl/config/depcomp'
3670 libtoolize: linking file `ltdl/config/install-sh'
3671 libtoolize: linking file `ltdl/config/missing'
3672 libtoolize: linking file `ltdl/config/ltmain.sh'
3673 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
3674 libtoolize: linking file `ltdl/m4/argz.m4'
3675 libtoolize: linking file `ltdl/m4/libtool.m4'
3676 libtoolize: linking file `ltdl/m4/ltdl.m4'
3677 libtoolize: linking file `ltdl/m4/ltoptions.m4'
3678 libtoolize: linking file `ltdl/m4/ltsugar.m4'
3679 libtoolize: linking file `ltdl/m4/ltversion.m4'
3680 libtoolize: linking file `ltdl/m4/lt~obsolete.m4'
3681 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
3682 libtoolize: linking file `ltdl/COPYING.LIB'
3683 libtoolize: linking file `ltdl/README'
3684 libtoolize: linking file `ltdl/Makefile.am'
3685 libtoolize: linking file `ltdl/configure.ac'
3686 libtoolize: copying file `ltdl/aclocal.m4'
3687 libtoolize: linking file `ltdl/Makefile.in'
3688 libtoolize: linking file `ltdl/config-h.in'
3689 libtoolize: linking file `ltdl/configure'
3690 libtoolize: linking file `ltdl/argz_.h'
3691 libtoolize: linking file `ltdl/argz.c'
3692 libtoolize: linking file `ltdl/loaders/dld_link.c'
3693 libtoolize: linking file `ltdl/loaders/dlopen.c'
3694 libtoolize: linking file `ltdl/loaders/dyld.c'
3695 libtoolize: linking file `ltdl/loaders/load_add_on.c'
3696 libtoolize: linking file `ltdl/loaders/loadlibrary.c'
3697 libtoolize: linking file `ltdl/loaders/shl_load.c'
3698 libtoolize: linking file `ltdl/lt__dirent.c'
3699 libtoolize: linking file `ltdl/lt__strl.c'
3700 libtoolize: linking file `ltdl/libltdl/lt__alloc.h'
3701 libtoolize: linking file `ltdl/libltdl/lt__dirent.h'
3702 libtoolize: linking file `ltdl/libltdl/lt__glibc.h'
3703 libtoolize: linking file `ltdl/libltdl/lt__private.h'
3704 libtoolize: linking file `ltdl/libltdl/lt__strl.h'
3705 libtoolize: linking file `ltdl/libltdl/lt_dlloader.h'
3706 libtoolize: linking file `ltdl/libltdl/lt_error.h'
3707 libtoolize: linking file `ltdl/libltdl/lt_system.h'
3708 libtoolize: linking file `ltdl/libltdl/slist.h'
3709 libtoolize: linking file `ltdl/loaders/preopen.c'
3710 libtoolize: linking file `ltdl/lt__alloc.c'
3711 libtoolize: linking file `ltdl/lt_dlloader.c'
3712 libtoolize: linking file `ltdl/lt_error.c'
3713 libtoolize: linking file `ltdl/ltdl.c'
3714 libtoolize: linking file `ltdl/ltdl.h'
3715 libtoolize: linking file `ltdl/slist.c'
3716 _ATEOF
3717
3718
3719 cat >configure.ac <<'_ATEOF'
3720 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3721 LT_CONFIG_LTDL_DIR([ltdl])
3722 AC_CONFIG_AUX_DIR([ltdl/config])
3723 AC_CONFIG_MACRO_DIR([ltdl/m4])
3724 LT_INIT
3725 LTDL_INIT
3726 AC_OUTPUT
3727 _ATEOF
3728
3729
3730 cat >Makefile.am <<'_ATEOF'
3731 ACLOCAL_AMFLAGS = -I ltdl/m4
3732 _ATEOF
3733
3734
3735
3736 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3737 sed "s/libtoolize/$lt_name/g
3738 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3739 mv -f expout.t expout
3740 { set +x
3741 $as_echo "$at_srcdir/libtoolize.at:442: \$LIBTOOLIZE
3742
3743 "
3744 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:442"
3745 ( $at_check_trace; $LIBTOOLIZE
3746
3747
3748 ) >>"$at_stdout" 2>>"$at_stderr"
3749 at_status=$? at_failed=false
3750 $at_check_filter
3751 at_fn_diff_devnull "$at_stderr" || at_failed=:
3752 $at_diff expout "$at_stdout" || at_failed=:
3753 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:442"
3754 $at_failed && at_fn_log_failure
3755 $at_traceon; }
3756
3757
3758
3759   set +x
3760   $at_times_p && times >"$at_times_file"
3761 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3762 read at_status <"$at_status_file"
3763 #AT_STOP_13
3764 #AT_START_14
3765 at_fn_group_banner 14 'libtoolize.at:450' \
3766   "diagnose missing LTDL_INIT invocation" "          " 2
3767 at_xfail=no
3768 (
3769   $as_echo "14. $at_setup_line: testing $at_desc ..."
3770   $at_traceon
3771
3772
3773 cat >expout <<'_ATEOF'
3774 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'.
3775 libtoolize: copying file `ltdl/config/compile'
3776 libtoolize: copying file `ltdl/config/config.guess'
3777 libtoolize: copying file `ltdl/config/config.sub'
3778 libtoolize: copying file `ltdl/config/depcomp'
3779 libtoolize: copying file `ltdl/config/install-sh'
3780 libtoolize: copying file `ltdl/config/missing'
3781 libtoolize: copying file `ltdl/config/ltmain.sh'
3782 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'.
3783 libtoolize: copying file `ltdl/m4/argz.m4'
3784 libtoolize: copying file `ltdl/m4/libtool.m4'
3785 libtoolize: copying file `ltdl/m4/ltdl.m4'
3786 libtoolize: copying file `ltdl/m4/ltoptions.m4'
3787 libtoolize: copying file `ltdl/m4/ltsugar.m4'
3788 libtoolize: copying file `ltdl/m4/ltversion.m4'
3789 libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
3790 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
3791 libtoolize: copying file `ltdl/COPYING.LIB'
3792 libtoolize: copying file `ltdl/README'
3793 libtoolize: copying file `ltdl/Makefile.am'
3794 libtoolize: copying file `ltdl/configure.ac'
3795 libtoolize: copying file `ltdl/aclocal.m4'
3796 libtoolize: copying file `ltdl/Makefile.in'
3797 libtoolize: copying file `ltdl/config-h.in'
3798 libtoolize: copying file `ltdl/configure'
3799 libtoolize: copying file `ltdl/argz_.h'
3800 libtoolize: copying file `ltdl/argz.c'
3801 libtoolize: copying file `ltdl/loaders/dld_link.c'
3802 libtoolize: copying file `ltdl/loaders/dlopen.c'
3803 libtoolize: copying file `ltdl/loaders/dyld.c'
3804 libtoolize: copying file `ltdl/loaders/load_add_on.c'
3805 libtoolize: copying file `ltdl/loaders/loadlibrary.c'
3806 libtoolize: copying file `ltdl/loaders/shl_load.c'
3807 libtoolize: copying file `ltdl/lt__dirent.c'
3808 libtoolize: copying file `ltdl/lt__strl.c'
3809 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
3810 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
3811 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
3812 libtoolize: copying file `ltdl/libltdl/lt__private.h'
3813 libtoolize: copying file `ltdl/libltdl/lt__strl.h'
3814 libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
3815 libtoolize: copying file `ltdl/libltdl/lt_error.h'
3816 libtoolize: copying file `ltdl/libltdl/lt_system.h'
3817 libtoolize: copying file `ltdl/libltdl/slist.h'
3818 libtoolize: copying file `ltdl/loaders/preopen.c'
3819 libtoolize: copying file `ltdl/lt__alloc.c'
3820 libtoolize: copying file `ltdl/lt_dlloader.c'
3821 libtoolize: copying file `ltdl/lt_error.c'
3822 libtoolize: copying file `ltdl/ltdl.c'
3823 libtoolize: copying file `ltdl/ltdl.h'
3824 libtoolize: copying file `ltdl/slist.c'
3825 libtoolize: Remember to add `LTDL_INIT' to configure.ac.
3826 libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
3827 _ATEOF
3828
3829
3830 cat >configure.ac <<'_ATEOF'
3831 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3832 LT_CONFIG_LTDL_DIR([ltdl])
3833 AC_CONFIG_AUX_DIR([ltdl/config])
3834 AC_CONFIG_MACRO_DIR([ltdl/m4])
3835 LT_INIT
3836 AC_OUTPUT
3837 _ATEOF
3838
3839
3840 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3841 sed "s/libtoolize/$lt_name/g
3842 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3843 mv -f expout.t expout
3844 { set +x
3845 $as_echo "$at_srcdir/libtoolize.at:517: \$LIBTOOLIZE --ltdl --copy
3846
3847 "
3848 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:517"
3849 ( $at_check_trace; $LIBTOOLIZE --ltdl --copy
3850
3851
3852 ) >>"$at_stdout" 2>>"$at_stderr"
3853 at_status=$? at_failed=false
3854 $at_check_filter
3855 at_fn_diff_devnull "$at_stderr" || at_failed=:
3856 $at_diff expout "$at_stdout" || at_failed=:
3857 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:517"
3858 $at_failed && at_fn_log_failure
3859 $at_traceon; }
3860
3861
3862
3863   set +x
3864   $at_times_p && times >"$at_times_file"
3865 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3866 read at_status <"$at_status_file"
3867 #AT_STOP_14
3868 #AT_START_15
3869 at_fn_group_banner 15 'libtoolize.at:527' \
3870   "upgrading verbatim style aclocal.m4" "            " 2
3871 at_xfail=no
3872       test "$ACLOCAL" = no && at_xfail=yes
3873 (
3874   $as_echo "15. $at_setup_line: testing $at_desc ..."
3875   $at_traceon
3876
3877
3878 cat >configure.ac <<'_ATEOF'
3879 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3880 AC_CONFIG_AUX_DIR([build-aux])
3881 LT_INIT
3882 AC_OUTPUT
3883 _ATEOF
3884
3885
3886 cat >expout <<'_ATEOF'
3887 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
3888 libtoolize: copying file `build-aux/ltmain.sh'
3889 libtoolize: You should add the contents of the following files to `aclocal.m4':
3890 libtoolize:   `/usr/local/share/aclocal/libtool.m4'
3891 libtoolize:   `/usr/local/share/aclocal/ltoptions.m4'
3892 libtoolize:   `/usr/local/share/aclocal/ltversion.m4'
3893 libtoolize:   `/usr/local/share/aclocal/ltsugar.m4'
3894 libtoolize:   `/usr/local/share/aclocal/lt~obsolete.m4'
3895 libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
3896 libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
3897 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
3898 _ATEOF
3899
3900
3901 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3902 sed "s/libtoolize/$lt_name/g
3903 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3904 mv -f expout.t expout
3905 { set +x
3906 $as_echo "$at_srcdir/libtoolize.at:550: \$LIBTOOLIZE --copy
3907
3908 "
3909 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:550"
3910 ( $at_check_trace; $LIBTOOLIZE --copy
3911
3912
3913 ) >>"$at_stdout" 2>>"$at_stderr"
3914 at_status=$? at_failed=false
3915 $at_check_filter
3916 at_fn_diff_devnull "$at_stderr" || at_failed=:
3917 $at_diff expout "$at_stdout" || at_failed=:
3918 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:550"
3919 $at_failed && at_fn_log_failure
3920 $at_traceon; }
3921
3922
3923
3924
3925 ## --------------------------------------- ##
3926 ## Upgrading a hand maintained aclocal.m4. ##
3927 ## --------------------------------------- ##
3928
3929 cat >configure.ac <<'_ATEOF'
3930 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
3931 AC_CONFIG_AUX_DIR([build-aux])
3932 AC_CONFIG_MACRO_DIR([m4])
3933 LT_INIT
3934 AC_OUTPUT
3935 _ATEOF
3936
3937
3938 cat >Makefile.am <<'_ATEOF'
3939 ACLOCAL_AMFLAGS = -I m4
3940 _ATEOF
3941
3942
3943 cat >aclocal.m4 <<'_ATEOF'
3944 # This should need upgrading:
3945 # serial 25 LT_INIT
3946 AC_DEFUN([LT_INIT],
3947 [blah])
3948
3949 # This is newer than the upgrade version:
3950 # serial 99999 ltoptions.m4
3951
3952 # This is older than the upgrade version:
3953 # serial 1 ltversion.m4
3954 _ATEOF
3955
3956
3957 cat >expout <<'_ATEOF'
3958 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
3959 libtoolize: copying file `m4/libtool.m4'
3960 libtoolize: copying file `m4/ltoptions.m4'
3961 libtoolize: copying file `m4/ltsugar.m4'
3962 libtoolize: You should add the contents of `m4/ltsugar.m4' to `aclocal.m4'.
3963 libtoolize: copying file `m4/ltversion.m4'
3964 libtoolize: You should add the contents of `m4/ltversion.m4' to `aclocal.m4'.
3965 libtoolize: copying file `m4/lt~obsolete.m4'
3966 libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'.
3967 _ATEOF
3968
3969
3970 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
3971 sed "s/libtoolize/$lt_name/g
3972 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
3973 mv -f expout.t expout
3974 { set +x
3975 $as_echo "$at_srcdir/libtoolize.at:594: \$LIBTOOLIZE --copy
3976
3977 "
3978 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:594"
3979 ( $at_check_trace; $LIBTOOLIZE --copy
3980
3981
3982 ) >>"$at_stdout" 2>>"$at_stderr"
3983 at_status=$? at_failed=false
3984 $at_check_filter
3985 at_fn_diff_devnull "$at_stderr" || at_failed=:
3986 $at_diff expout "$at_stdout" || at_failed=:
3987 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:594"
3988 $at_failed && at_fn_log_failure
3989 $at_traceon; }
3990
3991
3992
3993
3994 ## ------------------------------------------- ##
3995 ## Upgrading an aclocal maintained aclocal.m4. ##
3996 ## ------------------------------------------- ##
3997
3998 { set +x
3999 $as_echo "$at_srcdir/libtoolize.at:601: \$ACLOCAL -I m4"
4000 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "libtoolize.at:601"
4001 ( $at_check_trace; $ACLOCAL -I m4
4002 ) >>"$at_stdout" 2>>"$at_stderr"
4003 at_status=$? at_failed=false
4004 $at_check_filter
4005 echo stderr:; cat "$at_stderr"
4006 echo stdout:; cat "$at_stdout"
4007 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:601"
4008 $at_failed && at_fn_log_failure
4009 $at_traceon; }
4010
4011
4012
4013
4014
4015 rm -f m4/libtool.m4 m4/ltoptions.m4
4016
4017 # This file should be upgraded.
4018 cat >m4/libtool.m4 <<'_ATEOF'
4019
4020 # serial 25 LT_INIT
4021 AC_DEFUN([LT_INIT])
4022 _ATEOF
4023
4024
4025 # This file has a very high serial number, and should be left unchanged.
4026 cat >m4/ltoptions.m4 <<'_ATEOF'
4027
4028 # serial 99999 ltoptions.m4
4029 _ATEOF
4030
4031
4032 cat >expout <<'_ATEOF'
4033 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
4034 libtoolize: copying file `m4/libtool.m4'
4035 _ATEOF
4036
4037
4038 cat >experr <<'_ATEOF'
4039 libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
4040 _ATEOF
4041
4042
4043 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4044 sed "s/libtoolize/$lt_name/g
4045 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4046 mv -f expout.t expout
4047 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4048 sed "s/libtoolize/$lt_name/g
4049 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
4050 mv -f experr.t experr
4051 { set +x
4052 $as_echo "$at_srcdir/libtoolize.at:625: \$LIBTOOLIZE --copy
4053
4054 "
4055 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:625"
4056 ( $at_check_trace; $LIBTOOLIZE --copy
4057
4058
4059 ) >>"$at_stdout" 2>>"$at_stderr"
4060 at_status=$? at_failed=false
4061 $at_check_filter
4062 $at_diff experr "$at_stderr" || at_failed=:
4063 $at_diff expout "$at_stdout" || at_failed=:
4064 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:625"
4065 $at_failed && at_fn_log_failure
4066 $at_traceon; }
4067
4068
4069
4070 ## ----------------------------------------------------------- ##
4071 ## Now, a forced update to downgrade files with newer serials. ##
4072 ## ----------------------------------------------------------- ##
4073
4074 cat >expout <<'_ATEOF'
4075 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
4076 libtoolize: copying file `build-aux/ltmain.sh'
4077 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
4078 libtoolize: copying file `m4/libtool.m4'
4079 libtoolize: copying file `m4/ltoptions.m4'
4080 libtoolize: copying file `m4/ltsugar.m4'
4081 libtoolize: copying file `m4/ltversion.m4'
4082 libtoolize: copying file `m4/lt~obsolete.m4'
4083 _ATEOF
4084
4085
4086 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4087 sed "s/libtoolize/$lt_name/g
4088 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4089 mv -f expout.t expout
4090 { set +x
4091 $as_echo "$at_srcdir/libtoolize.at:642: \$LIBTOOLIZE --copy --force
4092
4093 "
4094 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:642"
4095 ( $at_check_trace; $LIBTOOLIZE --copy --force
4096
4097
4098 ) >>"$at_stdout" 2>>"$at_stderr"
4099 at_status=$? at_failed=false
4100 $at_check_filter
4101 at_fn_diff_devnull "$at_stderr" || at_failed=:
4102 $at_diff expout "$at_stdout" || at_failed=:
4103 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:642"
4104 $at_failed && at_fn_log_failure
4105 $at_traceon; }
4106
4107
4108
4109   set +x
4110   $at_times_p && times >"$at_times_file"
4111 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4112 read at_status <"$at_status_file"
4113 #AT_STOP_15
4114 #AT_START_16
4115 at_fn_group_banner 16 'libtoolize.at:651' \
4116   "verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR" "    " 2
4117 at_xfail=no
4118       test "$ACLOCAL" = no && at_xfail=yes
4119 (
4120   $as_echo "16. $at_setup_line: testing $at_desc ..."
4121   $at_traceon
4122
4123
4124 cat >configure.ac <<'_ATEOF'
4125 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
4126 LT_INIT
4127 AC_OUTPUT
4128 _ATEOF
4129
4130
4131 cat >aclocal.m4 <<'_ATEOF'
4132 # This should need upgrading:
4133 # serial 25 LT_INIT
4134 AC_DEFUN([LT_INIT],
4135 [blah])
4136
4137 # This is newer than the upgrade version:
4138 # serial 99999 ltoptions.m4
4139
4140 # This is older than the upgrade version:
4141 # serial 1 ltversion.m4
4142 _ATEOF
4143
4144
4145 cat >expout <<'_ATEOF'
4146 libtoolize: putting auxiliary files in `.'.
4147 libtoolize: copying file `./ltmain.sh'
4148 libtoolize: You should add the contents of the following files to `aclocal.m4':
4149 libtoolize:   `/usr/local/share/aclocal/libtool.m4'
4150 libtoolize:   `/usr/local/share/aclocal/ltversion.m4'
4151 libtoolize:   `/usr/local/share/aclocal/ltsugar.m4'
4152 libtoolize:   `/usr/local/share/aclocal/lt~obsolete.m4'
4153 libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
4154 libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
4155 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
4156 _ATEOF
4157
4158
4159 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4160 sed "s/libtoolize/$lt_name/g
4161 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4162 mv -f expout.t expout
4163 { set +x
4164 $as_echo "$at_srcdir/libtoolize.at:685: \$LIBTOOLIZE --copy
4165
4166 "
4167 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:685"
4168 ( $at_check_trace; $LIBTOOLIZE --copy
4169
4170
4171 ) >>"$at_stdout" 2>>"$at_stderr"
4172 at_status=$? at_failed=false
4173 $at_check_filter
4174 at_fn_diff_devnull "$at_stderr" || at_failed=:
4175 $at_diff expout "$at_stdout" || at_failed=:
4176 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:685"
4177 $at_failed && at_fn_log_failure
4178 $at_traceon; }
4179
4180
4181
4182
4183 ## ----------------------------------------------------------------------- ##
4184 ## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ##
4185 ## ----------------------------------------------------------------------- ##
4186
4187 { set +x
4188 $as_echo "$at_srcdir/libtoolize.at:692: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
4189 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "libtoolize.at:692"
4190 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
4191 ) >>"$at_stdout" 2>>"$at_stderr"
4192 at_status=$? at_failed=false
4193 $at_check_filter
4194 echo stderr:; cat "$at_stderr"
4195 echo stdout:; cat "$at_stdout"
4196 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:692"
4197 $at_failed && at_fn_log_failure
4198 $at_traceon; }
4199
4200
4201
4202
4203
4204 ## The following code is adapted (and simplified) from libtoolize.m4sh
4205 ####
4206 : ${GREP="grep"}
4207 : ${SED="sed"}
4208
4209 basename="s,^.*/,,"
4210
4211 # func_grep expression filename
4212 # Check whether EXPRESSION matches any line of FILENAME, without output.
4213 func_grep ()
4214 {
4215     $GREP "$1" "$2" >/dev/null 2>&1
4216 }
4217
4218 # func_serial filename [macro_regex]
4219 # Output the value of the serial number comment in FILENAME, where the
4220 # comment line must also match MACRO_REGEX, if given.
4221 func_serial ()
4222 {
4223     my_filename="$1"
4224     my_macro_regex="$2"
4225     my_sed_serial='
4226         /^# serial [1-9][0-9.]*[        ]*'"$my_macro_regex"'[  ]*$/ {
4227             s,^# serial \([1-9][0-9.]*\).*$,\1,
4228             q
4229         }
4230         d'
4231
4232     # Search FILENAME and all the files it m4_includes for a serial number
4233     # in the file that AC_DEFUNs MACRO_REGEX.
4234     my_serial=
4235     if test -z "$my_macro_regex" ||
4236        test "$my_filename" = aclocal.m4 ||
4237        test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
4238        func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_filename"
4239     then
4240       my_serial=`$SED -e "$my_sed_serial" "$my_filename"`
4241     fi
4242
4243     # If the file has no serial number, something is badly wrong!
4244     test -n "$my_serial" || exit 1
4245
4246     echo $my_serial
4247 }
4248
4249 # Make the serial number in aclocal.m4 higher than installed ltoptions.m4,
4250 # and the others match the macro files that libtoolize will compare against.
4251 libtool_serial=`func_serial "$tst_aclocaldir/libtool.m4" LT_INIT`
4252 ltversion_serial=`func_serial "$tst_aclocaldir/ltversion.m4" ltversion.m4`
4253 ltsugar_serial=`func_serial "$tst_aclocaldir/ltsugar.m4" ltsugar.m4`
4254 lt_obsolete_serial=`func_serial "$tst_aclocaldir/lt~obsolete.m4" lt~obsolete.m4`
4255 $SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 ltoptions.m4,' \
4256   -e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \
4257   -e "s,^#.*serial.*ltversion.m4\$,# serial $ltversion_serial ltversion.m4," \
4258   -e "s,^#.*serial.*ltsugar.m4\$,# serial $ltsugar_serial ltsugar.m4," \
4259   -e "s,^#.*serial.*lt~obsolete.m4\$,# serial $lt_obsolete_serial lt~obsolete.m4," \
4260  < aclocal.m4 > aclocal.m4t
4261 mv -f aclocal.m4t aclocal.m4
4262
4263 cat >expout <<'_ATEOF'
4264 libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
4265 libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
4266 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
4267 _ATEOF
4268
4269
4270 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4271 sed "s/libtoolize/$lt_name/g
4272 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4273 mv -f expout.t expout
4274 { set +x
4275 $as_echo "$at_srcdir/libtoolize.at:759: \$LIBTOOLIZE --copy
4276
4277 "
4278 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:759"
4279 ( $at_check_trace; $LIBTOOLIZE --copy
4280
4281
4282 ) >>"$at_stdout" 2>>"$at_stderr"
4283 at_status=$? at_failed=false
4284 $at_check_filter
4285 at_fn_diff_devnull "$at_stderr" || at_failed=:
4286 $at_diff expout "$at_stdout" || at_failed=:
4287 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:759"
4288 $at_failed && at_fn_log_failure
4289 $at_traceon; }
4290
4291
4292
4293
4294 ## --------------------- ##
4295 ## Now, a forced update. ##
4296 ## --------------------- ##
4297
4298 cat >expout <<'_ATEOF'
4299 libtoolize: putting auxiliary files in `.'.
4300 libtoolize: copying file `./ltmain.sh'
4301 libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
4302 libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
4303 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
4304 _ATEOF
4305
4306
4307 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4308 sed "s/libtoolize/$lt_name/g
4309 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4310 mv -f expout.t expout
4311 { set +x
4312 $as_echo "$at_srcdir/libtoolize.at:774: \$LIBTOOLIZE --copy --force
4313
4314 "
4315 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:774"
4316 ( $at_check_trace; $LIBTOOLIZE --copy --force
4317
4318
4319 ) >>"$at_stdout" 2>>"$at_stderr"
4320 at_status=$? at_failed=false
4321 $at_check_filter
4322 at_fn_diff_devnull "$at_stderr" || at_failed=:
4323 $at_diff expout "$at_stdout" || at_failed=:
4324 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:774"
4325 $at_failed && at_fn_log_failure
4326 $at_traceon; }
4327
4328
4329
4330   set +x
4331   $at_times_p && times >"$at_times_file"
4332 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4333 read at_status <"$at_status_file"
4334 #AT_STOP_16
4335 #AT_START_17
4336 at_fn_group_banner 17 'libtoolize.at:783' \
4337   "nonrecursive ltdl with AC_CONFIG_MACRO_DIR" "     " 2
4338 at_xfail=no
4339 (
4340   $as_echo "17. $at_setup_line: testing $at_desc ..."
4341   $at_traceon
4342
4343
4344 cat >expout <<'_ATEOF'
4345 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
4346 libtoolize: copying file `build-aux/config.guess'
4347 libtoolize: copying file `build-aux/config.sub'
4348 libtoolize: copying file `build-aux/install-sh'
4349 libtoolize: copying file `build-aux/ltmain.sh'
4350 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
4351 libtoolize: copying file `m4/argz.m4'
4352 libtoolize: copying file `m4/libtool.m4'
4353 libtoolize: copying file `m4/ltdl.m4'
4354 libtoolize: copying file `m4/ltoptions.m4'
4355 libtoolize: copying file `m4/ltsugar.m4'
4356 libtoolize: copying file `m4/ltversion.m4'
4357 libtoolize: copying file `m4/lt~obsolete.m4'
4358 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
4359 libtoolize: copying file `ltdl/COPYING.LIB'
4360 libtoolize: copying file `ltdl/README'
4361 libtoolize: copying file `ltdl/argz_.h'
4362 libtoolize: copying file `ltdl/argz.c'
4363 libtoolize: copying file `ltdl/loaders/dld_link.c'
4364 libtoolize: copying file `ltdl/loaders/dlopen.c'
4365 libtoolize: copying file `ltdl/loaders/dyld.c'
4366 libtoolize: copying file `ltdl/loaders/load_add_on.c'
4367 libtoolize: copying file `ltdl/loaders/loadlibrary.c'
4368 libtoolize: copying file `ltdl/loaders/shl_load.c'
4369 libtoolize: copying file `ltdl/lt__dirent.c'
4370 libtoolize: copying file `ltdl/lt__strl.c'
4371 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
4372 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
4373 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
4374 libtoolize: copying file `ltdl/libltdl/lt__private.h'
4375 libtoolize: copying file `ltdl/libltdl/lt__strl.h'
4376 libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
4377 libtoolize: copying file `ltdl/libltdl/lt_error.h'
4378 libtoolize: copying file `ltdl/libltdl/lt_system.h'
4379 libtoolize: copying file `ltdl/libltdl/slist.h'
4380 libtoolize: copying file `ltdl/loaders/preopen.c'
4381 libtoolize: copying file `ltdl/lt__alloc.c'
4382 libtoolize: copying file `ltdl/lt_dlloader.c'
4383 libtoolize: copying file `ltdl/lt_error.c'
4384 libtoolize: copying file `ltdl/ltdl.c'
4385 libtoolize: copying file `ltdl/ltdl.h'
4386 libtoolize: copying file `ltdl/slist.c'
4387 libtoolize: creating file `ltdl/Makefile.inc'
4388 _ATEOF
4389
4390
4391 cat >configure.ac <<'_ATEOF'
4392 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
4393 LT_CONFIG_LTDL_DIR([ltdl])
4394 AC_CONFIG_AUX_DIR([build-aux])
4395 AC_CONFIG_MACRO_DIR([m4])
4396 LT_INIT
4397 LTDL_INIT([nonrecursive])
4398 AC_OUTPUT
4399 _ATEOF
4400
4401
4402 cat >Makefile.am <<'_ATEOF'
4403 ACLOCAL_AMFLAGS = -I m4
4404 _ATEOF
4405
4406
4407 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4408 sed "s/libtoolize/$lt_name/g
4409 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4410 mv -f expout.t expout
4411 { set +x
4412 $as_echo "$at_srcdir/libtoolize.at:845: \$LIBTOOLIZE --copy --install --ltdl=ltdl
4413
4414 "
4415 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:845"
4416 ( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl
4417
4418
4419 ) >>"$at_stdout" 2>>"$at_stderr"
4420 at_status=$? at_failed=false
4421 $at_check_filter
4422 at_fn_diff_devnull "$at_stderr" || at_failed=:
4423 $at_diff expout "$at_stdout" || at_failed=:
4424 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:845"
4425 $at_failed && at_fn_log_failure
4426 $at_traceon; }
4427
4428
4429
4430   set +x
4431   $at_times_p && times >"$at_times_file"
4432 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4433 read at_status <"$at_status_file"
4434 #AT_STOP_17
4435 #AT_START_18
4436 at_fn_group_banner 18 'libtoolize.at:854' \
4437   "subproject ltdl with non-shared directories" "    " 2
4438 at_xfail=no
4439 (
4440   $as_echo "18. $at_setup_line: testing $at_desc ..."
4441   $at_traceon
4442
4443
4444 cat >expout <<'_ATEOF'
4445 libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
4446 libtoolize: copying file `build-aux/config.guess'
4447 libtoolize: copying file `build-aux/config.sub'
4448 libtoolize: copying file `build-aux/install-sh'
4449 libtoolize: copying file `build-aux/ltmain.sh'
4450 libtoolize: putting auxiliary files in `build-aux'.
4451 libtoolize: copying file `ltdl/config/compile'
4452 libtoolize: copying file `ltdl/config/config.guess'
4453 libtoolize: copying file `ltdl/config/config.sub'
4454 libtoolize: copying file `ltdl/config/depcomp'
4455 libtoolize: copying file `ltdl/config/install-sh'
4456 libtoolize: copying file `ltdl/config/missing'
4457 libtoolize: copying file `ltdl/config/ltmain.sh'
4458 libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'.
4459 libtoolize: copying file `acm4/argz.m4'
4460 libtoolize: copying file `acm4/libtool.m4'
4461 libtoolize: copying file `acm4/ltdl.m4'
4462 libtoolize: copying file `acm4/ltoptions.m4'
4463 libtoolize: copying file `acm4/ltsugar.m4'
4464 libtoolize: copying file `acm4/ltversion.m4'
4465 libtoolize: copying file `acm4/lt~obsolete.m4'
4466 libtoolize: putting macros in `ltdl/m4'.
4467 libtoolize: copying file `ltdl/m4/argz.m4'
4468 libtoolize: copying file `ltdl/m4/libtool.m4'
4469 libtoolize: copying file `ltdl/m4/ltdl.m4'
4470 libtoolize: copying file `ltdl/m4/ltoptions.m4'
4471 libtoolize: copying file `ltdl/m4/ltsugar.m4'
4472 libtoolize: copying file `ltdl/m4/ltversion.m4'
4473 libtoolize: copying file `ltdl/m4/lt~obsolete.m4'
4474 libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'.
4475 libtoolize: copying file `ltdl/COPYING.LIB'
4476 libtoolize: copying file `ltdl/README'
4477 libtoolize: copying file `ltdl/Makefile.am'
4478 libtoolize: copying file `ltdl/configure.ac'
4479 libtoolize: copying file `ltdl/aclocal.m4'
4480 libtoolize: copying file `ltdl/Makefile.in'
4481 libtoolize: copying file `ltdl/config-h.in'
4482 libtoolize: copying file `ltdl/configure'
4483 libtoolize: copying file `ltdl/argz_.h'
4484 libtoolize: copying file `ltdl/argz.c'
4485 libtoolize: copying file `ltdl/loaders/dld_link.c'
4486 libtoolize: copying file `ltdl/loaders/dlopen.c'
4487 libtoolize: copying file `ltdl/loaders/dyld.c'
4488 libtoolize: copying file `ltdl/loaders/load_add_on.c'
4489 libtoolize: copying file `ltdl/loaders/loadlibrary.c'
4490 libtoolize: copying file `ltdl/loaders/shl_load.c'
4491 libtoolize: copying file `ltdl/lt__dirent.c'
4492 libtoolize: copying file `ltdl/lt__strl.c'
4493 libtoolize: copying file `ltdl/libltdl/lt__alloc.h'
4494 libtoolize: copying file `ltdl/libltdl/lt__dirent.h'
4495 libtoolize: copying file `ltdl/libltdl/lt__glibc.h'
4496 libtoolize: copying file `ltdl/libltdl/lt__private.h'
4497 libtoolize: copying file `ltdl/libltdl/lt__strl.h'
4498 libtoolize: copying file `ltdl/libltdl/lt_dlloader.h'
4499 libtoolize: copying file `ltdl/libltdl/lt_error.h'
4500 libtoolize: copying file `ltdl/libltdl/lt_system.h'
4501 libtoolize: copying file `ltdl/libltdl/slist.h'
4502 libtoolize: copying file `ltdl/loaders/preopen.c'
4503 libtoolize: copying file `ltdl/lt__alloc.c'
4504 libtoolize: copying file `ltdl/lt_dlloader.c'
4505 libtoolize: copying file `ltdl/lt_error.c'
4506 libtoolize: copying file `ltdl/ltdl.c'
4507 libtoolize: copying file `ltdl/ltdl.h'
4508 libtoolize: copying file `ltdl/slist.c'
4509 libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac.
4510 libtoolize: Consider using `AC_CONFIG_MACRO_DIR([ltdl/m4])' in configure.ac.
4511 libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am.
4512 _ATEOF
4513
4514
4515 cat >configure.ac <<'_ATEOF'
4516 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
4517 LT_CONFIG_LTDL_DIR([ltdl])
4518 AC_CONFIG_AUX_DIR([build-aux])
4519 AC_CONFIG_MACRO_DIR([acm4])
4520 LT_INIT
4521 LTDL_INIT([subproject])
4522 AC_OUTPUT
4523 _ATEOF
4524
4525
4526 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4527 sed "s/libtoolize/$lt_name/g
4528 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t
4529 mv -f expout.t expout
4530 { set +x
4531 $as_echo "$at_srcdir/libtoolize.at:936: \$LIBTOOLIZE --copy --install
4532
4533 "
4534 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:936"
4535 ( $at_check_trace; $LIBTOOLIZE --copy --install
4536
4537
4538 ) >>"$at_stdout" 2>>"$at_stderr"
4539 at_status=$? at_failed=false
4540 $at_check_filter
4541 at_fn_diff_devnull "$at_stderr" || at_failed=:
4542 $at_diff expout "$at_stdout" || at_failed=:
4543 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:936"
4544 $at_failed && at_fn_log_failure
4545 $at_traceon; }
4546
4547
4548
4549   set +x
4550   $at_times_p && times >"$at_times_file"
4551 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4552 read at_status <"$at_status_file"
4553 #AT_STOP_18
4554 #AT_START_19
4555 at_fn_group_banner 19 'libtoolize.at:945' \
4556   "LIBTOOLIZE_OPTIONS" "                             " 2
4557 at_xfail=no
4558 (
4559   $as_echo "19. $at_setup_line: testing $at_desc ..."
4560   $at_traceon
4561
4562
4563 cat >configure.ac <<'_ATEOF'
4564 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
4565 AC_CONFIG_AUX_DIR([build-aux])
4566 AC_CONFIG_MACRO_DIR([m4])
4567 LT_INIT
4568 AC_OUTPUT
4569 _ATEOF
4570
4571
4572
4573 LIBTOOLIZE_OPTIONS="narf"
4574 export LIBTOOLIZE_OPTIONS
4575
4576 cat >experr <<'_ATEOF'
4577 libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf'
4578 libtoolize: Try `libtoolize --help' for more information.
4579 _ATEOF
4580
4581
4582 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4583 sed "s/libtoolize/$lt_name/g
4584 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
4585 mv -f experr.t experr
4586 { set +x
4587 $as_echo "$at_srcdir/libtoolize.at:957: \$LIBTOOLIZE --copy
4588
4589 "
4590 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:957"
4591 ( $at_check_trace; $LIBTOOLIZE --copy
4592
4593
4594 ) >>"$at_stdout" 2>>"$at_stderr"
4595 at_status=$? at_failed=false
4596 $at_check_filter
4597 $at_diff experr "$at_stderr" || at_failed=:
4598 echo stdout:; cat "$at_stdout"
4599 at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:957"
4600 $at_failed && at_fn_log_failure
4601 $at_traceon; }
4602
4603
4604
4605
4606 ## --------------------------- ##
4607 ## Unknown LIBTOOLIZE_OPTIONS. ##
4608 ## --------------------------- ##
4609
4610 LIBTOOLIZE_OPTIONS=--no-such-option
4611 export LIBTOOLIZE_OPTIONS
4612
4613 cat >experr <<'_ATEOF'
4614 libtoolize: warning: unrecognized environment option `--no-such-option'
4615 _ATEOF
4616
4617
4618 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4619 sed "s/libtoolize/$lt_name/g
4620 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
4621 mv -f experr.t experr
4622 { set +x
4623 $as_echo "$at_srcdir/libtoolize.at:971: \$LIBTOOLIZE --copy
4624
4625 "
4626 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:971"
4627 ( $at_check_trace; $LIBTOOLIZE --copy
4628
4629
4630 ) >>"$at_stdout" 2>>"$at_stderr"
4631 at_status=$? at_failed=false
4632 $at_check_filter
4633 $at_diff experr "$at_stderr" || at_failed=:
4634 echo stdout:; cat "$at_stdout"
4635 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:971"
4636 $at_failed && at_fn_log_failure
4637 $at_traceon; }
4638
4639
4640
4641
4642 ## ----------------------------- ##
4643 ## --no-warn environment option. ##
4644 ## ----------------------------- ##
4645
4646 LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option
4647 export LIBTOOLIZE_OPTIONS
4648
4649 : >experr
4650
4651 lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"`
4652 sed "s/libtoolize/$lt_name/g
4653 s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t
4654 mv -f experr.t experr
4655 { set +x
4656 $as_echo "$at_srcdir/libtoolize.at:983: \$LIBTOOLIZE --copy
4657
4658 "
4659 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:983"
4660 ( $at_check_trace; $LIBTOOLIZE --copy
4661
4662
4663 ) >>"$at_stdout" 2>>"$at_stderr"
4664 at_status=$? at_failed=false
4665 $at_check_filter
4666 $at_diff experr "$at_stderr" || at_failed=:
4667 echo stdout:; cat "$at_stdout"
4668 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:983"
4669 $at_failed && at_fn_log_failure
4670 $at_traceon; }
4671
4672
4673
4674   set +x
4675   $at_times_p && times >"$at_times_file"
4676 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4677 read at_status <"$at_status_file"
4678 #AT_STOP_19
4679 #AT_START_20
4680 at_fn_group_banner 20 'libtoolize.at:992' \
4681   "cleanup old installation" "                       " 2
4682 at_xfail=no
4683 (
4684   $as_echo "20. $at_setup_line: testing $at_desc ..."
4685   $at_traceon
4686
4687
4688 cat >configure.ac <<'_ATEOF'
4689 AC_INIT([libtoolize-demo], 2.4.2, bug-libtool@gnu.org)
4690 AC_CONFIG_AUX_DIR([build-aux])
4691 AC_CONFIG_MACRO_DIR([m4])
4692 LT_INIT
4693 AC_OUTPUT
4694 _ATEOF
4695
4696
4697
4698 cat >Makefile.am <<'_ATEOF'
4699 ACLOCAL_AMFLAGS = -I m4
4700 _ATEOF
4701
4702
4703 cat >acinclude.m4 <<'_ATEOF'
4704 AC_DEFUN([LT_INIT],
4705 [: keep me, I might be hand maintained!]) # LT_INIT
4706 _ATEOF
4707
4708
4709 cat >libltdl/acinclude.m4 <<'_ATEOF'
4710 AC_DEFUN([LT_INIT],
4711 [: delete me, I was left here by on old libltdl build]) # LT_INIT
4712 _ATEOF
4713
4714
4715 { set +x
4716 $as_echo "$at_srcdir/libtoolize.at:1010: \$LIBTOOLIZE --copy --force --ltdl
4717
4718 "
4719 at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:1010"
4720 ( $at_check_trace; $LIBTOOLIZE --copy --force --ltdl
4721
4722
4723 ) >>"$at_stdout" 2>>"$at_stderr"
4724 at_status=$? at_failed=false
4725 $at_check_filter
4726 at_fn_diff_devnull "$at_stderr" || at_failed=:
4727 echo stdout:; cat "$at_stdout"
4728 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1010"
4729 $at_failed && at_fn_log_failure
4730 $at_traceon; }
4731
4732
4733
4734 # check files are left as expected
4735 { set +x
4736 $as_echo "$at_srcdir/libtoolize.at:1013: grep 'keep me' acinclude.m4"
4737 at_fn_check_prepare_trace "libtoolize.at:1013"
4738 ( $at_check_trace; grep 'keep me' acinclude.m4
4739 ) >>"$at_stdout" 2>>"$at_stderr"
4740 at_status=$? at_failed=false
4741 $at_check_filter
4742 at_fn_diff_devnull "$at_stderr" || at_failed=:
4743 echo stdout:; cat "$at_stdout"
4744 at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1013"
4745 $at_failed && at_fn_log_failure
4746 $at_traceon; }
4747
4748 { set +x
4749 $as_echo "$at_srcdir/libtoolize.at:1014: test -f libltdl/acinclude.m4"
4750 at_fn_check_prepare_trace "libtoolize.at:1014"
4751 ( $at_check_trace; test -f libltdl/acinclude.m4
4752 ) >>"$at_stdout" 2>>"$at_stderr"
4753 at_status=$? at_failed=false
4754 $at_check_filter
4755 echo stderr:; cat "$at_stderr"
4756 echo stdout:; cat "$at_stdout"
4757 at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:1014"
4758 $at_failed && at_fn_log_failure
4759 $at_traceon; }
4760
4761
4762   set +x
4763   $at_times_p && times >"$at_times_file"
4764 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4765 read at_status <"$at_status_file"
4766 #AT_STOP_20
4767 #AT_START_21
4768 at_fn_group_banner 21 'help.at:26' \
4769   "standard command line options" "                  " 3
4770 at_xfail=no
4771 (
4772   $as_echo "21. $at_setup_line: testing $at_desc ..."
4773   $at_traceon
4774
4775
4776
4777
4778 { set +x
4779 $as_echo "$at_srcdir/help.at:30: \$LIBTOOLIZE --help"
4780 at_fn_check_prepare_dynamic "$LIBTOOLIZE --help" "help.at:30"
4781 ( $at_check_trace; $LIBTOOLIZE --help
4782 ) >>"$at_stdout" 2>>"$at_stderr"
4783 at_status=$? at_failed=false
4784 $at_check_filter
4785 at_fn_diff_devnull "$at_stderr" || at_failed=:
4786 echo stdout:; cat "$at_stdout"
4787 at_fn_check_status 0 $at_status "$at_srcdir/help.at:30"
4788 $at_failed && at_fn_log_failure
4789 $at_traceon; }
4790
4791 { set +x
4792 $as_echo "$at_srcdir/help.at:31: \$LIBTOOLIZE --version"
4793 at_fn_check_prepare_dynamic "$LIBTOOLIZE --version" "help.at:31"
4794 ( $at_check_trace; $LIBTOOLIZE --version
4795 ) >>"$at_stdout" 2>>"$at_stderr"
4796 at_status=$? at_failed=false
4797 $at_check_filter
4798 at_fn_diff_devnull "$at_stderr" || at_failed=:
4799 echo stdout:; tee stdout <"$at_stdout"
4800 at_fn_check_status 0 $at_status "$at_srcdir/help.at:31"
4801 $at_failed && at_fn_log_failure
4802 $at_traceon; }
4803
4804 { set +x
4805 $as_echo "$at_srcdir/help.at:32: grep 'Copyright.*Free Software Foundation' stdout"
4806 at_fn_check_prepare_trace "help.at:32"
4807 ( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout
4808 ) >>"$at_stdout" 2>>"$at_stderr"
4809 at_status=$? at_failed=false
4810 $at_check_filter
4811 at_fn_diff_devnull "$at_stderr" || at_failed=:
4812 echo stdout:; cat "$at_stdout"
4813 at_fn_check_status 0 $at_status "$at_srcdir/help.at:32"
4814 $at_failed && at_fn_log_failure
4815 $at_traceon; }
4816
4817 { set +x
4818 $as_echo "$at_srcdir/help.at:33: \$LIBTOOL --help"
4819 at_fn_check_prepare_dynamic "$LIBTOOL --help" "help.at:33"
4820 ( $at_check_trace; $LIBTOOL --help
4821 ) >>"$at_stdout" 2>>"$at_stderr"
4822 at_status=$? at_failed=false
4823 $at_check_filter
4824 at_fn_diff_devnull "$at_stderr" || at_failed=:
4825 echo stdout:; cat "$at_stdout"
4826 at_fn_check_status 0 $at_status "$at_srcdir/help.at:33"
4827 $at_failed && at_fn_log_failure
4828 $at_traceon; }
4829
4830 { set +x
4831 $as_echo "$at_srcdir/help.at:34: \$LIBTOOL --help-all"
4832 at_fn_check_prepare_dynamic "$LIBTOOL --help-all" "help.at:34"
4833 ( $at_check_trace; $LIBTOOL --help-all
4834 ) >>"$at_stdout" 2>>"$at_stderr"
4835 at_status=$? at_failed=false
4836 $at_check_filter
4837 at_fn_diff_devnull "$at_stderr" || at_failed=:
4838 echo stdout:; cat "$at_stdout"
4839 at_fn_check_status 0 $at_status "$at_srcdir/help.at:34"
4840 $at_failed && at_fn_log_failure
4841 $at_traceon; }
4842
4843 { set +x
4844 $as_echo "$at_srcdir/help.at:35: \$LIBTOOL --version"
4845 at_fn_check_prepare_dynamic "$LIBTOOL --version" "help.at:35"
4846 ( $at_check_trace; $LIBTOOL --version
4847 ) >>"$at_stdout" 2>>"$at_stderr"
4848 at_status=$? at_failed=false
4849 $at_check_filter
4850 at_fn_diff_devnull "$at_stderr" || at_failed=:
4851 echo stdout:; tee stdout <"$at_stdout"
4852 at_fn_check_status 0 $at_status "$at_srcdir/help.at:35"
4853 $at_failed && at_fn_log_failure
4854 $at_traceon; }
4855
4856 { set +x
4857 $as_echo "$at_srcdir/help.at:36: grep 'Copyright.*Free Software Foundation' stdout"
4858 at_fn_check_prepare_trace "help.at:36"
4859 ( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout
4860 ) >>"$at_stdout" 2>>"$at_stderr"
4861 at_status=$? at_failed=false
4862 $at_check_filter
4863 at_fn_diff_devnull "$at_stderr" || at_failed=:
4864 echo stdout:; cat "$at_stdout"
4865 at_fn_check_status 0 $at_status "$at_srcdir/help.at:36"
4866 $at_failed && at_fn_log_failure
4867 $at_traceon; }
4868
4869
4870 { set +x
4871 $as_echo "$at_srcdir/help.at:38: \$LIBTOOL"
4872 at_fn_check_prepare_dynamic "$LIBTOOL" "help.at:38"
4873 ( $at_check_trace; $LIBTOOL
4874 ) >>"$at_stdout" 2>>"$at_stderr"
4875 at_status=$? at_failed=false
4876 $at_check_filter
4877 echo stderr:; tee stderr <"$at_stderr"
4878 echo stdout:; cat "$at_stdout"
4879 at_fn_check_status 1 $at_status "$at_srcdir/help.at:38"
4880 $at_failed && at_fn_log_failure
4881 $at_traceon; }
4882
4883 { set +x
4884 $as_echo "$at_srcdir/help.at:39: grep 'specify a MODE' stderr"
4885 at_fn_check_prepare_trace "help.at:39"
4886 ( $at_check_trace; grep 'specify a MODE' stderr
4887 ) >>"$at_stdout" 2>>"$at_stderr"
4888 at_status=$? at_failed=false
4889 $at_check_filter
4890 at_fn_diff_devnull "$at_stderr" || at_failed=:
4891 echo stdout:; cat "$at_stdout"
4892 at_fn_check_status 0 $at_status "$at_srcdir/help.at:39"
4893 $at_failed && at_fn_log_failure
4894 $at_traceon; }
4895
4896 { set +x
4897 $as_echo "$at_srcdir/help.at:40: grep ' --help' stderr"
4898 at_fn_check_prepare_trace "help.at:40"
4899 ( $at_check_trace; grep ' --help' stderr
4900 ) >>"$at_stdout" 2>>"$at_stderr"
4901 at_status=$? at_failed=false
4902 $at_check_filter
4903 at_fn_diff_devnull "$at_stderr" || at_failed=:
4904 echo stdout:; cat "$at_stdout"
4905 at_fn_check_status 0 $at_status "$at_srcdir/help.at:40"
4906 $at_failed && at_fn_log_failure
4907 $at_traceon; }
4908
4909
4910   set +x
4911   $at_times_p && times >"$at_times_file"
4912 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4913 read at_status <"$at_status_file"
4914 #AT_STOP_21
4915 #AT_START_22
4916 at_fn_group_banner 22 'help.at:45' \
4917   "mode short-hands" "                               " 3
4918 at_xfail=no
4919 (
4920   $as_echo "22. $at_setup_line: testing $at_desc ..."
4921   $at_traceon
4922
4923
4924 cat >a.c <<'_ATEOF'
4925 int a () { return 0; }
4926 _ATEOF
4927
4928
4929 cat >main.c <<'_ATEOF'
4930 extern int a ();
4931 int main () { return a (); }
4932 _ATEOF
4933
4934
4935 inst=`pwd`/inst
4936 libdir=$inst/lib
4937 bindir=$inst/bin
4938 mkdir $inst $libdir $bindir
4939
4940 { set +x
4941 $as_echo "$at_srcdir/help.at:61: \$LIBTOOL compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
4942 at_fn_check_prepare_dynamic "$LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:61"
4943 ( $at_check_trace; $LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c
4944 ) >>"$at_stdout" 2>>"$at_stderr"
4945 at_status=$? at_failed=false
4946 $at_check_filter
4947 echo stderr:; cat "$at_stderr"
4948 echo stdout:; cat "$at_stdout"
4949 at_fn_check_status 0 $at_status "$at_srcdir/help.at:61"
4950 $at_failed && at_fn_log_failure
4951 $at_traceon; }
4952
4953 { set +x
4954 $as_echo "$at_srcdir/help.at:63: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c"
4955 at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:63"
4956 ( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c
4957 ) >>"$at_stdout" 2>>"$at_stderr"
4958 at_status=$? at_failed=false
4959 $at_check_filter
4960 echo stderr:; cat "$at_stderr"
4961 echo stdout:; cat "$at_stdout"
4962 at_fn_check_status 0 $at_status "$at_srcdir/help.at:63"
4963 $at_failed && at_fn_log_failure
4964 $at_traceon; }
4965
4966 { set +x
4967 $as_echo "$at_srcdir/help.at:65: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c"
4968 at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:65"
4969 ( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c
4970 ) >>"$at_stdout" 2>>"$at_stderr"
4971 at_status=$? at_failed=false
4972 $at_check_filter
4973 echo stderr:; cat "$at_stderr"
4974 echo stdout:; cat "$at_stdout"
4975 at_fn_check_status 0 $at_status "$at_srcdir/help.at:65"
4976 $at_failed && at_fn_log_failure
4977 $at_traceon; }
4978
4979 { set +x
4980 $as_echo "$at_srcdir/help.at:67: \$LIBTOOL link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo          -no-undefined -rpath \$libdir"
4981 at_fn_check_prepare_dynamic "$LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo          -no-undefined -rpath $libdir" "help.at:67"
4982 ( $at_check_trace; $LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo    -no-undefined -rpath $libdir
4983 ) >>"$at_stdout" 2>>"$at_stderr"
4984 at_status=$? at_failed=false
4985 $at_check_filter
4986 echo stderr:; cat "$at_stderr"
4987 echo stdout:; cat "$at_stdout"
4988 at_fn_check_status 0 $at_status "$at_srcdir/help.at:67"
4989 $at_failed && at_fn_log_failure
4990 $at_traceon; }
4991
4992 { set +x
4993 $as_echo "$at_srcdir/help.at:69: \$LIBTOOL l \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo     liba.la"
4994 at_fn_check_prepare_dynamic "$LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo      liba.la" "help.at:69"
4995 ( $at_check_trace; $LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo        liba.la
4996 ) >>"$at_stdout" 2>>"$at_stderr"
4997 at_status=$? at_failed=false
4998 $at_check_filter
4999 echo stderr:; cat "$at_stderr"
5000 echo stdout:; cat "$at_stdout"
5001 at_fn_check_status 0 $at_status "$at_srcdir/help.at:69"
5002 $at_failed && at_fn_log_failure
5003 $at_traceon; }
5004
5005 { set +x
5006 $as_echo "$at_srcdir/help.at:71: \$LIBTOOL execute --dry-run ./main\$EXEEXT"
5007 at_fn_check_prepare_dynamic "$LIBTOOL execute --dry-run ./main$EXEEXT" "help.at:71"
5008 ( $at_check_trace; $LIBTOOL execute --dry-run ./main$EXEEXT
5009 ) >>"$at_stdout" 2>>"$at_stderr"
5010 at_status=$? at_failed=false
5011 $at_check_filter
5012 echo stderr:; cat "$at_stderr"
5013 echo stdout:; cat "$at_stdout"
5014 at_fn_check_status 0 $at_status "$at_srcdir/help.at:71"
5015 $at_failed && at_fn_log_failure
5016 $at_traceon; }
5017
5018 { set +x
5019 $as_echo "$at_srcdir/help.at:73: \$LIBTOOL exe --dry-run ./main\$EXEEXT"
5020 at_fn_check_prepare_dynamic "$LIBTOOL exe --dry-run ./main$EXEEXT" "help.at:73"
5021 ( $at_check_trace; $LIBTOOL exe --dry-run ./main$EXEEXT
5022 ) >>"$at_stdout" 2>>"$at_stderr"
5023 at_status=$? at_failed=false
5024 $at_check_filter
5025 echo stderr:; cat "$at_stderr"
5026 echo stdout:; cat "$at_stdout"
5027 at_fn_check_status 0 $at_status "$at_srcdir/help.at:73"
5028 $at_failed && at_fn_log_failure
5029 $at_traceon; }
5030
5031 { set +x
5032 $as_echo "$at_srcdir/help.at:75: \$LIBTOOL e --dry-run ./main\$EXEEXT"
5033 at_fn_check_prepare_dynamic "$LIBTOOL e --dry-run ./main$EXEEXT" "help.at:75"
5034 ( $at_check_trace; $LIBTOOL e --dry-run ./main$EXEEXT
5035 ) >>"$at_stdout" 2>>"$at_stderr"
5036 at_status=$? at_failed=false
5037 $at_check_filter
5038 echo stderr:; cat "$at_stderr"
5039 echo stdout:; cat "$at_stdout"
5040 at_fn_check_status 0 $at_status "$at_srcdir/help.at:75"
5041 $at_failed && at_fn_log_failure
5042 $at_traceon; }
5043
5044 { set +x
5045 $as_echo "$at_srcdir/help.at:77: \$LIBTOOL install cp liba.la \$libdir"
5046 at_fn_check_prepare_dynamic "$LIBTOOL install cp liba.la $libdir" "help.at:77"
5047 ( $at_check_trace; $LIBTOOL install cp liba.la $libdir
5048 ) >>"$at_stdout" 2>>"$at_stderr"
5049 at_status=$? at_failed=false
5050 $at_check_filter
5051 echo stderr:; cat "$at_stderr"
5052 echo stdout:; cat "$at_stdout"
5053 at_fn_check_status 0 $at_status "$at_srcdir/help.at:77"
5054 $at_failed && at_fn_log_failure
5055 $at_traceon; }
5056
5057 { set +x
5058 $as_echo "$at_srcdir/help.at:79: \$LIBTOOL i cp main\$EXEEXT \$bindir"
5059 at_fn_check_prepare_dynamic "$LIBTOOL i cp main$EXEEXT $bindir" "help.at:79"
5060 ( $at_check_trace; $LIBTOOL i cp main$EXEEXT $bindir
5061 ) >>"$at_stdout" 2>>"$at_stderr"
5062 at_status=$? at_failed=false
5063 $at_check_filter
5064 echo stderr:; cat "$at_stderr"
5065 echo stdout:; cat "$at_stdout"
5066 at_fn_check_status 0 $at_status "$at_srcdir/help.at:79"
5067 $at_failed && at_fn_log_failure
5068 $at_traceon; }
5069
5070 { set +x
5071 $as_echo "$at_srcdir/help.at:81: \$LIBTOOL finish \$libdir"
5072 at_fn_check_prepare_dynamic "$LIBTOOL finish $libdir" "help.at:81"
5073 ( $at_check_trace; $LIBTOOL finish $libdir
5074 ) >>"$at_stdout" 2>>"$at_stderr"
5075 at_status=$? at_failed=false
5076 $at_check_filter
5077 echo stderr:; cat "$at_stderr"
5078 echo stdout:; cat "$at_stdout"
5079 at_fn_check_status 0 $at_status "$at_srcdir/help.at:81"
5080 $at_failed && at_fn_log_failure
5081 $at_traceon; }
5082
5083 { set +x
5084 $as_echo "$at_srcdir/help.at:83: \$LIBTOOL f \$libdir"
5085 at_fn_check_prepare_dynamic "$LIBTOOL f $libdir" "help.at:83"
5086 ( $at_check_trace; $LIBTOOL f $libdir
5087 ) >>"$at_stdout" 2>>"$at_stderr"
5088 at_status=$? at_failed=false
5089 $at_check_filter
5090 echo stderr:; cat "$at_stderr"
5091 echo stdout:; cat "$at_stdout"
5092 at_fn_check_status 0 $at_status "$at_srcdir/help.at:83"
5093 $at_failed && at_fn_log_failure
5094 $at_traceon; }
5095
5096 { set +x
5097 $as_echo "$at_srcdir/help.at:85: \$LIBTOOL uninstall rm -f \$libdir/liba.la"
5098 at_fn_check_prepare_dynamic "$LIBTOOL uninstall rm -f $libdir/liba.la" "help.at:85"
5099 ( $at_check_trace; $LIBTOOL uninstall rm -f $libdir/liba.la
5100 ) >>"$at_stdout" 2>>"$at_stderr"
5101 at_status=$? at_failed=false
5102 $at_check_filter
5103 echo stderr:; cat "$at_stderr"
5104 echo stdout:; cat "$at_stdout"
5105 at_fn_check_status 0 $at_status "$at_srcdir/help.at:85"
5106 $at_failed && at_fn_log_failure
5107 $at_traceon; }
5108
5109 { set +x
5110 $as_echo "$at_srcdir/help.at:87: \$LIBTOOL u rm -f \$bindir/main\$EXEEXT"
5111 at_fn_check_prepare_dynamic "$LIBTOOL u rm -f $bindir/main$EXEEXT" "help.at:87"
5112 ( $at_check_trace; $LIBTOOL u rm -f $bindir/main$EXEEXT
5113 ) >>"$at_stdout" 2>>"$at_stderr"
5114 at_status=$? at_failed=false
5115 $at_check_filter
5116 echo stderr:; cat "$at_stderr"
5117 echo stdout:; cat "$at_stdout"
5118 at_fn_check_status 0 $at_status "$at_srcdir/help.at:87"
5119 $at_failed && at_fn_log_failure
5120 $at_traceon; }
5121
5122 { set +x
5123 $as_echo "$at_srcdir/help.at:89: \$LIBTOOL clean rm -f main\$EXEEXT"
5124 at_fn_check_prepare_dynamic "$LIBTOOL clean rm -f main$EXEEXT" "help.at:89"
5125 ( $at_check_trace; $LIBTOOL clean rm -f main$EXEEXT
5126 ) >>"$at_stdout" 2>>"$at_stderr"
5127 at_status=$? at_failed=false
5128 $at_check_filter
5129 echo stderr:; cat "$at_stderr"
5130 echo stdout:; cat "$at_stdout"
5131 at_fn_check_status 0 $at_status "$at_srcdir/help.at:89"
5132 $at_failed && at_fn_log_failure
5133 $at_traceon; }
5134
5135 { set +x
5136 $as_echo "$at_srcdir/help.at:91: \$LIBTOOL cl liba.la"
5137 at_fn_check_prepare_dynamic "$LIBTOOL cl liba.la" "help.at:91"
5138 ( $at_check_trace; $LIBTOOL cl liba.la
5139 ) >>"$at_stdout" 2>>"$at_stderr"
5140 at_status=$? at_failed=false
5141 $at_check_filter
5142 echo stderr:; cat "$at_stderr"
5143 echo stdout:; cat "$at_stdout"
5144 at_fn_check_status 0 $at_status "$at_srcdir/help.at:91"
5145 $at_failed && at_fn_log_failure
5146 $at_traceon; }
5147
5148
5149   set +x
5150   $at_times_p && times >"$at_times_file"
5151 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5152 read at_status <"$at_status_file"
5153 #AT_STOP_22
5154 #AT_START_23
5155 at_fn_group_banner 23 'help.at:97' \
5156   "debug tracing" "                                  " 3
5157 at_xfail=no
5158 (
5159   $as_echo "23. $at_setup_line: testing $at_desc ..."
5160   $at_traceon
5161
5162
5163 cat >a.c <<'_ATEOF'
5164 int a () { return 0; }
5165 _ATEOF
5166
5167
5168 cat >b.c <<'_ATEOF'
5169 extern int a ();
5170 int b () { return a (); }
5171 _ATEOF
5172
5173
5174 cat >main.c <<'_ATEOF'
5175 extern int b ();
5176 int main () { return b (); }
5177 _ATEOF
5178
5179
5180 inst=`pwd`/inst
5181 libdir=$inst/lib
5182 bindir=$inst/bin
5183 mkdir $inst $libdir $bindir
5184
5185 # This test will not work correctly if --debug is passed.
5186 { set +x
5187 $as_echo "$at_srcdir/help.at:119: case \"\$LIBTOOL \$CC \$CPPFLAGS \$CFLAGS \$LDFLAGS \" in        *\\ --debug\\ *) exit 77;; *) :;; esac"
5188 at_fn_check_prepare_dynamic "case \"$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS \" in          *\\ --debug\\ *) exit 77;; *) :;; esac" "help.at:119"
5189 ( $at_check_trace; case "$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS " in      *\ --debug\ *) exit 77;; *) :;; esac
5190 ) >>"$at_stdout" 2>>"$at_stderr"
5191 at_status=$? at_failed=false
5192 $at_check_filter
5193 at_fn_diff_devnull "$at_stderr" || at_failed=:
5194 at_fn_diff_devnull "$at_stdout" || at_failed=:
5195 at_fn_check_status 0 $at_status "$at_srcdir/help.at:119"
5196 $at_failed && at_fn_log_failure
5197 $at_traceon; }
5198
5199
5200 check_trace ()
5201 {
5202   if test "X$trace" = X--debug; then
5203     { set +x
5204 $as_echo "$at_srcdir/help.at:125: grep 'enabling shell trace mode' stdout stderr"
5205 at_fn_check_prepare_trace "help.at:125"
5206 ( $at_check_trace; grep 'enabling shell trace mode' stdout stderr
5207 ) >>"$at_stdout" 2>>"$at_stderr"
5208 at_status=$? at_failed=false
5209 $at_check_filter
5210 at_fn_diff_devnull "$at_stderr" || at_failed=:
5211 echo stdout:; cat "$at_stdout"
5212 at_fn_check_status 0 $at_status "$at_srcdir/help.at:125"
5213 $at_failed && at_fn_log_failure
5214 $at_traceon; }
5215
5216     { set +x
5217 $as_echo "$at_srcdir/help.at:126: grep ' --mode' stderr"
5218 at_fn_check_prepare_trace "help.at:126"
5219 ( $at_check_trace; grep ' --mode' stderr
5220 ) >>"$at_stdout" 2>>"$at_stderr"
5221 at_status=$? at_failed=false
5222 $at_check_filter
5223 at_fn_diff_devnull "$at_stderr" || at_failed=:
5224 echo stdout:; cat "$at_stdout"
5225 at_fn_check_status 0 $at_status "$at_srcdir/help.at:126"
5226 $at_failed && at_fn_log_failure
5227 $at_traceon; }
5228
5229   else
5230     { set +x
5231 $as_echo "$at_srcdir/help.at:128: grep 'enabling shell trace mode' stdout stderr"
5232 at_fn_check_prepare_trace "help.at:128"
5233 ( $at_check_trace; grep 'enabling shell trace mode' stdout stderr
5234 ) >>"$at_stdout" 2>>"$at_stderr"
5235 at_status=$? at_failed=false
5236 $at_check_filter
5237 at_fn_diff_devnull "$at_stderr" || at_failed=:
5238 at_fn_diff_devnull "$at_stdout" || at_failed=:
5239 at_fn_check_status 1 $at_status "$at_srcdir/help.at:128"
5240 $at_failed && at_fn_log_failure
5241 $at_traceon; }
5242
5243     { set +x
5244 $as_echo "$at_srcdir/help.at:129: grep ' --mode' stderr"
5245 at_fn_check_prepare_trace "help.at:129"
5246 ( $at_check_trace; grep ' --mode' stderr
5247 ) >>"$at_stdout" 2>>"$at_stderr"
5248 at_status=$? at_failed=false
5249 $at_check_filter
5250 at_fn_diff_devnull "$at_stderr" || at_failed=:
5251 at_fn_diff_devnull "$at_stdout" || at_failed=:
5252 at_fn_check_status 1 $at_status "$at_srcdir/help.at:129"
5253 $at_failed && at_fn_log_failure
5254 $at_traceon; }
5255
5256   fi
5257 }
5258
5259 orig_LIBTOOL=$LIBTOOL
5260 for trace in '' --debug; do
5261   LIBTOOL="$orig_LIBTOOL $trace"
5262
5263   # Hypothesis: debug output should happen if (and only if) --debug is
5264   # passed, for compile, link, install, uninstall, and clean modes.
5265   { set +x
5266 $as_echo "$at_srcdir/help.at:139: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
5267 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:139"
5268 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
5269 ) >>"$at_stdout" 2>>"$at_stderr"
5270 at_status=$? at_failed=false
5271 $at_check_filter
5272 echo stderr:; tee stderr <"$at_stderr"
5273 echo stdout:; tee stdout <"$at_stdout"
5274 at_fn_check_status 0 $at_status "$at_srcdir/help.at:139"
5275 $at_failed && at_fn_log_failure
5276 $at_traceon; }
5277
5278   check_trace
5279   { set +x
5280 $as_echo "$at_srcdir/help.at:142: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c"
5281 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c" "help.at:142"
5282 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c
5283 ) >>"$at_stdout" 2>>"$at_stderr"
5284 at_status=$? at_failed=false
5285 $at_check_filter
5286 echo stderr:; tee stderr <"$at_stderr"
5287 echo stdout:; tee stdout <"$at_stdout"
5288 at_fn_check_status 0 $at_status "$at_srcdir/help.at:142"
5289 $at_failed && at_fn_log_failure
5290 $at_traceon; }
5291
5292   check_trace
5293   { set +x
5294 $as_echo "$at_srcdir/help.at:145: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
5295 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "help.at:145"
5296 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
5297 ) >>"$at_stdout" 2>>"$at_stderr"
5298 at_status=$? at_failed=false
5299 $at_check_filter
5300 echo stderr:; cat "$at_stderr"
5301 echo stdout:; cat "$at_stdout"
5302 at_fn_check_status 0 $at_status "$at_srcdir/help.at:145"
5303 $at_failed && at_fn_log_failure
5304 $at_traceon; }
5305
5306   { set +x
5307 $as_echo "$at_srcdir/help.at:146: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo             -no-undefined -rpath \$libdir"
5308 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo      -no-undefined -rpath $libdir" "help.at:146"
5309 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo        -no-undefined -rpath $libdir
5310 ) >>"$at_stdout" 2>>"$at_stderr"
5311 at_status=$? at_failed=false
5312 $at_check_filter
5313 echo stderr:; tee stderr <"$at_stderr"
5314 echo stdout:; tee stdout <"$at_stdout"
5315 at_fn_check_status 0 $at_status "$at_srcdir/help.at:146"
5316 $at_failed && at_fn_log_failure
5317 $at_traceon; }
5318
5319   check_trace
5320   { set +x
5321 $as_echo "$at_srcdir/help.at:149: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo             -no-undefined -rpath \$libdir liba.la"
5322 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo      -no-undefined -rpath $libdir liba.la" "help.at:149"
5323 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo        -no-undefined -rpath $libdir liba.la
5324 ) >>"$at_stdout" 2>>"$at_stderr"
5325 at_status=$? at_failed=false
5326 $at_check_filter
5327 echo stderr:; tee stderr <"$at_stderr"
5328 echo stdout:; tee stdout <"$at_stdout"
5329 at_fn_check_status 0 $at_status "$at_srcdir/help.at:149"
5330 $at_failed && at_fn_log_failure
5331 $at_traceon; }
5332
5333   check_trace
5334   { set +x
5335 $as_echo "$at_srcdir/help.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT      libb.la"
5336 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT         libb.la" "help.at:152"
5337 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT           libb.la
5338 ) >>"$at_stdout" 2>>"$at_stderr"
5339 at_status=$? at_failed=false
5340 $at_check_filter
5341 echo stderr:; tee stderr <"$at_stderr"
5342 echo stdout:; tee stdout <"$at_stdout"
5343 at_fn_check_status 0 $at_status "$at_srcdir/help.at:152"
5344 $at_failed && at_fn_log_failure
5345 $at_traceon; }
5346
5347   check_trace
5348   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5349 { set +x
5350 $as_echo "$at_srcdir/help.at:155: if \$LIBTOOL --mode=execute  \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5351 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute  \"$lt_exe\" ; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "help.at:155"
5352 ( $at_check_trace; if $LIBTOOL --mode=execute  "$lt_exe" ; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5353 ) >>"$at_stdout" 2>>"$at_stderr"
5354 at_status=$? at_failed=false
5355 $at_check_filter
5356 echo stderr:; tee stderr <"$at_stderr"
5357 echo stdout:; tee stdout <"$at_stdout"
5358 at_fn_check_status 0 $at_status "$at_srcdir/help.at:155"
5359 $at_failed && at_fn_log_failure
5360 $at_traceon; }
5361
5362
5363   check_trace
5364
5365   { set +x
5366 $as_echo "$at_srcdir/help.at:158: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir"
5367 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "help.at:158"
5368 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir
5369 ) >>"$at_stdout" 2>>"$at_stderr"
5370 at_status=$? at_failed=false
5371 $at_check_filter
5372 echo stderr:; tee stderr <"$at_stderr"
5373 echo stdout:; tee stdout <"$at_stdout"
5374 at_fn_check_status 0 $at_status "$at_srcdir/help.at:158"
5375 $at_failed && at_fn_log_failure
5376 $at_traceon; }
5377
5378   check_trace
5379
5380   # Hypothesis: --debug should be passed to relink mode if (and only if)
5381   # it was passed at link mode.
5382   { set +x
5383 $as_echo "$at_srcdir/help.at:164: \$orig_LIBTOOL --mode=install \$lt_INSTALL liba.la libb.la \$libdir"
5384 at_fn_check_prepare_dynamic "$orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir" "help.at:164"
5385 ( $at_check_trace; $orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir
5386 ) >>"$at_stdout" 2>>"$at_stderr"
5387 at_status=$? at_failed=false
5388 $at_check_filter
5389 echo stderr:; tee stderr <"$at_stderr"
5390 echo stdout:; tee stdout <"$at_stdout"
5391 at_fn_check_status 0 $at_status "$at_srcdir/help.at:164"
5392 $at_failed && at_fn_log_failure
5393 $at_traceon; }
5394
5395   if grep ': relinking ' stdout stderr; then
5396     if test "X$trace" = X--debug; then
5397       { set +x
5398 $as_echo "$at_srcdir/help.at:168: grep ' --mode=relink' stdout stderr | grep ' --debug '"
5399 at_fn_check_prepare_notrace 'a shell pipeline' "help.at:168"
5400 ( $at_check_trace; grep ' --mode=relink' stdout stderr | grep ' --debug '
5401 ) >>"$at_stdout" 2>>"$at_stderr"
5402 at_status=$? at_failed=false
5403 $at_check_filter
5404 at_fn_diff_devnull "$at_stderr" || at_failed=:
5405 echo stdout:; cat "$at_stdout"
5406 at_fn_check_status 0 $at_status "$at_srcdir/help.at:168"
5407 $at_failed && at_fn_log_failure
5408 $at_traceon; }
5409
5410     else
5411       { set +x
5412 $as_echo "$at_srcdir/help.at:171: grep ' --mode=relink' stdout stderr | grep ' --debug '"
5413 at_fn_check_prepare_notrace 'a shell pipeline' "help.at:171"
5414 ( $at_check_trace; grep ' --mode=relink' stdout stderr | grep ' --debug '
5415 ) >>"$at_stdout" 2>>"$at_stderr"
5416 at_status=$? at_failed=false
5417 $at_check_filter
5418 at_fn_diff_devnull "$at_stderr" || at_failed=:
5419 at_fn_diff_devnull "$at_stdout" || at_failed=:
5420 at_fn_check_status 1 $at_status "$at_srcdir/help.at:171"
5421 $at_failed && at_fn_log_failure
5422 $at_traceon; }
5423
5424     fi
5425   fi
5426
5427   { set +x
5428 $as_echo "$at_srcdir/help.at:176: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir"
5429 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "help.at:176"
5430 ( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir
5431 ) >>"$at_stdout" 2>>"$at_stderr"
5432 at_status=$? at_failed=false
5433 $at_check_filter
5434 echo stderr:; tee stderr <"$at_stderr"
5435 echo stdout:; tee stdout <"$at_stdout"
5436 at_fn_check_status 0 $at_status "$at_srcdir/help.at:176"
5437 $at_failed && at_fn_log_failure
5438 $at_traceon; }
5439
5440   check_trace
5441   { set +x
5442 $as_echo "$at_srcdir/help.at:179: \$LIBTOOL --mode=finish \$bindir"
5443 at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $bindir" "help.at:179"
5444 ( $at_check_trace; $LIBTOOL --mode=finish $bindir
5445 ) >>"$at_stdout" 2>>"$at_stderr"
5446 at_status=$? at_failed=false
5447 $at_check_filter
5448 echo stderr:; tee stderr <"$at_stderr"
5449 echo stdout:; tee stdout <"$at_stdout"
5450 at_fn_check_status 0 $at_status "$at_srcdir/help.at:179"
5451 $at_failed && at_fn_log_failure
5452 $at_traceon; }
5453
5454   check_trace
5455
5456   { set +x
5457 $as_echo "$at_srcdir/help.at:182: \$LIBTOOL --mode=uninstall rm -f \$bindir/main\$EXEEXT           \$libdir/libb.la \$libdir/liba.la"
5458 at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $bindir/main$EXEEXT           $libdir/libb.la $libdir/liba.la" "help.at:182"
5459 ( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $bindir/main$EXEEXT     $libdir/libb.la $libdir/liba.la
5460 ) >>"$at_stdout" 2>>"$at_stderr"
5461 at_status=$? at_failed=false
5462 $at_check_filter
5463 echo stderr:; tee stderr <"$at_stderr"
5464 echo stdout:; tee stdout <"$at_stdout"
5465 at_fn_check_status 0 $at_status "$at_srcdir/help.at:182"
5466 $at_failed && at_fn_log_failure
5467 $at_traceon; }
5468
5469   check_trace
5470   { set +x
5471 $as_echo "$at_srcdir/help.at:185: \$LIBTOOL --mode=clean rm -f \$bindir/main\$EXEEXT       \$libdir/libb.la \$libdir/liba.la"
5472 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f $bindir/main$EXEEXT       $libdir/libb.la $libdir/liba.la" "help.at:185"
5473 ( $at_check_trace; $LIBTOOL --mode=clean rm -f $bindir/main$EXEEXT         $libdir/libb.la $libdir/liba.la
5474 ) >>"$at_stdout" 2>>"$at_stderr"
5475 at_status=$? at_failed=false
5476 $at_check_filter
5477 echo stderr:; tee stderr <"$at_stderr"
5478 echo stdout:; tee stdout <"$at_stdout"
5479 at_fn_check_status 0 $at_status "$at_srcdir/help.at:185"
5480 $at_failed && at_fn_log_failure
5481 $at_traceon; }
5482
5483   check_trace
5484
5485 done
5486
5487   set +x
5488   $at_times_p && times >"$at_times_file"
5489 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5490 read at_status <"$at_status_file"
5491 #AT_STOP_23
5492 #AT_START_24
5493 at_fn_group_banner 24 'duplicate_members.at:25' \
5494   "duplicate members in archive tests" "             " 3
5495 at_xfail=no
5496 (
5497   $as_echo "24. $at_setup_line: testing $at_desc ..."
5498   $at_traceon
5499
5500
5501
5502 # we don't want to use whole_archive_flag_spec, even if available
5503 sed -e 's|^whole_archive_flag_spec=.*|whole_archive_flag_spec=|g' < $LIBTOOL > libtool
5504
5505 chmod +x ./libtool
5506 LIBTOOL=./libtool
5507
5508 cat >bar.c <<'_ATEOF'
5509 extern int foo1 (), foo2 (), foo3 (), foo4 (), foo5 (), foo6 ();
5510 int bar() {
5511     int result = foo1 () + foo2 () + foo3 () + foo4 () + foo5 () + foo6 ();
5512     return result;
5513 }
5514 _ATEOF
5515
5516
5517 cat >main.c <<'_ATEOF'
5518 int bar();
5519 int main()
5520 {
5521 if (bar() == 21) return 0;
5522 return 1;
5523 }
5524 _ATEOF
5525
5526
5527
5528 for a in 1 2 3 4 5 6
5529 do
5530   mkdir $a
5531   echo "int foo$a() {return $a;}" > $a/a.c
5532 done
5533
5534
5535 for a in 1 2 3 4 5 6
5536 do
5537   $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o $a/a.lo $a/a.c
5538 done
5539 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo
5540 { set +x
5541 $as_echo "$at_srcdir/duplicate_members.at:64: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libconv.la       1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la"
5542 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la    1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" "duplicate_members.at:64"
5543 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la      1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la
5544 ) >>"$at_stdout" 2>>"$at_stderr"
5545 at_status=$? at_failed=false
5546 $at_check_filter
5547 echo stderr:; cat "$at_stderr"
5548 echo stdout:; cat "$at_stdout"
5549 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:64"
5550 $at_failed && at_fn_log_failure
5551 $at_traceon; }
5552
5553
5554 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
5555 { set +x
5556 $as_echo "$at_srcdir/duplicate_members.at:68: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbar.la         bar.lo libconv.la -rpath /notexist"
5557 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la      bar.lo libconv.la -rpath /notexist" "duplicate_members.at:68"
5558 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la        bar.lo libconv.la -rpath /notexist
5559 ) >>"$at_stdout" 2>>"$at_stderr"
5560 at_status=$? at_failed=false
5561 $at_check_filter
5562 echo stderr:; cat "$at_stderr"
5563 echo stdout:; cat "$at_stdout"
5564 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:68"
5565 $at_failed && at_fn_log_failure
5566 $at_traceon; }
5567
5568
5569 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
5570 { set +x
5571 $as_echo "$at_srcdir/duplicate_members.at:72: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT     main.lo ./libbar.la"
5572 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT   main.lo ./libbar.la" "duplicate_members.at:72"
5573 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT     main.lo ./libbar.la
5574 ) >>"$at_stdout" 2>>"$at_stderr"
5575 at_status=$? at_failed=false
5576 $at_check_filter
5577 echo stderr:; cat "$at_stderr"
5578 echo stdout:; cat "$at_stdout"
5579 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:72"
5580 $at_failed && at_fn_log_failure
5581 $at_traceon; }
5582
5583
5584 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5585 { set +x
5586 $as_echo "$at_srcdir/duplicate_members.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5587 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_members.at:75"
5588 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5589 ) >>"$at_stdout" 2>>"$at_stderr"
5590 at_status=$? at_failed=false
5591 $at_check_filter
5592 echo stderr:; cat "$at_stderr"
5593 echo stdout:; cat "$at_stdout"
5594 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:75"
5595 $at_failed && at_fn_log_failure
5596 $at_traceon; }
5597
5598
5599
5600   set +x
5601   $at_times_p && times >"$at_times_file"
5602 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5603 read at_status <"$at_status_file"
5604 #AT_STOP_24
5605 #AT_START_25
5606 at_fn_group_banner 25 'duplicate_conv.at:25' \
5607   "duplicate convenience archive names" "            " 3
5608 at_xfail=no
5609 (
5610   $as_echo "25. $at_setup_line: testing $at_desc ..."
5611   $at_traceon
5612
5613
5614
5615 eval `$LIBTOOL --config | sed -n '/^reload_cmds=/,/^$/p'`
5616
5617 # We create two convenience archives with the same name, and _also_
5618 # containing an object with the same name.  This is necessary to detect
5619 # the failure with both 1.5.22 and HEAD, since the latter does not (did
5620 # not?) remove the temporary output directory, thus masking the failure
5621 # when all objects have distinct names.
5622
5623 mkdir a b c
5624
5625 echo 'int a () { return 0; }' > a/a.c
5626 echo 'int a2() { return 0; }' > b/a.c
5627 echo 'int b () { return 0; }' > b/b.c
5628 echo 'extern int a(), a2(), b(); int c() { return a() + a2() + b(); }' > c.c
5629 echo 'extern int c(); int main() { return c(); }' > main.c
5630
5631 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a/a.c -o a/a.lo
5632 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/a.c -o b/a.lo
5633 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/b.c -o b/b.lo
5634 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c c.c
5635 $CC $CPPFLAGS $CFLAGS -c main.c
5636 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a/a.lo
5637 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/liba.la b/a.lo b/b.lo
5638
5639 # Fold into convenience archive.
5640 { set +x
5641 $as_echo "$at_srcdir/duplicate_conv.at:53: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la"
5642 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:53"
5643 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la
5644 ) >>"$at_stdout" 2>>"$at_stderr"
5645 at_status=$? at_failed=false
5646 $at_check_filter
5647 echo stderr:; cat "$at_stderr"
5648 echo stdout:; cat "$at_stdout"
5649 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:53"
5650 $at_failed && at_fn_log_failure
5651 $at_traceon; }
5652
5653 { set +x
5654 $as_echo "$at_srcdir/duplicate_conv.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
5655 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:55"
5656 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
5657 ) >>"$at_stdout" 2>>"$at_stderr"
5658 at_status=$? at_failed=false
5659 $at_check_filter
5660 echo stderr:; cat "$at_stderr"
5661 echo stdout:; cat "$at_stdout"
5662 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:55"
5663 $at_failed && at_fn_log_failure
5664 $at_traceon; }
5665
5666 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5667 { set +x
5668 $as_echo "$at_srcdir/duplicate_conv.at:57: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5669 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_conv.at:57"
5670 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5671 ) >>"$at_stdout" 2>>"$at_stderr"
5672 at_status=$? at_failed=false
5673 $at_check_filter
5674 echo stderr:; cat "$at_stderr"
5675 echo stdout:; cat "$at_stdout"
5676 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:57"
5677 $at_failed && at_fn_log_failure
5678 $at_traceon; }
5679
5680
5681 $LIBTOOL --mode=clean rm -f libcee.la
5682
5683
5684 # FIXME: For this test, we may want to zero out whole_archive_flag_spec;
5685 #        OTOH, we'd like to test the other situation, too.
5686
5687 # Fold into static library.
5688 { set +x
5689 $as_echo "$at_srcdir/duplicate_conv.at:65: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la"
5690 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:65"
5691 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la
5692 ) >>"$at_stdout" 2>>"$at_stderr"
5693 at_status=$? at_failed=false
5694 $at_check_filter
5695 echo stderr:; cat "$at_stderr"
5696 echo stdout:; cat "$at_stdout"
5697 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:65"
5698 $at_failed && at_fn_log_failure
5699 $at_traceon; }
5700
5701 { set +x
5702 $as_echo "$at_srcdir/duplicate_conv.at:67: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
5703 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:67"
5704 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
5705 ) >>"$at_stdout" 2>>"$at_stderr"
5706 at_status=$? at_failed=false
5707 $at_check_filter
5708 echo stderr:; cat "$at_stderr"
5709 echo stdout:; cat "$at_stdout"
5710 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:67"
5711 $at_failed && at_fn_log_failure
5712 $at_traceon; }
5713
5714 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5715 { set +x
5716 $as_echo "$at_srcdir/duplicate_conv.at:69: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5717 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_conv.at:69"
5718 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5719 ) >>"$at_stdout" 2>>"$at_stderr"
5720 at_status=$? at_failed=false
5721 $at_check_filter
5722 echo stderr:; cat "$at_stderr"
5723 echo stdout:; cat "$at_stdout"
5724 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:69"
5725 $at_failed && at_fn_log_failure
5726 $at_traceon; }
5727
5728
5729 $LIBTOOL --mode=clean rm -f libcee.la
5730
5731 # Fold into library.
5732 { set +x
5733 $as_echo "$at_srcdir/duplicate_conv.at:73: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la"
5734 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:73"
5735 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la
5736 ) >>"$at_stdout" 2>>"$at_stderr"
5737 at_status=$? at_failed=false
5738 $at_check_filter
5739 echo stderr:; cat "$at_stderr"
5740 echo stdout:; cat "$at_stdout"
5741 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:73"
5742 $at_failed && at_fn_log_failure
5743 $at_traceon; }
5744
5745 { set +x
5746 $as_echo "$at_srcdir/duplicate_conv.at:75: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la"
5747 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:75"
5748 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la
5749 ) >>"$at_stdout" 2>>"$at_stderr"
5750 at_status=$? at_failed=false
5751 $at_check_filter
5752 echo stderr:; cat "$at_stderr"
5753 echo stdout:; cat "$at_stdout"
5754 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:75"
5755 $at_failed && at_fn_log_failure
5756 $at_traceon; }
5757
5758 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5759 { set +x
5760 $as_echo "$at_srcdir/duplicate_conv.at:77: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5761 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_conv.at:77"
5762 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5763 ) >>"$at_stdout" 2>>"$at_stderr"
5764 at_status=$? at_failed=false
5765 $at_check_filter
5766 echo stderr:; cat "$at_stderr"
5767 echo stdout:; cat "$at_stdout"
5768 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:77"
5769 $at_failed && at_fn_log_failure
5770 $at_traceon; }
5771
5772
5773 $LIBTOOL --mode=clean rm -f libcee.la
5774
5775 { set +x
5776 $as_echo "$at_srcdir/duplicate_conv.at:80: test \"x\$reload_cmds\" = xfalse && exit 77"
5777 at_fn_check_prepare_dynamic "test \"x$reload_cmds\" = xfalse && exit 77" "duplicate_conv.at:80"
5778 ( $at_check_trace; test "x$reload_cmds" = xfalse && exit 77
5779 ) >>"$at_stdout" 2>>"$at_stderr"
5780 at_status=$? at_failed=false
5781 $at_check_filter
5782 at_fn_diff_devnull "$at_stderr" || at_failed=:
5783 at_fn_diff_devnull "$at_stdout" || at_failed=:
5784 at_fn_check_status 1 $at_status "$at_srcdir/duplicate_conv.at:80"
5785 $at_failed && at_fn_log_failure
5786 $at_traceon; }
5787
5788
5789 # Test whether this works with reloadable objects as well.
5790 { set +x
5791 $as_echo "$at_srcdir/duplicate_conv.at:83: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o cee.\$OBJEXT c.lo a/liba.la b/liba.la"
5792 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la" "duplicate_conv.at:83"
5793 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la
5794 ) >>"$at_stdout" 2>>"$at_stderr"
5795 at_status=$? at_failed=false
5796 $at_check_filter
5797 echo stderr:; cat "$at_stderr"
5798 echo stdout:; cat "$at_stdout"
5799 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:83"
5800 $at_failed && at_fn_log_failure
5801 $at_traceon; }
5802
5803 { set +x
5804 $as_echo "$at_srcdir/duplicate_conv.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT cee.\$OBJEXT"
5805 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT" "duplicate_conv.at:85"
5806 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT
5807 ) >>"$at_stdout" 2>>"$at_stderr"
5808 at_status=$? at_failed=false
5809 $at_check_filter
5810 echo stderr:; cat "$at_stderr"
5811 echo stdout:; cat "$at_stdout"
5812 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:85"
5813 $at_failed && at_fn_log_failure
5814 $at_traceon; }
5815
5816 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5817 { set +x
5818 $as_echo "$at_srcdir/duplicate_conv.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5819 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_conv.at:87"
5820 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5821 ) >>"$at_stdout" 2>>"$at_stderr"
5822 at_status=$? at_failed=false
5823 $at_check_filter
5824 echo stderr:; cat "$at_stderr"
5825 echo stdout:; cat "$at_stdout"
5826 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:87"
5827 $at_failed && at_fn_log_failure
5828 $at_traceon; }
5829
5830
5831
5832 # TODO: test dlpreloading of duplicates (when it is implemented)
5833
5834   set +x
5835   $at_times_p && times >"$at_times_file"
5836 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5837 read at_status <"$at_status_file"
5838 #AT_STOP_25
5839 #AT_START_26
5840 at_fn_group_banner 26 'duplicate_deps.at:25' \
5841   "preserve duplicate convenience deps" "            " 3
5842 at_xfail=yes
5843 (
5844   $as_echo "26. $at_setup_line: testing $at_desc ..."
5845   $at_traceon
5846
5847
5848
5849 # --preserve-dup-deps should work for convenience archives.
5850
5851 # Create a circular dependency of liba and libb:
5852 # a1 pulls in b1, that pulls in a2.
5853 cat >a1.c <<\EOF
5854 extern int b1 ();
5855 int a1 () { return b1 (); }
5856 EOF
5857 cat >a2.c <<\EOF
5858 int a2 () { return 0; }
5859 EOF
5860 cat >b1.c <<\EOF
5861 extern int a2 ();
5862 int b1 () { return a2 (); }
5863 EOF
5864 cat >main.c <<\EOF
5865 extern int a1 ();
5866 int main () { return a1 (); }
5867 EOF
5868
5869 for file in a1.c a2.c b1.c; do
5870   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
5871 done
5872 $CC $CPPFLAGS $CFLAGS -c main.c
5873 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a1.lo a2.lo
5874
5875 # This could be worked around by adding liba.la to libb.la
5876 # (in that case all objects from liba would be merged into
5877 # libb.a as well, possibly renamed.)
5878 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo liba.la
5879 { set +x
5880 $as_echo "$at_srcdir/duplicate_deps.at:58: \$LIBTOOL --mode=link --tag=CC \\
5881           \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la"
5882 at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:58"
5883 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC \
5884           $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la
5885 ) >>"$at_stdout" 2>>"$at_stderr"
5886 at_status=$? at_failed=false
5887 $at_check_filter
5888 echo stderr:; cat "$at_stderr"
5889 echo stdout:; cat "$at_stdout"
5890 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:58"
5891 $at_failed && at_fn_log_failure
5892 $at_traceon; }
5893
5894 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
5895 { set +x
5896 $as_echo "$at_srcdir/duplicate_deps.at:61: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
5897 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "duplicate_deps.at:61"
5898 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
5899 ) >>"$at_stdout" 2>>"$at_stderr"
5900 at_status=$? at_failed=false
5901 $at_check_filter
5902 at_fn_diff_devnull "$at_stderr" || at_failed=:
5903 at_fn_diff_devnull "$at_stdout" || at_failed=:
5904 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:61"
5905 $at_failed && at_fn_log_failure
5906 $at_traceon; }
5907
5908
5909
5910 # Forgo the workaround and create a true circular dependency.
5911 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo
5912 # Some systems find all symbols anyway; skip this test on such systems.
5913 { set +x
5914 $as_echo "$at_srcdir/duplicate_deps.at:66: \$LIBTOOL --mode=link --tag=CC \\
5915           \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la \\
5916           && exit 77"
5917 at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:66"
5918 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC \
5919           $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la \
5920           && exit 77
5921 ) >>"$at_stdout" 2>>"$at_stderr"
5922 at_status=$? at_failed=false
5923 $at_check_filter
5924 echo stderr:; cat "$at_stderr"
5925 echo stdout:; cat "$at_stdout"
5926 at_fn_check_status 1 $at_status "$at_srcdir/duplicate_deps.at:66"
5927 $at_failed && at_fn_log_failure
5928 $at_traceon; }
5929
5930 # Other systems need special treatment, which currently fails.
5931
5932 { set +x
5933 $as_echo "$at_srcdir/duplicate_deps.at:72: \$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \\
5934           \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la"
5935 at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:72"
5936 ( $at_check_trace; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \
5937           $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la
5938 ) >>"$at_stdout" 2>>"$at_stderr"
5939 at_status=$? at_failed=false
5940 $at_check_filter
5941 echo stderr:; cat "$at_stderr"
5942 echo stdout:; cat "$at_stdout"
5943 at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:72"
5944 $at_failed && at_fn_log_failure
5945 $at_traceon; }
5946
5947
5948   set +x
5949   $at_times_p && times >"$at_times_file"
5950 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5951 read at_status <"$at_status_file"
5952 #AT_STOP_26
5953 #AT_START_27
5954 at_fn_group_banner 27 'flags.at:24' \
5955   "passing CC flags through libtool" "               " 3
5956 at_xfail=no
5957 (
5958   $as_echo "27. $at_setup_line: testing $at_desc ..."
5959   $at_traceon
5960
5961
5962
5963 { set +x
5964 $as_echo "$at_srcdir/flags.at:24: { test -n \"\$CC\" && test \"X\$CC\" != Xno; } || (exit 77)"
5965 at_fn_check_prepare_dynamic "{ test -n \"$CC\" && test \"X$CC\" != Xno; } || (exit 77)" "flags.at:24"
5966 ( $at_check_trace; { test -n "$CC" && test "X$CC" != Xno; } || (exit 77)
5967 ) >>"$at_stdout" 2>>"$at_stderr"
5968 at_status=$? at_failed=false
5969 $at_check_filter
5970 at_fn_diff_devnull "$at_stderr" || at_failed=:
5971 at_fn_diff_devnull "$at_stdout" || at_failed=:
5972 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
5973 $at_failed && at_fn_log_failure
5974 $at_traceon; }
5975
5976
5977
5978
5979 LDFLAGS="$LDFLAGS -no-undefined"
5980 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
5981
5982 cat >a.c <<'_ATEOF'
5983 int main () { return 0; }
5984 _ATEOF
5985
5986 compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c
5987
5988
5989 # Linker flags are not passed to the archiver, so don't test static libraries.
5990 if $LIBTOOL --features | grep 'enable shared libraries'; then
5991   library_and_module='library.la "module.la -module -avoid-version"'
5992 else
5993   library_and_module=
5994 fi
5995
5996 eval "`$LIBTOOL --tag=CC --config | $EGREP '^(wl|archive_cmds)='`"
5997
5998 { set +x
5999 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CC --mode=compile \$compile -c \$source"
6000 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CC --mode=compile $compile -c $source" "flags.at:24"
6001 ( $at_check_trace; $LIBTOOL --tag=CC --mode=compile $compile -c $source
6002 ) >>"$at_stdout" 2>>"$at_stderr"
6003 at_status=$? at_failed=false
6004 $at_check_filter
6005 echo stderr:; cat "$at_stderr"
6006 echo stdout:; cat "$at_stdout"
6007 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6008 $at_failed && at_fn_log_failure
6009 $at_traceon; }
6010
6011
6012 # Linker flags are prefixed with ${wl} iff they are passed to the
6013 # compiler driver, instead of directly to the linker.
6014 case $archive_cmds in
6015 *\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;;
6016 *) maybe_wl=$wl compiler_flags_in_liblink=: ;;
6017 esac
6018
6019 for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
6020   case $flag in
6021   -Wc, | -Xcompiler\ )
6022     { set +x
6023 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=compile \$compile             \$flag-foo -c \$source"
6024 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=compile $compile            $flag-foo -c $source" "flags.at:24"
6025 ( $at_check_trace; $LIBTOOL -n --tag=CC --mode=compile $compile              $flag-foo -c $source
6026 ) >>"$at_stdout" 2>>"$at_stderr"
6027 at_status=$? at_failed=false
6028 $at_check_filter
6029 echo stderr:; cat "$at_stderr"
6030 echo stdout:; tee stdout <"$at_stdout"
6031 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6032 $at_failed && at_fn_log_failure
6033 $at_traceon; }
6034
6035     { set +x
6036 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
6037 at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
6038 ( $at_check_trace; $FGREP " -foo" stdout
6039 ) >>"$at_stdout" 2>>"$at_stderr"
6040 at_status=$? at_failed=false
6041 $at_check_filter
6042 at_fn_diff_devnull "$at_stderr" || at_failed=:
6043 echo stdout:; cat "$at_stdout"
6044 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6045 $at_failed && at_fn_log_failure
6046 $at_traceon; }
6047
6048     flag_prefix_prog=
6049     flag_prefix_lib=
6050     flags_in_liblink=$compiler_flags_in_liblink
6051     ;;
6052   -Wl, | -Xlinker\ )
6053     flag_prefix_prog=$wl
6054     flag_prefix_lib=$maybe_wl
6055     flags_in_liblink=:
6056     ;;
6057   esac
6058
6059   { set +x
6060 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link         -o program\$EXEEXT a.lo \$flag-foo"
6061 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link        -o program$EXEEXT a.lo $flag-foo" "flags.at:24"
6062 ( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link          -o program$EXEEXT a.lo $flag-foo
6063 ) >>"$at_stdout" 2>>"$at_stderr"
6064 at_status=$? at_failed=false
6065 $at_check_filter
6066 echo stderr:; cat "$at_stderr"
6067 echo stdout:; tee stdout <"$at_stdout"
6068 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6069 $at_failed && at_fn_log_failure
6070 $at_traceon; }
6071
6072   { set +x
6073 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout"
6074 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24"
6075 ( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout
6076 ) >>"$at_stdout" 2>>"$at_stderr"
6077 at_status=$? at_failed=false
6078 $at_check_filter
6079 at_fn_diff_devnull "$at_stderr" || at_failed=:
6080 echo stdout:; cat "$at_stdout"
6081 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6082 $at_failed && at_fn_log_failure
6083 $at_traceon; }
6084
6085
6086   eval set x "$library_and_module"
6087   for output
6088   do
6089     test x = "$output" && continue
6090     { set +x
6091 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link           -o \$output a.lo -rpath /nowhere \$flag-foo"
6092 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link          -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
6093 ( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link            -o $output a.lo -rpath /nowhere $flag-foo
6094 ) >>"$at_stdout" 2>>"$at_stderr"
6095 at_status=$? at_failed=false
6096 $at_check_filter
6097 echo stderr:; cat "$at_stderr"
6098 echo stdout:; tee stdout <"$at_stdout"
6099 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6100 $at_failed && at_fn_log_failure
6101 $at_traceon; }
6102
6103     if $flags_in_liblink; then
6104       { set +x
6105 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6106 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6107 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6108 ) >>"$at_stdout" 2>>"$at_stderr"
6109 at_status=$? at_failed=false
6110 $at_check_filter
6111 at_fn_diff_devnull "$at_stderr" || at_failed=:
6112 echo stdout:; cat "$at_stdout"
6113 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6114 $at_failed && at_fn_log_failure
6115 $at_traceon; }
6116
6117     else
6118       { set +x
6119 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6120 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6121 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6122 ) >>"$at_stdout" 2>>"$at_stderr"
6123 at_status=$? at_failed=false
6124 $at_check_filter
6125 at_fn_diff_devnull "$at_stderr" || at_failed=:
6126 at_fn_diff_devnull "$at_stdout" || at_failed=:
6127 at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24"
6128 $at_failed && at_fn_log_failure
6129 $at_traceon; }
6130
6131     fi
6132   done
6133 done
6134
6135   set +x
6136   $at_times_p && times >"$at_times_file"
6137 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6138 read at_status <"$at_status_file"
6139 #AT_STOP_27
6140 #AT_START_28
6141 at_fn_group_banner 28 'flags.at:24' \
6142   "passing CXX flags through libtool" "              " 3
6143 at_xfail=no
6144 (
6145   $as_echo "28. $at_setup_line: testing $at_desc ..."
6146   $at_traceon
6147
6148
6149
6150 { set +x
6151 $as_echo "$at_srcdir/flags.at:24: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
6152 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "flags.at:24"
6153 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
6154 ) >>"$at_stdout" 2>>"$at_stderr"
6155 at_status=$? at_failed=false
6156 $at_check_filter
6157 at_fn_diff_devnull "$at_stderr" || at_failed=:
6158 at_fn_diff_devnull "$at_stdout" || at_failed=:
6159 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6160 $at_failed && at_fn_log_failure
6161 $at_traceon; }
6162
6163 { set +x
6164 $as_echo "$at_srcdir/flags.at:24: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
6165 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "flags.at:24"
6166 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
6167 ) >>"$at_stdout" 2>>"$at_stderr"
6168 at_status=$? at_failed=false
6169 $at_check_filter
6170 at_fn_diff_devnull "$at_stderr" || at_failed=:
6171 at_fn_diff_devnull "$at_stdout" || at_failed=:
6172 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6173 $at_failed && at_fn_log_failure
6174 $at_traceon; }
6175
6176
6177
6178 LDFLAGS="$LDFLAGS -no-undefined"
6179 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
6180
6181 cat >a.cpp <<'_ATEOF'
6182 int main () { return 0; }
6183 _ATEOF
6184
6185 compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp
6186
6187
6188 # Linker flags are not passed to the archiver, so don't test static libraries.
6189 if $LIBTOOL --features | grep 'enable shared libraries'; then
6190   library_and_module='library.la "module.la -module -avoid-version"'
6191 else
6192   library_and_module=
6193 fi
6194
6195 eval "`$LIBTOOL --tag=CXX --config | $EGREP '^(wl|archive_cmds)='`"
6196
6197 { set +x
6198 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CXX --mode=compile \$compile -c \$source"
6199 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $compile -c $source" "flags.at:24"
6200 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $compile -c $source
6201 ) >>"$at_stdout" 2>>"$at_stderr"
6202 at_status=$? at_failed=false
6203 $at_check_filter
6204 echo stderr:; cat "$at_stderr"
6205 echo stdout:; cat "$at_stdout"
6206 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6207 $at_failed && at_fn_log_failure
6208 $at_traceon; }
6209
6210
6211 # Linker flags are prefixed with ${wl} iff they are passed to the
6212 # compiler driver, instead of directly to the linker.
6213 case $archive_cmds in
6214 *\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;;
6215 *) maybe_wl=$wl compiler_flags_in_liblink=: ;;
6216 esac
6217
6218 for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
6219   case $flag in
6220   -Wc, | -Xcompiler\ )
6221     { set +x
6222 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=compile \$compile            \$flag-foo -c \$source"
6223 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=compile $compile           $flag-foo -c $source" "flags.at:24"
6224 ( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=compile $compile             $flag-foo -c $source
6225 ) >>"$at_stdout" 2>>"$at_stderr"
6226 at_status=$? at_failed=false
6227 $at_check_filter
6228 echo stderr:; cat "$at_stderr"
6229 echo stdout:; tee stdout <"$at_stdout"
6230 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6231 $at_failed && at_fn_log_failure
6232 $at_traceon; }
6233
6234     { set +x
6235 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
6236 at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
6237 ( $at_check_trace; $FGREP " -foo" stdout
6238 ) >>"$at_stdout" 2>>"$at_stderr"
6239 at_status=$? at_failed=false
6240 $at_check_filter
6241 at_fn_diff_devnull "$at_stderr" || at_failed=:
6242 echo stdout:; cat "$at_stdout"
6243 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6244 $at_failed && at_fn_log_failure
6245 $at_traceon; }
6246
6247     flag_prefix_prog=
6248     flag_prefix_lib=
6249     flags_in_liblink=$compiler_flags_in_liblink
6250     ;;
6251   -Wl, | -Xlinker\ )
6252     flag_prefix_prog=$wl
6253     flag_prefix_lib=$maybe_wl
6254     flags_in_liblink=:
6255     ;;
6256   esac
6257
6258   { set +x
6259 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link        -o program\$EXEEXT a.lo \$flag-foo"
6260 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link       -o program$EXEEXT a.lo $flag-foo" "flags.at:24"
6261 ( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link         -o program$EXEEXT a.lo $flag-foo
6262 ) >>"$at_stdout" 2>>"$at_stderr"
6263 at_status=$? at_failed=false
6264 $at_check_filter
6265 echo stderr:; cat "$at_stderr"
6266 echo stdout:; tee stdout <"$at_stdout"
6267 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6268 $at_failed && at_fn_log_failure
6269 $at_traceon; }
6270
6271   { set +x
6272 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout"
6273 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24"
6274 ( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout
6275 ) >>"$at_stdout" 2>>"$at_stderr"
6276 at_status=$? at_failed=false
6277 $at_check_filter
6278 at_fn_diff_devnull "$at_stderr" || at_failed=:
6279 echo stdout:; cat "$at_stdout"
6280 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6281 $at_failed && at_fn_log_failure
6282 $at_traceon; }
6283
6284
6285   eval set x "$library_and_module"
6286   for output
6287   do
6288     test x = "$output" && continue
6289     { set +x
6290 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link          -o \$output a.lo -rpath /nowhere \$flag-foo"
6291 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link         -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
6292 ( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link           -o $output a.lo -rpath /nowhere $flag-foo
6293 ) >>"$at_stdout" 2>>"$at_stderr"
6294 at_status=$? at_failed=false
6295 $at_check_filter
6296 echo stderr:; cat "$at_stderr"
6297 echo stdout:; tee stdout <"$at_stdout"
6298 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6299 $at_failed && at_fn_log_failure
6300 $at_traceon; }
6301
6302     if $flags_in_liblink; then
6303       { set +x
6304 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6305 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6306 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6307 ) >>"$at_stdout" 2>>"$at_stderr"
6308 at_status=$? at_failed=false
6309 $at_check_filter
6310 at_fn_diff_devnull "$at_stderr" || at_failed=:
6311 echo stdout:; cat "$at_stdout"
6312 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6313 $at_failed && at_fn_log_failure
6314 $at_traceon; }
6315
6316     else
6317       { set +x
6318 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6319 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6320 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6321 ) >>"$at_stdout" 2>>"$at_stderr"
6322 at_status=$? at_failed=false
6323 $at_check_filter
6324 at_fn_diff_devnull "$at_stderr" || at_failed=:
6325 at_fn_diff_devnull "$at_stdout" || at_failed=:
6326 at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24"
6327 $at_failed && at_fn_log_failure
6328 $at_traceon; }
6329
6330     fi
6331   done
6332 done
6333
6334   set +x
6335   $at_times_p && times >"$at_times_file"
6336 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6337 read at_status <"$at_status_file"
6338 #AT_STOP_28
6339 #AT_START_29
6340 at_fn_group_banner 29 'flags.at:24' \
6341   "passing F77 flags through libtool" "              " 3
6342 at_xfail=no
6343 (
6344   $as_echo "29. $at_setup_line: testing $at_desc ..."
6345   $at_traceon
6346
6347
6348
6349 { set +x
6350 $as_echo "$at_srcdir/flags.at:24: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
6351 at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "flags.at:24"
6352 ( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
6353 ) >>"$at_stdout" 2>>"$at_stderr"
6354 at_status=$? at_failed=false
6355 $at_check_filter
6356 at_fn_diff_devnull "$at_stderr" || at_failed=:
6357 at_fn_diff_devnull "$at_stdout" || at_failed=:
6358 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6359 $at_failed && at_fn_log_failure
6360 $at_traceon; }
6361
6362
6363
6364
6365 LDFLAGS="$LDFLAGS -no-undefined"
6366 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
6367
6368 cat >a.f <<'_ATEOF'
6369       program main
6370       end
6371 _ATEOF
6372
6373 compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f
6374
6375
6376 # Linker flags are not passed to the archiver, so don't test static libraries.
6377 if $LIBTOOL --features | grep 'enable shared libraries'; then
6378   library_and_module='library.la "module.la -module -avoid-version"'
6379 else
6380   library_and_module=
6381 fi
6382
6383 eval "`$LIBTOOL --tag=F77 --config | $EGREP '^(wl|archive_cmds)='`"
6384
6385 { set +x
6386 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=F77 --mode=compile \$compile -c \$source"
6387 at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=compile $compile -c $source" "flags.at:24"
6388 ( $at_check_trace; $LIBTOOL --tag=F77 --mode=compile $compile -c $source
6389 ) >>"$at_stdout" 2>>"$at_stderr"
6390 at_status=$? at_failed=false
6391 $at_check_filter
6392 echo stderr:; cat "$at_stderr"
6393 echo stdout:; cat "$at_stdout"
6394 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6395 $at_failed && at_fn_log_failure
6396 $at_traceon; }
6397
6398
6399 # Linker flags are prefixed with ${wl} iff they are passed to the
6400 # compiler driver, instead of directly to the linker.
6401 case $archive_cmds in
6402 *\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;;
6403 *) maybe_wl=$wl compiler_flags_in_liblink=: ;;
6404 esac
6405
6406 for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
6407   case $flag in
6408   -Wc, | -Xcompiler\ )
6409     { set +x
6410 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=compile \$compile            \$flag-foo -c \$source"
6411 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=compile $compile           $flag-foo -c $source" "flags.at:24"
6412 ( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=compile $compile             $flag-foo -c $source
6413 ) >>"$at_stdout" 2>>"$at_stderr"
6414 at_status=$? at_failed=false
6415 $at_check_filter
6416 echo stderr:; cat "$at_stderr"
6417 echo stdout:; tee stdout <"$at_stdout"
6418 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6419 $at_failed && at_fn_log_failure
6420 $at_traceon; }
6421
6422     { set +x
6423 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
6424 at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
6425 ( $at_check_trace; $FGREP " -foo" stdout
6426 ) >>"$at_stdout" 2>>"$at_stderr"
6427 at_status=$? at_failed=false
6428 $at_check_filter
6429 at_fn_diff_devnull "$at_stderr" || at_failed=:
6430 echo stdout:; cat "$at_stdout"
6431 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6432 $at_failed && at_fn_log_failure
6433 $at_traceon; }
6434
6435     flag_prefix_prog=
6436     flag_prefix_lib=
6437     flags_in_liblink=$compiler_flags_in_liblink
6438     ;;
6439   -Wl, | -Xlinker\ )
6440     flag_prefix_prog=$wl
6441     flag_prefix_lib=$maybe_wl
6442     flags_in_liblink=:
6443     ;;
6444   esac
6445
6446   { set +x
6447 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link        -o program\$EXEEXT a.lo \$flag-foo"
6448 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link       -o program$EXEEXT a.lo $flag-foo" "flags.at:24"
6449 ( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link         -o program$EXEEXT a.lo $flag-foo
6450 ) >>"$at_stdout" 2>>"$at_stderr"
6451 at_status=$? at_failed=false
6452 $at_check_filter
6453 echo stderr:; cat "$at_stderr"
6454 echo stdout:; tee stdout <"$at_stdout"
6455 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6456 $at_failed && at_fn_log_failure
6457 $at_traceon; }
6458
6459   { set +x
6460 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout"
6461 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24"
6462 ( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout
6463 ) >>"$at_stdout" 2>>"$at_stderr"
6464 at_status=$? at_failed=false
6465 $at_check_filter
6466 at_fn_diff_devnull "$at_stderr" || at_failed=:
6467 echo stdout:; cat "$at_stdout"
6468 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6469 $at_failed && at_fn_log_failure
6470 $at_traceon; }
6471
6472
6473   eval set x "$library_and_module"
6474   for output
6475   do
6476     test x = "$output" && continue
6477     { set +x
6478 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link          -o \$output a.lo -rpath /nowhere \$flag-foo"
6479 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link         -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
6480 ( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link           -o $output a.lo -rpath /nowhere $flag-foo
6481 ) >>"$at_stdout" 2>>"$at_stderr"
6482 at_status=$? at_failed=false
6483 $at_check_filter
6484 echo stderr:; cat "$at_stderr"
6485 echo stdout:; tee stdout <"$at_stdout"
6486 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6487 $at_failed && at_fn_log_failure
6488 $at_traceon; }
6489
6490     if $flags_in_liblink; then
6491       { set +x
6492 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6493 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6494 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6495 ) >>"$at_stdout" 2>>"$at_stderr"
6496 at_status=$? at_failed=false
6497 $at_check_filter
6498 at_fn_diff_devnull "$at_stderr" || at_failed=:
6499 echo stdout:; cat "$at_stdout"
6500 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6501 $at_failed && at_fn_log_failure
6502 $at_traceon; }
6503
6504     else
6505       { set +x
6506 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6507 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6508 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6509 ) >>"$at_stdout" 2>>"$at_stderr"
6510 at_status=$? at_failed=false
6511 $at_check_filter
6512 at_fn_diff_devnull "$at_stderr" || at_failed=:
6513 at_fn_diff_devnull "$at_stdout" || at_failed=:
6514 at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24"
6515 $at_failed && at_fn_log_failure
6516 $at_traceon; }
6517
6518     fi
6519   done
6520 done
6521
6522   set +x
6523   $at_times_p && times >"$at_times_file"
6524 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6525 read at_status <"$at_status_file"
6526 #AT_STOP_29
6527 #AT_START_30
6528 at_fn_group_banner 30 'flags.at:24' \
6529   "passing FC flags through libtool" "               " 3
6530 at_xfail=no
6531 (
6532   $as_echo "30. $at_setup_line: testing $at_desc ..."
6533   $at_traceon
6534
6535
6536
6537 { set +x
6538 $as_echo "$at_srcdir/flags.at:24: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
6539 at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "flags.at:24"
6540 ( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
6541 ) >>"$at_stdout" 2>>"$at_stderr"
6542 at_status=$? at_failed=false
6543 $at_check_filter
6544 at_fn_diff_devnull "$at_stderr" || at_failed=:
6545 at_fn_diff_devnull "$at_stdout" || at_failed=:
6546 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6547 $at_failed && at_fn_log_failure
6548 $at_traceon; }
6549
6550
6551
6552
6553 LDFLAGS="$LDFLAGS -no-undefined"
6554 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
6555
6556 cat >a.f90 <<'_ATEOF'
6557       program main
6558       end
6559 _ATEOF
6560
6561 compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90
6562
6563
6564 # Linker flags are not passed to the archiver, so don't test static libraries.
6565 if $LIBTOOL --features | grep 'enable shared libraries'; then
6566   library_and_module='library.la "module.la -module -avoid-version"'
6567 else
6568   library_and_module=
6569 fi
6570
6571 eval "`$LIBTOOL --tag=FC --config | $EGREP '^(wl|archive_cmds)='`"
6572
6573 { set +x
6574 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=FC --mode=compile \$compile -c \$source"
6575 at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=compile $compile -c $source" "flags.at:24"
6576 ( $at_check_trace; $LIBTOOL --tag=FC --mode=compile $compile -c $source
6577 ) >>"$at_stdout" 2>>"$at_stderr"
6578 at_status=$? at_failed=false
6579 $at_check_filter
6580 echo stderr:; cat "$at_stderr"
6581 echo stdout:; cat "$at_stdout"
6582 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6583 $at_failed && at_fn_log_failure
6584 $at_traceon; }
6585
6586
6587 # Linker flags are prefixed with ${wl} iff they are passed to the
6588 # compiler driver, instead of directly to the linker.
6589 case $archive_cmds in
6590 *\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;;
6591 *) maybe_wl=$wl compiler_flags_in_liblink=: ;;
6592 esac
6593
6594 for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
6595   case $flag in
6596   -Wc, | -Xcompiler\ )
6597     { set +x
6598 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=compile \$compile             \$flag-foo -c \$source"
6599 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=compile $compile            $flag-foo -c $source" "flags.at:24"
6600 ( $at_check_trace; $LIBTOOL -n --tag=FC --mode=compile $compile              $flag-foo -c $source
6601 ) >>"$at_stdout" 2>>"$at_stderr"
6602 at_status=$? at_failed=false
6603 $at_check_filter
6604 echo stderr:; cat "$at_stderr"
6605 echo stdout:; tee stdout <"$at_stdout"
6606 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6607 $at_failed && at_fn_log_failure
6608 $at_traceon; }
6609
6610     { set +x
6611 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
6612 at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
6613 ( $at_check_trace; $FGREP " -foo" stdout
6614 ) >>"$at_stdout" 2>>"$at_stderr"
6615 at_status=$? at_failed=false
6616 $at_check_filter
6617 at_fn_diff_devnull "$at_stderr" || at_failed=:
6618 echo stdout:; cat "$at_stdout"
6619 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6620 $at_failed && at_fn_log_failure
6621 $at_traceon; }
6622
6623     flag_prefix_prog=
6624     flag_prefix_lib=
6625     flags_in_liblink=$compiler_flags_in_liblink
6626     ;;
6627   -Wl, | -Xlinker\ )
6628     flag_prefix_prog=$wl
6629     flag_prefix_lib=$maybe_wl
6630     flags_in_liblink=:
6631     ;;
6632   esac
6633
6634   { set +x
6635 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link         -o program\$EXEEXT a.lo \$flag-foo"
6636 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link        -o program$EXEEXT a.lo $flag-foo" "flags.at:24"
6637 ( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link          -o program$EXEEXT a.lo $flag-foo
6638 ) >>"$at_stdout" 2>>"$at_stderr"
6639 at_status=$? at_failed=false
6640 $at_check_filter
6641 echo stderr:; cat "$at_stderr"
6642 echo stdout:; tee stdout <"$at_stdout"
6643 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6644 $at_failed && at_fn_log_failure
6645 $at_traceon; }
6646
6647   { set +x
6648 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout"
6649 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24"
6650 ( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout
6651 ) >>"$at_stdout" 2>>"$at_stderr"
6652 at_status=$? at_failed=false
6653 $at_check_filter
6654 at_fn_diff_devnull "$at_stderr" || at_failed=:
6655 echo stdout:; cat "$at_stdout"
6656 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6657 $at_failed && at_fn_log_failure
6658 $at_traceon; }
6659
6660
6661   eval set x "$library_and_module"
6662   for output
6663   do
6664     test x = "$output" && continue
6665     { set +x
6666 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link           -o \$output a.lo -rpath /nowhere \$flag-foo"
6667 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link          -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
6668 ( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link            -o $output a.lo -rpath /nowhere $flag-foo
6669 ) >>"$at_stdout" 2>>"$at_stderr"
6670 at_status=$? at_failed=false
6671 $at_check_filter
6672 echo stderr:; cat "$at_stderr"
6673 echo stdout:; tee stdout <"$at_stdout"
6674 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6675 $at_failed && at_fn_log_failure
6676 $at_traceon; }
6677
6678     if $flags_in_liblink; then
6679       { set +x
6680 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6681 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6682 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6683 ) >>"$at_stdout" 2>>"$at_stderr"
6684 at_status=$? at_failed=false
6685 $at_check_filter
6686 at_fn_diff_devnull "$at_stderr" || at_failed=:
6687 echo stdout:; cat "$at_stdout"
6688 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6689 $at_failed && at_fn_log_failure
6690 $at_traceon; }
6691
6692     else
6693       { set +x
6694 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6695 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6696 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6697 ) >>"$at_stdout" 2>>"$at_stderr"
6698 at_status=$? at_failed=false
6699 $at_check_filter
6700 at_fn_diff_devnull "$at_stderr" || at_failed=:
6701 at_fn_diff_devnull "$at_stdout" || at_failed=:
6702 at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24"
6703 $at_failed && at_fn_log_failure
6704 $at_traceon; }
6705
6706     fi
6707   done
6708 done
6709
6710   set +x
6711   $at_times_p && times >"$at_times_file"
6712 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6713 read at_status <"$at_status_file"
6714 #AT_STOP_30
6715 #AT_START_31
6716 at_fn_group_banner 31 'flags.at:24' \
6717   "passing GCJ flags through libtool" "              " 3
6718 at_xfail=no
6719 (
6720   $as_echo "31. $at_setup_line: testing $at_desc ..."
6721   $at_traceon
6722
6723
6724
6725 { set +x
6726 $as_echo "$at_srcdir/flags.at:24: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
6727 at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "flags.at:24"
6728 ( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
6729 ) >>"$at_stdout" 2>>"$at_stderr"
6730 at_status=$? at_failed=false
6731 $at_check_filter
6732 at_fn_diff_devnull "$at_stderr" || at_failed=:
6733 at_fn_diff_devnull "$at_stdout" || at_failed=:
6734 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6735 $at_failed && at_fn_log_failure
6736 $at_traceon; }
6737
6738 # There are just too many broken gcj installations out there, either missing
6739    # libgcj.spec or unable to find it.  Skip the test for them.
6740    cat >gcj_test.java <<'_ATEOF'
6741 public class gcj_test {
6742     public static void main(String[] argv) { }
6743   }
6744 _ATEOF
6745
6746    { set +x
6747 $as_echo "$at_srcdir/flags.at:24: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77"
6748 at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "flags.at:24"
6749 ( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77
6750 ) >>"$at_stdout" 2>>"$at_stderr"
6751 at_status=$? at_failed=false
6752 $at_check_filter
6753 echo stderr:; cat "$at_stderr"
6754 echo stdout:; cat "$at_stdout"
6755 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6756 $at_failed && at_fn_log_failure
6757 $at_traceon; }
6758
6759
6760
6761 LDFLAGS="$LDFLAGS -no-undefined"
6762 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
6763
6764 cat >a.java <<'_ATEOF'
6765 class a {}
6766 _ATEOF
6767
6768 compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java
6769
6770
6771 # Linker flags are not passed to the archiver, so don't test static libraries.
6772 if $LIBTOOL --features | grep 'enable shared libraries'; then
6773   library_and_module='library.la "module.la -module -avoid-version"'
6774 else
6775   library_and_module=
6776 fi
6777
6778 eval "`$LIBTOOL --tag=GCJ --config | $EGREP '^(wl|archive_cmds)='`"
6779
6780 { set +x
6781 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=GCJ --mode=compile \$compile -c \$source"
6782 at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=compile $compile -c $source" "flags.at:24"
6783 ( $at_check_trace; $LIBTOOL --tag=GCJ --mode=compile $compile -c $source
6784 ) >>"$at_stdout" 2>>"$at_stderr"
6785 at_status=$? at_failed=false
6786 $at_check_filter
6787 echo stderr:; cat "$at_stderr"
6788 echo stdout:; cat "$at_stdout"
6789 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6790 $at_failed && at_fn_log_failure
6791 $at_traceon; }
6792
6793
6794 # Linker flags are prefixed with ${wl} iff they are passed to the
6795 # compiler driver, instead of directly to the linker.
6796 case $archive_cmds in
6797 *\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;;
6798 *) maybe_wl=$wl compiler_flags_in_liblink=: ;;
6799 esac
6800
6801 for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
6802   case $flag in
6803   -Wc, | -Xcompiler\ )
6804     { set +x
6805 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=compile \$compile            \$flag-foo -c \$source"
6806 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=compile $compile           $flag-foo -c $source" "flags.at:24"
6807 ( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=compile $compile             $flag-foo -c $source
6808 ) >>"$at_stdout" 2>>"$at_stderr"
6809 at_status=$? at_failed=false
6810 $at_check_filter
6811 echo stderr:; cat "$at_stderr"
6812 echo stdout:; tee stdout <"$at_stdout"
6813 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6814 $at_failed && at_fn_log_failure
6815 $at_traceon; }
6816
6817     { set +x
6818 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout"
6819 at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24"
6820 ( $at_check_trace; $FGREP " -foo" stdout
6821 ) >>"$at_stdout" 2>>"$at_stderr"
6822 at_status=$? at_failed=false
6823 $at_check_filter
6824 at_fn_diff_devnull "$at_stderr" || at_failed=:
6825 echo stdout:; cat "$at_stdout"
6826 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6827 $at_failed && at_fn_log_failure
6828 $at_traceon; }
6829
6830     flag_prefix_prog=
6831     flag_prefix_lib=
6832     flags_in_liblink=$compiler_flags_in_liblink
6833     ;;
6834   -Wl, | -Xlinker\ )
6835     flag_prefix_prog=$wl
6836     flag_prefix_lib=$maybe_wl
6837     flags_in_liblink=:
6838     ;;
6839   esac
6840
6841   { set +x
6842 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link        -o program\$EXEEXT a.lo \$flag-foo"
6843 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link       -o program$EXEEXT a.lo $flag-foo" "flags.at:24"
6844 ( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link         -o program$EXEEXT a.lo $flag-foo
6845 ) >>"$at_stdout" 2>>"$at_stderr"
6846 at_status=$? at_failed=false
6847 $at_check_filter
6848 echo stderr:; cat "$at_stderr"
6849 echo stdout:; tee stdout <"$at_stdout"
6850 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6851 $at_failed && at_fn_log_failure
6852 $at_traceon; }
6853
6854   { set +x
6855 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout"
6856 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24"
6857 ( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout
6858 ) >>"$at_stdout" 2>>"$at_stderr"
6859 at_status=$? at_failed=false
6860 $at_check_filter
6861 at_fn_diff_devnull "$at_stderr" || at_failed=:
6862 echo stdout:; cat "$at_stdout"
6863 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6864 $at_failed && at_fn_log_failure
6865 $at_traceon; }
6866
6867
6868   eval set x "$library_and_module"
6869   for output
6870   do
6871     test x = "$output" && continue
6872     { set +x
6873 $as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link          -o \$output a.lo -rpath /nowhere \$flag-foo"
6874 at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link         -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24"
6875 ( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link           -o $output a.lo -rpath /nowhere $flag-foo
6876 ) >>"$at_stdout" 2>>"$at_stderr"
6877 at_status=$? at_failed=false
6878 $at_check_filter
6879 echo stderr:; cat "$at_stderr"
6880 echo stdout:; tee stdout <"$at_stdout"
6881 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6882 $at_failed && at_fn_log_failure
6883 $at_traceon; }
6884
6885     if $flags_in_liblink; then
6886       { set +x
6887 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6888 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6889 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6890 ) >>"$at_stdout" 2>>"$at_stderr"
6891 at_status=$? at_failed=false
6892 $at_check_filter
6893 at_fn_diff_devnull "$at_stderr" || at_failed=:
6894 echo stdout:; cat "$at_stdout"
6895 at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24"
6896 $at_failed && at_fn_log_failure
6897 $at_traceon; }
6898
6899     else
6900       { set +x
6901 $as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout"
6902 at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24"
6903 ( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout
6904 ) >>"$at_stdout" 2>>"$at_stderr"
6905 at_status=$? at_failed=false
6906 $at_check_filter
6907 at_fn_diff_devnull "$at_stderr" || at_failed=:
6908 at_fn_diff_devnull "$at_stdout" || at_failed=:
6909 at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24"
6910 $at_failed && at_fn_log_failure
6911 $at_traceon; }
6912
6913     fi
6914   done
6915 done
6916
6917   set +x
6918   $at_times_p && times >"$at_times_file"
6919 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6920 read at_status <"$at_status_file"
6921 #AT_STOP_31
6922 #AT_START_32
6923 at_fn_group_banner 32 'inherited_flags.at:26' \
6924   "inherited_linker_flags" "                         " 3
6925 at_xfail=no
6926 (
6927   $as_echo "32. $at_setup_line: testing $at_desc ..."
6928   $at_traceon
6929
6930
6931
6932 cat >foo.c <<'_ATEOF'
6933
6934 int foo() { return 1;}
6935 _ATEOF
6936
6937
6938 cat >bar.c <<'_ATEOF'
6939
6940 int bar() { return 1;}
6941 _ATEOF
6942
6943
6944 cat >baz.c <<'_ATEOF'
6945
6946 int baz() { return 1;}
6947 _ATEOF
6948
6949
6950 cat >both.c <<'_ATEOF'
6951
6952 int both() { return 1;}
6953 _ATEOF
6954
6955
6956 cat >main.c <<'_ATEOF'
6957
6958 int main() { return 0;}
6959 _ATEOF
6960
6961
6962 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
6963 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
6964 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o baz.lo baz.c
6965 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o both.lo both.c
6966 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c
6967 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo -rpath /nonexistent -no-undefined
6968 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /nonexistent -no-undefined
6969 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libboth.la both.lo -rpath /nonexistent -no-undefined
6970
6971
6972 mv libfoo.la libfoo.la.bak
6973 sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_inlikely_existing_lib/g' < libfoo.la.bak > libfoo.la
6974 rm libfoo.la.bak
6975
6976 mv libbar.la libbar.la.bak
6977 sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_unlikely_existing_lib/g' < libbar.la.bak > libbar.la
6978 rm libbar.la.bak
6979
6980 mv libboth.la libboth.la.bak
6981 sed -e "s/^inherited_linker_flags.*/inherited_linker_flags='-llt_inlikely_existing_lib -llt_unlikely_existing_lib'/g" < libboth.la.bak > libboth.la
6982 rm libboth.la.bak
6983
6984 { set +x
6985 $as_echo "$at_srcdir/inherited_flags.at:76: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la"
6986 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:76"
6987 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la
6988 ) >>"$at_stdout" 2>>"$at_stderr"
6989 at_status=$? at_failed=false
6990 $at_check_filter
6991 echo stderr:; cat "$at_stderr"
6992 echo stdout:; tee stdout <"$at_stdout"
6993 at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:76"
6994 $at_failed && at_fn_log_failure
6995 $at_traceon; }
6996
6997 # We used to grep for
6998 # 'llt_[[ui]]nlikely_existing_lib.*llt_[[ui]]nlikely_existing_lib'
6999 # here.  This fails on win32/MSVC because the generated command lines have a
7000 # different syntax.  So drop the first `l'.
7001 { set +x
7002 $as_echo "$at_srcdir/inherited_flags.at:82: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
7003 at_fn_check_prepare_notrace 'a shell pipeline' "inherited_flags.at:82"
7004 ( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77)
7005 ) >>"$at_stdout" 2>>"$at_stderr"
7006 at_status=$? at_failed=false
7007 $at_check_filter
7008 at_fn_diff_devnull "$at_stderr" || at_failed=:
7009 echo stdout:; cat "$at_stdout"
7010 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:82"
7011 $at_failed && at_fn_log_failure
7012 $at_traceon; }
7013
7014 { set +x
7015 $as_echo "$at_srcdir/inherited_flags.at:83: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
7016 at_fn_check_prepare_trace "inherited_flags.at:83"
7017 ( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout
7018 ) >>"$at_stdout" 2>>"$at_stderr"
7019 at_status=$? at_failed=false
7020 $at_check_filter
7021 echo stderr:; cat "$at_stderr"
7022 echo stdout:; cat "$at_stdout"
7023 at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:83"
7024 $at_failed && at_fn_log_failure
7025 $at_traceon; }
7026
7027 { set +x
7028 $as_echo "$at_srcdir/inherited_flags.at:85: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la"
7029 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la" "inherited_flags.at:85"
7030 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la
7031 ) >>"$at_stdout" 2>>"$at_stderr"
7032 at_status=$? at_failed=false
7033 $at_check_filter
7034 echo stderr:; cat "$at_stderr"
7035 echo stdout:; tee stdout <"$at_stdout"
7036 at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:85"
7037 $at_failed && at_fn_log_failure
7038 $at_traceon; }
7039
7040 { set +x
7041 $as_echo "$at_srcdir/inherited_flags.at:87: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout"
7042 at_fn_check_prepare_trace "inherited_flags.at:87"
7043 ( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout
7044 ) >>"$at_stdout" 2>>"$at_stderr"
7045 at_status=$? at_failed=false
7046 $at_check_filter
7047 echo stderr:; cat "$at_stderr"
7048 echo stdout:; cat "$at_stdout"
7049 at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:87"
7050 $at_failed && at_fn_log_failure
7051 $at_traceon; }
7052
7053
7054 # now check for duplicates
7055 { set +x
7056 $as_echo "$at_srcdir/inherited_flags.at:91: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la"
7057 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:91"
7058 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la
7059 ) >>"$at_stdout" 2>>"$at_stderr"
7060 at_status=$? at_failed=false
7061 $at_check_filter
7062 echo stderr:; cat "$at_stderr"
7063 echo stdout:; tee stdout <"$at_stdout"
7064 at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:91"
7065 $at_failed && at_fn_log_failure
7066 $at_traceon; }
7067
7068 { set +x
7069 $as_echo "$at_srcdir/inherited_flags.at:93: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
7070 at_fn_check_prepare_trace "inherited_flags.at:93"
7071 ( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout
7072 ) >>"$at_stdout" 2>>"$at_stderr"
7073 at_status=$? at_failed=false
7074 $at_check_filter
7075 echo stderr:; cat "$at_stderr"
7076 echo stdout:; cat "$at_stdout"
7077 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:93"
7078 $at_failed && at_fn_log_failure
7079 $at_traceon; }
7080
7081 { set +x
7082 $as_echo "$at_srcdir/inherited_flags.at:95: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
7083 at_fn_check_prepare_trace "inherited_flags.at:95"
7084 ( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout
7085 ) >>"$at_stdout" 2>>"$at_stderr"
7086 at_status=$? at_failed=false
7087 $at_check_filter
7088 echo stderr:; cat "$at_stderr"
7089 echo stdout:; cat "$at_stdout"
7090 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:95"
7091 $at_failed && at_fn_log_failure
7092 $at_traceon; }
7093
7094 { set +x
7095 $as_echo "$at_srcdir/inherited_flags.at:97: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la ./libboth.la"
7096 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:97"
7097 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent  ./libfoo.la ./libbar.la ./libboth.la
7098 ) >>"$at_stdout" 2>>"$at_stderr"
7099 at_status=$? at_failed=false
7100 $at_check_filter
7101 echo stderr:; cat "$at_stderr"
7102 echo stdout:; tee stdout <"$at_stdout"
7103 at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:97"
7104 $at_failed && at_fn_log_failure
7105 $at_traceon; }
7106
7107 { set +x
7108 $as_echo "$at_srcdir/inherited_flags.at:99: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout"
7109 at_fn_check_prepare_trace "inherited_flags.at:99"
7110 ( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout
7111 ) >>"$at_stdout" 2>>"$at_stderr"
7112 at_status=$? at_failed=false
7113 $at_check_filter
7114 echo stderr:; cat "$at_stderr"
7115 echo stdout:; cat "$at_stdout"
7116 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:99"
7117 $at_failed && at_fn_log_failure
7118 $at_traceon; }
7119
7120 { set +x
7121 $as_echo "$at_srcdir/inherited_flags.at:101: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout"
7122 at_fn_check_prepare_trace "inherited_flags.at:101"
7123 ( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout
7124 ) >>"$at_stdout" 2>>"$at_stderr"
7125 at_status=$? at_failed=false
7126 $at_check_filter
7127 echo stderr:; cat "$at_stderr"
7128 echo stdout:; cat "$at_stdout"
7129 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:101"
7130 $at_failed && at_fn_log_failure
7131 $at_traceon; }
7132
7133
7134 mv libboth.la libboth.la.bak
7135 sed "s/^inherited_linker_flags.*/inherited_linker_flags='-framework Cocoa -framework ApplicationServices'/" < libboth.la.bak > libboth.la
7136 rm libboth.la.bak
7137
7138 { set +x
7139 $as_echo "$at_srcdir/inherited_flags.at:108: \$LIBTOOL -n --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent"
7140 at_fn_check_prepare_dynamic "$LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" "inherited_flags.at:108"
7141 ( $at_check_trace; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent
7142 ) >>"$at_stdout" 2>>"$at_stderr"
7143 at_status=$? at_failed=false
7144 $at_check_filter
7145 echo stderr:; cat "$at_stderr"
7146 echo stdout:; tee stdout <"$at_stdout"
7147 at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:108"
7148 $at_failed && at_fn_log_failure
7149 $at_traceon; }
7150
7151 { set +x
7152 $as_echo "$at_srcdir/inherited_flags.at:110: grep Cocoa.ltframework stdout"
7153 at_fn_check_prepare_trace "inherited_flags.at:110"
7154 ( $at_check_trace; grep Cocoa.ltframework stdout
7155 ) >>"$at_stdout" 2>>"$at_stderr"
7156 at_status=$? at_failed=false
7157 $at_check_filter
7158 at_fn_diff_devnull "$at_stderr" || at_failed=:
7159 at_fn_diff_devnull "$at_stdout" || at_failed=:
7160 at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:110"
7161 $at_failed && at_fn_log_failure
7162 $at_traceon; }
7163
7164 { set +x
7165 $as_echo "$at_srcdir/inherited_flags.at:111: grep ' -framework Cocoa' stdout"
7166 at_fn_check_prepare_trace "inherited_flags.at:111"
7167 ( $at_check_trace; grep ' -framework Cocoa' stdout
7168 ) >>"$at_stdout" 2>>"$at_stderr"
7169 at_status=$? at_failed=false
7170 $at_check_filter
7171 at_fn_diff_devnull "$at_stderr" || at_failed=:
7172 echo stdout:; cat "$at_stdout"
7173 at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:111"
7174 $at_failed && at_fn_log_failure
7175 $at_traceon; }
7176
7177
7178   set +x
7179   $at_times_p && times >"$at_times_file"
7180 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7181 read at_status <"$at_status_file"
7182 #AT_STOP_32
7183 #AT_START_33
7184 at_fn_group_banner 33 'convenience.at:31' \
7185   "C convenience archives" "                         " 3
7186 at_xfail=no
7187 (
7188   $as_echo "33. $at_setup_line: testing $at_desc ..."
7189   $at_traceon
7190
7191
7192
7193 cat >main1.c <<EOF
7194 extern int a1(void);
7195 int main(void) { return a1() != 1; }
7196 EOF
7197 cat >main2.c <<EOF
7198 extern int a1(void), a2(void);
7199 int main(void) { return a1() + a2() != 3; }
7200 EOF
7201 cat >main3.c <<EOF
7202 extern int a1(void), a2(void), a3(void);
7203 int main(void) { return a1() + a2() + a3() != 6; }
7204 EOF
7205 for i in 1 2 3; do
7206   echo "int a$i(void) { return $i; }" > a$i.c
7207   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c
7208   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
7209   $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo
7210 done
7211 { set +x
7212 $as_echo "$at_srcdir/convenience.at:52: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
7213 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:52"
7214 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
7215 ) >>"$at_stdout" 2>>"$at_stderr"
7216 at_status=$? at_failed=false
7217 $at_check_filter
7218 echo stderr:; cat "$at_stderr"
7219 echo stdout:; cat "$at_stdout"
7220 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:52"
7221 $at_failed && at_fn_log_failure
7222 $at_traceon; }
7223
7224 { set +x
7225 $as_echo "$at_srcdir/convenience.at:54: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
7226 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:54"
7227 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
7228 ) >>"$at_stdout" 2>>"$at_stderr"
7229 at_status=$? at_failed=false
7230 $at_check_filter
7231 echo stderr:; cat "$at_stderr"
7232 echo stdout:; cat "$at_stdout"
7233 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:54"
7234 $at_failed && at_fn_log_failure
7235 $at_traceon; }
7236
7237
7238 conv=
7239 for i in 1 2 3; do
7240   conv=$conv$i
7241   { set +x
7242 $as_echo "$at_srcdir/convenience.at:60: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
7243 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:60"
7244 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
7245 ) >>"$at_stdout" 2>>"$at_stderr"
7246 at_status=$? at_failed=false
7247 $at_check_filter
7248 echo stderr:; cat "$at_stderr"
7249 echo stdout:; cat "$at_stdout"
7250 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:60"
7251 $at_failed && at_fn_log_failure
7252 $at_traceon; }
7253
7254   { set +x
7255 $as_echo "$at_srcdir/convenience.at:62: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
7256 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:62"
7257 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
7258 ) >>"$at_stdout" 2>>"$at_stderr"
7259 at_status=$? at_failed=false
7260 $at_check_filter
7261 echo stderr:; cat "$at_stderr"
7262 echo stdout:; cat "$at_stdout"
7263 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:62"
7264 $at_failed && at_fn_log_failure
7265 $at_traceon; }
7266
7267   lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7268 { set +x
7269 $as_echo "$at_srcdir/convenience.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7270 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:64"
7271 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7272 ) >>"$at_stdout" 2>>"$at_stderr"
7273 at_status=$? at_failed=false
7274 $at_check_filter
7275 at_fn_diff_devnull "$at_stderr" || at_failed=:
7276 at_fn_diff_devnull "$at_stdout" || at_failed=:
7277 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:64"
7278 $at_failed && at_fn_log_failure
7279 $at_traceon; }
7280
7281
7282   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7283 { set +x
7284 $as_echo "$at_srcdir/convenience.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7285 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:65"
7286 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7287 ) >>"$at_stdout" 2>>"$at_stderr"
7288 at_status=$? at_failed=false
7289 $at_check_filter
7290 at_fn_diff_devnull "$at_stderr" || at_failed=:
7291 at_fn_diff_devnull "$at_stdout" || at_failed=:
7292 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:65"
7293 $at_failed && at_fn_log_failure
7294 $at_traceon; }
7295
7296
7297 done
7298   set +x
7299   $at_times_p && times >"$at_times_file"
7300 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7301 read at_status <"$at_status_file"
7302 #AT_STOP_33
7303 #AT_START_34
7304 at_fn_group_banner 34 'convenience.at:70' \
7305   "C++ convenience archives" "                       " 3
7306 at_xfail=no
7307 (
7308   $as_echo "34. $at_setup_line: testing $at_desc ..."
7309   $at_traceon
7310
7311
7312 { set +x
7313 $as_echo "$at_srcdir/convenience.at:71: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
7314 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "convenience.at:71"
7315 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
7316 ) >>"$at_stdout" 2>>"$at_stderr"
7317 at_status=$? at_failed=false
7318 $at_check_filter
7319 at_fn_diff_devnull "$at_stderr" || at_failed=:
7320 at_fn_diff_devnull "$at_stdout" || at_failed=:
7321 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:71"
7322 $at_failed && at_fn_log_failure
7323 $at_traceon; }
7324
7325 { set +x
7326 $as_echo "$at_srcdir/convenience.at:71: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
7327 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "convenience.at:71"
7328 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
7329 ) >>"$at_stdout" 2>>"$at_stderr"
7330 at_status=$? at_failed=false
7331 $at_check_filter
7332 at_fn_diff_devnull "$at_stderr" || at_failed=:
7333 at_fn_diff_devnull "$at_stdout" || at_failed=:
7334 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:71"
7335 $at_failed && at_fn_log_failure
7336 $at_traceon; }
7337
7338
7339
7340
7341 cat >main1.cpp <<EOF
7342 extern int a1(void);
7343 int main(void) { return a1() != 1; }
7344 EOF
7345 cat >main2.cpp <<EOF
7346 extern int a1(void), a2(void);
7347 int main(void) { return a1() + a2() != 3; }
7348 EOF
7349 cat >main3.cpp <<EOF
7350 extern int a1(void), a2(void), a3(void);
7351 int main(void) { return a1() + a2() + a3() != 6; }
7352 EOF
7353 for i in 1 2 3; do
7354   echo "int a$i(void) { return $i; }" > a$i.cpp
7355   $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp
7356   $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp
7357   $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba$i.la a$i.lo
7358 done
7359 { set +x
7360 $as_echo "$at_srcdir/convenience.at:92: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
7361 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:92"
7362 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
7363 ) >>"$at_stdout" 2>>"$at_stderr"
7364 at_status=$? at_failed=false
7365 $at_check_filter
7366 echo stderr:; cat "$at_stderr"
7367 echo stdout:; cat "$at_stdout"
7368 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:92"
7369 $at_failed && at_fn_log_failure
7370 $at_traceon; }
7371
7372 { set +x
7373 $as_echo "$at_srcdir/convenience.at:94: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
7374 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:94"
7375 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
7376 ) >>"$at_stdout" 2>>"$at_stderr"
7377 at_status=$? at_failed=false
7378 $at_check_filter
7379 echo stderr:; cat "$at_stderr"
7380 echo stdout:; cat "$at_stdout"
7381 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:94"
7382 $at_failed && at_fn_log_failure
7383 $at_traceon; }
7384
7385
7386 conv=
7387 for i in 1 2 3; do
7388   conv=$conv$i
7389   { set +x
7390 $as_echo "$at_srcdir/convenience.at:100: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
7391 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:100"
7392 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
7393 ) >>"$at_stdout" 2>>"$at_stderr"
7394 at_status=$? at_failed=false
7395 $at_check_filter
7396 echo stderr:; cat "$at_stderr"
7397 echo stdout:; cat "$at_stdout"
7398 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:100"
7399 $at_failed && at_fn_log_failure
7400 $at_traceon; }
7401
7402   { set +x
7403 $as_echo "$at_srcdir/convenience.at:102: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
7404 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:102"
7405 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
7406 ) >>"$at_stdout" 2>>"$at_stderr"
7407 at_status=$? at_failed=false
7408 $at_check_filter
7409 echo stderr:; cat "$at_stderr"
7410 echo stdout:; cat "$at_stdout"
7411 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:102"
7412 $at_failed && at_fn_log_failure
7413 $at_traceon; }
7414
7415   lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7416 { set +x
7417 $as_echo "$at_srcdir/convenience.at:104: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7418 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:104"
7419 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7420 ) >>"$at_stdout" 2>>"$at_stderr"
7421 at_status=$? at_failed=false
7422 $at_check_filter
7423 at_fn_diff_devnull "$at_stderr" || at_failed=:
7424 at_fn_diff_devnull "$at_stdout" || at_failed=:
7425 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:104"
7426 $at_failed && at_fn_log_failure
7427 $at_traceon; }
7428
7429
7430   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7431 { set +x
7432 $as_echo "$at_srcdir/convenience.at:105: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7433 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:105"
7434 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7435 ) >>"$at_stdout" 2>>"$at_stderr"
7436 at_status=$? at_failed=false
7437 $at_check_filter
7438 at_fn_diff_devnull "$at_stderr" || at_failed=:
7439 at_fn_diff_devnull "$at_stdout" || at_failed=:
7440 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:105"
7441 $at_failed && at_fn_log_failure
7442 $at_traceon; }
7443
7444
7445 done
7446   set +x
7447   $at_times_p && times >"$at_times_file"
7448 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7449 read at_status <"$at_status_file"
7450 #AT_STOP_34
7451 #AT_START_35
7452 at_fn_group_banner 35 'convenience.at:110' \
7453   "F77 convenience archives" "                       " 3
7454 at_xfail=no
7455 (
7456   $as_echo "35. $at_setup_line: testing $at_desc ..."
7457   $at_traceon
7458
7459
7460 { set +x
7461 $as_echo "$at_srcdir/convenience.at:111: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
7462 at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "convenience.at:111"
7463 ( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
7464 ) >>"$at_stdout" 2>>"$at_stderr"
7465 at_status=$? at_failed=false
7466 $at_check_filter
7467 at_fn_diff_devnull "$at_stderr" || at_failed=:
7468 at_fn_diff_devnull "$at_stdout" || at_failed=:
7469 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:111"
7470 $at_failed && at_fn_log_failure
7471 $at_traceon; }
7472
7473
7474
7475
7476
7477 cat >main1.f <<EOF
7478       program main
7479       implicit none
7480       integer*4 res
7481       call a1(res)
7482       end
7483 EOF
7484 cat >main2.f <<EOF
7485       program main
7486       implicit none
7487       integer*4 res
7488       call a1(res)
7489       call a2(res)
7490       end
7491 EOF
7492 cat >main3.f <<EOF
7493       program main
7494       implicit none
7495       integer*4 res
7496       call a1(res)
7497       call a2(res)
7498       call a3(res)
7499       end
7500 EOF
7501
7502 for i in 1 2 3; do
7503   cat >a$i.f <<EOF
7504       subroutine a$i(res)
7505       implicit none
7506       integer*4 res
7507       res=$i
7508       return
7509       end
7510 EOF
7511   $LIBTOOL --tag=F77 --mode=compile $F77 $FFLAGS -c main$i.f
7512   $LIBTOOL --tag=F77 --mode=compile $F77 $FFLAGS -c a$i.f
7513   $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba$i.la a$i.lo
7514 done
7515 { set +x
7516 $as_echo "$at_srcdir/convenience.at:152: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
7517 at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:152"
7518 ( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
7519 ) >>"$at_stdout" 2>>"$at_stderr"
7520 at_status=$? at_failed=false
7521 $at_check_filter
7522 echo stderr:; cat "$at_stderr"
7523 echo stdout:; cat "$at_stdout"
7524 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:152"
7525 $at_failed && at_fn_log_failure
7526 $at_traceon; }
7527
7528 { set +x
7529 $as_echo "$at_srcdir/convenience.at:154: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
7530 at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:154"
7531 ( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
7532 ) >>"$at_stdout" 2>>"$at_stderr"
7533 at_status=$? at_failed=false
7534 $at_check_filter
7535 echo stderr:; cat "$at_stderr"
7536 echo stdout:; cat "$at_stdout"
7537 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:154"
7538 $at_failed && at_fn_log_failure
7539 $at_traceon; }
7540
7541
7542 conv=
7543 for i in 1 2 3; do
7544   conv=$conv$i
7545   { set +x
7546 $as_echo "$at_srcdir/convenience.at:160: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
7547 at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:160"
7548 ( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
7549 ) >>"$at_stdout" 2>>"$at_stderr"
7550 at_status=$? at_failed=false
7551 $at_check_filter
7552 echo stderr:; cat "$at_stderr"
7553 echo stdout:; cat "$at_stdout"
7554 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:160"
7555 $at_failed && at_fn_log_failure
7556 $at_traceon; }
7557
7558   { set +x
7559 $as_echo "$at_srcdir/convenience.at:162: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
7560 at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:162"
7561 ( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
7562 ) >>"$at_stdout" 2>>"$at_stderr"
7563 at_status=$? at_failed=false
7564 $at_check_filter
7565 echo stderr:; cat "$at_stderr"
7566 echo stdout:; cat "$at_stdout"
7567 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:162"
7568 $at_failed && at_fn_log_failure
7569 $at_traceon; }
7570
7571   lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7572 { set +x
7573 $as_echo "$at_srcdir/convenience.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7574 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:164"
7575 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7576 ) >>"$at_stdout" 2>>"$at_stderr"
7577 at_status=$? at_failed=false
7578 $at_check_filter
7579 at_fn_diff_devnull "$at_stderr" || at_failed=:
7580 at_fn_diff_devnull "$at_stdout" || at_failed=:
7581 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:164"
7582 $at_failed && at_fn_log_failure
7583 $at_traceon; }
7584
7585
7586   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7587 { set +x
7588 $as_echo "$at_srcdir/convenience.at:165: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7589 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:165"
7590 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7591 ) >>"$at_stdout" 2>>"$at_stderr"
7592 at_status=$? at_failed=false
7593 $at_check_filter
7594 at_fn_diff_devnull "$at_stderr" || at_failed=:
7595 at_fn_diff_devnull "$at_stdout" || at_failed=:
7596 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:165"
7597 $at_failed && at_fn_log_failure
7598 $at_traceon; }
7599
7600
7601 done
7602   set +x
7603   $at_times_p && times >"$at_times_file"
7604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7605 read at_status <"$at_status_file"
7606 #AT_STOP_35
7607 #AT_START_36
7608 at_fn_group_banner 36 'convenience.at:170' \
7609   "FC convenience archives" "                        " 3
7610 at_xfail=no
7611 (
7612   $as_echo "36. $at_setup_line: testing $at_desc ..."
7613   $at_traceon
7614
7615
7616 { set +x
7617 $as_echo "$at_srcdir/convenience.at:171: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
7618 at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "convenience.at:171"
7619 ( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
7620 ) >>"$at_stdout" 2>>"$at_stderr"
7621 at_status=$? at_failed=false
7622 $at_check_filter
7623 at_fn_diff_devnull "$at_stderr" || at_failed=:
7624 at_fn_diff_devnull "$at_stdout" || at_failed=:
7625 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:171"
7626 $at_failed && at_fn_log_failure
7627 $at_traceon; }
7628
7629
7630
7631
7632
7633 cat >main1.f <<EOF
7634       program main
7635       implicit none
7636       integer*4 res
7637       call a1(res)
7638       end
7639 EOF
7640 cat >main2.f <<EOF
7641       program main
7642       implicit none
7643       integer*4 res
7644       call a1(res)
7645       call a2(res)
7646       end
7647 EOF
7648 cat >main3.f <<EOF
7649       program main
7650       implicit none
7651       integer*4 res
7652       call a1(res)
7653       call a2(res)
7654       call a3(res)
7655       end
7656 EOF
7657
7658 for i in 1 2 3; do
7659   cat >a$i.f <<EOF
7660       subroutine a$i(res)
7661       implicit none
7662       integer*4 res
7663       res=$i
7664       return
7665       end
7666 EOF
7667   $LIBTOOL --tag=FC --mode=compile $FC $FCFLAGS -c main$i.f
7668   $LIBTOOL --tag=FC --mode=compile $FC $FCFLAGS -c a$i.f
7669   $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba$i.la a$i.lo
7670 done
7671 { set +x
7672 $as_echo "$at_srcdir/convenience.at:212: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
7673 at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:212"
7674 ( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
7675 ) >>"$at_stdout" 2>>"$at_stderr"
7676 at_status=$? at_failed=false
7677 $at_check_filter
7678 echo stderr:; cat "$at_stderr"
7679 echo stdout:; cat "$at_stdout"
7680 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:212"
7681 $at_failed && at_fn_log_failure
7682 $at_traceon; }
7683
7684 { set +x
7685 $as_echo "$at_srcdir/convenience.at:214: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist"
7686 at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:214"
7687 ( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist
7688 ) >>"$at_stdout" 2>>"$at_stderr"
7689 at_status=$? at_failed=false
7690 $at_check_filter
7691 echo stderr:; cat "$at_stderr"
7692 echo stdout:; cat "$at_stdout"
7693 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:214"
7694 $at_failed && at_fn_log_failure
7695 $at_traceon; }
7696
7697
7698 conv=
7699 for i in 1 2 3; do
7700   conv=$conv$i
7701   { set +x
7702 $as_echo "$at_srcdir/convenience.at:220: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la"
7703 at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:220"
7704 ( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la
7705 ) >>"$at_stdout" 2>>"$at_stderr"
7706 at_status=$? at_failed=false
7707 $at_check_filter
7708 echo stderr:; cat "$at_stderr"
7709 echo stdout:; cat "$at_stdout"
7710 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:220"
7711 $at_failed && at_fn_log_failure
7712 $at_traceon; }
7713
7714   { set +x
7715 $as_echo "$at_srcdir/convenience.at:222: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la"
7716 at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:222"
7717 ( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la
7718 ) >>"$at_stdout" 2>>"$at_stderr"
7719 at_status=$? at_failed=false
7720 $at_check_filter
7721 echo stderr:; cat "$at_stderr"
7722 echo stdout:; cat "$at_stdout"
7723 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:222"
7724 $at_failed && at_fn_log_failure
7725 $at_traceon; }
7726
7727   lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7728 { set +x
7729 $as_echo "$at_srcdir/convenience.at:224: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7730 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:224"
7731 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7732 ) >>"$at_stdout" 2>>"$at_stderr"
7733 at_status=$? at_failed=false
7734 $at_check_filter
7735 at_fn_diff_devnull "$at_stderr" || at_failed=:
7736 at_fn_diff_devnull "$at_stdout" || at_failed=:
7737 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:224"
7738 $at_failed && at_fn_log_failure
7739 $at_traceon; }
7740
7741
7742   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7743 { set +x
7744 $as_echo "$at_srcdir/convenience.at:225: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7745 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:225"
7746 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7747 ) >>"$at_stdout" 2>>"$at_stderr"
7748 at_status=$? at_failed=false
7749 $at_check_filter
7750 at_fn_diff_devnull "$at_stderr" || at_failed=:
7751 at_fn_diff_devnull "$at_stdout" || at_failed=:
7752 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:225"
7753 $at_failed && at_fn_log_failure
7754 $at_traceon; }
7755
7756
7757 done
7758   set +x
7759   $at_times_p && times >"$at_times_file"
7760 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7761 read at_status <"$at_status_file"
7762 #AT_STOP_36
7763 #AT_START_37
7764 at_fn_group_banner 37 'convenience.at:230' \
7765   "Java convenience archives" "                      " 3
7766 at_xfail=no
7767 (
7768   $as_echo "37. $at_setup_line: testing $at_desc ..."
7769   $at_traceon
7770
7771
7772 { set +x
7773 $as_echo "$at_srcdir/convenience.at:231: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
7774 at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "convenience.at:231"
7775 ( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
7776 ) >>"$at_stdout" 2>>"$at_stderr"
7777 at_status=$? at_failed=false
7778 $at_check_filter
7779 at_fn_diff_devnull "$at_stderr" || at_failed=:
7780 at_fn_diff_devnull "$at_stdout" || at_failed=:
7781 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231"
7782 $at_failed && at_fn_log_failure
7783 $at_traceon; }
7784
7785 # There are just too many broken gcj installations out there, either missing
7786    # libgcj.spec or unable to find it.  Skip the test for them.
7787    cat >gcj_test.java <<'_ATEOF'
7788 public class gcj_test {
7789     public static void main(String[] argv) { }
7790   }
7791 _ATEOF
7792
7793    { set +x
7794 $as_echo "$at_srcdir/convenience.at:231: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77"
7795 at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "convenience.at:231"
7796 ( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77
7797 ) >>"$at_stdout" 2>>"$at_stderr"
7798 at_status=$? at_failed=false
7799 $at_check_filter
7800 echo stderr:; cat "$at_stderr"
7801 echo stdout:; cat "$at_stdout"
7802 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231"
7803 $at_failed && at_fn_log_failure
7804 $at_traceon; }
7805
7806
7807 { set +x
7808 $as_echo "$at_srcdir/convenience.at:231: \$GCJ \$GCJFLAGS --main=gcj_test -o gcj_test\$EXEEXT gcj_test.java         || exit 77"
7809 at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java        || exit 77" "convenience.at:231"
7810 ( $at_check_trace; $GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java          || exit 77
7811 ) >>"$at_stdout" 2>>"$at_stderr"
7812 at_status=$? at_failed=false
7813 $at_check_filter
7814 echo stderr:; cat "$at_stderr"
7815 echo stdout:; cat "$at_stdout"
7816 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231"
7817 $at_failed && at_fn_log_failure
7818 $at_traceon; }
7819
7820    { set +x
7821 $as_echo "$at_srcdir/convenience.at:231: ./gcj_test\$EXEEXT || exit 77"
7822 at_fn_check_prepare_dynamic "./gcj_test$EXEEXT || exit 77" "convenience.at:231"
7823 ( $at_check_trace; ./gcj_test$EXEEXT || exit 77
7824 ) >>"$at_stdout" 2>>"$at_stderr"
7825 at_status=$? at_failed=false
7826 $at_check_filter
7827 echo stderr:; cat "$at_stderr"
7828 echo stdout:; cat "$at_stdout"
7829 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231"
7830 $at_failed && at_fn_log_failure
7831 $at_traceon; }
7832
7833
7834
7835
7836 cat >foo1.java <<EOF
7837 public class foo1 {
7838   public static void main(String[] argv) {
7839     A1 a1 = new A1();
7840   }
7841 }
7842 EOF
7843 cat >foo2.java <<EOF
7844 public class foo2 {
7845   public static void main(String[] argv) {
7846     A1 a1 = new A1(); A2 a2 = new A2();
7847   }
7848 }
7849 EOF
7850 cat >foo3.java <<EOF
7851 public class foo3 {
7852   public static void main(String[] argv) {
7853     A1 a1 = new A1(); A2 a2 = new A2(); A3 a3 = new A3();
7854   }
7855 }
7856 EOF
7857 for i in 1 2 3; do
7858   cat >A$i.java <<EOF
7859 public class A$i {
7860   private int a;
7861   public A$i () { a = 0; }
7862 };
7863 EOF
7864
7865   $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java
7866   $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java
7867   $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo
7868 done
7869 { set +x
7870 $as_echo "$at_srcdir/convenience.at:267: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist"
7871 at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:267"
7872 ( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist
7873 ) >>"$at_stdout" 2>>"$at_stderr"
7874 at_status=$? at_failed=false
7875 $at_check_filter
7876 echo stderr:; cat "$at_stderr"
7877 echo stdout:; cat "$at_stdout"
7878 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:267"
7879 $at_failed && at_fn_log_failure
7880 $at_traceon; }
7881
7882 { set +x
7883 $as_echo "$at_srcdir/convenience.at:269: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist"
7884 at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:269"
7885 ( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist
7886 ) >>"$at_stdout" 2>>"$at_stderr"
7887 at_status=$? at_failed=false
7888 $at_check_filter
7889 echo stderr:; cat "$at_stderr"
7890 echo stdout:; cat "$at_stdout"
7891 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:269"
7892 $at_failed && at_fn_log_failure
7893 $at_traceon; }
7894
7895
7896 conv=
7897 for i in 1 2 3; do
7898   conv=$conv$i
7899   { set +x
7900 $as_echo "$at_srcdir/convenience.at:275: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -static --main=foo\$i -o main_static\$EXEEXT foo\$i.lo liba\$conv.la"
7901 at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la" "convenience.at:275"
7902 ( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la
7903 ) >>"$at_stdout" 2>>"$at_stderr"
7904 at_status=$? at_failed=false
7905 $at_check_filter
7906 echo stderr:; cat "$at_stderr"
7907 echo stdout:; cat "$at_stdout"
7908 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:275"
7909 $at_failed && at_fn_log_failure
7910 $at_traceon; }
7911
7912   { set +x
7913 $as_echo "$at_srcdir/convenience.at:277: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS --main=foo\$i -o main\$EXEEXT foo\$i.lo liba\$conv.la"
7914 at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la" "convenience.at:277"
7915 ( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la
7916 ) >>"$at_stdout" 2>>"$at_stderr"
7917 at_status=$? at_failed=false
7918 $at_check_filter
7919 echo stderr:; cat "$at_stderr"
7920 echo stdout:; cat "$at_stdout"
7921 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:277"
7922 $at_failed && at_fn_log_failure
7923 $at_traceon; }
7924
7925   lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7926 { set +x
7927 $as_echo "$at_srcdir/convenience.at:279: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7928 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:279"
7929 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7930 ) >>"$at_stdout" 2>>"$at_stderr"
7931 at_status=$? at_failed=false
7932 $at_check_filter
7933 at_fn_diff_devnull "$at_stderr" || at_failed=:
7934 at_fn_diff_devnull "$at_stdout" || at_failed=:
7935 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:279"
7936 $at_failed && at_fn_log_failure
7937 $at_traceon; }
7938
7939
7940   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
7941 { set +x
7942 $as_echo "$at_srcdir/convenience.at:280: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
7943 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "convenience.at:280"
7944 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
7945 ) >>"$at_stdout" 2>>"$at_stderr"
7946 at_status=$? at_failed=false
7947 $at_check_filter
7948 at_fn_diff_devnull "$at_stderr" || at_failed=:
7949 at_fn_diff_devnull "$at_stdout" || at_failed=:
7950 at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:280"
7951 $at_failed && at_fn_log_failure
7952 $at_traceon; }
7953
7954
7955 done
7956   set +x
7957   $at_times_p && times >"$at_times_file"
7958 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7959 read at_status <"$at_status_file"
7960 #AT_STOP_37
7961 #AT_START_38
7962 at_fn_group_banner 38 'link-order.at:26' \
7963   "Link order test" "                                " 3
7964 at_xfail=no
7965 (
7966   $as_echo "38. $at_setup_line: testing $at_desc ..."
7967   $at_traceon
7968
7969
7970 eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_absolute|shrext_cmds)='`
7971 LDFLAGS="$LDFLAGS -no-undefined"
7972
7973 module=no
7974 eval shared_ext=\"$shrext_cmds\"
7975
7976 prefix_old=`pwd`/old
7977 prefix_new=`pwd`/new
7978 mkdir src $prefix_old $prefix_new $prefix_old/lib $prefix_new/lib
7979
7980 cat >src/c.c <<'_ATEOF'
7981 int c = 1;
7982 _ATEOF
7983
7984
7985 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/c.c -o src/c.lo
7986 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libcee.la src/c.lo -rpath $prefix_old/lib
7987 $LIBTOOL --mode=install cp src/libcee.la $prefix_old/lib/libcee.la
7988
7989 for i in old new; do
7990   rm -rf src
7991   mkdir src
7992
7993   cat >src/a_$i.c <<EOF
7994 /* w32 fun, MSVC needs to dllimport when using a shared library, so use
7995  * DLL_EXPORT to discriminate as that happens to coinside in this case.
7996  * gnu has auto import.
7997  */
7998 #if defined _MSC_VER && defined DLL_EXPORT
7999 #  define LIBCEE_SCOPE __declspec(dllimport)
8000 #else
8001 #  define LIBCEE_SCOPE extern
8002 #endif
8003 LIBCEE_SCOPE int c;
8004 extern int b_$i();
8005 int a_$i() { return c + b_$i(); }
8006 EOF
8007
8008   cat >src/b_$i.c <<EOF
8009 /* w32 fun, MSVC needs to dllimport when using a shared library, so use
8010  * DLL_EXPORT to discriminate as that happens to coinside in this case.
8011  * gnu has auto import.
8012  */
8013 #if defined _MSC_VER && defined DLL_EXPORT
8014 #  define LIBCEE_SCOPE __declspec(dllimport)
8015 #else
8016 #  define LIBCEE_SCOPE extern
8017 #endif
8018 LIBCEE_SCOPE int c;
8019 int b_$i() { return 1 + c; }
8020 EOF
8021
8022   prefix=`eval echo \\$prefix_$i`
8023   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/a_$i.c -o src/a.lo
8024   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/b_$i.c -o src/b.lo
8025   $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libb.la src/b.lo \
8026       -L$prefix_old/lib -lcee -rpath $prefix/lib
8027   $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/liba.la src/a.lo \
8028       src/libb.la -L$prefix_old/lib -lcee -rpath $prefix/lib
8029   $LIBTOOL --mode=install cp src/libb.la $prefix/lib/libb.la
8030   { set +x
8031 $as_echo "$at_srcdir/link-order.at:87: \$LIBTOOL --mode=install cp src/liba.la \$prefix/lib/liba.la"
8032 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la" "link-order.at:87"
8033 ( $at_check_trace; $LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la
8034 ) >>"$at_stdout" 2>>"$at_stderr"
8035 at_status=$? at_failed=false
8036 $at_check_filter
8037 echo stderr:; tee stderr <"$at_stderr"
8038 echo stdout:; tee stdout <"$at_stdout"
8039 at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:87"
8040 $at_failed && at_fn_log_failure
8041 $at_traceon; }
8042
8043 done
8044
8045 $LIBTOOL --mode=clean rm -f src/libb.la
8046 $LIBTOOL --mode=clean rm -f src/liba.la
8047
8048 case $host_os in
8049 aix* | interix*) ;;  # These systems have different path syntax
8050 *)
8051   # Do not error if we do not relink (e.g. static-only systems)
8052   case $hardcode_direct$hardcode_direct_absolute in
8053   yesno)
8054     { set +x
8055 $as_echo "$at_srcdir/link-order.at:100: if \$EGREP relinking stderr; then
8056          \$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout
8057        else :; fi"
8058 at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:100"
8059 ( $at_check_trace; if $EGREP relinking stderr; then
8060          $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
8061        else :; fi
8062 ) >>"$at_stdout" 2>>"$at_stderr"
8063 at_status=$? at_failed=false
8064 $at_check_filter
8065 at_fn_diff_devnull "$at_stderr" || at_failed=:
8066 echo stdout:; cat "$at_stdout"
8067 at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:100"
8068 if $at_failed; then :
8069   echo "wrong link order"
8070 fi
8071 $at_failed && at_fn_log_failure
8072 $at_traceon; }
8073
8074     ;;
8075   *)
8076     { set +x
8077 $as_echo "$at_srcdir/link-order.at:105: if \$EGREP relinking stderr; then
8078          \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout
8079        else :; fi"
8080 at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:105"
8081 ( $at_check_trace; if $EGREP relinking stderr; then
8082          $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
8083        else :; fi
8084 ) >>"$at_stdout" 2>>"$at_stderr"
8085 at_status=$? at_failed=false
8086 $at_check_filter
8087 at_fn_diff_devnull "$at_stderr" || at_failed=:
8088 echo stdout:; cat "$at_stdout"
8089 at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:105"
8090 if $at_failed; then :
8091   echo "wrong link order"
8092 fi
8093 $at_failed && at_fn_log_failure
8094 $at_traceon; }
8095
8096     ;;
8097   esac
8098   ;;
8099 esac
8100
8101 for i in old new; do
8102   cat >src/main_$i.c <<EOF
8103 extern int a_$i();
8104 int main(void) { return a_$i() != 3; }
8105 EOF
8106
8107   prefix=`eval echo \\$prefix_$i`
8108   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/main_$i.c -o src/main_$i.lo
8109   { set +x
8110 $as_echo "$at_srcdir/link-order.at:121: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/main_\$i\$EXEEXT src/main_\$i.lo -L\$prefix/lib -la"
8111 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la" "link-order.at:121"
8112 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la
8113 ) >>"$at_stdout" 2>>"$at_stderr"
8114 at_status=$? at_failed=false
8115 $at_check_filter
8116 echo stderr:; cat "$at_stderr"
8117 echo stdout:; cat "$at_stdout"
8118 at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:121"
8119 $at_failed && at_fn_log_failure
8120 $at_traceon; }
8121
8122   lt_exe=src/main_$i; if test -f "src/main_$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8123 { set +x
8124 $as_echo "$at_srcdir/link-order.at:123: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8125 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "link-order.at:123"
8126 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8127 ) >>"$at_stdout" 2>>"$at_stderr"
8128 at_status=$? at_failed=false
8129 $at_check_filter
8130 at_fn_diff_devnull "$at_stderr" || at_failed=:
8131 at_fn_diff_devnull "$at_stdout" || at_failed=:
8132 at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:123"
8133 $at_failed && at_fn_log_failure
8134 $at_traceon; }
8135
8136
8137 done
8138
8139   set +x
8140   $at_times_p && times >"$at_times_file"
8141 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8142 read at_status <"$at_status_file"
8143 #AT_STOP_38
8144 #AT_START_39
8145 at_fn_group_banner 39 'link-order2.at:46' \
8146   "Link order of deplibs" "                          " 3
8147 at_xfail=no
8148 (
8149   $as_echo "39. $at_setup_line: testing $at_desc ..."
8150   $at_traceon
8151
8152
8153
8154 eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
8155
8156 undefined_setting=-no-undefined
8157 shared_fails=no
8158 case $host_os,$LDFLAGS,$allow_undefined_flag in
8159 aix*,*-brtl*,*) ;;
8160 aix*) shared_fails=yes ;;
8161 darwin*,*,*-flat_namespace*) undefined_setting= ;;
8162 darwin*,*,*) shared_fails=yes ;;
8163 esac
8164
8165 deflibdir=`pwd`/lib
8166 defbindir=`pwd`/lib
8167 libdir=`pwd`/inst/lib
8168 bindir=`pwd`/inst/bin
8169 mkdir bin lib inst inst/bin inst/lib
8170 LDFLAGS="$LDFLAGS $undefined_setting -L$deflibdir"
8171
8172 cat >a0.c <<\EOF
8173 int a (void) { return 1; }
8174 EOF
8175
8176 cat >a1.c <<\EOF
8177 int a (void) { return 0; }
8178 EOF
8179
8180 cat >b.c <<\EOF
8181 int a (void);
8182 int b (void) { return a (); }
8183 EOF
8184
8185 cat >main.c <<\EOF
8186 #include <stdlib.h>
8187 extern int a (void);
8188 extern int b (void);
8189 int main (void)
8190 {
8191   return !(a () + b () == 0);
8192 }
8193 EOF
8194
8195 for file in a0 a1 b; do
8196   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
8197 done
8198 $CC $CPPFLAGS $CFLAGS -c main.c
8199
8200 # Build an old, installed library.
8201 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
8202 $LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la
8203 $LIBTOOL --mode=clean rm -f liba0.la
8204
8205 for type_of_depdepl in libtool non-libtool; do
8206   echo "type of depdepl: $type_of_depdepl"
8207   if test $type_of_depdepl = non-libtool; then
8208     # Simulate a non-Libtool system library.
8209     rm $deflibdir/liba1.la
8210     addpath=$deflibdir
8211     if test "$shlibpath_var" = PATH; then
8212       addpath=$defbindir
8213     fi
8214     sep=
8215     eval test -n \"\$$shlibpath_var\" && sep=:
8216     eval $shlibpath_var='$addpath$sep$'$shlibpath_var
8217     export $shlibpath_var
8218   fi
8219   for static in '' -static-libtool-libs; do
8220     case `$LIBTOOL --features` in
8221     *disable\ static\ libraries*) test "$static" = '' || continue;;
8222     esac
8223     test "$type_of_depdepl,$static" = "non-libtool,-static-libtool-libs" &&
8224        static=-all-static
8225     $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
8226     $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
8227     { set +x
8228 $as_echo "$at_srcdir/link-order2.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o main\$EXEEXT main.\$OBJEXT libb.la -la0"
8229 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0" "link-order2.at:123"
8230 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0
8231 ) >>"$at_stdout" 2>>"$at_stderr"
8232 at_status=$? at_failed=false
8233 $at_check_filter
8234 echo stderr:; cat "$at_stderr"
8235 echo stdout:; cat "$at_stdout"
8236 at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:123"
8237 $at_failed && at_fn_log_failure
8238 $at_traceon; }
8239
8240     lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8241 { set +x
8242 $as_echo "$at_srcdir/link-order2.at:125: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8243 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "link-order2.at:125"
8244 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8245 ) >>"$at_stdout" 2>>"$at_stderr"
8246 at_status=$? at_failed=false
8247 $at_check_filter
8248 at_fn_diff_devnull "$at_stderr" || at_failed=:
8249 at_fn_diff_devnull "$at_stdout" || at_failed=:
8250 at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:125"
8251 $at_failed && at_fn_log_failure
8252 $at_traceon; }
8253
8254
8255     # Now test that if we reverse the link order, the program fails.
8256     { set +x
8257 $as_echo "$at_srcdir/link-order2.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o wrong\$EXEEXT main.\$OBJEXT -la0 libb.la"
8258 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la" "link-order2.at:127"
8259 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la
8260 ) >>"$at_stdout" 2>>"$at_stderr"
8261 at_status=$? at_failed=false
8262 $at_check_filter
8263 echo stderr:; cat "$at_stderr"
8264 echo stdout:; cat "$at_stdout"
8265 at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:127"
8266 $at_failed && at_fn_log_failure
8267 $at_traceon; }
8268
8269     if test $shared_fails,$static != yes,; then
8270       lt_exe=./wrong; if test -f "./wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8271 { set +x
8272 $as_echo "$at_srcdir/link-order2.at:130: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?;          test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8273 at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?;        test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "link-order2.at:130"
8274 ( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?;            test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8275 ) >>"$at_stdout" 2>>"$at_stderr"
8276 at_status=$? at_failed=false
8277 $at_check_filter
8278 echo stderr:; cat "$at_stderr"
8279 at_fn_diff_devnull "$at_stdout" || at_failed=:
8280 at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:130"
8281 $at_failed && at_fn_log_failure
8282 $at_traceon; }
8283
8284
8285     fi
8286
8287     $LIBTOOL --mode=install cp liba1.la $libdir/liba1.la
8288     $LIBTOOL --mode=install cp libb.la $libdir/libb.la
8289     $LIBTOOL --mode=install cp main$EXEEXT $bindir/main$EXEEXT
8290     $LIBTOOL --mode=install cp wrong$EXEEXT $bindir/wrong$EXEEXT
8291     $LIBTOOL --mode=clean rm -f liba1.la libb.la
8292     lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8293 { set +x
8294 $as_echo "$at_srcdir/link-order2.at:138: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8295 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "link-order2.at:138"
8296 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8297 ) >>"$at_stdout" 2>>"$at_stderr"
8298 at_status=$? at_failed=false
8299 $at_check_filter
8300 at_fn_diff_devnull "$at_stderr" || at_failed=:
8301 at_fn_diff_devnull "$at_stdout" || at_failed=:
8302 at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:138"
8303 $at_failed && at_fn_log_failure
8304 $at_traceon; }
8305
8306
8307     if test $shared_fails,$static != yes,; then
8308       lt_exe=$bindir/wrong; if test -f "$bindir/wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8309 { set +x
8310 $as_echo "$at_srcdir/link-order2.at:140: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?;          test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8311 at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?;        test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "link-order2.at:140"
8312 ( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?;            test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8313 ) >>"$at_stdout" 2>>"$at_stderr"
8314 at_status=$? at_failed=false
8315 $at_check_filter
8316 echo stderr:; cat "$at_stderr"
8317 at_fn_diff_devnull "$at_stdout" || at_failed=:
8318 at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:140"
8319 $at_failed && at_fn_log_failure
8320 $at_traceon; }
8321
8322
8323     fi
8324   done
8325 done
8326
8327 { set +x
8328 $as_echo "$at_srcdir/link-order2.at:145: test \$shared_fails = no || (exit 77)"
8329 at_fn_check_prepare_dynamic "test $shared_fails = no || (exit 77)" "link-order2.at:145"
8330 ( $at_check_trace; test $shared_fails = no || (exit 77)
8331 ) >>"$at_stdout" 2>>"$at_stderr"
8332 at_status=$? at_failed=false
8333 $at_check_filter
8334 at_fn_diff_devnull "$at_stderr" || at_failed=:
8335 at_fn_diff_devnull "$at_stdout" || at_failed=:
8336 at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:145"
8337 $at_failed && at_fn_log_failure
8338 $at_traceon; }
8339
8340
8341 # Now the converse: if both the program and the library need libm, then
8342 # it needs to be sorted last.  (TODO)
8343
8344   set +x
8345   $at_times_p && times >"$at_times_file"
8346 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8347 read at_status <"$at_status_file"
8348 #AT_STOP_39
8349 #AT_START_40
8350 at_fn_group_banner 40 'fail.at:27' \
8351   "Failure tests" "                                  " 3
8352 at_xfail=no
8353 (
8354   $as_echo "40. $at_setup_line: testing $at_desc ..."
8355   $at_traceon
8356
8357
8358 eval `$LIBTOOL --config | $EGREP '^(pic_mode|pic_flag|build_old_libs|build_libtool_libs)='`
8359 LDFLAGS="$LDFLAGS -no-undefined"
8360
8361
8362
8363 cat >script <<'_ATEOF'
8364 #! /bin/sh
8365 exit 0
8366 _ATEOF
8367
8368 chmod +x script
8369 if test -x script >/dev/null 2>&1; then
8370   test_x="test -x"
8371 else
8372   test_x=:
8373 fi
8374
8375 # compile failure
8376 echo 'choke me' > a.c
8377 { set +x
8378 $as_echo "$at_srcdir/fail.at:49: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c; then (exit 1); else :; fi"
8379 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi" "fail.at:49"
8380 ( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi
8381 ) >>"$at_stdout" 2>>"$at_stderr"
8382 at_status=$? at_failed=false
8383 $at_check_filter
8384 echo stderr:; cat "$at_stderr"
8385 echo stdout:; cat "$at_stdout"
8386 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:49"
8387 $at_failed && at_fn_log_failure
8388 $at_traceon; }
8389
8390
8391 { set +x
8392 $as_echo "$at_srcdir/fail.at:50: test -f a.lo"
8393 at_fn_check_prepare_trace "fail.at:50"
8394 ( $at_check_trace; test -f a.lo
8395 ) >>"$at_stdout" 2>>"$at_stderr"
8396 at_status=$? at_failed=false
8397 $at_check_filter
8398 at_fn_diff_devnull "$at_stderr" || at_failed=:
8399 at_fn_diff_devnull "$at_stdout" || at_failed=:
8400 at_fn_check_status 1 $at_status "$at_srcdir/fail.at:50"
8401 $at_failed && at_fn_log_failure
8402 $at_traceon; }
8403
8404
8405 # non-PIC compile failure
8406 case $pic_mode in default | no)
8407   case " $CFLAGS " in
8408    *\ -prefer-pic\ *) ;;
8409    *)
8410     case $build_old_libs,$pic_flag in yes,*-DPIC*)
8411       cat >a.c <<'_ATEOF'
8412
8413 #ifndef PIC
8414   choke me
8415 #endif
8416 _ATEOF
8417
8418       { set +x
8419 $as_echo "$at_srcdir/fail.at:63: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi"
8420 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" "fail.at:63"
8421 ( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi
8422 ) >>"$at_stdout" 2>>"$at_stderr"
8423 at_status=$? at_failed=false
8424 $at_check_filter
8425 echo stderr:; cat "$at_stderr"
8426 echo stdout:; cat "$at_stdout"
8427 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:63"
8428 $at_failed && at_fn_log_failure
8429 $at_traceon; }
8430
8431
8432       { set +x
8433 $as_echo "$at_srcdir/fail.at:64: test -f a.lo"
8434 at_fn_check_prepare_trace "fail.at:64"
8435 ( $at_check_trace; test -f a.lo
8436 ) >>"$at_stdout" 2>>"$at_stderr"
8437 at_status=$? at_failed=false
8438 $at_check_filter
8439 at_fn_diff_devnull "$at_stderr" || at_failed=:
8440 at_fn_diff_devnull "$at_stdout" || at_failed=:
8441 at_fn_check_status 1 $at_status "$at_srcdir/fail.at:64"
8442 $at_failed && at_fn_log_failure
8443 $at_traceon; }
8444
8445       ;;
8446     esac
8447     ;;
8448   esac
8449   ;;
8450 esac
8451
8452 # program creation failure.
8453 # We can't rely on `main' not being present: the QNX linker
8454 # won't error out in that case, although the resulting binary won't work.
8455 # So we provoke a link failure due to an unresolved symbol, and require
8456 # libtool to fail only if the link without libtool would have failed, too.
8457 cat > a.c <<'EOF'
8458 extern int nonexistent_function (void);
8459 int main (void)
8460 {
8461   return nonexistent_function ();
8462 }
8463 EOF
8464 $CC $CPPFLAGS $CFLAGS -c a.c
8465 if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else
8466   rm -f a a$EXEEXT
8467   { set +x
8468 $as_echo "$at_srcdir/fail.at:87: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT; then (exit 1); else :; fi"
8469 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi" "fail.at:87"
8470 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi
8471 ) >>"$at_stdout" 2>>"$at_stderr"
8472 at_status=$? at_failed=false
8473 $at_check_filter
8474 echo stderr:; cat "$at_stderr"
8475 echo stdout:; cat "$at_stdout"
8476 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:87"
8477 $at_failed && at_fn_log_failure
8478 $at_traceon; }
8479
8480
8481   { set +x
8482 $as_echo "$at_srcdir/fail.at:88: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
8483 at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:88"
8484 ( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }
8485 ) >>"$at_stdout" 2>>"$at_stderr"
8486 at_status=$? at_failed=false
8487 $at_check_filter
8488 at_fn_diff_devnull "$at_stderr" || at_failed=:
8489 at_fn_diff_devnull "$at_stdout" || at_failed=:
8490 at_fn_check_status 1 $at_status "$at_srcdir/fail.at:88"
8491 $at_failed && at_fn_log_failure
8492 $at_traceon; }
8493
8494   { set +x
8495 $as_echo "$at_srcdir/fail.at:89: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT -static; then (exit 1); else :; fi"
8496 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi" "fail.at:89"
8497 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi
8498 ) >>"$at_stdout" 2>>"$at_stderr"
8499 at_status=$? at_failed=false
8500 $at_check_filter
8501 echo stderr:; cat "$at_stderr"
8502 echo stdout:; cat "$at_stdout"
8503 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:89"
8504 $at_failed && at_fn_log_failure
8505 $at_traceon; }
8506
8507
8508   { set +x
8509 $as_echo "$at_srcdir/fail.at:90: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }"
8510 at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:90"
8511 ( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }
8512 ) >>"$at_stdout" 2>>"$at_stderr"
8513 at_status=$? at_failed=false
8514 $at_check_filter
8515 at_fn_diff_devnull "$at_stderr" || at_failed=:
8516 at_fn_diff_devnull "$at_stdout" || at_failed=:
8517 at_fn_check_status 1 $at_status "$at_srcdir/fail.at:90"
8518 $at_failed && at_fn_log_failure
8519 $at_traceon; }
8520
8521 fi
8522
8523 # shared library creation failure
8524 case $build_libtool_libs in yes)
8525   echo 'int duplicate_name(void) { return 0; }' > a.c
8526   echo 'double duplicate_name(double x) { return 2.*x; }' > b.c
8527   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
8528   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c
8529   # Unfortunately, this may actually succeed on AIX and IRIX  :(
8530   # So, also add a bogus object file to provoke more failure.
8531   echo 'int whatever(void) { return 0;}' > c.c
8532   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c
8533   (
8534     . ./c.lo
8535     test "$pic_object" != none && echo choke me >"$pic_object"
8536     test "$non_pic_object" != none && echo choke me >"$non_pic_object"
8537   )
8538   { set +x
8539 $as_echo "$at_srcdir/fail.at:108: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi"
8540 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" "fail.at:108"
8541 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi
8542 ) >>"$at_stdout" 2>>"$at_stderr"
8543 at_status=$? at_failed=false
8544 $at_check_filter
8545 echo stderr:; cat "$at_stderr"
8546 echo stdout:; cat "$at_stdout"
8547 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:108"
8548 $at_failed && at_fn_log_failure
8549 $at_traceon; }
8550
8551
8552   { set +x
8553 $as_echo "$at_srcdir/fail.at:109: test -f liba.la"
8554 at_fn_check_prepare_trace "fail.at:109"
8555 ( $at_check_trace; test -f liba.la
8556 ) >>"$at_stdout" 2>>"$at_stderr"
8557 at_status=$? at_failed=false
8558 $at_check_filter
8559 at_fn_diff_devnull "$at_stderr" || at_failed=:
8560 at_fn_diff_devnull "$at_stdout" || at_failed=:
8561 at_fn_check_status 1 $at_status "$at_srcdir/fail.at:109"
8562 $at_failed && at_fn_log_failure
8563 $at_traceon; }
8564
8565   ;;
8566 esac
8567
8568 # Ensure we diagnose '-L path'.
8569 echo 'int main () { return 0; }' > d.c
8570 echo 'int foo () { return 0; }' > space-after-L.c
8571 $CC $CPPFLAGS $CFLAGS -c d.c
8572 $CC $CPPFLAGS $CFLAGS -c space-after-L.c
8573 { set +x
8574 $as_echo "$at_srcdir/fail.at:118: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -L space-after-L.\$OBJEXT -o d\$EXEEXT d.\$OBJEXT; then (exit 1); else :; fi"
8575 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi" "fail.at:118"
8576 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi
8577 ) >>"$at_stdout" 2>>"$at_stderr"
8578 at_status=$? at_failed=false
8579 $at_check_filter
8580 echo stderr:; cat "$at_stderr"
8581 echo stdout:; cat "$at_stdout"
8582 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:118"
8583 $at_failed && at_fn_log_failure
8584 $at_traceon; }
8585
8586
8587 { set +x
8588 $as_echo "$at_srcdir/fail.at:119: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o d\$EXEEXT d.\$OBJEXT -L; then (exit 1); else :; fi"
8589 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi" "fail.at:119"
8590 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi
8591 ) >>"$at_stdout" 2>>"$at_stderr"
8592 at_status=$? at_failed=false
8593 $at_check_filter
8594 echo stderr:; cat "$at_stderr"
8595 echo stdout:; cat "$at_stdout"
8596 at_fn_check_status 0 $at_status "$at_srcdir/fail.at:119"
8597 $at_failed && at_fn_log_failure
8598 $at_traceon; }
8599
8600
8601
8602
8603   set +x
8604   $at_times_p && times >"$at_times_file"
8605 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8606 read at_status <"$at_status_file"
8607 #AT_STOP_40
8608 #AT_START_41
8609 at_fn_group_banner 41 'shlibpath.at:25' \
8610   "shlibpath_overrides_runpath" "                    " 3
8611 at_xfail=no
8612 (
8613   $as_echo "41. $at_setup_line: testing $at_desc ..."
8614   $at_traceon
8615
8616
8617
8618 mkdir sub sub/lib sub/bin
8619 echo 'int a () { return 0; }' > a.c
8620 echo 'extern int a (); int main () { return a(); }' > m.c
8621 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
8622 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib
8623 $LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la
8624 $LIBTOOL --mode=clean rm -f liba.la
8625 rm -f sub/lib/liba.la
8626
8627 $CC $CPPFLAGS $CFLAGS -c m.c
8628 { set +x
8629 $as_echo "$at_srcdir/shlibpath.at:38: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT -Lsub/lib -la -R\`pwd\`/sub/lib"
8630 at_fn_check_prepare_notrace 'a `...` command substitution' "shlibpath.at:38"
8631 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib
8632 ) >>"$at_stdout" 2>>"$at_stderr"
8633 at_status=$? at_failed=false
8634 $at_check_filter
8635 echo stderr:; cat "$at_stderr"
8636 echo stdout:; cat "$at_stdout"
8637 at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:38"
8638 $at_failed && at_fn_log_failure
8639 $at_traceon; }
8640
8641 { set +x
8642 $as_echo "$at_srcdir/shlibpath.at:40: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT -Lsub/lib -la"
8643 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la" "shlibpath.at:40"
8644 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la
8645 ) >>"$at_stdout" 2>>"$at_stderr"
8646 at_status=$? at_failed=false
8647 $at_check_filter
8648 echo stderr:; cat "$at_stderr"
8649 echo stdout:; cat "$at_stdout"
8650 at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:40"
8651 $at_failed && at_fn_log_failure
8652 $at_traceon; }
8653
8654
8655 $mkdir_p moved
8656 (cd sub && find . -type d) | (cd moved && xargs $mkdir_p)
8657 for file in `cd sub && find . -type f -print -o -type l -print`
8658 do
8659   mv sub/$file moved/$file
8660 done
8661 rm -rf sub
8662
8663 mkdir sub sub/lib sub/bin
8664 echo 'int wrong_lib () { return 0; }' > a.c
8665 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
8666 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib
8667 $LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la
8668 $LIBTOOL --mode=clean rm -f liba.la
8669
8670 eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shlibpath_overrides_runpath)='`
8671
8672 # No point checking a system with static libraries:
8673 lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8674 { set +x
8675 $as_echo "$at_srcdir/shlibpath.at:54: if \"\$lt_exe\" || exit 1 && exit 77; then :; else lt_status=\$?;            test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8676 at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1 && exit 77; then :; else lt_status=$?;       test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "shlibpath.at:54"
8677 ( $at_check_trace; if "$lt_exe" || exit 1 && exit 77; then :; else lt_status=$?;           test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8678 ) >>"$at_stdout" 2>>"$at_stderr"
8679 at_status=$? at_failed=false
8680 $at_check_filter
8681 echo stderr:; cat "$at_stderr"
8682 echo stdout:; cat "$at_stdout"
8683 at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:54"
8684 $at_failed && at_fn_log_failure
8685 $at_traceon; }
8686
8687
8688
8689 if test "$shlibpath_var" = PATH; then
8690   addpath=`pwd`/moved/bin
8691 else
8692   addpath=`pwd`/moved/lib
8693 fi
8694 sep=
8695 eval test -n \"\$$shlibpath_var\" && sep=:
8696 eval $shlibpath_var='$addpath$sep$'$shlibpath_var
8697 export $shlibpath_var
8698 if test "$shlibpath_overrides_runpath" != no; then
8699   lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8700 { set +x
8701 $as_echo "$at_srcdir/shlibpath.at:66: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8702 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "shlibpath.at:66"
8703 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8704 ) >>"$at_stdout" 2>>"$at_stderr"
8705 at_status=$? at_failed=false
8706 $at_check_filter
8707 echo stderr:; cat "$at_stderr"
8708 echo stdout:; cat "$at_stdout"
8709 at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:66"
8710 $at_failed && at_fn_log_failure
8711 $at_traceon; }
8712
8713
8714 else
8715   lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8716 { set +x
8717 $as_echo "$at_srcdir/shlibpath.at:68: if \"\$lt_exe\" || exit 1; then :; else lt_status=\$?;       test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8718 at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1; then :; else lt_status=$?;          test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "shlibpath.at:68"
8719 ( $at_check_trace; if "$lt_exe" || exit 1; then :; else lt_status=$?;      test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8720 ) >>"$at_stdout" 2>>"$at_stderr"
8721 at_status=$? at_failed=false
8722 $at_check_filter
8723 echo stderr:; cat "$at_stderr"
8724 echo stdout:; cat "$at_stdout"
8725 at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:68"
8726 $at_failed && at_fn_log_failure
8727 $at_traceon; }
8728
8729
8730 fi
8731 # Test that shlibpath_var is effective in adding paths at all:
8732 lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
8733 { set +x
8734 $as_echo "$at_srcdir/shlibpath.at:71: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
8735 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "shlibpath.at:71"
8736 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
8737 ) >>"$at_stdout" 2>>"$at_stderr"
8738 at_status=$? at_failed=false
8739 $at_check_filter
8740 echo stderr:; cat "$at_stderr"
8741 echo stdout:; cat "$at_stdout"
8742 at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:71"
8743 $at_failed && at_fn_log_failure
8744 $at_traceon; }
8745
8746
8747
8748   set +x
8749   $at_times_p && times >"$at_times_file"
8750 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8751 read at_status <"$at_status_file"
8752 #AT_STOP_41
8753 #AT_START_42
8754 at_fn_group_banner 42 'runpath-in-lalib.at:25' \
8755   "Runpath in libtool library files" "               " 3
8756 at_xfail=no
8757 (
8758   $as_echo "42. $at_setup_line: testing $at_desc ..."
8759   $at_traceon
8760
8761
8762
8763 cat >a.c <<'_ATEOF'
8764 int a () { return 0; }
8765 _ATEOF
8766
8767 cat >b.c <<'_ATEOF'
8768 extern int a ();
8769 int b () { return a (); }
8770 _ATEOF
8771
8772 cat >m.c <<'_ATEOF'
8773 extern int b ();
8774 int main () { return b (); }
8775 _ATEOF
8776
8777
8778 instdir=`pwd`/inst
8779 libdir=$instdir/lib
8780 bindir=$instdir/bin
8781 addrunpath=`pwd`/foobar
8782
8783 mkdir $instdir $libdir $bindir
8784
8785 for file in a.c b.c; do
8786   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
8787 done
8788 $CC $CPPFLAGS $CFLAGS -c m.c
8789 { set +x
8790 $as_echo "$at_srcdir/runpath-in-lalib.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir -R\$addrunpath"
8791 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath" "runpath-in-lalib.at:51"
8792 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath
8793 ) >>"$at_stdout" 2>>"$at_stderr"
8794 at_status=$? at_failed=false
8795 $at_check_filter
8796 echo stderr:; cat "$at_stderr"
8797 echo stdout:; cat "$at_stdout"
8798 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:51"
8799 $at_failed && at_fn_log_failure
8800 $at_traceon; }
8801
8802 { set +x
8803 $as_echo "$at_srcdir/runpath-in-lalib.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir liba.la"
8804 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la" "runpath-in-lalib.at:53"
8805 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la
8806 ) >>"$at_stdout" 2>>"$at_stderr"
8807 at_status=$? at_failed=false
8808 $at_check_filter
8809 echo stderr:; cat "$at_stderr"
8810 echo stdout:; cat "$at_stdout"
8811 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:53"
8812 $at_failed && at_fn_log_failure
8813 $at_traceon; }
8814
8815 { set +x
8816 $as_echo "$at_srcdir/runpath-in-lalib.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT libb.la"
8817 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la" "runpath-in-lalib.at:55"
8818 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la
8819 ) >>"$at_stdout" 2>>"$at_stderr"
8820 at_status=$? at_failed=false
8821 $at_check_filter
8822 echo stderr:; cat "$at_stderr"
8823 echo stdout:; cat "$at_stdout"
8824 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:55"
8825 $at_failed && at_fn_log_failure
8826 $at_traceon; }
8827
8828 { set +x
8829 $as_echo "$at_srcdir/runpath-in-lalib.at:57: \$LIBTOOL --mode=install cp liba.la \$libdir/liba.la"
8830 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir/liba.la" "runpath-in-lalib.at:57"
8831 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir/liba.la
8832 ) >>"$at_stdout" 2>>"$at_stderr"
8833 at_status=$? at_failed=false
8834 $at_check_filter
8835 echo stderr:; cat "$at_stderr"
8836 echo stdout:; cat "$at_stdout"
8837 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:57"
8838 $at_failed && at_fn_log_failure
8839 $at_traceon; }
8840
8841 { set +x
8842 $as_echo "$at_srcdir/runpath-in-lalib.at:58: \$LIBTOOL --mode=install cp libb.la \$libdir/libb.la"
8843 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb.la $libdir/libb.la" "runpath-in-lalib.at:58"
8844 ( $at_check_trace; $LIBTOOL --mode=install cp libb.la $libdir/libb.la
8845 ) >>"$at_stdout" 2>>"$at_stderr"
8846 at_status=$? at_failed=false
8847 $at_check_filter
8848 echo stderr:; cat "$at_stderr"
8849 echo stdout:; cat "$at_stdout"
8850 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:58"
8851 $at_failed && at_fn_log_failure
8852 $at_traceon; }
8853
8854 { set +x
8855 $as_echo "$at_srcdir/runpath-in-lalib.at:59: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT"
8856 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "runpath-in-lalib.at:59"
8857 ( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT
8858 ) >>"$at_stdout" 2>>"$at_stderr"
8859 at_status=$? at_failed=false
8860 $at_check_filter
8861 echo stderr:; cat "$at_stderr"
8862 echo stdout:; cat "$at_stdout"
8863 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:59"
8864 $at_failed && at_fn_log_failure
8865 $at_traceon; }
8866
8867
8868 { set +x
8869 $as_echo "$at_srcdir/runpath-in-lalib.at:61: grep /foobar \$libdir/liba.la"
8870 at_fn_check_prepare_dynamic "grep /foobar $libdir/liba.la" "runpath-in-lalib.at:61"
8871 ( $at_check_trace; grep /foobar $libdir/liba.la
8872 ) >>"$at_stdout" 2>>"$at_stderr"
8873 at_status=$? at_failed=false
8874 $at_check_filter
8875 at_fn_diff_devnull "$at_stderr" || at_failed=:
8876 echo stdout:; cat "$at_stdout"
8877 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:61"
8878 $at_failed && at_fn_log_failure
8879 $at_traceon; }
8880
8881 { set +x
8882 $as_echo "$at_srcdir/runpath-in-lalib.at:62: grep /foobar \$libdir/libb.la"
8883 at_fn_check_prepare_dynamic "grep /foobar $libdir/libb.la" "runpath-in-lalib.at:62"
8884 ( $at_check_trace; grep /foobar $libdir/libb.la
8885 ) >>"$at_stdout" 2>>"$at_stderr"
8886 at_status=$? at_failed=false
8887 $at_check_filter
8888 at_fn_diff_devnull "$at_stderr" || at_failed=:
8889 echo stdout:; cat "$at_stdout"
8890 at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:62"
8891 $at_failed && at_fn_log_failure
8892 $at_traceon; }
8893
8894
8895 # TODO: check that m gets -R, too.
8896
8897   set +x
8898   $at_times_p && times >"$at_times_file"
8899 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8900 read at_status <"$at_status_file"
8901 #AT_STOP_42
8902 #AT_START_43
8903 at_fn_group_banner 43 'static.at:68' \
8904   "static linking flags for programs" "              " 3
8905 at_xfail=no
8906 (
8907   $as_echo "43. $at_setup_line: testing $at_desc ..."
8908   $at_traceon
8909
8910
8911
8912 LDFLAGS="$LDFLAGS -no-undefined"
8913 prefix=`pwd`/inst
8914 bindir=$prefix/bin
8915 prefix1=`pwd`/inst1
8916 prefix2=`pwd`/inst2
8917 prefix3=`pwd`/inst3
8918 libdir1=$prefix1/lib
8919 libdir2=$prefix2/lib
8920 libdir3=$prefix3/lib
8921 srcdir_broken=`pwd`/broken-src
8922 prefix_broken=`pwd`/broken
8923 libdir_broken=$prefix_broken/lib
8924 bindir_broken=$prefix_broken/bin
8925
8926 have_static=false
8927 have_shared=false
8928 per_deplib=false
8929 $LIBTOOL --features | grep 'enable static libraries' >/dev/null && have_static=:
8930 $LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
8931 eval `$LIBTOOL --config |
8932         $EGREP '^(per_deplib_(static|dynamic)_flag|shlibpath_var|link_static_flag)='`
8933 if test -n "$per_deplib_static_flag" && test -n "$per_deplib_dynamic_flag"; then
8934   per_deplib=:
8935 fi
8936 # On GNU/Linux with --disable-static, m-all-static fails to link.
8937 # What we'd like to state here is: if the user actively passed
8938 # --disable-static (as opposed to: the libtool.m4 macros set
8939 # enable_static=no), then they cannot expect -all-static to work.
8940 # So we punt, knowing that we mangle enable_static on AIX only.
8941 can_link_all_static=-all-static
8942 case $host_os,$have_static,$link_static_flag in
8943   aix*) ;;
8944   *,false,?*) can_link_all_static= ;;
8945 esac
8946
8947 # Create broken libraries.  They will later be moved to those
8948 # directories where the respective libraries should be linked
8949 # statically from.  This detects both failure to link statically
8950 # and failure to omit extraneous run paths.
8951 mkdir $srcdir_broken $prefix_broken $libdir_broken
8952 (
8953   cd $srcdir_broken
8954   echo 'int this_should_not_be_linked_against() { return 0; }' > a.c
8955   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
8956   for i in 1 1dep 2 2dep 3 3dep; do
8957     $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a.lo -rpath $libdir_broken
8958     $LIBTOOL --mode=install cp liba$i.la $libdir_broken/liba$i.la
8959   done
8960 )
8961
8962 func_fix_path ()
8963 {
8964   # For w32, hardcoding cannot work, but $libdir/../bin is where binaries
8965   # usually are installed.  Since we use several prefixes for testing
8966   # convenience -- it allows us to replace the good libraries easily with
8967   # broken ones and vice versa -- we have to set PATH to find them.
8968   # Since OTOH we put broken libs of all names in the "moved" prefixes,
8969   # we have to ensure that this prefix comes last: otherwise we may link
8970   # against a broken library but the good one would come later in the PATH.
8971   # So we let the caller of this function set the order: the "other" two
8972   # come first.
8973   if test "$shlibpath_var" = PATH; then
8974     save_PATH=$PATH
8975     sep=
8976     test -z "$PATH" || sep=:
8977     PATH=${2}/bin:${3}/bin:${1}/bin$sep$PATH
8978   fi
8979
8980 }
8981
8982 func_restore_path ()
8983 {
8984   if test "$shlibpath_var" = PATH; then
8985     PATH=$save_PATH
8986   fi
8987 }
8988
8989 # func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix
8990 func_move_libs ()
8991 {
8992   $mkdir_p "${1}-moved"
8993 (cd "${1}" && find . -type d) | (cd "${1}-moved" && xargs $mkdir_p)
8994 for file in `cd "${1}" && find . -type f -print -o -type l -print`
8995 do
8996   mv "${1}"/$file "${1}-moved"/$file
8997 done
8998 rm -rf "${1}"
8999
9000   $mkdir_p "${2}-moved"
9001 (cd "${2}" && find . -type d) | (cd "${2}-moved" && xargs $mkdir_p)
9002 for file in `cd "${2}" && find . -type f -print -o -type l -print`
9003 do
9004   mv "${2}"/$file "${2}-moved"/$file
9005 done
9006 rm -rf "${2}"
9007
9008   $mkdir_p "${1}"
9009 (cd "$srcdir_broken" && find . -type d) | (cd "${1}" && xargs $mkdir_p)
9010 for file in `cd "$srcdir_broken" && find . -type f -print -o -type l -print`
9011 do
9012   mv "$srcdir_broken"/$file "${1}"/$file
9013 done
9014 rm -rf "$srcdir_broken"
9015
9016   $mkdir_p "${2}"
9017 (cd "$prefix_broken" && find . -type d) | (cd "${2}" && xargs $mkdir_p)
9018 for file in `cd "$prefix_broken" && find . -type f -print -o -type l -print`
9019 do
9020   mv "$prefix_broken"/$file "${2}"/$file
9021 done
9022 rm -rf "$prefix_broken"
9023
9024   func_fix_path ${2} ${3} ${4}
9025 }
9026
9027 # func_restore_libs srcdir_to_restore prefix_to_restore
9028 func_restore_libs ()
9029 {
9030   func_restore_path
9031   $mkdir_p "$prefix_broken"
9032 (cd "${2}" && find . -type d) | (cd "$prefix_broken" && xargs $mkdir_p)
9033 for file in `cd "${2}" && find . -type f -print -o -type l -print`
9034 do
9035   mv "${2}"/$file "$prefix_broken"/$file
9036 done
9037 rm -rf "${2}"
9038
9039   $mkdir_p "$srcdir_broken"
9040 (cd "${1}" && find . -type d) | (cd "$srcdir_broken" && xargs $mkdir_p)
9041 for file in `cd "${1}" && find . -type f -print -o -type l -print`
9042 do
9043   mv "${1}"/$file "$srcdir_broken"/$file
9044 done
9045 rm -rf "${1}"
9046
9047   $mkdir_p "${2}"
9048 (cd "${2}-moved" && find . -type d) | (cd "${2}" && xargs $mkdir_p)
9049 for file in `cd "${2}-moved" && find . -type f -print -o -type l -print`
9050 do
9051   mv "${2}-moved"/$file "${2}"/$file
9052 done
9053 rm -rf "${2}-moved"
9054
9055   $mkdir_p "${1}"
9056 (cd "${1}-moved" && find . -type d) | (cd "${1}" && xargs $mkdir_p)
9057 for file in `cd "${1}-moved" && find . -type f -print -o -type l -print`
9058 do
9059   mv "${1}-moved"/$file "${1}"/$file
9060 done
9061 rm -rf "${1}-moved"
9062
9063 }
9064
9065 # make sure the program can be run.
9066 func_test_exec ()
9067 {
9068   # On AIX without runtimelinking, this does not make sense.
9069   if $have_static; then
9070     echo "## The following should succeed:"
9071     for st
9072     do
9073       echo "# m$st"
9074       lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9075 { set +x
9076 $as_echo "$at_srcdir/static.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9077 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "static.at:178"
9078 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9079 ) >>"$at_stdout" 2>>"$at_stderr"
9080 at_status=$? at_failed=false
9081 $at_check_filter
9082 at_fn_diff_devnull "$at_stderr" || at_failed=:
9083 at_fn_diff_devnull "$at_stdout" || at_failed=:
9084 at_fn_check_status 0 $at_status "$at_srcdir/static.at:178"
9085 $at_failed && at_fn_log_failure
9086 $at_traceon; }
9087
9088
9089       # For some per-deplib flag combinations there may be no installed program,
9090       # because liba2 is not yet installed.
9091       if test -f "$bindir/m${st}$EXEEXT"; then
9092         lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9093 { set +x
9094 $as_echo "$at_srcdir/static.at:182: if \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9095 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "static.at:182"
9096 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9097 ) >>"$at_stdout" 2>>"$at_stderr"
9098 at_status=$? at_failed=false
9099 $at_check_filter
9100 at_fn_diff_devnull "$at_stderr" || at_failed=:
9101 at_fn_diff_devnull "$at_stdout" || at_failed=:
9102 at_fn_check_status 0 $at_status "$at_srcdir/static.at:182"
9103 $at_failed && at_fn_log_failure
9104 $at_traceon; }
9105
9106
9107       fi
9108     done
9109   fi
9110 }
9111
9112 # make sure the program cannot be run.
9113 func_test_exec_fail ()
9114 {
9115   # No point in testing if we're linking statically anyway.
9116   # TODO: Maybe in the `else' case we could test for success?
9117   if $have_shared; then
9118     echo "## The following should fail:"
9119     for st
9120     do
9121       echo "# m$st"
9122       lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9123 { set +x
9124 $as_echo "$at_srcdir/static.at:198: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?;       test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9125 at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?;        test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "static.at:198"
9126 ( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?;            test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9127 ) >>"$at_stdout" 2>>"$at_stderr"
9128 at_status=$? at_failed=false
9129 $at_check_filter
9130 echo stderr:; cat "$at_stderr"
9131 at_fn_diff_devnull "$at_stdout" || at_failed=:
9132 at_fn_check_status 1 $at_status "$at_srcdir/static.at:198"
9133 $at_failed && at_fn_log_failure
9134 $at_traceon; }
9135
9136
9137       # For some per-deplib flag combinations there may be no installed program,
9138       # because liba2 is not yet installed.
9139       if test -f "$bindir/m${st}$EXEEXT"; then
9140         lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9141 { set +x
9142 $as_echo "$at_srcdir/static.at:202: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?;       test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9143 at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?;        test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "static.at:202"
9144 ( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?;            test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9145 ) >>"$at_stdout" 2>>"$at_stderr"
9146 at_status=$? at_failed=false
9147 $at_check_filter
9148 echo stderr:; cat "$at_stderr"
9149 at_fn_diff_devnull "$at_stdout" || at_failed=:
9150 at_fn_check_status 1 $at_status "$at_srcdir/static.at:202"
9151 $at_failed && at_fn_log_failure
9152 $at_traceon; }
9153
9154
9155       fi
9156     done
9157   fi
9158 }
9159
9160
9161 # Try three independent libraries,
9162 #   one installed libtool library,
9163 #   one uninstalled libtool library,
9164 #   one non-libtool library,
9165 # the libtool libraries each having a dependency, or not.
9166 # Try both an uninstalled and the corresponding installed program.
9167
9168 for withdep in no yes; do
9169   echo
9170   echo "### libraries with dependencies: $withdep"
9171   rm -rf src $prefix $prefix1 $prefix2 $prefix3
9172   mkdir src $prefix $bindir $prefix1 $prefix2 $prefix3
9173   cd src
9174
9175   ### build the libraries.
9176   for i in 1 2 3; do
9177     eval ldir=\$libdir$i
9178     mkdir a$i $ldir
9179     cd a$i
9180     case $withdep,$i in
9181     no,* | yes,3)
9182       echo "int a$i() { return 0; }" > a$i.c
9183       $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
9184       $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir
9185       ;;
9186     *)
9187       echo "int a${i}dep() { return 0; }" > a${i}dep.c
9188       $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a${i}dep.c
9189       $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba${i}dep.la a${i}dep.lo -rpath $ldir
9190       echo "extern int a${i}dep(); int a$i() { return a${i}dep(); }" > a$i.c
9191       $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c
9192       $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir ./liba${i}dep.la
9193       ;;
9194     esac
9195     cd ..
9196   done
9197
9198   ### install the libraries.
9199   test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la
9200   $LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la
9201   $LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la
9202   $LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la
9203   test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la
9204   # simulate a non-libtool lib:
9205   rm -f $libdir3/liba3.la
9206
9207
9208   ### build the programs.
9209   echo 'extern int a1(), a2(), a3();
9210   int main() { return a1() + a2() + a3(); }' > m.c
9211   $CC $CPPFLAGS $CFLAGS -c m.c
9212
9213   # global static flags.
9214   for st in -static -static-libtool-libs $can_link_all_static; do
9215     { set +x
9216 $as_echo "$at_srcdir/static.at:263: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o m\${st}\$EXEEXT m.\$OBJEXT \\
9217         -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
9218 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:263"
9219 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m${st}$EXEEXT m.$OBJEXT \
9220         -L$libdir1 -la1 a2/liba2.la -L$libdir3 -R$libdir3 -la3
9221 ) >>"$at_stdout" 2>>"$at_stderr"
9222 at_status=$? at_failed=false
9223 $at_check_filter
9224 echo stderr:; cat "$at_stderr"
9225 echo stdout:; cat "$at_stdout"
9226 at_fn_check_status 0 $at_status "$at_srcdir/static.at:263"
9227 $at_failed && at_fn_log_failure
9228 $at_traceon; }
9229
9230   done
9231
9232   # per-deplib static/shared flags.
9233   # also try a bit redundant flags, and shuffled order (for run paths check).
9234   if $per_deplib; then
9235     { set +x
9236 $as_echo "$at_srcdir/static.at:271: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1\$EXEEXT m.\$OBJEXT \\
9237               -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L\$libdir3 -R\$libdir3 -la3"
9238 at_fn_check_prepare_notrace 'an embedded newline' "static.at:271"
9239 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT \
9240               -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3
9241 ) >>"$at_stdout" 2>>"$at_stderr"
9242 at_status=$? at_failed=false
9243 $at_check_filter
9244 echo stderr:; cat "$at_stderr"
9245 echo stdout:; cat "$at_stdout"
9246 at_fn_check_status 0 $at_status "$at_srcdir/static.at:271"
9247 $at_failed && at_fn_log_failure
9248 $at_traceon; }
9249
9250     { set +x
9251 $as_echo "$at_srcdir/static.at:274: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT \\
9252               -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
9253 at_fn_check_prepare_notrace 'an embedded newline' "static.at:274"
9254 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT \
9255               -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3
9256 ) >>"$at_stdout" 2>>"$at_stderr"
9257 at_status=$? at_failed=false
9258 $at_check_filter
9259 echo stderr:; cat "$at_stderr"
9260 echo stdout:; cat "$at_stdout"
9261 at_fn_check_status 0 $at_status "$at_srcdir/static.at:274"
9262 $at_failed && at_fn_log_failure
9263 $at_traceon; }
9264
9265     { set +x
9266 $as_echo "$at_srcdir/static.at:277: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT m.\$OBJEXT \\
9267               -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -Bstatic -la3 -Bdynamic"
9268 at_fn_check_prepare_notrace 'an embedded newline' "static.at:277"
9269 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT m.$OBJEXT \
9270               -L$libdir1 -la1 a2/liba2.la -L$libdir3 -Bstatic -la3 -Bdynamic
9271 ) >>"$at_stdout" 2>>"$at_stderr"
9272 at_status=$? at_failed=false
9273 $at_check_filter
9274 echo stderr:; cat "$at_stderr"
9275 echo stdout:; cat "$at_stdout"
9276 at_fn_check_status 0 $at_status "$at_srcdir/static.at:277"
9277 $at_failed && at_fn_log_failure
9278 $at_traceon; }
9279
9280     { set +x
9281 $as_echo "$at_srcdir/static.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m12\$EXEEXT m.\$OBJEXT \\
9282               -L\$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3"
9283 at_fn_check_prepare_notrace 'an embedded newline' "static.at:280"
9284 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12$EXEEXT m.$OBJEXT \
9285               -L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3
9286 ) >>"$at_stdout" 2>>"$at_stderr"
9287 at_status=$? at_failed=false
9288 $at_check_filter
9289 echo stderr:; cat "$at_stderr"
9290 echo stdout:; cat "$at_stdout"
9291 at_fn_check_status 0 $at_status "$at_srcdir/static.at:280"
9292 $at_failed && at_fn_log_failure
9293 $at_traceon; }
9294
9295     { set +x
9296 $as_echo "$at_srcdir/static.at:283: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m13\$EXEEXT m.\$OBJEXT \\
9297               -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \\
9298               -L\$libdir3 -Bstatic -la3 -Bdynamic"
9299 at_fn_check_prepare_notrace 'an embedded newline' "static.at:283"
9300 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m13$EXEEXT m.$OBJEXT \
9301               -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \
9302               -L$libdir3 -Bstatic -la3 -Bdynamic
9303 ) >>"$at_stdout" 2>>"$at_stderr"
9304 at_status=$? at_failed=false
9305 $at_check_filter
9306 echo stderr:; cat "$at_stderr"
9307 echo stdout:; cat "$at_stdout"
9308 at_fn_check_status 0 $at_status "$at_srcdir/static.at:283"
9309 $at_failed && at_fn_log_failure
9310 $at_traceon; }
9311
9312     { set +x
9313 $as_echo "$at_srcdir/static.at:287: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m31\$EXEEXT m.\$OBJEXT \\
9314               -L\$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \\
9315               -L\$libdir1 -Bstatic -la1 -Bdynamic"
9316 at_fn_check_prepare_notrace 'an embedded newline' "static.at:287"
9317 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31$EXEEXT m.$OBJEXT \
9318               -L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \
9319               -L$libdir1 -Bstatic -la1 -Bdynamic
9320 ) >>"$at_stdout" 2>>"$at_stderr"
9321 at_status=$? at_failed=false
9322 $at_check_filter
9323 echo stderr:; cat "$at_stderr"
9324 echo stdout:; cat "$at_stdout"
9325 at_fn_check_status 0 $at_status "$at_srcdir/static.at:287"
9326 $at_failed && at_fn_log_failure
9327 $at_traceon; }
9328
9329     { set +x
9330 $as_echo "$at_srcdir/static.at:291: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m23\$EXEEXT m.\$OBJEXT \\
9331               -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \\
9332               -L\$libdir3 -Bstatic -la3 -Bdynamic"
9333 at_fn_check_prepare_notrace 'an embedded newline' "static.at:291"
9334 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m23$EXEEXT m.$OBJEXT \
9335               -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \
9336               -L$libdir3 -Bstatic -la3 -Bdynamic
9337 ) >>"$at_stdout" 2>>"$at_stderr"
9338 at_status=$? at_failed=false
9339 $at_check_filter
9340 echo stderr:; cat "$at_stderr"
9341 echo stdout:; cat "$at_stdout"
9342 at_fn_check_status 0 $at_status "$at_srcdir/static.at:291"
9343 $at_failed && at_fn_log_failure
9344 $at_traceon; }
9345
9346     { set +x
9347 $as_echo "$at_srcdir/static.at:295: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123\$EXEEXT m.\$OBJEXT \\
9348               -L\$libdir1 -Bstatic -la1 a2/liba2.la -L\$libdir3 -la3 -Bdynamic"
9349 at_fn_check_prepare_notrace 'an embedded newline' "static.at:295"
9350 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123$EXEEXT m.$OBJEXT \
9351               -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic
9352 ) >>"$at_stdout" 2>>"$at_stderr"
9353 at_status=$? at_failed=false
9354 $at_check_filter
9355 echo stderr:; cat "$at_stderr"
9356 echo stdout:; cat "$at_stdout"
9357 at_fn_check_status 0 $at_status "$at_srcdir/static.at:295"
9358 $at_failed && at_fn_log_failure
9359 $at_traceon; }
9360
9361     { set +x
9362 $as_echo "$at_srcdir/static.at:298: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123a\$EXEEXT m.\$OBJEXT \\
9363               -L\$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \\
9364               -Bstatic -L\$libdir3 -la3 -Bdynamic"
9365 at_fn_check_prepare_notrace 'an embedded newline' "static.at:298"
9366 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123a$EXEEXT m.$OBJEXT \
9367               -L$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \
9368               -Bstatic -L$libdir3 -la3 -Bdynamic
9369 ) >>"$at_stdout" 2>>"$at_stderr"
9370 at_status=$? at_failed=false
9371 $at_check_filter
9372 echo stderr:; cat "$at_stderr"
9373 echo stdout:; cat "$at_stdout"
9374 at_fn_check_status 0 $at_status "$at_srcdir/static.at:298"
9375 $at_failed && at_fn_log_failure
9376 $at_traceon; }
9377
9378                   fi
9379
9380   ### install the programs.
9381   # We can't install any program that links dynamically against liba2.
9382   for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do
9383     echo "# m$st"
9384     { set +x
9385 $as_echo "$at_srcdir/static.at:312: \$LIBTOOL --mode=install cp m\${st}\$EXEEXT \$bindir/m\${st}\$EXEEXT"
9386 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:312"
9387 ( $at_check_trace; $LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT
9388 ) >>"$at_stdout" 2>>"$at_stderr"
9389 at_status=$? at_failed=false
9390 $at_check_filter
9391 echo stderr:; tee stderr <"$at_stderr"
9392 echo stdout:; cat "$at_stdout"
9393 at_fn_check_status 0 $at_status "$at_srcdir/static.at:312"
9394 $at_failed && at_fn_log_failure
9395 $at_traceon; }
9396
9397     if $have_static; then
9398       { set +x
9399 $as_echo "$at_srcdir/static.at:314: \$EGREP 'relinking|has not been installed' stderr"
9400 at_fn_check_prepare_notrace 'a shell pipeline' "static.at:314"
9401 ( $at_check_trace; $EGREP 'relinking|has not been installed' stderr
9402 ) >>"$at_stdout" 2>>"$at_stderr"
9403 at_status=$? at_failed=false
9404 $at_check_filter
9405 at_fn_diff_devnull "$at_stderr" || at_failed=:
9406 at_fn_diff_devnull "$at_stdout" || at_failed=:
9407 at_fn_check_status 1 $at_status "$at_srcdir/static.at:314"
9408 $at_failed && at_fn_log_failure
9409 $at_traceon; }
9410
9411     fi
9412   done
9413
9414
9415   ### Run each program once so that relinking has happened.
9416
9417   func_fix_path $prefix1 $prefix2 $prefix3
9418   func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a`
9419   func_restore_path
9420
9421   # For each library:
9422   # - remove the library images to catch failure to link statically/dynamically,
9423   # - add false other deplibs in the paths to catch (some) wrongly added run paths.
9424
9425   # if -all-static does not work, do not exercise it any more.
9426   all_static=-all-static
9427   test -z "$link_static_flag" && all_static=
9428
9429   echo "### test whether installed libtool library liba2 was linked statically"
9430   func_move_libs a2 $prefix2 $prefix3 $prefix1
9431   func_test_exec -static -static-libtool-libs $all_static `$per_deplib && echo 2 12 23 123 123a`
9432   $per_deplib && func_test_exec_fail 1 3 13 31
9433   func_restore_libs a2 $prefix2
9434
9435   echo "### test whether uninstalled libtool library liba1 was linked statically"
9436   func_move_libs a1 $prefix1 $prefix2 $prefix3
9437   func_test_exec -static-libtool-libs $all_static `$per_deplib && echo 1 12 13 31 123 123a`
9438   $per_deplib && func_test_exec_fail -static 2 3 23
9439   func_restore_libs a1 $prefix1
9440
9441   echo "### test whether non-libtool library liba3 was linked statically"
9442   func_move_libs a3 $prefix3 $prefix1 $prefix2
9443   func_test_exec $all_static `$per_deplib && echo 3 13 23 31 123 123a`
9444   func_test_exec_fail -static -static-libtool-libs `$per_deplib && echo 1 2 12`
9445   func_restore_libs a3 $prefix3
9446
9447   cd ..
9448 done
9449
9450   set +x
9451   $at_times_p && times >"$at_times_file"
9452 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9453 read at_status <"$at_status_file"
9454 #AT_STOP_43
9455 #AT_START_44
9456 at_fn_group_banner 44 'static.at:358' \
9457   "ccache -all-static" "                             " 3
9458 at_xfail=no
9459 (
9460   $as_echo "44. $at_setup_line: testing $at_desc ..."
9461   $at_traceon
9462
9463
9464 cat >ccache <<'_ATEOF'
9465 #! /bin/sh
9466 # poor man's ccache clone
9467 case $1 in
9468 -*) echo "bogus argument: $1" >&2; exit 1 ;;
9469 esac
9470 exec "$@"
9471 _ATEOF
9472
9473 chmod +x ./ccache
9474
9475 cat >a.c <<'_ATEOF'
9476 int main(void) { return 0; }
9477 _ATEOF
9478
9479
9480 { set +x
9481 $as_echo "$at_srcdir/static.at:374: \$CC \$CPPFLAGS \$CFLAGS -c a.c"
9482 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c" "static.at:374"
9483 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c
9484 ) >>"$at_stdout" 2>>"$at_stderr"
9485 at_status=$? at_failed=false
9486 $at_check_filter
9487 echo stderr:; cat "$at_stderr"
9488 echo stdout:; cat "$at_stdout"
9489 at_fn_check_status 0 $at_status "$at_srcdir/static.at:374"
9490 $at_failed && at_fn_log_failure
9491 $at_traceon; }
9492
9493 { set +x
9494 $as_echo "$at_srcdir/static.at:375: \$LIBTOOL --mode=link --tag=CC ./ccache \$CC \$CFLAGS \$LDFLAGS -all-static a.\$OBJEXT -o a\$EXEEXT"
9495 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT" "static.at:375"
9496 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT
9497 ) >>"$at_stdout" 2>>"$at_stderr"
9498 at_status=$? at_failed=false
9499 $at_check_filter
9500 echo stderr:; cat "$at_stderr"
9501 echo stdout:; cat "$at_stdout"
9502 at_fn_check_status 0 $at_status "$at_srcdir/static.at:375"
9503 $at_failed && at_fn_log_failure
9504 $at_traceon; }
9505
9506
9507   set +x
9508   $at_times_p && times >"$at_times_file"
9509 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9510 read at_status <"$at_status_file"
9511 #AT_STOP_44
9512 #AT_START_45
9513 at_fn_group_banner 45 'export.at:25' \
9514   "Export test" "                                    " 3
9515 at_xfail=no
9516 (
9517   $as_echo "45. $at_setup_line: testing $at_desc ..."
9518   $at_traceon
9519
9520
9521
9522 { set +x
9523 $as_echo "$at_srcdir/export.at:28: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)"
9524 at_fn_check_prepare_notrace 'a shell pipeline' "export.at:28"
9525 ( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77)
9526 ) >>"$at_stdout" 2>>"$at_stderr"
9527 at_status=$? at_failed=false
9528 $at_check_filter
9529 at_fn_diff_devnull "$at_stderr" || at_failed=:
9530 echo stdout:; cat "$at_stdout"
9531 at_fn_check_status 1 $at_status "$at_srcdir/export.at:28"
9532 $at_failed && at_fn_log_failure
9533 $at_traceon; }
9534
9535 { set +x
9536 $as_echo "$at_srcdir/export.at:30: eval \`\$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^\$/p'\`
9537           test -n \"\$archive_expsym_cmds\" || echo false >can-hide
9538           case \$archive_expsym_cmds in
9539           *-retain-symbols-file*) echo false >can-hide ;;
9540           esac"
9541 at_fn_check_prepare_notrace 'a `...` command substitution' "export.at:30"
9542 ( $at_check_trace; eval `$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^$/p'`
9543           test -n "$archive_expsym_cmds" || echo false >can-hide
9544           case $archive_expsym_cmds in
9545           *-retain-symbols-file*) echo false >can-hide ;;
9546           esac
9547 ) >>"$at_stdout" 2>>"$at_stderr"
9548 at_status=$? at_failed=false
9549 $at_check_filter
9550 at_fn_diff_devnull "$at_stderr" || at_failed=:
9551 at_fn_diff_devnull "$at_stdout" || at_failed=:
9552 at_fn_check_status 0 $at_status "$at_srcdir/export.at:30"
9553 $at_failed && at_fn_log_failure
9554 $at_traceon; }
9555
9556 can_hide=:
9557 test -s can-hide && can_hide=false
9558
9559 LDFLAGS="$LDFLAGS -no-undefined"
9560 libdir=`pwd`/inst/lib
9561 mkdir inst inst/lib
9562
9563 cat >a.c <<'_ATEOF'
9564 /* all kinds of data items */
9565 #ifdef __cplusplus
9566 extern "C" {
9567 #endif
9568
9569 int v1;
9570 static int v2;
9571 int v3 = 0;
9572 int v4 = 1;
9573 extern const int v5, v6;
9574 extern const char *v7;
9575 extern const char v8[];
9576 extern int (*const v12) (void);
9577 const int v5 = 0;
9578 const int v6 = 1;
9579 const char* v7 = "\01foo";
9580 const char v8[] = "\01bar";
9581 int v9(void) { return v2 + 1; }
9582 int (*v10) (void);
9583 int (*v11) (void) = v9;
9584 int (*const v12) (void) = v9;
9585
9586 typedef struct { int arr[1000]; } large;
9587 large v13;
9588 large v14 = { { 0 } };
9589 large v15 = { { 1 } };
9590
9591 int w1 (void) { return 0; }
9592
9593 #ifdef __cplusplus
9594 }
9595 #endif
9596 _ATEOF
9597
9598
9599 cat >asyms <<'_ATEOF'
9600 v1
9601 v3
9602 v4
9603 v5
9604 v6
9605 v7
9606 v8
9607 v9
9608 v10
9609 v11
9610 v12
9611 v13
9612 v14
9613 v15
9614 _ATEOF
9615
9616
9617 cat >main.c <<'_ATEOF'
9618
9619 /* w32 fun.  With GCC, you can have auto-import, which will work for
9620  * functions and non-const variables.  With MSVC, you have to explicitly
9621  * import all variables.  Depending on the amount of portability, you
9622  * need these annotations: LIBA_SCOPE for GCC, and also LIBA_SCOPE_VAR
9623  * for MSVC.  Of course you can merge both to one, this test only avoids
9624  * that in order to expose the auto-import feature on Cygwin.
9625  *
9626  * For users, it's best to realize that they should not provide any
9627  * non-function API at all.
9628  */
9629 #if defined(LIBA_DLL_IMPORT)
9630 #  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
9631 #    define LIBA_SCOPE extern __declspec(dllimport)
9632 #    if defined(_MSC_VER)
9633 #      define LIBA_SCOPE_VAR LIBA_SCOPE
9634 #    endif
9635 #  endif
9636 #endif
9637 #if !defined(LIBA_SCOPE)
9638 #  define LIBA_SCOPE extern
9639 #endif
9640 #if !defined(LIBA_SCOPE_VAR)
9641 #  define LIBA_SCOPE_VAR extern
9642 #endif
9643 #ifdef __cplusplus
9644 extern "C" {
9645 #endif
9646 LIBA_SCOPE_VAR int v1;
9647 LIBA_SCOPE_VAR int v3, v4;
9648 LIBA_SCOPE const int v5, v6;
9649 LIBA_SCOPE_VAR const char* v7;
9650 LIBA_SCOPE_VAR const char v8[];
9651 extern int v9(void);
9652 LIBA_SCOPE_VAR int (*v10) (void);
9653 LIBA_SCOPE_VAR int (*v11) (void);
9654 LIBA_SCOPE int (*const v12) (void);
9655 #ifdef __cplusplus
9656 }
9657 #endif
9658
9659 typedef struct { int arr[1000]; } large;
9660 LIBA_SCOPE_VAR large v13, v14, v15;
9661
9662 int main (void)
9663 {
9664   char s = v7[0] + v8[0];
9665   return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
9666            + v13.arr[0] + v14.arr[0] + v15.arr[0]
9667            - 8;
9668 }
9669 _ATEOF
9670
9671
9672 cat >broken.c <<'_ATEOF'
9673
9674 /* these symbols should not be exported */
9675 #ifdef __cplusplus
9676 extern "C" {
9677 #endif
9678 extern int w1 (void);
9679 #ifdef __cplusplus
9680 }
9681 #endif
9682 int main (void)
9683 {
9684   return w1 ();
9685 }
9686 _ATEOF
9687
9688
9689 { set +x
9690 $as_echo "$at_srcdir/export.at:164: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
9691 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "export.at:164"
9692 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
9693 ) >>"$at_stdout" 2>>"$at_stderr"
9694 at_status=$? at_failed=false
9695 $at_check_filter
9696 echo stderr:; cat "$at_stderr"
9697 echo stdout:; cat "$at_stdout"
9698 at_fn_check_status 0 $at_status "$at_srcdir/export.at:164"
9699 $at_failed && at_fn_log_failure
9700 $at_traceon; }
9701
9702 { set +x
9703 $as_echo "$at_srcdir/export.at:165: \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
9704 at_fn_check_prepare_dynamic "$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "export.at:165"
9705 ( $at_check_trace; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c
9706 ) >>"$at_stdout" 2>>"$at_stderr"
9707 at_status=$? at_failed=false
9708 $at_check_filter
9709 echo stderr:; cat "$at_stderr"
9710 echo stdout:; cat "$at_stdout"
9711 at_fn_check_status 0 $at_status "$at_srcdir/export.at:165"
9712 $at_failed && at_fn_log_failure
9713 $at_traceon; }
9714
9715 { set +x
9716 $as_echo "$at_srcdir/export.at:166: \$CC \$CPPFLAGS \$CFLAGS -c broken.c"
9717 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c broken.c" "export.at:166"
9718 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c broken.c
9719 ) >>"$at_stdout" 2>>"$at_stderr"
9720 at_status=$? at_failed=false
9721 $at_check_filter
9722 echo stderr:; cat "$at_stderr"
9723 echo stdout:; cat "$at_stdout"
9724 at_fn_check_status 0 $at_status "$at_srcdir/export.at:166"
9725 $at_failed && at_fn_log_failure
9726 $at_traceon; }
9727
9728
9729 for exportsyms in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'
9730 do
9731   # case 1: shared library built from object.
9732   echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \\
9733                -rpath $libdir' $exportsyms"; { set +x
9734 $as_echo "$at_srcdir/export.at:171: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo \\
9735                -rpath \$libdir' \$exportsyms"
9736 at_fn_check_prepare_notrace 'an embedded newline' "export.at:171"
9737 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \
9738                -rpath $libdir' $exportsyms
9739 ) >>"$at_stdout" 2>>"$at_stderr"
9740 at_status=$? at_failed=false
9741 $at_check_filter
9742 echo stderr:; cat "$at_stderr"
9743 echo stdout:; cat "$at_stdout"
9744 at_fn_check_status 0 $at_status "$at_srcdir/export.at:171"
9745 $at_failed && at_fn_log_failure
9746 $at_traceon; }
9747
9748   { set +x
9749 $as_echo "$at_srcdir/export.at:173: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
9750 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:173"
9751 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
9752 ) >>"$at_stdout" 2>>"$at_stderr"
9753 at_status=$? at_failed=false
9754 $at_check_filter
9755 echo stderr:; cat "$at_stderr"
9756 echo stdout:; cat "$at_stdout"
9757 at_fn_check_status 0 $at_status "$at_srcdir/export.at:173"
9758 $at_failed && at_fn_log_failure
9759 $at_traceon; }
9760
9761   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9762 { set +x
9763 $as_echo "$at_srcdir/export.at:175: if \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9764 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "export.at:175"
9765 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9766 ) >>"$at_stdout" 2>>"$at_stderr"
9767 at_status=$? at_failed=false
9768 $at_check_filter
9769 at_fn_diff_devnull "$at_stderr" || at_failed=:
9770 at_fn_diff_devnull "$at_stdout" || at_failed=:
9771 at_fn_check_status 0 $at_status "$at_srcdir/export.at:175"
9772 $at_failed && at_fn_log_failure
9773 $at_traceon; }
9774
9775
9776   if test -n "$exportsyms" && $can_hide; then
9777     { set +x
9778 $as_echo "$at_srcdir/export.at:177: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la
9779               then (exit 1); else :; fi"
9780 at_fn_check_prepare_notrace 'an embedded newline' "export.at:177"
9781 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la
9782               then (exit 1); else :; fi
9783 ) >>"$at_stdout" 2>>"$at_stderr"
9784 at_status=$? at_failed=false
9785 $at_check_filter
9786 echo stderr:; cat "$at_stderr"
9787 echo stdout:; cat "$at_stdout"
9788 at_fn_check_status 0 $at_status "$at_srcdir/export.at:177"
9789 $at_failed && at_fn_log_failure
9790 $at_traceon; }
9791
9792   fi
9793
9794   # case 2: shared library built from convenience archive.
9795   { set +x
9796 $as_echo "$at_srcdir/export.at:182: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libconv.la a.lo"
9797 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo" "export.at:182"
9798 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo
9799 ) >>"$at_stdout" 2>>"$at_stderr"
9800 at_status=$? at_failed=false
9801 $at_check_filter
9802 echo stderr:; cat "$at_stderr"
9803 echo stdout:; cat "$at_stdout"
9804 at_fn_check_status 0 $at_status "$at_srcdir/export.at:182"
9805 $at_failed && at_fn_log_failure
9806 $at_traceon; }
9807
9808   echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \\
9809                -rpath $libdir' $exportsyms"; { set +x
9810 $as_echo "$at_srcdir/export.at:184: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la libconv.la \\
9811                -rpath \$libdir' \$exportsyms"
9812 at_fn_check_prepare_notrace 'an embedded newline' "export.at:184"
9813 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \
9814                -rpath $libdir' $exportsyms
9815 ) >>"$at_stdout" 2>>"$at_stderr"
9816 at_status=$? at_failed=false
9817 $at_check_filter
9818 echo stderr:; cat "$at_stderr"
9819 echo stdout:; cat "$at_stdout"
9820 at_fn_check_status 0 $at_status "$at_srcdir/export.at:184"
9821 $at_failed && at_fn_log_failure
9822 $at_traceon; }
9823
9824   { set +x
9825 $as_echo "$at_srcdir/export.at:186: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
9826 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:186"
9827 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
9828 ) >>"$at_stdout" 2>>"$at_stderr"
9829 at_status=$? at_failed=false
9830 $at_check_filter
9831 echo stderr:; cat "$at_stderr"
9832 echo stdout:; cat "$at_stdout"
9833 at_fn_check_status 0 $at_status "$at_srcdir/export.at:186"
9834 $at_failed && at_fn_log_failure
9835 $at_traceon; }
9836
9837   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
9838 { set +x
9839 $as_echo "$at_srcdir/export.at:188: if \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
9840 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "export.at:188"
9841 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
9842 ) >>"$at_stdout" 2>>"$at_stderr"
9843 at_status=$? at_failed=false
9844 $at_check_filter
9845 at_fn_diff_devnull "$at_stderr" || at_failed=:
9846 at_fn_diff_devnull "$at_stdout" || at_failed=:
9847 at_fn_check_status 0 $at_status "$at_srcdir/export.at:188"
9848 $at_failed && at_fn_log_failure
9849 $at_traceon; }
9850
9851
9852   if test -n "$exportsyms" && $can_hide; then
9853     { set +x
9854 $as_echo "$at_srcdir/export.at:190: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la
9855               then (exit 1); else :; fi"
9856 at_fn_check_prepare_notrace 'an embedded newline' "export.at:190"
9857 ( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la
9858               then (exit 1); else :; fi
9859 ) >>"$at_stdout" 2>>"$at_stderr"
9860 at_status=$? at_failed=false
9861 $at_check_filter
9862 echo stderr:; cat "$at_stderr"
9863 echo stdout:; cat "$at_stdout"
9864 at_fn_check_status 0 $at_status "$at_srcdir/export.at:190"
9865 $at_failed && at_fn_log_failure
9866 $at_traceon; }
9867
9868   fi
9869 done
9870
9871 { set +x
9872 $as_echo "$at_srcdir/export.at:195: \$can_hide || (exit 77)"
9873 at_fn_check_prepare_dynamic "$can_hide || (exit 77)" "export.at:195"
9874 ( $at_check_trace; $can_hide || (exit 77)
9875 ) >>"$at_stdout" 2>>"$at_stderr"
9876 at_status=$? at_failed=false
9877 $at_check_filter
9878 at_fn_diff_devnull "$at_stderr" || at_failed=:
9879 at_fn_diff_devnull "$at_stdout" || at_failed=:
9880 at_fn_check_status 0 $at_status "$at_srcdir/export.at:195"
9881 $at_failed && at_fn_log_failure
9882 $at_traceon; }
9883
9884
9885   set +x
9886   $at_times_p && times >"$at_times_file"
9887 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9888 read at_status <"$at_status_file"
9889 #AT_STOP_45
9890 #AT_START_46
9891 at_fn_group_banner 46 'search-path.at:24' \
9892   "sys_lib_search_path" "                            " 3
9893 at_xfail=no
9894 (
9895   $as_echo "46. $at_setup_line: testing $at_desc ..."
9896   $at_traceon
9897
9898
9899 LDFLAGS="$LDFLAGS -no-undefined"
9900
9901 cat >main.c <<'_ATEOF'
9902 extern
9903 #ifdef __cplusplus
9904 "C"
9905 #endif
9906 int inflate ();
9907 int main()
9908 {
9909   return inflate ();
9910 }
9911 _ATEOF
9912
9913
9914 $CC $CPPFLAGS $CFLAGS -c main.c
9915 eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='`
9916 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
9917 no_libz=:
9918 for path in $sys_lib_search_path; do
9919   if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$path -lz
9920   then
9921     { set +x
9922 $as_echo "$at_srcdir/search-path.at:47: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -lz"
9923 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz" "search-path.at:47"
9924 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz
9925 ) >>"$at_stdout" 2>>"$at_stderr"
9926 at_status=$? at_failed=false
9927 $at_check_filter
9928 echo stderr:; cat "$at_stderr"
9929 echo stdout:; cat "$at_stdout"
9930 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:47"
9931 $at_failed && at_fn_log_failure
9932 $at_traceon; }
9933
9934     no_libz=false
9935     break
9936   fi
9937 done
9938
9939 # If -lz doesn't exist (hello, cross compiler!), we need a dummy test.
9940 if $no_libz; then
9941   { set +x
9942 $as_echo "$at_srcdir/search-path.at:56: exit 77"
9943 at_fn_check_prepare_trace "search-path.at:56"
9944 ( $at_check_trace; exit 77
9945 ) >>"$at_stdout" 2>>"$at_stderr"
9946 at_status=$? at_failed=false
9947 $at_check_filter
9948 at_fn_diff_devnull "$at_stderr" || at_failed=:
9949 at_fn_diff_devnull "$at_stdout" || at_failed=:
9950 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:56"
9951 $at_failed && at_fn_log_failure
9952 $at_traceon; }
9953
9954 fi
9955
9956   set +x
9957   $at_times_p && times >"$at_times_file"
9958 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9959 read at_status <"$at_status_file"
9960 #AT_STOP_46
9961 #AT_START_47
9962 at_fn_group_banner 47 'search-path.at:62' \
9963   "sys_lib_search_path on w32" "                     " 3
9964 at_xfail=no
9965 (
9966   $as_echo "47. $at_setup_line: testing $at_desc ..."
9967   $at_traceon
9968
9969
9970
9971 # Check if libtool knows the path to system libraries.  Using
9972 # a w32 system library since the test is designed to check if
9973 # the libtool handling of the sys_lib_search_path variable is
9974 # correct for MSVC.
9975
9976 LDFLAGS="$LDFLAGS -no-undefined"
9977
9978 cat >gc.c <<'_ATEOF'
9979 #include <windows.h>
9980 HCURSOR get_cursor (void)
9981 {
9982   return GetCursor ();
9983 }
9984 _ATEOF
9985
9986
9987 eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
9988 { set +x
9989 $as_echo "$at_srcdir/search-path.at:81: test \"\$build_libtool_libs\" = yes || exit 77"
9990 at_fn_check_prepare_dynamic "test \"$build_libtool_libs\" = yes || exit 77" "search-path.at:81"
9991 ( $at_check_trace; test "$build_libtool_libs" = yes || exit 77
9992 ) >>"$at_stdout" 2>>"$at_stderr"
9993 at_status=$? at_failed=false
9994 $at_check_filter
9995 at_fn_diff_devnull "$at_stderr" || at_failed=:
9996 at_fn_diff_devnull "$at_stdout" || at_failed=:
9997 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:81"
9998 $at_failed && at_fn_log_failure
9999 $at_traceon; }
10000
10001
10002 { set +x
10003 $as_echo "$at_srcdir/search-path.at:83: \$LIBTOOL --mode=compile --tag=CC \\
10004           \$CC \$CPPFLAGS \$CFLAGS -o gc.lo -c gc.c || exit 77"
10005 at_fn_check_prepare_notrace 'an embedded newline' "search-path.at:83"
10006 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC \
10007           $CC $CPPFLAGS $CFLAGS -o gc.lo -c gc.c || exit 77
10008 ) >>"$at_stdout" 2>>"$at_stderr"
10009 at_status=$? at_failed=false
10010 $at_check_filter
10011 echo stderr:; cat "$at_stderr"
10012 echo stdout:; cat "$at_stdout"
10013 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:83"
10014 $at_failed && at_fn_log_failure
10015 $at_traceon; }
10016
10017
10018 # Ok, compile was fine, then it should be possible to link too.
10019
10020 { set +x
10021 $as_echo "$at_srcdir/search-path.at:89: \$LIBTOOL --mode=link --tag=CC --tag=disable-static \\
10022           \$CC \$CFLAGS \$LDFLAGS -o libgc.la gc.lo -rpath /nowhere -luser32"
10023 at_fn_check_prepare_notrace 'an embedded newline' "search-path.at:89"
10024 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC --tag=disable-static \
10025           $CC $CFLAGS $LDFLAGS -o libgc.la gc.lo -rpath /nowhere -luser32
10026 ) >>"$at_stdout" 2>>"$at_stderr"
10027 at_status=$? at_failed=false
10028 $at_check_filter
10029 echo stderr:; cat "$at_stderr"
10030 echo stdout:; cat "$at_stdout"
10031 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:89"
10032 $at_failed && at_fn_log_failure
10033 $at_traceon; }
10034
10035
10036 # If -luser32 was found, then libtool will build a shared library,
10037 # otherwise libtool will fall back to creating a static library.
10038 { set +x
10039 $as_echo "$at_srcdir/search-path.at:95: grep old_library=\\'\\' libgc.la"
10040 at_fn_check_prepare_trace "search-path.at:95"
10041 ( $at_check_trace; grep old_library=\'\' libgc.la
10042 ) >>"$at_stdout" 2>>"$at_stderr"
10043 at_status=$? at_failed=false
10044 $at_check_filter
10045 at_fn_diff_devnull "$at_stderr" || at_failed=:
10046 echo stdout:; cat "$at_stdout"
10047 at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:95"
10048 $at_failed && at_fn_log_failure
10049 $at_traceon; }
10050
10051
10052   set +x
10053   $at_times_p && times >"$at_times_file"
10054 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10055 read at_status <"$at_status_file"
10056 #AT_STOP_47
10057 #AT_START_48
10058 at_fn_group_banner 48 'indirect_deps.at:25' \
10059   "indirect convenience" "                           " 3
10060 at_xfail=no
10061 (
10062   $as_echo "48. $at_setup_line: testing $at_desc ..."
10063   $at_traceon
10064
10065
10066
10067 cat >a.c <<'_ATEOF'
10068
10069 #include <math.h>
10070 int a () { return 0; }
10071 double ad (double x) { return sin (x); }
10072 _ATEOF
10073
10074 cat >b.c <<'_ATEOF'
10075
10076 extern int a ();
10077 extern double ad (double);
10078 int b () { return a () + (int) ad (0.0); }
10079 _ATEOF
10080
10081 cat >c.c <<'_ATEOF'
10082
10083 extern int b ();
10084 int c () { return b (); }
10085 _ATEOF
10086
10087 cat >m.c <<'_ATEOF'
10088
10089 extern int c ();
10090 int main () { return c (); }
10091 _ATEOF
10092
10093
10094 LDFLAGS="$LDFLAGS -no-undefined"
10095 for file in a.c b.c c.c; do
10096   $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file
10097 done
10098 $CC $CPPFLAGS $CFLAGS -c m.c
10099
10100 # liba is an indirect dependency of libd and of libconv.
10101 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath /nowhere -lm
10102 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b.lo liba.la -rpath /nowhere
10103 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la c.lo libb.la
10104 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libd.la libconv.la -rpath /nowhere
10105
10106 for st in '' -static; do
10107   { set +x
10108 $as_echo "$at_srcdir/indirect_deps.at:60: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m.\$OBJEXT libd.la"
10109 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la" "indirect_deps.at:60"
10110 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la
10111 ) >>"$at_stdout" 2>>"$at_stderr"
10112 at_status=$? at_failed=false
10113 $at_check_filter
10114 echo stderr:; cat "$at_stderr"
10115 echo stdout:; cat "$at_stdout"
10116 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:60"
10117 $at_failed && at_fn_log_failure
10118 $at_traceon; }
10119
10120   { set +x
10121 $as_echo "$at_srcdir/indirect_deps.at:62: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m.\$OBJEXT libconv.la"
10122 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la" "indirect_deps.at:62"
10123 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la
10124 ) >>"$at_stdout" 2>>"$at_stderr"
10125 at_status=$? at_failed=false
10126 $at_check_filter
10127 echo stderr:; cat "$at_stderr"
10128 echo stdout:; cat "$at_stdout"
10129 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:62"
10130 $at_failed && at_fn_log_failure
10131 $at_traceon; }
10132
10133   lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10134 { set +x
10135 $as_echo "$at_srcdir/indirect_deps.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?;                    test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10136 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "indirect_deps.at:64"
10137 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10138 ) >>"$at_stdout" 2>>"$at_stderr"
10139 at_status=$? at_failed=false
10140 $at_check_filter
10141 at_fn_diff_devnull "$at_stderr" || at_failed=:
10142 at_fn_diff_devnull "$at_stdout" || at_failed=:
10143 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:64"
10144 $at_failed && at_fn_log_failure
10145 $at_traceon; }
10146
10147
10148   lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10149 { set +x
10150 $as_echo "$at_srcdir/indirect_deps.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?;                    test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10151 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "indirect_deps.at:65"
10152 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10153 ) >>"$at_stdout" 2>>"$at_stderr"
10154 at_status=$? at_failed=false
10155 $at_check_filter
10156 at_fn_diff_devnull "$at_stderr" || at_failed=:
10157 at_fn_diff_devnull "$at_stdout" || at_failed=:
10158 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:65"
10159 $at_failed && at_fn_log_failure
10160 $at_traceon; }
10161
10162
10163 done
10164
10165   set +x
10166   $at_times_p && times >"$at_times_file"
10167 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10168 read at_status <"$at_status_file"
10169 #AT_STOP_48
10170 #AT_START_49
10171 at_fn_group_banner 49 'indirect_deps.at:71' \
10172   "indirect uninstalled" "                           " 3
10173 at_xfail=no
10174 (
10175   $as_echo "49. $at_setup_line: testing $at_desc ..."
10176   $at_traceon
10177
10178
10179
10180 cat >a.c <<'_ATEOF'
10181
10182 int a () { return 0; }
10183 _ATEOF
10184
10185 cat >b.c <<'_ATEOF'
10186
10187 extern int a ();
10188 int b () { return a (); }
10189 _ATEOF
10190
10191 cat >c.c <<'_ATEOF'
10192
10193 extern int b ();
10194 int c () { return b (); }
10195 _ATEOF
10196
10197
10198 cat >m1.c <<'_ATEOF'
10199
10200 extern int b ();
10201 int main () { return b (); }
10202 _ATEOF
10203
10204 cat >m2.c <<'_ATEOF'
10205
10206 extern int c ();
10207 int main () { return c (); }
10208 _ATEOF
10209
10210
10211 mkdir a b c
10212 LDFLAGS="$LDFLAGS -no-undefined"
10213 for file in a.c b.c c.c; do
10214   $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file
10215 done
10216 for file in m1.c m2.c; do
10217   $CC $CPPFLAGS $CFLAGS -c $file
10218 done
10219
10220 for st in '' -static; do
10221   $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a.lo -rpath /nowherea
10222   $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/libb.la b.lo a/liba.la -rpath /nowhereb
10223   $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o c/libcee.la c.lo b/libb.la -rpath /nowherec
10224
10225   { set +x
10226 $as_echo "$at_srcdir/indirect_deps.at:109: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m1.\$OBJEXT b/libb.la"
10227 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la" "indirect_deps.at:109"
10228 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la
10229 ) >>"$at_stdout" 2>>"$at_stderr"
10230 at_status=$? at_failed=false
10231 $at_check_filter
10232 echo stderr:; cat "$at_stderr"
10233 echo stdout:; cat "$at_stdout"
10234 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:109"
10235 $at_failed && at_fn_log_failure
10236 $at_traceon; }
10237
10238   { set +x
10239 $as_echo "$at_srcdir/indirect_deps.at:111: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m2.\$OBJEXT c/libcee.la"
10240 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la" "indirect_deps.at:111"
10241 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la
10242 ) >>"$at_stdout" 2>>"$at_stderr"
10243 at_status=$? at_failed=false
10244 $at_check_filter
10245 echo stderr:; cat "$at_stderr"
10246 echo stdout:; cat "$at_stdout"
10247 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:111"
10248 $at_failed && at_fn_log_failure
10249 $at_traceon; }
10250
10251   lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10252 { set +x
10253 $as_echo "$at_srcdir/indirect_deps.at:113: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10254 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "indirect_deps.at:113"
10255 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10256 ) >>"$at_stdout" 2>>"$at_stderr"
10257 at_status=$? at_failed=false
10258 $at_check_filter
10259 at_fn_diff_devnull "$at_stderr" || at_failed=:
10260 at_fn_diff_devnull "$at_stdout" || at_failed=:
10261 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:113"
10262 $at_failed && at_fn_log_failure
10263 $at_traceon; }
10264
10265
10266   lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10267 { set +x
10268 $as_echo "$at_srcdir/indirect_deps.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10269 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "indirect_deps.at:114"
10270 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10271 ) >>"$at_stdout" 2>>"$at_stderr"
10272 at_status=$? at_failed=false
10273 $at_check_filter
10274 at_fn_diff_devnull "$at_stderr" || at_failed=:
10275 at_fn_diff_devnull "$at_stdout" || at_failed=:
10276 at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:114"
10277 $at_failed && at_fn_log_failure
10278 $at_traceon; }
10279
10280
10281 done
10282
10283   set +x
10284   $at_times_p && times >"$at_times_file"
10285 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10286 read at_status <"$at_status_file"
10287 #AT_STOP_49
10288 #AT_START_50
10289 at_fn_group_banner 50 'archive-in-archive.at:26' \
10290   "static library contains static library" "         " 3
10291 at_xfail=no
10292       case $AR in ar-lib\ * | *[/\\]ar-lib\ *) false;; *) :;; esac && at_xfail=yes
10293 (
10294   $as_echo "50. $at_setup_line: testing $at_desc ..."
10295   $at_traceon
10296
10297
10298
10299 # This test passes with MS lib.
10300
10301
10302 cat >foo.c <<'_ATEOF'
10303
10304 int foo() { return 1;}
10305 _ATEOF
10306
10307
10308 cat >bar.c <<'_ATEOF'
10309
10310 int bar() { return 1;}
10311 _ATEOF
10312
10313
10314 thisdir=`cd . && pwd`
10315 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c
10316 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c
10317 $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
10318 -o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir
10319 $LIBTOOL --mode=install cp libfoo.la $thisdir
10320 eval `$EGREP '^(old_library)=' < libfoo.la`
10321 libfoo=$old_library
10322 { set +x
10323 $as_echo "$at_srcdir/archive-in-archive.at:50: \$LIBTOOL --mode=link --tag=CC --tag=disable-shared \$CC \$CFLAGS \$LDFLAGS \\
10324          -o libbar.la bar.lo \$libfoo -version-info 1:0:0 -rpath \$thisdir"
10325 at_fn_check_prepare_notrace 'an embedded newline' "archive-in-archive.at:50"
10326 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \
10327          -o libbar.la bar.lo $libfoo -version-info 1:0:0 -rpath $thisdir
10328 ) >>"$at_stdout" 2>>"$at_stderr"
10329 at_status=$? at_failed=false
10330 $at_check_filter
10331 echo stderr:; cat "$at_stderr"
10332 echo stdout:; cat "$at_stdout"
10333 at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:50"
10334 $at_failed && at_fn_log_failure
10335 $at_traceon; }
10336
10337 { set +x
10338 $as_echo "$at_srcdir/archive-in-archive.at:53: \$LIBTOOL --mode=install cp libbar.la \$thisdir"
10339 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libbar.la $thisdir" "archive-in-archive.at:53"
10340 ( $at_check_trace; $LIBTOOL --mode=install cp libbar.la $thisdir
10341 ) >>"$at_stdout" 2>>"$at_stderr"
10342 at_status=$? at_failed=false
10343 $at_check_filter
10344 echo stderr:; cat "$at_stderr"
10345 echo stdout:; cat "$at_stdout"
10346 at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:53"
10347 $at_failed && at_fn_log_failure
10348 $at_traceon; }
10349
10350 eval `$EGREP '^(old_library)=' < libbar.la`
10351 libbar=$old_library
10352 { set +x
10353 $as_echo "$at_srcdir/archive-in-archive.at:56: \$AR -t \$libbar | grep \$libfoo"
10354 at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:56"
10355 ( $at_check_trace; $AR -t $libbar | grep $libfoo
10356 ) >>"$at_stdout" 2>>"$at_stderr"
10357 at_status=$? at_failed=false
10358 $at_check_filter
10359 echo stderr:; cat "$at_stderr"
10360 echo stdout:; cat "$at_stdout"
10361 at_fn_check_status 1 $at_status "$at_srcdir/archive-in-archive.at:56"
10362 $at_failed && at_fn_log_failure
10363 $at_traceon; }
10364
10365 { set +x
10366 $as_echo "$at_srcdir/archive-in-archive.at:57: \$AR -t \$libbar | grep foo.\$OBJEXT"
10367 at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:57"
10368 ( $at_check_trace; $AR -t $libbar | grep foo.$OBJEXT
10369 ) >>"$at_stdout" 2>>"$at_stderr"
10370 at_status=$? at_failed=false
10371 $at_check_filter
10372 echo stderr:; cat "$at_stderr"
10373 echo stdout:; cat "$at_stdout"
10374 at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:57"
10375 $at_failed && at_fn_log_failure
10376 $at_traceon; }
10377
10378 { set +x
10379 $as_echo "$at_srcdir/archive-in-archive.at:58: \$AR -t \$libbar | grep bar.\$OBJEXT"
10380 at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:58"
10381 ( $at_check_trace; $AR -t $libbar | grep bar.$OBJEXT
10382 ) >>"$at_stdout" 2>>"$at_stderr"
10383 at_status=$? at_failed=false
10384 $at_check_filter
10385 echo stderr:; cat "$at_stderr"
10386 echo stdout:; cat "$at_stdout"
10387 at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:58"
10388 $at_failed && at_fn_log_failure
10389 $at_traceon; }
10390
10391   set +x
10392   $at_times_p && times >"$at_times_file"
10393 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10394 read at_status <"$at_status_file"
10395 #AT_STOP_50
10396 #AT_START_51
10397 at_fn_group_banner 51 'exeext.at:26' \
10398   "both of -o prog and -o prog\$EXEEXT work" "        " 3
10399 at_xfail=no
10400 (
10401   $as_echo "51. $at_setup_line: testing $at_desc ..."
10402   $at_traceon
10403
10404
10405
10406 { set +x
10407 $as_echo "$at_srcdir/exeext.at:29: test -n \"\$EXEEXT\" || exit 77"
10408 at_fn_check_prepare_dynamic "test -n \"$EXEEXT\" || exit 77" "exeext.at:29"
10409 ( $at_check_trace; test -n "$EXEEXT" || exit 77
10410 ) >>"$at_stdout" 2>>"$at_stderr"
10411 at_status=$? at_failed=false
10412 $at_check_filter
10413 at_fn_diff_devnull "$at_stderr" || at_failed=:
10414 at_fn_diff_devnull "$at_stdout" || at_failed=:
10415 at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:29"
10416 $at_failed && at_fn_log_failure
10417 $at_traceon; }
10418
10419
10420 bin=`pwd`/bin
10421 binext=`pwd`/binext
10422 mkdir src $bin srcext $binext
10423
10424 cat >src/prog.c <<'_ATEOF'
10425
10426 int main(void) { return 0; }
10427 _ATEOF
10428
10429
10430 $CC $CPPFLAGS $CFLAGS -c src/prog.c -o src/prog.$OBJEXT
10431
10432 { set +x
10433 $as_echo "$at_srcdir/exeext.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/prog src/prog.\$OBJEXT"
10434 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog src/prog.$OBJEXT" "exeext.at:42"
10435 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog src/prog.$OBJEXT
10436 ) >>"$at_stdout" 2>>"$at_stderr"
10437 at_status=$? at_failed=false
10438 $at_check_filter
10439 echo stderr:; cat "$at_stderr"
10440 echo stdout:; cat "$at_stdout"
10441 at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:42"
10442 $at_failed && at_fn_log_failure
10443 $at_traceon; }
10444
10445 { set +x
10446 $as_echo "$at_srcdir/exeext.at:44: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o srcext/prog\$EXEEXT src/prog.\$OBJEXT"
10447 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT src/prog.$OBJEXT" "exeext.at:44"
10448 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT src/prog.$OBJEXT
10449 ) >>"$at_stdout" 2>>"$at_stderr"
10450 at_status=$? at_failed=false
10451 $at_check_filter
10452 echo stderr:; cat "$at_stderr"
10453 echo stdout:; cat "$at_stdout"
10454 at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:44"
10455 $at_failed && at_fn_log_failure
10456 $at_traceon; }
10457
10458
10459 $LIBTOOL --mode=install cp src/prog $bin/prog
10460 $LIBTOOL --mode=install cp srcext/prog$EXEEXT $binext/prog$EXEEXT
10461
10462 lt_exe=$bin/prog; if test -f "$bin/prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10463 { set +x
10464 $as_echo "$at_srcdir/exeext.at:50: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10465 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "exeext.at:50"
10466 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10467 ) >>"$at_stdout" 2>>"$at_stderr"
10468 at_status=$? at_failed=false
10469 $at_check_filter
10470 at_fn_diff_devnull "$at_stderr" || at_failed=:
10471 at_fn_diff_devnull "$at_stdout" || at_failed=:
10472 at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:50"
10473 $at_failed && at_fn_log_failure
10474 $at_traceon; }
10475
10476
10477 lt_exe=$binext/prog$EXEEXT; if test -f "$binext/prog$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10478 { set +x
10479 $as_echo "$at_srcdir/exeext.at:51: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10480 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "exeext.at:51"
10481 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10482 ) >>"$at_stdout" 2>>"$at_stderr"
10483 at_status=$? at_failed=false
10484 $at_check_filter
10485 at_fn_diff_devnull "$at_stderr" || at_failed=:
10486 at_fn_diff_devnull "$at_stdout" || at_failed=:
10487 at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:51"
10488 $at_failed && at_fn_log_failure
10489 $at_traceon; }
10490
10491
10492
10493   set +x
10494   $at_times_p && times >"$at_times_file"
10495 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10496 read at_status <"$at_status_file"
10497 #AT_STOP_51
10498 #AT_START_52
10499 at_fn_group_banner 52 'execute-mode.at:25' \
10500   "execute mode" "                                   " 3
10501 at_xfail=no
10502 (
10503   $as_echo "52. $at_setup_line: testing $at_desc ..."
10504   $at_traceon
10505
10506
10507
10508 eval `$LIBTOOL --config | $EGREP '^(FGREP)='`
10509
10510 cat >foo <<'_ATEOF'
10511 #! /bin/sh
10512 if test $# -gt 0; then
10513   for arg
10514   do
10515     printf %s\\n "$arg"
10516   done
10517 else
10518   :
10519 fi
10520 _ATEOF
10521
10522
10523 cat >lt-wrapper <<'_ATEOF'
10524 #! /bin/sh
10525 # Generated by GNU libtool.
10526 # fake wrapper script.
10527 program=lt-real
10528 progdir=.
10529 if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
10530   # Run the actual program with our arguments.
10531   exec "$progdir/$program" ${1+"$@"}
10532   echo "$0: cannot exec $program $*" >&2
10533   exit 1
10534 fi
10535 _ATEOF
10536
10537
10538 cat >lt-real <<'_ATEOF'
10539 #! /bin/sh
10540 for arg
10541 do
10542   printf %s\\n "$arg"
10543 done
10544 cat
10545 _ATEOF
10546
10547
10548 cat >libfakelib.la <<'_ATEOF'
10549 # libfakelib.la - a libtool library file
10550 # Generated by ltmain.sh (GNU libtool 1.2605 2008/03/04 22:31:32) 2.3a
10551 #
10552 # Please DO NOT delete this file!
10553 # It is necessary for linking the library.
10554
10555 dlname=''
10556 library_names=''
10557 old_library='libfakelib.a'
10558 inherited_linker_flags=''
10559 dependency_libs=''
10560 weak_library_names=''
10561 current=
10562 age=
10563 revision=
10564 installed=no
10565 shouldnotlink=yes
10566 dlopen=''
10567 dlpreopen=''
10568 libdir=''
10569 _ATEOF
10570
10571
10572 mkdir sub
10573 cp foo sub/foo
10574 chmod +x foo sub/foo lt-wrapper lt-real
10575
10576 cat >liba.c <<'_ATEOF'
10577 int a () { return 0; }
10578 _ATEOF
10579
10580
10581 cat >main.c <<'_ATEOF'
10582 #include <stdio.h>
10583 extern int a ();
10584 int main (int argc, char **argv)
10585 {
10586   int i;
10587   for (i=1; i<argc; ++i)
10588     {
10589       if (i != 1)
10590         fputc ('\n', stdout);
10591       fputs (argv[i], stdout);
10592     }
10593   fputc ('\n', stdout);
10594   return a ();
10595 }
10596 _ATEOF
10597
10598
10599 LDFLAGS="$LDFLAGS -no-undefined"
10600 instdir=`pwd`/inst
10601 libdir=$instdir/lib
10602
10603 { set +x
10604 $as_echo "$at_srcdir/execute-mode.at:117: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
10605 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "execute-mode.at:117"
10606 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
10607 ) >>"$at_stdout" 2>>"$at_stderr"
10608 at_status=$? at_failed=false
10609 $at_check_filter
10610 echo stderr:; cat "$at_stderr"
10611 echo stdout:; cat "$at_stdout"
10612 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:117"
10613 $at_failed && at_fn_log_failure
10614 $at_traceon; }
10615
10616 { set +x
10617 $as_echo "$at_srcdir/execute-mode.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la -rpath \$libdir liba.lo"
10618 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo" "execute-mode.at:119"
10619 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo
10620 ) >>"$at_stdout" 2>>"$at_stderr"
10621 at_status=$? at_failed=false
10622 $at_check_filter
10623 echo stderr:; cat "$at_stderr"
10624 echo stdout:; cat "$at_stdout"
10625 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:119"
10626 $at_failed && at_fn_log_failure
10627 $at_traceon; }
10628
10629 { set +x
10630 $as_echo "$at_srcdir/execute-mode.at:121: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
10631 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "execute-mode.at:121"
10632 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
10633 ) >>"$at_stdout" 2>>"$at_stderr"
10634 at_status=$? at_failed=false
10635 $at_check_filter
10636 echo stderr:; cat "$at_stderr"
10637 echo stdout:; cat "$at_stdout"
10638 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:121"
10639 $at_failed && at_fn_log_failure
10640 $at_traceon; }
10641
10642 { set +x
10643 $as_echo "$at_srcdir/execute-mode.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la"
10644 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "execute-mode.at:123"
10645 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la
10646 ) >>"$at_stdout" 2>>"$at_stderr"
10647 at_status=$? at_failed=false
10648 $at_check_filter
10649 echo stderr:; cat "$at_stderr"
10650 echo stdout:; cat "$at_stdout"
10651 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:123"
10652 $at_failed && at_fn_log_failure
10653 $at_traceon; }
10654
10655
10656 # end of preparatory blurb.
10657 # Now, when doing the tests, we both try the fake wrappers plus the real one
10658 # (only the latter exposes the C wrappers used for w32 systems).
10659 # With the latter, however, we need to ignore additional output; esp. wine
10660 # may be rather noisy.
10661
10662 { set +x
10663 $as_echo "$at_srcdir/execute-mode.at:132: \$LIBTOOL --mode=execute ./foo"
10664 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo" "execute-mode.at:132"
10665 ( $at_check_trace; $LIBTOOL --mode=execute ./foo
10666 ) >>"$at_stdout" 2>>"$at_stderr"
10667 at_status=$? at_failed=false
10668 $at_check_filter
10669 at_fn_diff_devnull "$at_stderr" || at_failed=:
10670 at_fn_diff_devnull "$at_stdout" || at_failed=:
10671 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:132"
10672 $at_failed && at_fn_log_failure
10673 $at_traceon; }
10674
10675 { set +x
10676 $as_echo "$at_srcdir/execute-mode.at:133: \$LIBTOOL --mode=execute sub/foo"
10677 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute sub/foo" "execute-mode.at:133"
10678 ( $at_check_trace; $LIBTOOL --mode=execute sub/foo
10679 ) >>"$at_stdout" 2>>"$at_stderr"
10680 at_status=$? at_failed=false
10681 $at_check_filter
10682 at_fn_diff_devnull "$at_stderr" || at_failed=:
10683 at_fn_diff_devnull "$at_stdout" || at_failed=:
10684 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:133"
10685 $at_failed && at_fn_log_failure
10686 $at_traceon; }
10687
10688 { set +x
10689 $as_echo "$at_srcdir/execute-mode.at:134: \$LIBTOOL --mode=execute ./foo foo"
10690 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo foo" "execute-mode.at:134"
10691 ( $at_check_trace; $LIBTOOL --mode=execute ./foo foo
10692 ) >>"$at_stdout" 2>>"$at_stderr"
10693 at_status=$? at_failed=false
10694 $at_check_filter
10695 at_fn_diff_devnull "$at_stderr" || at_failed=:
10696 echo >>"$at_stdout"; $as_echo "foo
10697 " | \
10698   $at_diff - "$at_stdout" || at_failed=:
10699 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:134"
10700 $at_failed && at_fn_log_failure
10701 $at_traceon; }
10702
10703 { set +x
10704 $as_echo "$at_srcdir/execute-mode.at:136: \$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null"
10705 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null" "execute-mode.at:136"
10706 ( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper foo </dev/null
10707 ) >>"$at_stdout" 2>>"$at_stderr"
10708 at_status=$? at_failed=false
10709 $at_check_filter
10710 at_fn_diff_devnull "$at_stderr" || at_failed=:
10711 echo >>"$at_stdout"; $as_echo "foo
10712 " | \
10713   $at_diff - "$at_stdout" || at_failed=:
10714 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:136"
10715 $at_failed && at_fn_log_failure
10716 $at_traceon; }
10717
10718 { set +x
10719 $as_echo "$at_srcdir/execute-mode.at:138: cd sub && \$LIBTOOL --mode=execute ./foo ../foo"
10720 at_fn_check_prepare_dynamic "cd sub && $LIBTOOL --mode=execute ./foo ../foo" "execute-mode.at:138"
10721 ( $at_check_trace; cd sub && $LIBTOOL --mode=execute ./foo ../foo
10722 ) >>"$at_stdout" 2>>"$at_stderr"
10723 at_status=$? at_failed=false
10724 $at_check_filter
10725 at_fn_diff_devnull "$at_stderr" || at_failed=:
10726 echo >>"$at_stdout"; $as_echo "../foo
10727 " | \
10728   $at_diff - "$at_stdout" || at_failed=:
10729 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:138"
10730 $at_failed && at_fn_log_failure
10731 $at_traceon; }
10732
10733 # suppose that ./foo is gdb, and lt-wrapper is the wrapper script.
10734 { set +x
10735 $as_echo "$at_srcdir/execute-mode.at:141: \$LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null"
10736 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null" "execute-mode.at:141"
10737 ( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper bar baz </dev/null
10738 ) >>"$at_stdout" 2>>"$at_stderr"
10739 at_status=$? at_failed=false
10740 $at_check_filter
10741 at_fn_diff_devnull "$at_stderr" || at_failed=:
10742 echo >>"$at_stdout"; $as_echo "./lt-real
10743 bar
10744 baz
10745 " | \
10746   $at_diff - "$at_stdout" || at_failed=:
10747 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:141"
10748 $at_failed && at_fn_log_failure
10749 $at_traceon; }
10750
10751
10752 # check that stdin works even with -dlopen.
10753 { set +x
10754 $as_echo "$at_srcdir/execute-mode.at:148: echo bar | \$LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo"
10755 at_fn_check_prepare_notrace 'a shell pipeline' "execute-mode.at:148"
10756 ( $at_check_trace; echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo
10757 ) >>"$at_stdout" 2>>"$at_stderr"
10758 at_status=$? at_failed=false
10759 $at_check_filter
10760 at_fn_diff_devnull "$at_stderr" || at_failed=:
10761 echo >>"$at_stdout"; $as_echo "foo
10762 bar
10763 " | \
10764   $at_diff - "$at_stdout" || at_failed=:
10765 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:148"
10766 $at_failed && at_fn_log_failure
10767 $at_traceon; }
10768
10769
10770 # Check that a missing real program causes an error.
10771 # The error message and code are likely to be 126,
10772 # "No such file or directory" but system-dependent.
10773 mv -f lt-real lt-backup
10774 { set +x
10775 $as_echo "$at_srcdir/execute-mode.at:157: \$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1"
10776 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1" "execute-mode.at:157"
10777 ( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper foo </dev/null || exit 1
10778 ) >>"$at_stdout" 2>>"$at_stderr"
10779 at_status=$? at_failed=false
10780 $at_check_filter
10781 echo stderr:; cat "$at_stderr"
10782 echo stdout:; cat "$at_stdout"
10783 at_fn_check_status 1 $at_status "$at_srcdir/execute-mode.at:157"
10784 $at_failed && at_fn_log_failure
10785 $at_traceon; }
10786
10787 mv -f lt-backup lt-real
10788
10789 # Now use arguments that require decent quoting.
10790 { set +x
10791 $as_echo "$at_srcdir/execute-mode.at:162: \$LIBTOOL --mode=execute ./foo \"arg  with special chars: \\\$!&*\\\`'()\""
10792 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:162"
10793 ( $at_check_trace; $LIBTOOL --mode=execute ./foo "arg  with special chars: \$!&*\`'()"
10794 ) >>"$at_stdout" 2>>"$at_stderr"
10795 at_status=$? at_failed=false
10796 $at_check_filter
10797 at_fn_diff_devnull "$at_stderr" || at_failed=:
10798 echo >>"$at_stdout"; $as_echo "arg  with special chars: \$!&*\`'()
10799 " | \
10800   $at_diff - "$at_stdout" || at_failed=:
10801 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:162"
10802 $at_failed && at_fn_log_failure
10803 $at_traceon; }
10804
10805 { set +x
10806 $as_echo "$at_srcdir/execute-mode.at:165: \$LIBTOOL --mode=execute ./lt-wrapper \"arg  with special chars: \\\$!&*\\\`'()\" </dev/null"
10807 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:165"
10808 ( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper "arg  with special chars: \$!&*\`'()" </dev/null
10809 ) >>"$at_stdout" 2>>"$at_stderr"
10810 at_status=$? at_failed=false
10811 $at_check_filter
10812 at_fn_diff_devnull "$at_stderr" || at_failed=:
10813 echo >>"$at_stdout"; $as_echo "arg  with special chars: \$!&*\`'()
10814 " | \
10815   $at_diff - "$at_stdout" || at_failed=:
10816 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:165"
10817 $at_failed && at_fn_log_failure
10818 $at_traceon; }
10819
10820 { set +x
10821 $as_echo "$at_srcdir/execute-mode.at:168: \$LIBTOOL --mode=execute ./foo lt-wrapper \"arg  with special chars: \\\$!&*\\\`'()\""
10822 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:168"
10823 ( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper "arg  with special chars: \$!&*\`'()"
10824 ) >>"$at_stdout" 2>>"$at_stderr"
10825 at_status=$? at_failed=false
10826 $at_check_filter
10827 at_fn_diff_devnull "$at_stderr" || at_failed=:
10828 echo >>"$at_stdout"; $as_echo "./lt-real
10829 arg  with special chars: \$!&*\`'()
10830 " | \
10831   $at_diff - "$at_stdout" || at_failed=:
10832 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:168"
10833 $at_failed && at_fn_log_failure
10834 $at_traceon; }
10835
10836 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
10837 { set +x
10838 $as_echo "$at_srcdir/execute-mode.at:172: if \$LIBTOOL --mode=execute  \"\$lt_exe\" \"arg  with special chars: \\\$!&*\\\`'()\"; then :; else lt_status=\$?;               test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
10839 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:172"
10840 ( $at_check_trace; if $LIBTOOL --mode=execute  "$lt_exe" "arg  with special chars: \$!&*\`'()"; then :; else lt_status=$?;                 test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
10841 ) >>"$at_stdout" 2>>"$at_stderr"
10842 at_status=$? at_failed=false
10843 $at_check_filter
10844 echo stderr:; cat "$at_stderr"
10845 echo stdout:; tee stdout <"$at_stdout"
10846 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:172"
10847 $at_failed && at_fn_log_failure
10848 $at_traceon; }
10849
10850
10851 { set +x
10852 $as_echo "$at_srcdir/execute-mode.at:174: \$FGREP 'arg  with special chars: \$!&*\`'\\''()' stdout"
10853 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:174"
10854 ( $at_check_trace; $FGREP 'arg  with special chars: $!&*`'\''()' stdout
10855 ) >>"$at_stdout" 2>>"$at_stderr"
10856 at_status=$? at_failed=false
10857 $at_check_filter
10858 at_fn_diff_devnull "$at_stderr" || at_failed=:
10859 echo stdout:; cat "$at_stdout"
10860 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:174"
10861 $at_failed && at_fn_log_failure
10862 $at_traceon; }
10863
10864
10865 # We always pair two args.  The first one is never the empty string.
10866 arg1=
10867 for arg2 in \
10868    'def ghi' '' \
10869    'd"e' 'f"g' \
10870    'd\"e' 'f\"g' \
10871    'd\\"e' 'f\\"g' \
10872    'd\\\"e' 'f\\\"g' \
10873    'd\' '' \
10874    'd\\' '' \
10875    'd\\\' '' \
10876    'd\\\\' '' \
10877    '<' '>' \
10878    '<def>' ''
10879 do
10880   if test -z "$arg1"; then
10881     arg1=$arg2; continue
10882   fi
10883   { set +x
10884 $as_echo "$at_srcdir/execute-mode.at:194: \$LIBTOOL --mode=execute ./foo abc \"\$arg1\" \"\$arg2\" xyz"
10885 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:194"
10886 ( $at_check_trace; $LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz
10887 ) >>"$at_stdout" 2>>"$at_stderr"
10888 at_status=$? at_failed=false
10889 $at_check_filter
10890 echo stderr:; cat "$at_stderr"
10891 echo stdout:; tee stdout <"$at_stdout"
10892 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:194"
10893 $at_failed && at_fn_log_failure
10894 $at_traceon; }
10895
10896   { set +x
10897 $as_echo "$at_srcdir/execute-mode.at:195: \$FGREP \"\$arg1\" stdout"
10898 at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:195"
10899 ( $at_check_trace; $FGREP "$arg1" stdout
10900 ) >>"$at_stdout" 2>>"$at_stderr"
10901 at_status=$? at_failed=false
10902 $at_check_filter
10903 at_fn_diff_devnull "$at_stderr" || at_failed=:
10904 echo stdout:; cat "$at_stdout"
10905 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:195"
10906 $at_failed && at_fn_log_failure
10907 $at_traceon; }
10908
10909   { set +x
10910 $as_echo "$at_srcdir/execute-mode.at:196: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout"
10911 at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:196"
10912 ( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout
10913 ) >>"$at_stdout" 2>>"$at_stderr"
10914 at_status=$? at_failed=false
10915 $at_check_filter
10916 at_fn_diff_devnull "$at_stderr" || at_failed=:
10917 echo stdout:; cat "$at_stdout"
10918 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:196"
10919 $at_failed && at_fn_log_failure
10920 $at_traceon; }
10921
10922   { set +x
10923 $as_echo "$at_srcdir/execute-mode.at:197: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
10924 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:197"
10925 ( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
10926 ) >>"$at_stdout" 2>>"$at_stderr"
10927 at_status=$? at_failed=false
10928 $at_check_filter
10929 at_fn_diff_devnull "$at_stderr" || at_failed=:
10930 at_fn_diff_devnull "$at_stdout" || at_failed=:
10931 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:197"
10932 $at_failed && at_fn_log_failure
10933 $at_traceon; }
10934
10935   { set +x
10936 $as_echo "$at_srcdir/execute-mode.at:198: \$LIBTOOL --mode=execute ./lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz </dev/null"
10937 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./lt-wrapper abc \"$arg1\" \"$arg2\" xyz </dev/null" "execute-mode.at:198"
10938 ( $at_check_trace; $LIBTOOL --mode=execute ./lt-wrapper abc "$arg1" "$arg2" xyz </dev/null
10939 ) >>"$at_stdout" 2>>"$at_stderr"
10940 at_status=$? at_failed=false
10941 $at_check_filter
10942 at_fn_diff_devnull "$at_stderr" || at_failed=:
10943 echo stdout:; tee stdout <"$at_stdout"
10944 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:198"
10945 $at_failed && at_fn_log_failure
10946 $at_traceon; }
10947
10948   { set +x
10949 $as_echo "$at_srcdir/execute-mode.at:199: \$FGREP \"\$arg1\" stdout"
10950 at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:199"
10951 ( $at_check_trace; $FGREP "$arg1" stdout
10952 ) >>"$at_stdout" 2>>"$at_stderr"
10953 at_status=$? at_failed=false
10954 $at_check_filter
10955 at_fn_diff_devnull "$at_stderr" || at_failed=:
10956 echo stdout:; cat "$at_stdout"
10957 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:199"
10958 $at_failed && at_fn_log_failure
10959 $at_traceon; }
10960
10961   { set +x
10962 $as_echo "$at_srcdir/execute-mode.at:200: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout"
10963 at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:200"
10964 ( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout
10965 ) >>"$at_stdout" 2>>"$at_stderr"
10966 at_status=$? at_failed=false
10967 $at_check_filter
10968 at_fn_diff_devnull "$at_stderr" || at_failed=:
10969 echo stdout:; cat "$at_stdout"
10970 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:200"
10971 $at_failed && at_fn_log_failure
10972 $at_traceon; }
10973
10974   { set +x
10975 $as_echo "$at_srcdir/execute-mode.at:201: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
10976 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:201"
10977 ( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
10978 ) >>"$at_stdout" 2>>"$at_stderr"
10979 at_status=$? at_failed=false
10980 $at_check_filter
10981 at_fn_diff_devnull "$at_stderr" || at_failed=:
10982 at_fn_diff_devnull "$at_stdout" || at_failed=:
10983 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:201"
10984 $at_failed && at_fn_log_failure
10985 $at_traceon; }
10986
10987   { set +x
10988 $as_echo "$at_srcdir/execute-mode.at:202: \$LIBTOOL --mode=execute ./foo lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz"
10989 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:202"
10990 ( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper abc "$arg1" "$arg2" xyz
10991 ) >>"$at_stdout" 2>>"$at_stderr"
10992 at_status=$? at_failed=false
10993 $at_check_filter
10994 at_fn_diff_devnull "$at_stderr" || at_failed=:
10995 echo stdout:; tee stdout <"$at_stdout"
10996 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:202"
10997 $at_failed && at_fn_log_failure
10998 $at_traceon; }
10999
11000   { set +x
11001 $as_echo "$at_srcdir/execute-mode.at:203: \$FGREP \"\$arg1\" stdout"
11002 at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:203"
11003 ( $at_check_trace; $FGREP "$arg1" stdout
11004 ) >>"$at_stdout" 2>>"$at_stderr"
11005 at_status=$? at_failed=false
11006 $at_check_filter
11007 at_fn_diff_devnull "$at_stderr" || at_failed=:
11008 echo stdout:; cat "$at_stdout"
11009 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:203"
11010 $at_failed && at_fn_log_failure
11011 $at_traceon; }
11012
11013   { set +x
11014 $as_echo "$at_srcdir/execute-mode.at:204: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout"
11015 at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:204"
11016 ( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout
11017 ) >>"$at_stdout" 2>>"$at_stderr"
11018 at_status=$? at_failed=false
11019 $at_check_filter
11020 at_fn_diff_devnull "$at_stderr" || at_failed=:
11021 echo stdout:; cat "$at_stdout"
11022 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:204"
11023 $at_failed && at_fn_log_failure
11024 $at_traceon; }
11025
11026   { set +x
11027 $as_echo "$at_srcdir/execute-mode.at:205: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4"
11028 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:205"
11029 ( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4
11030 ) >>"$at_stdout" 2>>"$at_stderr"
11031 at_status=$? at_failed=false
11032 $at_check_filter
11033 at_fn_diff_devnull "$at_stderr" || at_failed=:
11034 at_fn_diff_devnull "$at_stdout" || at_failed=:
11035 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:205"
11036 $at_failed && at_fn_log_failure
11037 $at_traceon; }
11038
11039   { set +x
11040 $as_echo "$at_srcdir/execute-mode.at:206: \$LIBTOOL --mode=execute ./main\$EXEEXT abc \"\$arg1\" \"\$arg2\" xyz"
11041 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./main$EXEEXT abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:206"
11042 ( $at_check_trace; $LIBTOOL --mode=execute ./main$EXEEXT abc "$arg1" "$arg2" xyz
11043 ) >>"$at_stdout" 2>>"$at_stderr"
11044 at_status=$? at_failed=false
11045 $at_check_filter
11046 at_fn_diff_devnull "$at_stderr" || at_failed=:
11047 echo stdout:; tee stdout <"$at_stdout"
11048 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:206"
11049 $at_failed && at_fn_log_failure
11050 $at_traceon; }
11051
11052   { set +x
11053 $as_echo "$at_srcdir/execute-mode.at:207: \$FGREP \"\$arg1\" stdout"
11054 at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:207"
11055 ( $at_check_trace; $FGREP "$arg1" stdout
11056 ) >>"$at_stdout" 2>>"$at_stderr"
11057 at_status=$? at_failed=false
11058 $at_check_filter
11059 at_fn_diff_devnull "$at_stderr" || at_failed=:
11060 echo stdout:; cat "$at_stdout"
11061 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:207"
11062 $at_failed && at_fn_log_failure
11063 $at_traceon; }
11064
11065   { set +x
11066 $as_echo "$at_srcdir/execute-mode.at:208: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout"
11067 at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:208"
11068 ( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout
11069 ) >>"$at_stdout" 2>>"$at_stderr"
11070 at_status=$? at_failed=false
11071 $at_check_filter
11072 at_fn_diff_devnull "$at_stderr" || at_failed=:
11073 echo stdout:; cat "$at_stdout"
11074 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:208"
11075 $at_failed && at_fn_log_failure
11076 $at_traceon; }
11077
11078   # Do not match EOL here, cross setups may have an extra \r here.
11079   { set +x
11080 $as_echo "$at_srcdir/execute-mode.at:210: test \`sed -n '/^abc/,/^xyz/p' stdout | wc -l\` -eq 4"
11081 at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:210"
11082 ( $at_check_trace; test `sed -n '/^abc/,/^xyz/p' stdout | wc -l` -eq 4
11083 ) >>"$at_stdout" 2>>"$at_stderr"
11084 at_status=$? at_failed=false
11085 $at_check_filter
11086 at_fn_diff_devnull "$at_stderr" || at_failed=:
11087 at_fn_diff_devnull "$at_stdout" || at_failed=:
11088 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:210"
11089 $at_failed && at_fn_log_failure
11090 $at_traceon; }
11091
11092   arg1=
11093 done
11094
11095 # Check that .la files are not transformed by the wrapper searching loop.
11096 { set +x
11097 $as_echo "$at_srcdir/execute-mode.at:215: \$LIBTOOL --mode=execute echo ./main\$EXEEXT liba.lo libfakelib.la"
11098 at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la" "execute-mode.at:215"
11099 ( $at_check_trace; $LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la
11100 ) >>"$at_stdout" 2>>"$at_stderr"
11101 at_status=$? at_failed=false
11102 $at_check_filter
11103 at_fn_diff_devnull "$at_stderr" || at_failed=:
11104 echo stdout:; tee stdout <"$at_stdout"
11105 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:215"
11106 $at_failed && at_fn_log_failure
11107 $at_traceon; }
11108
11109 # This could be .libs/lt-main or similar (or just plain `main').
11110 { set +x
11111 $as_echo "$at_srcdir/execute-mode.at:217: grep main stdout"
11112 at_fn_check_prepare_trace "execute-mode.at:217"
11113 ( $at_check_trace; grep main stdout
11114 ) >>"$at_stdout" 2>>"$at_stderr"
11115 at_status=$? at_failed=false
11116 $at_check_filter
11117 at_fn_diff_devnull "$at_stderr" || at_failed=:
11118 echo stdout:; cat "$at_stdout"
11119 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:217"
11120 $at_failed && at_fn_log_failure
11121 $at_traceon; }
11122
11123 { set +x
11124 $as_echo "$at_srcdir/execute-mode.at:218: grep liba.lo stdout"
11125 at_fn_check_prepare_trace "execute-mode.at:218"
11126 ( $at_check_trace; grep liba.lo stdout
11127 ) >>"$at_stdout" 2>>"$at_stderr"
11128 at_status=$? at_failed=false
11129 $at_check_filter
11130 at_fn_diff_devnull "$at_stderr" || at_failed=:
11131 echo stdout:; cat "$at_stdout"
11132 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:218"
11133 $at_failed && at_fn_log_failure
11134 $at_traceon; }
11135
11136 { set +x
11137 $as_echo "$at_srcdir/execute-mode.at:219: grep libfakelib.la stdout"
11138 at_fn_check_prepare_trace "execute-mode.at:219"
11139 ( $at_check_trace; grep libfakelib.la stdout
11140 ) >>"$at_stdout" 2>>"$at_stderr"
11141 at_status=$? at_failed=false
11142 $at_check_filter
11143 at_fn_diff_devnull "$at_stderr" || at_failed=:
11144 echo stdout:; cat "$at_stdout"
11145 at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:219"
11146 $at_failed && at_fn_log_failure
11147 $at_traceon; }
11148
11149
11150   set +x
11151   $at_times_p && times >"$at_times_file"
11152 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11153 read at_status <"$at_status_file"
11154 #AT_STOP_52
11155 #AT_START_53
11156 at_fn_group_banner 53 'bindir.at:64' \
11157   "bindir basic lib test" "                          " 3
11158 at_xfail=no
11159 (
11160   $as_echo "53. $at_setup_line: testing $at_desc ..."
11161   $at_traceon
11162
11163
11164 bindirneeded=:
11165 case "$host_os" in
11166   cygwin*|mingw*|cegcc*)
11167     ;;
11168   *)
11169     bindirneeded=false
11170     ;;
11171 esac
11172
11173 ####
11174 # These routines save the PATH before a test and restore it after,
11175 # prepending a chosen directory to the path on the platforms where
11176 # -bindir is needed after saving.
11177 #
11178
11179 func_save_and_prepend_path ()
11180 {
11181   save_PATH=$PATH
11182   if $bindirneeded ; then
11183     PATH=$1:$PATH
11184   fi
11185   export PATH
11186 }
11187
11188 func_restore_path ()
11189 {
11190   PATH=$save_PATH
11191   export PATH
11192 }
11193
11194 cat >foo.c <<'_ATEOF'
11195
11196 int x=11;
11197 _ATEOF
11198
11199
11200 cat >baz.c <<'_ATEOF'
11201
11202 extern int x;
11203 int baz (void);
11204 int baz (void) { return x;}
11205 _ATEOF
11206
11207
11208 cat >bar.c <<'_ATEOF'
11209
11210 extern int baz (void);
11211 int y=3;
11212 int bar (void);
11213 int bar (void) { return y + baz ();}
11214 _ATEOF
11215
11216
11217 cat >main.c <<'_ATEOF'
11218
11219 #include <stdlib.h>
11220 extern int baz (void);
11221 extern int bar (void);
11222 int main() {
11223 if (baz () + bar () - 25) abort ();
11224 return 0;
11225 }
11226 _ATEOF
11227
11228
11229
11230 curdir=`pwd`
11231 eval "`$LIBTOOL --config | grep '^objdir='`"
11232
11233 { set +x
11234 $as_echo "$at_srcdir/bindir.at:127: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c"
11235 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:127"
11236 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c
11237 ) >>"$at_stdout" 2>>"$at_stderr"
11238 at_status=$? at_failed=false
11239 $at_check_filter
11240 echo stderr:; cat "$at_stderr"
11241 echo stdout:; cat "$at_stdout"
11242 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:127"
11243 $at_failed && at_fn_log_failure
11244 $at_traceon; }
11245
11246 { set +x
11247 $as_echo "$at_srcdir/bindir.at:128: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c"
11248 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:128"
11249 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c
11250 ) >>"$at_stdout" 2>>"$at_stderr"
11251 at_status=$? at_failed=false
11252 $at_check_filter
11253 echo stderr:; cat "$at_stderr"
11254 echo stdout:; cat "$at_stdout"
11255 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:128"
11256 $at_failed && at_fn_log_failure
11257 $at_traceon; }
11258
11259 { set +x
11260 $as_echo "$at_srcdir/bindir.at:129: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo baz.lo -rpath \$curdir/\$objdir"
11261 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir" "bindir.at:129"
11262 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir
11263 ) >>"$at_stdout" 2>>"$at_stderr"
11264 at_status=$? at_failed=false
11265 $at_check_filter
11266 echo stderr:; cat "$at_stderr"
11267 echo stdout:; cat "$at_stdout"
11268 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:129"
11269 $at_failed && at_fn_log_failure
11270 $at_traceon; }
11271
11272
11273 { set +x
11274 $as_echo "$at_srcdir/bindir.at:131: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c"
11275 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:131"
11276 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c
11277 ) >>"$at_stdout" 2>>"$at_stderr"
11278 at_status=$? at_failed=false
11279 $at_check_filter
11280 echo stderr:; cat "$at_stderr"
11281 echo stdout:; cat "$at_stdout"
11282 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:131"
11283 $at_failed && at_fn_log_failure
11284 $at_traceon; }
11285
11286 { set +x
11287 $as_echo "$at_srcdir/bindir.at:132: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS bar.lo libfoo.la -rpath \$curdir/\$objdir"
11288 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir" "bindir.at:132"
11289 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir
11290 ) >>"$at_stdout" 2>>"$at_stderr"
11291 at_status=$? at_failed=false
11292 $at_check_filter
11293 echo stderr:; cat "$at_stderr"
11294 echo stdout:; cat "$at_stdout"
11295 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:132"
11296 $at_failed && at_fn_log_failure
11297 $at_traceon; }
11298
11299
11300 { set +x
11301 $as_echo "$at_srcdir/bindir.at:134: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c"
11302 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:134"
11303 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c
11304 ) >>"$at_stdout" 2>>"$at_stderr"
11305 at_status=$? at_failed=false
11306 $at_check_filter
11307 echo stderr:; cat "$at_stderr"
11308 echo stdout:; cat "$at_stdout"
11309 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:134"
11310 $at_failed && at_fn_log_failure
11311 $at_traceon; }
11312
11313 { set +x
11314 $as_echo "$at_srcdir/bindir.at:135: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libbar.la libfoo.la"
11315 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la" "bindir.at:135"
11316 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la
11317 ) >>"$at_stdout" 2>>"$at_stderr"
11318 at_status=$? at_failed=false
11319 $at_check_filter
11320 echo stderr:; cat "$at_stderr"
11321 echo stdout:; cat "$at_stdout"
11322 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:135"
11323 $at_failed && at_fn_log_failure
11324 $at_traceon; }
11325
11326
11327 # Check both static and shared versions run.  We don't install them
11328 # here, that will be covered by the later tests; we've rpath'd things
11329 # so that they can all be run in situ.
11330
11331 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
11332 { set +x
11333 $as_echo "$at_srcdir/bindir.at:141: if \$LIBTOOL --mode=execute  \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
11334 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute  \"$lt_exe\" ; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "bindir.at:141"
11335 ( $at_check_trace; if $LIBTOOL --mode=execute  "$lt_exe" ; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
11336 ) >>"$at_stdout" 2>>"$at_stderr"
11337 at_status=$? at_failed=false
11338 $at_check_filter
11339 at_fn_diff_devnull "$at_stderr" || at_failed=:
11340 at_fn_diff_devnull "$at_stdout" || at_failed=:
11341 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:141"
11342 $at_failed && at_fn_log_failure
11343 $at_traceon; }
11344
11345
11346
11347 # Ensure libraries can be found on PATH, if we are on one
11348 # of the affected platforms, before testing the shared version.
11349
11350 func_save_and_prepend_path $curdir/$objdir
11351 $bindirneeded && {
11352   lt_exe=$objdir/main; if test -f "$objdir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
11353 { set +x
11354 $as_echo "$at_srcdir/bindir.at:148: if \$LIBTOOL --mode=execute  \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
11355 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute  \"$lt_exe\" ; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "bindir.at:148"
11356 ( $at_check_trace; if $LIBTOOL --mode=execute  "$lt_exe" ; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
11357 ) >>"$at_stdout" 2>>"$at_stderr"
11358 at_status=$? at_failed=false
11359 $at_check_filter
11360 at_fn_diff_devnull "$at_stderr" || at_failed=:
11361 at_fn_diff_devnull "$at_stdout" || at_failed=:
11362 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:148"
11363 $at_failed && at_fn_log_failure
11364 $at_traceon; }
11365
11366
11367 }
11368
11369 #  In fact, prepending the PATH as above is superfluous on the windows
11370 # platforms that this feature is primarily aimed at, as the DLL search
11371 # path always includes the directory from which the app was launched.
11372 # To make sure it still works even when not side-by-side, we'll install
11373 # the main executable and execute it from there while the PATH still
11374 # points to the shared libs in the .libs subdir.  On other platforms,
11375 # the rpaths we set at link time will guarantee it runs from the bindir.
11376
11377 mkdir $curdir/bin
11378 { set +x
11379 $as_echo "$at_srcdir/bindir.at:160: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/bin/main\$EXEEXT"
11380 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT" "bindir.at:160"
11381 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT
11382 ) >>"$at_stdout" 2>>"$at_stderr"
11383 at_status=$? at_failed=false
11384 $at_check_filter
11385 echo stderr:; cat "$at_stderr"
11386 echo stdout:; cat "$at_stdout"
11387 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:160"
11388 $at_failed && at_fn_log_failure
11389 $at_traceon; }
11390
11391 lt_exe=$curdir/bin/main$EXEEXT; if test -f "$curdir/bin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
11392 { set +x
11393 $as_echo "$at_srcdir/bindir.at:161: if \"\$lt_exe\" ; then :; else lt_status=\$?;          test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
11394 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "bindir.at:161"
11395 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
11396 ) >>"$at_stdout" 2>>"$at_stderr"
11397 at_status=$? at_failed=false
11398 $at_check_filter
11399 echo stderr:; cat "$at_stderr"
11400 echo stdout:; cat "$at_stdout"
11401 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:161"
11402 $at_failed && at_fn_log_failure
11403 $at_traceon; }
11404
11405
11406 func_restore_path
11407
11408   set +x
11409   $at_times_p && times >"$at_times_file"
11410 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11411 read at_status <"$at_status_file"
11412 #AT_STOP_53
11413 #AT_START_54
11414 at_fn_group_banner 54 'bindir.at:173' \
11415   "bindir install tests" "                           " 3
11416 at_xfail=no
11417 (
11418   $as_echo "54. $at_setup_line: testing $at_desc ..."
11419   $at_traceon
11420
11421
11422 bindirneeded=:
11423 case "$host_os" in
11424   cygwin*|mingw*|cegcc*)
11425     ;;
11426   *)
11427     bindirneeded=false
11428     ;;
11429 esac
11430
11431 eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
11432 { set +x
11433 $as_echo "$at_srcdir/bindir.at:185: test \"\$build_libtool_libs\" = yes || exit 77"
11434 at_fn_check_prepare_dynamic "test \"$build_libtool_libs\" = yes || exit 77" "bindir.at:185"
11435 ( $at_check_trace; test "$build_libtool_libs" = yes || exit 77
11436 ) >>"$at_stdout" 2>>"$at_stderr"
11437 at_status=$? at_failed=false
11438 $at_check_filter
11439 at_fn_diff_devnull "$at_stderr" || at_failed=:
11440 at_fn_diff_devnull "$at_stdout" || at_failed=:
11441 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:185"
11442 $at_failed && at_fn_log_failure
11443 $at_traceon; }
11444
11445
11446 ####
11447 # These routines save the PATH before a test and restore it after,
11448 # prepending a chosen directory to the path on the platforms where
11449 # -bindir is needed after saving.
11450 #
11451
11452 func_save_and_prepend_path ()
11453 {
11454   save_PATH=$PATH
11455   if $bindirneeded ; then
11456     PATH=$1:$PATH
11457   fi
11458   export PATH
11459 }
11460
11461 func_restore_path ()
11462 {
11463   PATH=$save_PATH
11464   export PATH
11465 }
11466
11467 cat >foo.c <<'_ATEOF'
11468
11469 int x=11;
11470 _ATEOF
11471
11472
11473 cat >baz.c <<'_ATEOF'
11474
11475 extern int x;
11476 int baz (void);
11477 int baz (void) { return x;}
11478 _ATEOF
11479
11480
11481 cat >bar.c <<'_ATEOF'
11482
11483 extern int baz (void);
11484 int y=3;
11485 int bar (void);
11486 int bar (void) { return y + baz ();}
11487 _ATEOF
11488
11489
11490 cat >main.c <<'_ATEOF'
11491
11492 #include <stdlib.h>
11493 extern int baz (void);
11494 extern int bar (void);
11495 int main() {
11496 if (baz () + bar () - 25) abort ();
11497 return 0;
11498 }
11499 _ATEOF
11500
11501
11502 # We only need to compile once, but we'll need to relink for each different value
11503 # of libdir in order to set the rpath, and we'll install for each combination of
11504 # libdir and bindir.
11505
11506 { set +x
11507 $as_echo "$at_srcdir/bindir.at:239: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c"
11508 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:239"
11509 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c
11510 ) >>"$at_stdout" 2>>"$at_stderr"
11511 at_status=$? at_failed=false
11512 $at_check_filter
11513 echo stderr:; cat "$at_stderr"
11514 echo stdout:; cat "$at_stdout"
11515 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:239"
11516 $at_failed && at_fn_log_failure
11517 $at_traceon; }
11518
11519 { set +x
11520 $as_echo "$at_srcdir/bindir.at:240: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c"
11521 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:240"
11522 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c
11523 ) >>"$at_stdout" 2>>"$at_stderr"
11524 at_status=$? at_failed=false
11525 $at_check_filter
11526 echo stderr:; cat "$at_stderr"
11527 echo stdout:; cat "$at_stdout"
11528 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:240"
11529 $at_failed && at_fn_log_failure
11530 $at_traceon; }
11531
11532 { set +x
11533 $as_echo "$at_srcdir/bindir.at:241: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c"
11534 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:241"
11535 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c
11536 ) >>"$at_stdout" 2>>"$at_stderr"
11537 at_status=$? at_failed=false
11538 $at_check_filter
11539 echo stderr:; cat "$at_stderr"
11540 echo stdout:; cat "$at_stdout"
11541 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:241"
11542 $at_failed && at_fn_log_failure
11543 $at_traceon; }
11544
11545 { set +x
11546 $as_echo "$at_srcdir/bindir.at:242: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c"
11547 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:242"
11548 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c
11549 ) >>"$at_stdout" 2>>"$at_stderr"
11550 at_status=$? at_failed=false
11551 $at_check_filter
11552 echo stderr:; cat "$at_stderr"
11553 echo stdout:; cat "$at_stdout"
11554 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:242"
11555 $at_failed && at_fn_log_failure
11556 $at_traceon; }
11557
11558
11559 # Now try installing the libs.  There are the following cases:
11560 # No -bindir
11561 # -bindir below lib install dir
11562 # -bindir is lib install dir
11563 # -bindir beside lib install dir
11564 # -bindir above lib dir
11565 # -bindir above and beside lib dir
11566 # -bindir in entirely unrelated prefix.
11567
11568 curdir=`pwd`
11569 for libdir in \
11570         $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \
11571         $curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \
11572         $curdir/usr/lib/ \
11573         $curdir/usr/lib \
11574         $curdir/baz \
11575         $curdir/baz/lib/ ;
11576 do
11577
11578   # Do a basic install with no -bindir option for reference.  We use the sbin/
11579   # dir for the main exe to avoid the potential "this only works because it's
11580   # side-by-side with the libs" default DLL search path problem mentioned above.
11581   rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
11582   as_dir=$libdir; as_fn_mkdir_p
11583   as_dir=$curdir/sbin; as_fn_mkdir_p
11584   { set +x
11585 $as_echo "$at_srcdir/bindir.at:269: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir"
11586 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:269"
11587 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir
11588 ) >>"$at_stdout" 2>>"$at_stderr"
11589 at_status=$? at_failed=false
11590 $at_check_filter
11591 echo stderr:; cat "$at_stderr"
11592 echo stdout:; cat "$at_stdout"
11593 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:269"
11594 $at_failed && at_fn_log_failure
11595 $at_traceon; }
11596
11597   { set +x
11598 $as_echo "$at_srcdir/bindir.at:270: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la -rpath \$libdir"
11599 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir" "bindir.at:270"
11600 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir
11601 ) >>"$at_stdout" 2>>"$at_stderr"
11602 at_status=$? at_failed=false
11603 $at_check_filter
11604 echo stderr:; cat "$at_stderr"
11605 echo stdout:; cat "$at_stdout"
11606 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:270"
11607 $at_failed && at_fn_log_failure
11608 $at_traceon; }
11609
11610   { set +x
11611 $as_echo "$at_srcdir/bindir.at:271: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir"
11612 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:271"
11613 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir
11614 ) >>"$at_stdout" 2>>"$at_stderr"
11615 at_status=$? at_failed=false
11616 $at_check_filter
11617 echo stderr:; cat "$at_stderr"
11618 echo stdout:; cat "$at_stdout"
11619 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:271"
11620 $at_failed && at_fn_log_failure
11621 $at_traceon; }
11622
11623   { set +x
11624 $as_echo "$at_srcdir/bindir.at:272: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT"
11625 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:272"
11626 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT
11627 ) >>"$at_stdout" 2>>"$at_stderr"
11628 at_status=$? at_failed=false
11629 $at_check_filter
11630 echo stderr:; cat "$at_stderr"
11631 echo stdout:; cat "$at_stdout"
11632 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:272"
11633 $at_failed && at_fn_log_failure
11634 $at_traceon; }
11635
11636
11637   # And ensure it went where we expect.  Could be looking for any of
11638   # 'cygfoo-0.dll', 'libfoo-0.dll', 'foo-0.dll', or 'libfoo.so.0'.  We'll
11639   # simplify this check by taking advantage of the fact that if it's a DLL,
11640   # it has to go in bindir, so we'll not check for both forms in libdir.
11641   if $bindirneeded; then
11642     { set +x
11643 $as_echo "$at_srcdir/bindir.at:279: test -f \$libdir/../bin/???foo-0.dll || ls \$libdir/../bin/*foo*0*"
11644 at_fn_check_prepare_dynamic "test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0*" "bindir.at:279"
11645 ( $at_check_trace; test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0*
11646 ) >>"$at_stdout" 2>>"$at_stderr"
11647 at_status=$? at_failed=false
11648 $at_check_filter
11649 echo stderr:; cat "$at_stderr"
11650 echo stdout:; cat "$at_stdout"
11651 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:279"
11652 $at_failed && at_fn_log_failure
11653 $at_traceon; }
11654
11655   else
11656     { set +x
11657 $as_echo "$at_srcdir/bindir.at:281: ls \$libdir/*foo*"
11658 at_fn_check_prepare_dynamic "ls $libdir/*foo*" "bindir.at:281"
11659 ( $at_check_trace; ls $libdir/*foo*
11660 ) >>"$at_stdout" 2>>"$at_stderr"
11661 at_status=$? at_failed=false
11662 $at_check_filter
11663 echo stderr:; cat "$at_stderr"
11664 echo stdout:; cat "$at_stdout"
11665 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:281"
11666 $at_failed && at_fn_log_failure
11667 $at_traceon; }
11668
11669   fi
11670
11671   # And that it can be executed.
11672   extrapath=
11673   $bindirneeded && extrapath=$libdir/../bin
11674   func_save_and_prepend_path $extrapath
11675   lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
11676 { set +x
11677 $as_echo "$at_srcdir/bindir.at:288: if \"\$lt_exe\" ; then :; else lt_status=\$?;          test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
11678 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "bindir.at:288"
11679 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
11680 ) >>"$at_stdout" 2>>"$at_stderr"
11681 at_status=$? at_failed=false
11682 $at_check_filter
11683 echo stderr:; cat "$at_stderr"
11684 echo stdout:; cat "$at_stdout"
11685 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:288"
11686 $at_failed && at_fn_log_failure
11687 $at_traceon; }
11688
11689
11690   func_restore_path
11691
11692   for bindir in \
11693         $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \
11694         $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \
11695         $curdir/usr/lib/gcc/i686-pc-cygwin/bin \
11696         $curdir/usr/lib/bin \
11697         $curdir/usr/bin/ \
11698         $curdir/usr/bin \
11699         /tmp/foo/bar ;
11700   do
11701
11702     # Clear any old stuff out before we install.  Because bindir
11703     # may be in /tmp, we have to take care to create it securely
11704     # and not to delete and recreate it if we do.
11705     rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr
11706
11707     tmp=
11708     case $bindir in
11709       /tmp*)
11710         # Create a temporary directory $tmp in $TMPDIR (default /tmp).
11711         # Use mktemp if possible; otherwise fall back on mkdir,
11712         # with $RANDOM to make collisions less likely.
11713         : ${TMPDIR=/tmp}
11714         {
11715           tmp=`
11716             (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
11717           ` &&
11718           test -n "$tmp" && test -d "$tmp"
11719         } || {
11720           tmp=$TMPDIR/foo$$-$RANDOM
11721           (umask 077 && mkdir "$tmp")
11722         } || { set +x
11723 $as_echo "$at_srcdir/bindir.at:321: exit 77"
11724 at_fn_check_prepare_trace "bindir.at:321"
11725 ( $at_check_trace; exit 77
11726 ) >>"$at_stdout" 2>>"$at_stderr"
11727 at_status=$? at_failed=false
11728 $at_check_filter
11729 at_fn_diff_devnull "$at_stderr" || at_failed=:
11730 at_fn_diff_devnull "$at_stdout" || at_failed=:
11731 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:321"
11732 $at_failed && at_fn_log_failure
11733 $at_traceon; }
11734
11735         bindir=$tmp/bar
11736       ;;
11737       *)
11738         # Clear any old stuff out before we install.
11739         rm -rf $bindir
11740         as_dir=$bindir; as_fn_mkdir_p
11741       ;;
11742     esac
11743
11744     # Relink with new rpaths.
11745     { set +x
11746 $as_echo "$at_srcdir/bindir.at:332: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -bindir \$bindir -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir"
11747 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:332"
11748 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir
11749 ) >>"$at_stdout" 2>>"$at_stderr"
11750 at_status=$? at_failed=false
11751 $at_check_filter
11752 echo stderr:; cat "$at_stderr"
11753 echo stdout:; cat "$at_stdout"
11754 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:332"
11755 $at_failed && at_fn_log_failure
11756 $at_traceon; }
11757
11758     { set +x
11759 $as_echo "$at_srcdir/bindir.at:333: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la"
11760 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la" "bindir.at:333"
11761 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la
11762 ) >>"$at_stdout" 2>>"$at_stderr"
11763 at_status=$? at_failed=false
11764 $at_check_filter
11765 echo stderr:; cat "$at_stderr"
11766 echo stdout:; cat "$at_stdout"
11767 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:333"
11768 $at_failed && at_fn_log_failure
11769 $at_traceon; }
11770
11771
11772     # Recreate directories (bindir already done) and install.
11773     as_dir=$libdir; as_fn_mkdir_p
11774     as_dir=$curdir/sbin; as_fn_mkdir_p
11775     { set +x
11776 $as_echo "$at_srcdir/bindir.at:338: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir"
11777 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:338"
11778 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir
11779 ) >>"$at_stdout" 2>>"$at_stderr"
11780 at_status=$? at_failed=false
11781 $at_check_filter
11782 echo stderr:; cat "$at_stderr"
11783 echo stdout:; cat "$at_stdout"
11784 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:338"
11785 $at_failed && at_fn_log_failure
11786 $at_traceon; }
11787
11788     { set +x
11789 $as_echo "$at_srcdir/bindir.at:339: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT"
11790 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:339"
11791 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT
11792 ) >>"$at_stdout" 2>>"$at_stderr"
11793 at_status=$? at_failed=false
11794 $at_check_filter
11795 echo stderr:; cat "$at_stderr"
11796 echo stdout:; cat "$at_stdout"
11797 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:339"
11798 $at_failed && at_fn_log_failure
11799 $at_traceon; }
11800
11801
11802     # Ensure it went to bindir rather than default dir this time.
11803     if $bindirneeded; then
11804       { set +x
11805 $as_echo "$at_srcdir/bindir.at:343: test -f \$bindir/???foo-0.dll || ls \$bindir/*foo*0*"
11806 at_fn_check_prepare_dynamic "test -f $bindir/???foo-0.dll || ls $bindir/*foo*0*" "bindir.at:343"
11807 ( $at_check_trace; test -f $bindir/???foo-0.dll || ls $bindir/*foo*0*
11808 ) >>"$at_stdout" 2>>"$at_stderr"
11809 at_status=$? at_failed=false
11810 $at_check_filter
11811 echo stderr:; cat "$at_stderr"
11812 echo stdout:; cat "$at_stdout"
11813 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:343"
11814 $at_failed && at_fn_log_failure
11815 $at_traceon; }
11816
11817     else
11818       { set +x
11819 $as_echo "$at_srcdir/bindir.at:345: ls \$libdir/*foo*"
11820 at_fn_check_prepare_dynamic "ls $libdir/*foo*" "bindir.at:345"
11821 ( $at_check_trace; ls $libdir/*foo*
11822 ) >>"$at_stdout" 2>>"$at_stderr"
11823 at_status=$? at_failed=false
11824 $at_check_filter
11825 echo stderr:; cat "$at_stderr"
11826 echo stdout:; cat "$at_stdout"
11827 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:345"
11828 $at_failed && at_fn_log_failure
11829 $at_traceon; }
11830
11831     fi
11832
11833     # And that it can be executed.
11834     extrapath=
11835     $bindirneeded && extrapath=$bindir
11836     func_save_and_prepend_path $extrapath
11837     lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
11838 { set +x
11839 $as_echo "$at_srcdir/bindir.at:352: if \"\$lt_exe\" ; then :; else lt_status=\$?;          test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
11840 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "bindir.at:352"
11841 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
11842 ) >>"$at_stdout" 2>>"$at_stderr"
11843 at_status=$? at_failed=false
11844 $at_check_filter
11845 echo stderr:; cat "$at_stderr"
11846 echo stdout:; cat "$at_stdout"
11847 at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:352"
11848 $at_failed && at_fn_log_failure
11849 $at_traceon; }
11850
11851
11852     func_restore_path
11853
11854     # Clean up if we made a temp dir.  Subdirs under our testdir get rm'd
11855     # and recreated at the top of the loop.  Securely created subdirs under
11856     # /tmp get created precisely once and rm'd when we're done with them.
11857     if test ! -z "$tmp" ; then
11858       rm -rf "$tmp"
11859     fi
11860
11861   done
11862 done
11863
11864   set +x
11865   $at_times_p && times >"$at_times_file"
11866 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11867 read at_status <"$at_status_file"
11868 #AT_STOP_54
11869 #AT_START_55
11870 at_fn_group_banner 55 'cwrapper.at:25' \
11871   "cwrapper for uninstalled executables" "           " 3
11872 at_xfail=no
11873 (
11874   $as_echo "55. $at_setup_line: testing $at_desc ..."
11875   $at_traceon
11876
11877
11878
11879 # make sure existing libtool is configured for shared libraries
11880 { set +x
11881 $as_echo "$at_srcdir/cwrapper.at:29: \$LIBTOOL --features | grep 'disable shared libraries' && exit 77"
11882 at_fn_check_prepare_notrace 'a shell pipeline' "cwrapper.at:29"
11883 ( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && exit 77
11884 ) >>"$at_stdout" 2>>"$at_stderr"
11885 at_status=$? at_failed=false
11886 $at_check_filter
11887 at_fn_diff_devnull "$at_stderr" || at_failed=:
11888 echo stdout:; cat "$at_stdout"
11889 at_fn_check_status 1 $at_status "$at_srcdir/cwrapper.at:29"
11890 $at_failed && at_fn_log_failure
11891 $at_traceon; }
11892
11893
11894 cat >trivial.c <<'_ATEOF'
11895
11896 int main (void)
11897 {
11898   return 0;
11899 }
11900 _ATEOF
11901
11902 cat >liba.c <<'_ATEOF'
11903 int liba_func1 (int arg)
11904 {
11905   return arg + 1;
11906 }
11907 _ATEOF
11908
11909 cat >usea.c <<'_ATEOF'
11910 extern int liba_func1 (int arg);
11911 int main (void)
11912 {
11913   int a = 2;
11914   int b = liba_func1 (a);
11915   if (b == 3) return 0;
11916   return 1;
11917 }
11918 _ATEOF
11919
11920
11921 orig_CFLAGS=$CFLAGS
11922 orig_LIBTOOL=$LIBTOOL
11923 for restrictive_flags in '-Wall -Werror' '-std=c89 -Wall -Werror' '-std=c99 -Wall -Werror'; do
11924   CFLAGS="$orig_CFLAGS $restrictive_flags"
11925   sed "s/LTCFLAGS=.*/&' $restrictive_flags'/" < "$orig_LIBTOOL" > ./libtool
11926   chmod +x libtool
11927   LIBTOOL=./libtool
11928
11929   # Make sure $restrictive_flags do not cause a failure
11930   # themselves (e.g. because a non-gcc compiler doesn't
11931   # understand them).  Tru64 cc only fails when linking.
11932   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS trivial.c || continue
11933
11934   { set +x
11935 $as_echo "$at_srcdir/cwrapper.at:69: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
11936 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:69"
11937 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
11938 ) >>"$at_stdout" 2>>"$at_stderr"
11939 at_status=$? at_failed=false
11940 $at_check_filter
11941 echo stderr:; cat "$at_stderr"
11942 echo stdout:; cat "$at_stdout"
11943 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:69"
11944 $at_failed && at_fn_log_failure
11945 $at_traceon; }
11946
11947   { set +x
11948 $as_echo "$at_srcdir/cwrapper.at:71: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo"
11949 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:71"
11950 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo
11951 ) >>"$at_stdout" 2>>"$at_stderr"
11952 at_status=$? at_failed=false
11953 $at_check_filter
11954 echo stderr:; cat "$at_stderr"
11955 echo stdout:; cat "$at_stdout"
11956 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:71"
11957 $at_failed && at_fn_log_failure
11958 $at_traceon; }
11959
11960   { set +x
11961 $as_echo "$at_srcdir/cwrapper.at:73: test -f liba.la"
11962 at_fn_check_prepare_trace "cwrapper.at:73"
11963 ( $at_check_trace; test -f liba.la
11964 ) >>"$at_stdout" 2>>"$at_stderr"
11965 at_status=$? at_failed=false
11966 $at_check_filter
11967 at_fn_diff_devnull "$at_stderr" || at_failed=:
11968 at_fn_diff_devnull "$at_stdout" || at_failed=:
11969 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:73"
11970 $at_failed && at_fn_log_failure
11971 $at_traceon; }
11972
11973
11974   { set +x
11975 $as_echo "$at_srcdir/cwrapper.at:75: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
11976 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:75"
11977 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
11978 ) >>"$at_stdout" 2>>"$at_stderr"
11979 at_status=$? at_failed=false
11980 $at_check_filter
11981 echo stderr:; cat "$at_stderr"
11982 echo stdout:; cat "$at_stdout"
11983 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:75"
11984 $at_failed && at_fn_log_failure
11985 $at_traceon; }
11986
11987   { set +x
11988 $as_echo "$at_srcdir/cwrapper.at:77: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
11989 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:77"
11990 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
11991 ) >>"$at_stdout" 2>>"$at_stderr"
11992 at_status=$? at_failed=false
11993 $at_check_filter
11994 echo stderr:; cat "$at_stderr"
11995 echo stdout:; cat "$at_stdout"
11996 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:77"
11997 $at_failed && at_fn_log_failure
11998 $at_traceon; }
11999
12000   lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12001 { set +x
12002 $as_echo "$at_srcdir/cwrapper.at:79: if \"\$lt_exe\" ; then :; else lt_status=\$?;         test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12003 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "cwrapper.at:79"
12004 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12005 ) >>"$at_stdout" 2>>"$at_stderr"
12006 at_status=$? at_failed=false
12007 $at_check_filter
12008 echo stderr:; cat "$at_stderr"
12009 echo stdout:; cat "$at_stdout"
12010 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:79"
12011 $at_failed && at_fn_log_failure
12012 $at_traceon; }
12013
12014
12015 done
12016
12017
12018 # Test run-time activation of wrapper debugging.
12019 # This is not part of the loop above, because we
12020 # need to check, not ignore, the output.
12021 CFLAGS="$orig_CFLAGS"
12022 LIBTOOL=$orig_LIBTOOL
12023
12024 { set +x
12025 $as_echo "$at_srcdir/cwrapper.at:89: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
12026 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:89"
12027 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
12028 ) >>"$at_stdout" 2>>"$at_stderr"
12029 at_status=$? at_failed=false
12030 $at_check_filter
12031 echo stderr:; cat "$at_stderr"
12032 echo stdout:; cat "$at_stdout"
12033 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:89"
12034 $at_failed && at_fn_log_failure
12035 $at_traceon; }
12036
12037 { set +x
12038 $as_echo "$at_srcdir/cwrapper.at:91: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo"
12039 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:91"
12040 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo
12041 ) >>"$at_stdout" 2>>"$at_stderr"
12042 at_status=$? at_failed=false
12043 $at_check_filter
12044 echo stderr:; cat "$at_stderr"
12045 echo stdout:; cat "$at_stdout"
12046 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:91"
12047 $at_failed && at_fn_log_failure
12048 $at_traceon; }
12049
12050 { set +x
12051 $as_echo "$at_srcdir/cwrapper.at:93: test -f liba.la"
12052 at_fn_check_prepare_trace "cwrapper.at:93"
12053 ( $at_check_trace; test -f liba.la
12054 ) >>"$at_stdout" 2>>"$at_stderr"
12055 at_status=$? at_failed=false
12056 $at_check_filter
12057 at_fn_diff_devnull "$at_stderr" || at_failed=:
12058 at_fn_diff_devnull "$at_stdout" || at_failed=:
12059 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:93"
12060 $at_failed && at_fn_log_failure
12061 $at_traceon; }
12062
12063
12064 { set +x
12065 $as_echo "$at_srcdir/cwrapper.at:95: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
12066 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:95"
12067 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
12068 ) >>"$at_stdout" 2>>"$at_stderr"
12069 at_status=$? at_failed=false
12070 $at_check_filter
12071 echo stderr:; cat "$at_stderr"
12072 echo stdout:; cat "$at_stdout"
12073 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:95"
12074 $at_failed && at_fn_log_failure
12075 $at_traceon; }
12076
12077 { set +x
12078 $as_echo "$at_srcdir/cwrapper.at:97: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
12079 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:97"
12080 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
12081 ) >>"$at_stdout" 2>>"$at_stderr"
12082 at_status=$? at_failed=false
12083 $at_check_filter
12084 echo stderr:; cat "$at_stderr"
12085 echo stdout:; cat "$at_stdout"
12086 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:97"
12087 $at_failed && at_fn_log_failure
12088 $at_traceon; }
12089
12090 lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12091 { set +x
12092 $as_echo "$at_srcdir/cwrapper.at:99: if \"\$lt_exe\" --lt-debug; then :; else lt_status=\$?;       test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12093 at_fn_check_prepare_dynamic "if \"$lt_exe\" --lt-debug; then :; else lt_status=$?;         test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "cwrapper.at:99"
12094 ( $at_check_trace; if "$lt_exe" --lt-debug; then :; else lt_status=$?;     test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12095 ) >>"$at_stdout" 2>>"$at_stderr"
12096 at_status=$? at_failed=false
12097 $at_check_filter
12098 echo stderr:; tee stderr <"$at_stderr"
12099 echo stdout:; cat "$at_stdout"
12100 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:99"
12101 $at_failed && at_fn_log_failure
12102 $at_traceon; }
12103
12104
12105 case $host_os in
12106   mingw*)
12107     tr -d '\015' < stderr > stderr.t
12108     mv -f stderr.t stderr ;;
12109 esac
12110 { set +x
12111 $as_echo "$at_srcdir/cwrapper.at:101: grep 'libtool wrapper' stderr"
12112 at_fn_check_prepare_trace "cwrapper.at:101"
12113 ( $at_check_trace; grep 'libtool wrapper' stderr
12114 ) >>"$at_stdout" 2>>"$at_stderr"
12115 at_status=$? at_failed=false
12116 $at_check_filter
12117 echo stderr:; cat "$at_stderr"
12118 echo stdout:; cat "$at_stdout"
12119 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:101"
12120 $at_failed && at_fn_log_failure
12121 $at_traceon; }
12122
12123
12124
12125 # Test compile-time activation of wrapper debugging.
12126 # We structure this test as a loop, so that we can 'break' out of it
12127 # if necessary -- even though the loop by design executes only once.
12128 for debugwrapper_flags in '-DLT_DEBUGWRAPPER'; do
12129   CFLAGS="$orig_CFLAGS $debugwrapper_flags"
12130   sed -e "s/LTCFLAGS=.*/&' $debugwrapper_flags'/" \
12131       -e "s/^lt_option_debug=/lt_option_debug=1/" \
12132     < "$orig_LIBTOOL" > ./libtool
12133   LIBTOOL=./libtool
12134
12135   # Make sure $debugwrapper_flags do not cause a failure
12136   # themselves (e.g. because a non-gcc compiler doesn't
12137   # understand them).  Tru64 cc only fails when linking.
12138   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS trivial.c || continue
12139
12140   { set +x
12141 $as_echo "$at_srcdir/cwrapper.at:119: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
12142 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:119"
12143 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
12144 ) >>"$at_stdout" 2>>"$at_stderr"
12145 at_status=$? at_failed=false
12146 $at_check_filter
12147 echo stderr:; cat "$at_stderr"
12148 echo stdout:; cat "$at_stdout"
12149 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:119"
12150 $at_failed && at_fn_log_failure
12151 $at_traceon; }
12152
12153   { set +x
12154 $as_echo "$at_srcdir/cwrapper.at:121: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo"
12155 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:121"
12156 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo
12157 ) >>"$at_stdout" 2>>"$at_stderr"
12158 at_status=$? at_failed=false
12159 $at_check_filter
12160 echo stderr:; cat "$at_stderr"
12161 echo stdout:; cat "$at_stdout"
12162 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:121"
12163 $at_failed && at_fn_log_failure
12164 $at_traceon; }
12165
12166   { set +x
12167 $as_echo "$at_srcdir/cwrapper.at:123: test -f liba.la"
12168 at_fn_check_prepare_trace "cwrapper.at:123"
12169 ( $at_check_trace; test -f liba.la
12170 ) >>"$at_stdout" 2>>"$at_stderr"
12171 at_status=$? at_failed=false
12172 $at_check_filter
12173 at_fn_diff_devnull "$at_stderr" || at_failed=:
12174 at_fn_diff_devnull "$at_stdout" || at_failed=:
12175 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:123"
12176 $at_failed && at_fn_log_failure
12177 $at_traceon; }
12178
12179
12180   { set +x
12181 $as_echo "$at_srcdir/cwrapper.at:125: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
12182 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:125"
12183 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
12184 ) >>"$at_stdout" 2>>"$at_stderr"
12185 at_status=$? at_failed=false
12186 $at_check_filter
12187 echo stderr:; cat "$at_stderr"
12188 echo stdout:; cat "$at_stdout"
12189 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:125"
12190 $at_failed && at_fn_log_failure
12191 $at_traceon; }
12192
12193   { set +x
12194 $as_echo "$at_srcdir/cwrapper.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la"
12195 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:127"
12196 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la
12197 ) >>"$at_stdout" 2>>"$at_stderr"
12198 at_status=$? at_failed=false
12199 $at_check_filter
12200 echo stderr:; cat "$at_stderr"
12201 echo stdout:; cat "$at_stdout"
12202 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:127"
12203 $at_failed && at_fn_log_failure
12204 $at_traceon; }
12205
12206   lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12207 { set +x
12208 $as_echo "$at_srcdir/cwrapper.at:129: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12209 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "cwrapper.at:129"
12210 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12211 ) >>"$at_stdout" 2>>"$at_stderr"
12212 at_status=$? at_failed=false
12213 $at_check_filter
12214 echo stderr:; tee stderr <"$at_stderr"
12215 echo stdout:; cat "$at_stdout"
12216 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:129"
12217 $at_failed && at_fn_log_failure
12218 $at_traceon; }
12219
12220
12221   case $host_os in
12222   mingw*)
12223     tr -d '\015' < stderr > stderr.t
12224     mv -f stderr.t stderr ;;
12225 esac
12226   { set +x
12227 $as_echo "$at_srcdir/cwrapper.at:131: grep 'libtool wrapper' stderr"
12228 at_fn_check_prepare_trace "cwrapper.at:131"
12229 ( $at_check_trace; grep 'libtool wrapper' stderr
12230 ) >>"$at_stdout" 2>>"$at_stderr"
12231 at_status=$? at_failed=false
12232 $at_check_filter
12233 echo stderr:; cat "$at_stderr"
12234 echo stdout:; cat "$at_stdout"
12235 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:131"
12236 $at_failed && at_fn_log_failure
12237 $at_traceon; }
12238
12239 done
12240
12241
12242   set +x
12243   $at_times_p && times >"$at_times_file"
12244 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12245 read at_status <"$at_status_file"
12246 #AT_STOP_55
12247 #AT_START_56
12248 at_fn_group_banner 56 'cwrapper.at:138' \
12249   "cwrapper string length" "                         " 3
12250 at_xfail=no
12251 (
12252   $as_echo "56. $at_setup_line: testing $at_desc ..."
12253   $at_traceon
12254
12255
12256 eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
12257
12258 cat >liba.c <<'_ATEOF'
12259 int liba_func1 (int arg)
12260 {
12261   return arg + 1;
12262 }
12263 _ATEOF
12264
12265 cat >usea.c <<'_ATEOF'
12266 extern int liba_func1 (int arg);
12267 int main (void)
12268 {
12269   int a = 2;
12270   int b = liba_func1 (a);
12271   if (b == 3) return 0;
12272   return 1;
12273 }
12274 _ATEOF
12275
12276
12277 { set +x
12278 $as_echo "$at_srcdir/cwrapper.at:159: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c"
12279 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:159"
12280 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c
12281 ) >>"$at_stdout" 2>>"$at_stderr"
12282 at_status=$? at_failed=false
12283 $at_check_filter
12284 echo stderr:; cat "$at_stderr"
12285 echo stdout:; cat "$at_stdout"
12286 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:159"
12287 $at_failed && at_fn_log_failure
12288 $at_traceon; }
12289
12290 { set +x
12291 $as_echo "$at_srcdir/cwrapper.at:161: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined        -o liba.la -rpath /foo liba.lo"
12292 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined     -o liba.la -rpath /foo liba.lo" "cwrapper.at:161"
12293 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined       -o liba.la -rpath /foo liba.lo
12294 ) >>"$at_stdout" 2>>"$at_stderr"
12295 at_status=$? at_failed=false
12296 $at_check_filter
12297 echo stderr:; cat "$at_stderr"
12298 echo stdout:; cat "$at_stdout"
12299 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:161"
12300 $at_failed && at_fn_log_failure
12301 $at_traceon; }
12302
12303 { set +x
12304 $as_echo "$at_srcdir/cwrapper.at:164: \$CC \$CPPFLAGS \$CFLAGS -c usea.c"
12305 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:164"
12306 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c
12307 ) >>"$at_stdout" 2>>"$at_stderr"
12308 at_status=$? at_failed=false
12309 $at_check_filter
12310 echo stderr:; cat "$at_stderr"
12311 echo stdout:; cat "$at_stdout"
12312 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:164"
12313 $at_failed && at_fn_log_failure
12314 $at_traceon; }
12315
12316
12317
12318 # Make sure PATH is at least 250 chars, which should force line breaks
12319 # in lt-usea.c.
12320
12321 dirpath=
12322 save_IFS=$IFS
12323 IFS=$PATH_SEPARATOR
12324 for dirpath in $PATH; do
12325   IFS=$save_IFS
12326   break
12327 done
12328 IFS=$save_IFS
12329
12330 until $ECHO "PATH=$PATH" | grep 'PATH=.\{250\}'; do
12331   PATH="$PATH$PATH_SEPARATOR$dirpath"
12332 done
12333 export PATH
12334
12335 { set +x
12336 $as_echo "$at_srcdir/cwrapper.at:185: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-fast-install     -o usea\$EXEEXT usea.\$OBJEXT liba.la"
12337 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-fast-install          -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:185"
12338 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-fast-install    -o usea$EXEEXT usea.$OBJEXT liba.la
12339 ) >>"$at_stdout" 2>>"$at_stderr"
12340 at_status=$? at_failed=false
12341 $at_check_filter
12342 echo stderr:; cat "$at_stderr"
12343 echo stdout:; cat "$at_stdout"
12344 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:185"
12345 $at_failed && at_fn_log_failure
12346 $at_traceon; }
12347
12348
12349 # Skip if no cwrapper is generated.
12350 { set +x
12351 $as_echo "$at_srcdir/cwrapper.at:190: test -f \$objdir/lt-usea.c || exit 77"
12352 at_fn_check_prepare_dynamic "test -f $objdir/lt-usea.c || exit 77" "cwrapper.at:190"
12353 ( $at_check_trace; test -f $objdir/lt-usea.c || exit 77
12354 ) >>"$at_stdout" 2>>"$at_stderr"
12355 at_status=$? at_failed=false
12356 $at_check_filter
12357 at_fn_diff_devnull "$at_stderr" || at_failed=:
12358 at_fn_diff_devnull "$at_stdout" || at_failed=:
12359 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:190"
12360 $at_failed && at_fn_log_failure
12361 $at_traceon; }
12362
12363
12364 # Try to make sure the test is relevant.
12365 { set +x
12366 $as_echo "$at_srcdir/cwrapper.at:193: grep ' *fputs' \$objdir/lt-usea.c > /dev/null"
12367 at_fn_check_prepare_dynamic "grep ' *fputs' $objdir/lt-usea.c > /dev/null" "cwrapper.at:193"
12368 ( $at_check_trace; grep ' *fputs' $objdir/lt-usea.c > /dev/null
12369 ) >>"$at_stdout" 2>>"$at_stderr"
12370 at_status=$? at_failed=false
12371 $at_check_filter
12372 at_fn_diff_devnull "$at_stderr" || at_failed=:
12373 at_fn_diff_devnull "$at_stdout" || at_failed=:
12374 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:193"
12375 $at_failed && at_fn_log_failure
12376 $at_traceon; }
12377
12378 # Check for no overly long fputs.
12379 { set +x
12380 $as_echo "$at_srcdir/cwrapper.at:195: grep ' *fputs.\\{250\\}' \$objdir/lt-usea.c"
12381 at_fn_check_prepare_dynamic "grep ' *fputs.\\{250\\}' $objdir/lt-usea.c" "cwrapper.at:195"
12382 ( $at_check_trace; grep ' *fputs.\{250\}' $objdir/lt-usea.c
12383 ) >>"$at_stdout" 2>>"$at_stderr"
12384 at_status=$? at_failed=false
12385 $at_check_filter
12386 at_fn_diff_devnull "$at_stderr" || at_failed=:
12387 at_fn_diff_devnull "$at_stdout" || at_failed=:
12388 at_fn_check_status 1 $at_status "$at_srcdir/cwrapper.at:195"
12389 $at_failed && at_fn_log_failure
12390 $at_traceon; }
12391
12392
12393
12394   set +x
12395   $at_times_p && times >"$at_times_file"
12396 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12397 read at_status <"$at_status_file"
12398 #AT_STOP_56
12399 #AT_START_57
12400 at_fn_group_banner 57 'cwrapper.at:201' \
12401   "cwrapper and installed shared libraries" "        " 3
12402 at_xfail=no
12403 (
12404   $as_echo "57. $at_setup_line: testing $at_desc ..."
12405   $at_traceon
12406
12407
12408
12409 # make sure existing libtool is configured for shared libraries
12410 { set +x
12411 $as_echo "$at_srcdir/cwrapper.at:205: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
12412 at_fn_check_prepare_notrace 'a shell pipeline' "cwrapper.at:205"
12413 ( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
12414 ) >>"$at_stdout" 2>>"$at_stderr"
12415 at_status=$? at_failed=false
12416 $at_check_filter
12417 at_fn_diff_devnull "$at_stderr" || at_failed=:
12418 echo stdout:; cat "$at_stdout"
12419 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:205"
12420 $at_failed && at_fn_log_failure
12421 $at_traceon; }
12422
12423
12424 LDFLAGS="$LDFLAGS -no-undefined"
12425
12426 inst=`pwd`/inst
12427 libdir=$inst/lib
12428 bindir=$inst/bin
12429 mkdir $inst $libdir $bindir
12430
12431 # Build the library in a separate directory to avoid the special case
12432 # of loading from the current directory.
12433
12434 mkdir foo
12435 cd foo
12436 # build and install "old" library version
12437 cat >a.c <<'_ATEOF'
12438
12439 int liba_ver (void) { return 1; }
12440 _ATEOF
12441
12442 { set +x
12443 $as_echo "$at_srcdir/cwrapper.at:224: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c"
12444 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c" "cwrapper.at:224"
12445 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c
12446 ) >>"$at_stdout" 2>>"$at_stderr"
12447 at_status=$? at_failed=false
12448 $at_check_filter
12449 echo stderr:; cat "$at_stderr"
12450 echo stdout:; cat "$at_stdout"
12451 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:224"
12452 $at_failed && at_fn_log_failure
12453 $at_traceon; }
12454
12455 { set +x
12456 $as_echo "$at_srcdir/cwrapper.at:226: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -o liba.la -rpath \$libdir a.lo"
12457 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -o liba.la -rpath $libdir a.lo" "cwrapper.at:226"
12458 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -o liba.la -rpath $libdir a.lo
12459 ) >>"$at_stdout" 2>>"$at_stderr"
12460 at_status=$? at_failed=false
12461 $at_check_filter
12462 echo stderr:; cat "$at_stderr"
12463 echo stdout:; cat "$at_stdout"
12464 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:226"
12465 $at_failed && at_fn_log_failure
12466 $at_traceon; }
12467
12468 { set +x
12469 $as_echo "$at_srcdir/cwrapper.at:228: \$LIBTOOL --mode=install \$lt_INSTALL liba.la \$libdir"
12470 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL liba.la $libdir" "cwrapper.at:228"
12471 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL liba.la $libdir
12472 ) >>"$at_stdout" 2>>"$at_stderr"
12473 at_status=$? at_failed=false
12474 $at_check_filter
12475 echo stderr:; cat "$at_stderr"
12476 echo stdout:; cat "$at_stdout"
12477 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:228"
12478 $at_failed && at_fn_log_failure
12479 $at_traceon; }
12480
12481
12482 # build a new library version
12483 cat >a.c <<'_ATEOF'
12484
12485 int liba_ver (void) { return 2; }
12486 _ATEOF
12487
12488 { set +x
12489 $as_echo "$at_srcdir/cwrapper.at:235: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c"
12490 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c" "cwrapper.at:235"
12491 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c
12492 ) >>"$at_stdout" 2>>"$at_stderr"
12493 at_status=$? at_failed=false
12494 $at_check_filter
12495 echo stderr:; cat "$at_stderr"
12496 echo stdout:; cat "$at_stdout"
12497 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:235"
12498 $at_failed && at_fn_log_failure
12499 $at_traceon; }
12500
12501 { set +x
12502 $as_echo "$at_srcdir/cwrapper.at:237: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -o liba.la -rpath \$libdir a.lo"
12503 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -o liba.la -rpath $libdir a.lo" "cwrapper.at:237"
12504 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -o liba.la -rpath $libdir a.lo
12505 ) >>"$at_stdout" 2>>"$at_stderr"
12506 at_status=$? at_failed=false
12507 $at_check_filter
12508 echo stderr:; cat "$at_stderr"
12509 echo stdout:; cat "$at_stdout"
12510 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:237"
12511 $at_failed && at_fn_log_failure
12512 $at_traceon; }
12513
12514
12515 cd ..
12516
12517 # build and run test application
12518 cat >m.c <<'_ATEOF'
12519
12520 extern int liba_ver (void);
12521 int main (void)
12522 {
12523   int r = (liba_ver () == 2) ? 0 : 1;
12524   return r;
12525 }
12526 _ATEOF
12527
12528
12529 { set +x
12530 $as_echo "$at_srcdir/cwrapper.at:252: \$CC \$CPPFLAGS \$CFLAGS -c m.c"
12531 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c m.c" "cwrapper.at:252"
12532 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c m.c
12533 ) >>"$at_stdout" 2>>"$at_stderr"
12534 at_status=$? at_failed=false
12535 $at_check_filter
12536 echo stderr:; cat "$at_stderr"
12537 echo stdout:; cat "$at_stdout"
12538 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:252"
12539 $at_failed && at_fn_log_failure
12540 $at_traceon; }
12541
12542
12543 { set +x
12544 $as_echo "$at_srcdir/cwrapper.at:254: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1\$EXEEXT m.\$OBJEXT foo/liba.la"
12545 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT foo/liba.la" "cwrapper.at:254"
12546 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT foo/liba.la
12547 ) >>"$at_stdout" 2>>"$at_stderr"
12548 at_status=$? at_failed=false
12549 $at_check_filter
12550 echo stderr:; cat "$at_stderr"
12551 echo stdout:; cat "$at_stdout"
12552 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:254"
12553 $at_failed && at_fn_log_failure
12554 $at_traceon; }
12555
12556 lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12557 { set +x
12558 $as_echo "$at_srcdir/cwrapper.at:256: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12559 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "cwrapper.at:256"
12560 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12561 ) >>"$at_stdout" 2>>"$at_stderr"
12562 at_status=$? at_failed=false
12563 $at_check_filter
12564 echo stderr:; cat "$at_stderr"
12565 echo stdout:; cat "$at_stdout"
12566 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:256"
12567 $at_failed && at_fn_log_failure
12568 $at_traceon; }
12569
12570
12571
12572 { set +x
12573 $as_echo "$at_srcdir/cwrapper.at:258: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT foo/liba.la -L\$inst/lib"
12574 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT foo/liba.la -L$inst/lib" "cwrapper.at:258"
12575 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT foo/liba.la -L$inst/lib
12576 ) >>"$at_stdout" 2>>"$at_stderr"
12577 at_status=$? at_failed=false
12578 $at_check_filter
12579 echo stderr:; cat "$at_stderr"
12580 echo stdout:; cat "$at_stdout"
12581 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:258"
12582 $at_failed && at_fn_log_failure
12583 $at_traceon; }
12584
12585 lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12586 { set +x
12587 $as_echo "$at_srcdir/cwrapper.at:260: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12588 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "cwrapper.at:260"
12589 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12590 ) >>"$at_stdout" 2>>"$at_stderr"
12591 at_status=$? at_failed=false
12592 $at_check_filter
12593 echo stderr:; cat "$at_stderr"
12594 echo stdout:; cat "$at_stdout"
12595 at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:260"
12596 $at_failed && at_fn_log_failure
12597 $at_traceon; }
12598
12599
12600
12601
12602   set +x
12603   $at_times_p && times >"$at_times_file"
12604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12605 read at_status <"$at_status_file"
12606 #AT_STOP_57
12607 #AT_START_58
12608 at_fn_group_banner 58 'deplib-in-subdir.at:34' \
12609   "deplib in subdir" "                               " 3
12610 at_xfail=no
12611 (
12612   $as_echo "58. $at_setup_line: testing $at_desc ..."
12613   $at_traceon
12614
12615
12616
12617 cat >a1.c <<'_ATEOF'
12618 int a1 () { return 0; }
12619 _ATEOF
12620
12621 cat >a2.c <<'_ATEOF'
12622 int a2 () { return 0; }
12623 _ATEOF
12624
12625 cat >a3.c <<'_ATEOF'
12626 int a3 () { return 0; }
12627 _ATEOF
12628
12629 cat >b1.c <<'_ATEOF'
12630 extern int a1 ();
12631 int b1 () { return a1 (); }
12632 _ATEOF
12633
12634 cat >b2.c <<'_ATEOF'
12635 extern int a2 ();
12636 int b2 () { return a2 (); }
12637 _ATEOF
12638
12639 cat >b3.c <<'_ATEOF'
12640 extern int a3 ();
12641 int b3 () { return a3 (); }
12642 _ATEOF
12643
12644 cat >m.c <<'_ATEOF'
12645 extern int b1 ();
12646 extern int b2 ();
12647 extern int b3 ();
12648 int main () { return b1 () + b2 () + b3 (); }
12649 _ATEOF
12650
12651
12652 cwd=`pwd`
12653 instdir=$cwd/inst
12654 lib1dir=$instdir/lib1
12655 lib2dir=$instdir/lib2
12656 bindir=$instdir/bin
12657 addrunpath=$cwd/foobar
12658 LDFLAGS="$LDFLAGS -no-undefined"
12659
12660 flags='-export-symbols-regex ".*"'
12661
12662 mkdir -p sub1 sub2/subsub sub3/subsub $instdir $lib1dir $lib2dir $bindir
12663
12664 for file in a1.c a2.c a3.c b1.c b2.c b3.c; do
12665   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
12666 done
12667 $CC $CPPFLAGS $CFLAGS -c m.c
12668 { set +x
12669 $as_echo "$at_srcdir/deplib-in-subdir.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba1.la a1.lo -rpath \$lib1dir"
12670 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir" "deplib-in-subdir.at:81"
12671 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir
12672 ) >>"$at_stdout" 2>>"$at_stderr"
12673 at_status=$? at_failed=false
12674 $at_check_filter
12675 echo stderr:; cat "$at_stderr"
12676 echo stdout:; cat "$at_stdout"
12677 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:81"
12678 $at_failed && at_fn_log_failure
12679 $at_traceon; }
12680
12681 { set +x
12682 $as_echo "$at_srcdir/deplib-in-subdir.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba2.la a2.lo -rpath \$lib1dir"
12683 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir" "deplib-in-subdir.at:83"
12684 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir
12685 ) >>"$at_stdout" 2>>"$at_stderr"
12686 at_status=$? at_failed=false
12687 $at_check_filter
12688 echo stderr:; cat "$at_stderr"
12689 echo stdout:; cat "$at_stdout"
12690 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:83"
12691 $at_failed && at_fn_log_failure
12692 $at_traceon; }
12693
12694 { set +x
12695 $as_echo "$at_srcdir/deplib-in-subdir.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba3.la a3.lo -rpath \$lib1dir"
12696 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir" "deplib-in-subdir.at:85"
12697 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir
12698 ) >>"$at_stdout" 2>>"$at_stderr"
12699 at_status=$? at_failed=false
12700 $at_check_filter
12701 echo stderr:; cat "$at_stderr"
12702 echo stdout:; cat "$at_stdout"
12703 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:85"
12704 $at_failed && at_fn_log_failure
12705 $at_traceon; }
12706
12707
12708 { set +x
12709 $as_echo "$at_srcdir/deplib-in-subdir.at:88: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub2/subsub/libb1.la b1.lo   -rpath \$lib2dir sub1/liba1.la' \"\$flags\""
12710 at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo       -rpath $lib2dir sub1/liba1.la' \"$flags\"" "deplib-in-subdir.at:88"
12711 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo         -rpath $lib2dir sub1/liba1.la' "$flags"
12712 ) >>"$at_stdout" 2>>"$at_stderr"
12713 at_status=$? at_failed=false
12714 $at_check_filter
12715 echo stderr:; cat "$at_stderr"
12716 echo stdout:; cat "$at_stdout"
12717 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:88"
12718 $at_failed && at_fn_log_failure
12719 $at_traceon; }
12720
12721 cd sub2
12722 { set +x
12723 $as_echo "$at_srcdir/deplib-in-subdir.at:92: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/libb2.la ../b2.lo     -rpath \$lib2dir ../sub1/liba2.la' \"\$flags\""
12724 at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo         -rpath $lib2dir ../sub1/liba2.la' \"$flags\"" "deplib-in-subdir.at:92"
12725 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo   -rpath $lib2dir ../sub1/liba2.la' "$flags"
12726 ) >>"$at_stdout" 2>>"$at_stderr"
12727 at_status=$? at_failed=false
12728 $at_check_filter
12729 echo stderr:; cat "$at_stderr"
12730 echo stdout:; cat "$at_stdout"
12731 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:92"
12732 $at_failed && at_fn_log_failure
12733 $at_traceon; }
12734
12735 cd subsub
12736 { set +x
12737 $as_echo "$at_srcdir/deplib-in-subdir.at:96: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb3.la ../../b3.lo         -rpath \$lib2dir ../../sub1/liba3.la' \"\$flags\""
12738 at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo     -rpath $lib2dir ../../sub1/liba3.la' \"$flags\"" "deplib-in-subdir.at:96"
12739 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo       -rpath $lib2dir ../../sub1/liba3.la' "$flags"
12740 ) >>"$at_stdout" 2>>"$at_stderr"
12741 at_status=$? at_failed=false
12742 $at_check_filter
12743 echo stderr:; cat "$at_stderr"
12744 echo stdout:; cat "$at_stdout"
12745 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:96"
12746 $at_failed && at_fn_log_failure
12747 $at_traceon; }
12748
12749 cd ../..
12750 { set +x
12751 $as_echo "$at_srcdir/deplib-in-subdir.at:100: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub3/subsub/m1\$EXEEXT m.\$OBJEXT         sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la"
12752 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT        sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" "deplib-in-subdir.at:100"
12753 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT          sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la
12754 ) >>"$at_stdout" 2>>"$at_stderr"
12755 at_status=$? at_failed=false
12756 $at_check_filter
12757 echo stderr:; cat "$at_stderr"
12758 echo stdout:; cat "$at_stdout"
12759 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:100"
12760 $at_failed && at_fn_log_failure
12761 $at_traceon; }
12762
12763 cd sub3
12764 { set +x
12765 $as_echo "$at_srcdir/deplib-in-subdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/m2\$EXEEXT ../m.\$OBJEXT   ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la"
12766 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT          ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" "deplib-in-subdir.at:104"
12767 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT    ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la
12768 ) >>"$at_stdout" 2>>"$at_stderr"
12769 at_status=$? at_failed=false
12770 $at_check_filter
12771 echo stderr:; cat "$at_stderr"
12772 echo stdout:; cat "$at_stdout"
12773 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:104"
12774 $at_failed && at_fn_log_failure
12775 $at_traceon; }
12776
12777 cd subsub
12778 { set +x
12779 $as_echo "$at_srcdir/deplib-in-subdir.at:108: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT ../../m.\$OBJEXT       ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la"
12780 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT      ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" "deplib-in-subdir.at:108"
12781 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT        ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la
12782 ) >>"$at_stdout" 2>>"$at_stderr"
12783 at_status=$? at_failed=false
12784 $at_check_filter
12785 echo stderr:; cat "$at_stderr"
12786 echo stdout:; cat "$at_stdout"
12787 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:108"
12788 $at_failed && at_fn_log_failure
12789 $at_traceon; }
12790
12791 cd ../..
12792
12793 for i in 1 2 3; do
12794   lt_exe=./sub3/subsub/m$i; if test -f "./sub3/subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12795 { set +x
12796 $as_echo "$at_srcdir/deplib-in-subdir.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12797 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:114"
12798 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12799 ) >>"$at_stdout" 2>>"$at_stderr"
12800 at_status=$? at_failed=false
12801 $at_check_filter
12802 at_fn_diff_devnull "$at_stderr" || at_failed=:
12803 at_fn_diff_devnull "$at_stdout" || at_failed=:
12804 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:114"
12805 $at_failed && at_fn_log_failure
12806 $at_traceon; }
12807
12808
12809   cd sub3
12810   lt_exe=./subsub/m$i; if test -f "./subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12811 { set +x
12812 $as_echo "$at_srcdir/deplib-in-subdir.at:116: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12813 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:116"
12814 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12815 ) >>"$at_stdout" 2>>"$at_stderr"
12816 at_status=$? at_failed=false
12817 $at_check_filter
12818 at_fn_diff_devnull "$at_stderr" || at_failed=:
12819 at_fn_diff_devnull "$at_stdout" || at_failed=:
12820 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:116"
12821 $at_failed && at_fn_log_failure
12822 $at_traceon; }
12823
12824
12825   cd subsub
12826   lt_exe=./m$i; if test -f "./m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12827 { set +x
12828 $as_echo "$at_srcdir/deplib-in-subdir.at:118: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12829 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:118"
12830 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12831 ) >>"$at_stdout" 2>>"$at_stderr"
12832 at_status=$? at_failed=false
12833 $at_check_filter
12834 at_fn_diff_devnull "$at_stderr" || at_failed=:
12835 at_fn_diff_devnull "$at_stdout" || at_failed=:
12836 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:118"
12837 $at_failed && at_fn_log_failure
12838 $at_traceon; }
12839
12840
12841   cd ../..
12842 done
12843
12844 for i in 1 2 3; do
12845   { set +x
12846 $as_echo "$at_srcdir/deplib-in-subdir.at:123: \$LIBTOOL --mode=install cp sub1/liba\$i.la \$lib1dir/liba.la"
12847 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la" "deplib-in-subdir.at:123"
12848 ( $at_check_trace; $LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la
12849 ) >>"$at_stdout" 2>>"$at_stderr"
12850 at_status=$? at_failed=false
12851 $at_check_filter
12852 echo stderr:; cat "$at_stderr"
12853 echo stdout:; cat "$at_stdout"
12854 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:123"
12855 $at_failed && at_fn_log_failure
12856 $at_traceon; }
12857
12858 done
12859
12860 { set +x
12861 $as_echo "$at_srcdir/deplib-in-subdir.at:126: \$LIBTOOL --mode=install cp sub2/subsub/libb1.la \$lib2dir/libb1.la"
12862 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la" "deplib-in-subdir.at:126"
12863 ( $at_check_trace; $LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la
12864 ) >>"$at_stdout" 2>>"$at_stderr"
12865 at_status=$? at_failed=false
12866 $at_check_filter
12867 echo stderr:; cat "$at_stderr"
12868 echo stdout:; cat "$at_stdout"
12869 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:126"
12870 $at_failed && at_fn_log_failure
12871 $at_traceon; }
12872
12873 cd sub2
12874 { set +x
12875 $as_echo "$at_srcdir/deplib-in-subdir.at:128: \$LIBTOOL --mode=install cp subsub/libb2.la \$lib2dir/libb2.la"
12876 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la" "deplib-in-subdir.at:128"
12877 ( $at_check_trace; $LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la
12878 ) >>"$at_stdout" 2>>"$at_stderr"
12879 at_status=$? at_failed=false
12880 $at_check_filter
12881 echo stderr:; cat "$at_stderr"
12882 echo stdout:; cat "$at_stdout"
12883 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:128"
12884 $at_failed && at_fn_log_failure
12885 $at_traceon; }
12886
12887 cd subsub
12888 { set +x
12889 $as_echo "$at_srcdir/deplib-in-subdir.at:130: \$LIBTOOL --mode=install cp libb3.la \$lib2dir/libb3.la"
12890 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la" "deplib-in-subdir.at:130"
12891 ( $at_check_trace; $LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la
12892 ) >>"$at_stdout" 2>>"$at_stderr"
12893 at_status=$? at_failed=false
12894 $at_check_filter
12895 echo stderr:; cat "$at_stderr"
12896 echo stdout:; cat "$at_stdout"
12897 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:130"
12898 $at_failed && at_fn_log_failure
12899 $at_traceon; }
12900
12901 cd ../..
12902
12903 { set +x
12904 $as_echo "$at_srcdir/deplib-in-subdir.at:133: \$LIBTOOL --mode=install cp sub3/subsub/m1\$EXEEXT \$bindir/m1\$EXEEXT"
12905 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT" "deplib-in-subdir.at:133"
12906 ( $at_check_trace; $LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT
12907 ) >>"$at_stdout" 2>>"$at_stderr"
12908 at_status=$? at_failed=false
12909 $at_check_filter
12910 echo stderr:; cat "$at_stderr"
12911 echo stdout:; cat "$at_stdout"
12912 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:133"
12913 $at_failed && at_fn_log_failure
12914 $at_traceon; }
12915
12916 cd sub3
12917 { set +x
12918 $as_echo "$at_srcdir/deplib-in-subdir.at:135: \$LIBTOOL --mode=install cp subsub/m2\$EXEEXT \$bindir/m2\$EXEEXT"
12919 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT" "deplib-in-subdir.at:135"
12920 ( $at_check_trace; $LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT
12921 ) >>"$at_stdout" 2>>"$at_stderr"
12922 at_status=$? at_failed=false
12923 $at_check_filter
12924 echo stderr:; cat "$at_stderr"
12925 echo stdout:; cat "$at_stdout"
12926 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:135"
12927 $at_failed && at_fn_log_failure
12928 $at_traceon; }
12929
12930 cd subsub
12931 { set +x
12932 $as_echo "$at_srcdir/deplib-in-subdir.at:137: \$LIBTOOL --mode=install cp m3\$EXEEXT \$bindir/m3\$EXEEXT"
12933 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT" "deplib-in-subdir.at:137"
12934 ( $at_check_trace; $LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT
12935 ) >>"$at_stdout" 2>>"$at_stderr"
12936 at_status=$? at_failed=false
12937 $at_check_filter
12938 echo stderr:; cat "$at_stderr"
12939 echo stdout:; cat "$at_stdout"
12940 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:137"
12941 $at_failed && at_fn_log_failure
12942 $at_traceon; }
12943
12944 cd ../..
12945
12946 { set +x
12947 $as_echo "$at_srcdir/deplib-in-subdir.at:140: \$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la     sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la          sub3/subsub/m1\$EXEEXT sub3/subsub/m2\$EXEEXT sub3/subsub/m3\$EXEEXT"
12948 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la       sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la          sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT" "deplib-in-subdir.at:140"
12949 ( $at_check_trace; $LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la         sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la          sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT
12950 ) >>"$at_stdout" 2>>"$at_stderr"
12951 at_status=$? at_failed=false
12952 $at_check_filter
12953 echo stderr:; cat "$at_stderr"
12954 echo stdout:; cat "$at_stdout"
12955 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:140"
12956 $at_failed && at_fn_log_failure
12957 $at_traceon; }
12958
12959
12960 for i in 1 2 3; do
12961   lt_exe=$bindir/m$i$EXEEXT; if test -f "$bindir/m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12962 { set +x
12963 $as_echo "$at_srcdir/deplib-in-subdir.at:146: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12964 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:146"
12965 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12966 ) >>"$at_stdout" 2>>"$at_stderr"
12967 at_status=$? at_failed=false
12968 $at_check_filter
12969 at_fn_diff_devnull "$at_stderr" || at_failed=:
12970 at_fn_diff_devnull "$at_stdout" || at_failed=:
12971 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:146"
12972 $at_failed && at_fn_log_failure
12973 $at_traceon; }
12974
12975
12976   cd $bindir
12977   lt_exe=./m$i$EXEEXT; if test -f "./m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12978 { set +x
12979 $as_echo "$at_srcdir/deplib-in-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
12980 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:148"
12981 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
12982 ) >>"$at_stdout" 2>>"$at_stderr"
12983 at_status=$? at_failed=false
12984 $at_check_filter
12985 at_fn_diff_devnull "$at_stderr" || at_failed=:
12986 at_fn_diff_devnull "$at_stdout" || at_failed=:
12987 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:148"
12988 $at_failed && at_fn_log_failure
12989 $at_traceon; }
12990
12991
12992   cd $cwd
12993 done
12994
12995 PATH=$bindir${PATH_SEPARATOR-:}$PATH
12996 for i in 1 2 3; do
12997   lt_exe=m$i$EXEEXT; if test -f "m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
12998 { set +x
12999 $as_echo "$at_srcdir/deplib-in-subdir.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
13000 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "deplib-in-subdir.at:154"
13001 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
13002 ) >>"$at_stdout" 2>>"$at_stderr"
13003 at_status=$? at_failed=false
13004 $at_check_filter
13005 at_fn_diff_devnull "$at_stderr" || at_failed=:
13006 at_fn_diff_devnull "$at_stdout" || at_failed=:
13007 at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:154"
13008 $at_failed && at_fn_log_failure
13009 $at_traceon; }
13010
13011
13012 done
13013
13014   set +x
13015   $at_times_p && times >"$at_times_file"
13016 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13017 read at_status <"$at_status_file"
13018 #AT_STOP_58
13019 #AT_START_59
13020 at_fn_group_banner 59 'infer-tag.at:30' \
13021   "inferred tag" "                                   " 3
13022 at_xfail=no
13023 (
13024   $as_echo "59. $at_setup_line: testing $at_desc ..."
13025   $at_traceon
13026
13027
13028
13029 cat >a.c <<'_ATEOF'
13030 int a (void) { return 0; }
13031 _ATEOF
13032
13033
13034 { set +x
13035 $as_echo "$at_srcdir/infer-tag.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
13036 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "infer-tag.at:37"
13037 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
13038 ) >>"$at_stdout" 2>>"$at_stderr"
13039 at_status=$? at_failed=false
13040 $at_check_filter
13041 echo stderr:; cat "$at_stderr"
13042 echo stdout:; cat "$at_stdout"
13043 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:37"
13044 $at_failed && at_fn_log_failure
13045 $at_traceon; }
13046
13047
13048   set +x
13049   $at_times_p && times >"$at_times_file"
13050 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13051 read at_status <"$at_status_file"
13052 #AT_STOP_59
13053 #AT_START_60
13054 at_fn_group_banner 60 'infer-tag.at:42' \
13055   "CXX inferred tag" "                               " 3
13056 at_xfail=no
13057 (
13058   $as_echo "60. $at_setup_line: testing $at_desc ..."
13059   $at_traceon
13060
13061
13062 { set +x
13063 $as_echo "$at_srcdir/infer-tag.at:43: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
13064 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "infer-tag.at:43"
13065 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
13066 ) >>"$at_stdout" 2>>"$at_stderr"
13067 at_status=$? at_failed=false
13068 $at_check_filter
13069 at_fn_diff_devnull "$at_stderr" || at_failed=:
13070 at_fn_diff_devnull "$at_stdout" || at_failed=:
13071 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43"
13072 $at_failed && at_fn_log_failure
13073 $at_traceon; }
13074
13075 { set +x
13076 $as_echo "$at_srcdir/infer-tag.at:43: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
13077 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "infer-tag.at:43"
13078 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
13079 ) >>"$at_stdout" 2>>"$at_stderr"
13080 at_status=$? at_failed=false
13081 $at_check_filter
13082 at_fn_diff_devnull "$at_stderr" || at_failed=:
13083 at_fn_diff_devnull "$at_stdout" || at_failed=:
13084 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43"
13085 $at_failed && at_fn_log_failure
13086 $at_traceon; }
13087
13088
13089
13090
13091 cat >a.cpp <<'_ATEOF'
13092 int a (void) { return 0; }
13093 _ATEOF
13094
13095
13096 { set +x
13097 $as_echo "$at_srcdir/infer-tag.at:50: \$LIBTOOL --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c a.cpp"
13098 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp" "infer-tag.at:50"
13099 ( $at_check_trace; $LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp
13100 ) >>"$at_stdout" 2>>"$at_stderr"
13101 at_status=$? at_failed=false
13102 $at_check_filter
13103 echo stderr:; cat "$at_stderr"
13104 echo stdout:; cat "$at_stdout"
13105 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:50"
13106 $at_failed && at_fn_log_failure
13107 $at_traceon; }
13108
13109
13110   set +x
13111   $at_times_p && times >"$at_times_file"
13112 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13113 read at_status <"$at_status_file"
13114 #AT_STOP_60
13115 #AT_START_61
13116 at_fn_group_banner 61 'infer-tag.at:55' \
13117   "F77 inferred tag" "                               " 3
13118 at_xfail=no
13119 (
13120   $as_echo "61. $at_setup_line: testing $at_desc ..."
13121   $at_traceon
13122
13123
13124 { set +x
13125 $as_echo "$at_srcdir/infer-tag.at:56: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)"
13126 at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "infer-tag.at:56"
13127 ( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77)
13128 ) >>"$at_stdout" 2>>"$at_stderr"
13129 at_status=$? at_failed=false
13130 $at_check_filter
13131 at_fn_diff_devnull "$at_stderr" || at_failed=:
13132 at_fn_diff_devnull "$at_stdout" || at_failed=:
13133 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:56"
13134 $at_failed && at_fn_log_failure
13135 $at_traceon; }
13136
13137
13138
13139
13140
13141 cat >a.f <<'_ATEOF'
13142       program main
13143       end
13144 _ATEOF
13145
13146
13147 { set +x
13148 $as_echo "$at_srcdir/infer-tag.at:64: \$LIBTOOL --mode=compile \$F77 \$FFLAGS -c a.f"
13149 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $F77 $FFLAGS -c a.f" "infer-tag.at:64"
13150 ( $at_check_trace; $LIBTOOL --mode=compile $F77 $FFLAGS -c a.f
13151 ) >>"$at_stdout" 2>>"$at_stderr"
13152 at_status=$? at_failed=false
13153 $at_check_filter
13154 echo stderr:; cat "$at_stderr"
13155 echo stdout:; cat "$at_stdout"
13156 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:64"
13157 $at_failed && at_fn_log_failure
13158 $at_traceon; }
13159
13160
13161   set +x
13162   $at_times_p && times >"$at_times_file"
13163 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13164 read at_status <"$at_status_file"
13165 #AT_STOP_61
13166 #AT_START_62
13167 at_fn_group_banner 62 'infer-tag.at:69' \
13168   "FC inferred tag" "                                " 3
13169 at_xfail=no
13170 (
13171   $as_echo "62. $at_setup_line: testing $at_desc ..."
13172   $at_traceon
13173
13174
13175 { set +x
13176 $as_echo "$at_srcdir/infer-tag.at:70: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)"
13177 at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "infer-tag.at:70"
13178 ( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77)
13179 ) >>"$at_stdout" 2>>"$at_stderr"
13180 at_status=$? at_failed=false
13181 $at_check_filter
13182 at_fn_diff_devnull "$at_stderr" || at_failed=:
13183 at_fn_diff_devnull "$at_stdout" || at_failed=:
13184 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:70"
13185 $at_failed && at_fn_log_failure
13186 $at_traceon; }
13187
13188
13189
13190
13191
13192 cat >a.f <<'_ATEOF'
13193       program main
13194       end
13195 _ATEOF
13196
13197
13198 { set +x
13199 $as_echo "$at_srcdir/infer-tag.at:78: \$LIBTOOL --mode=compile \$FC \$FCFLAGS -c a.f"
13200 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $FC $FCFLAGS -c a.f" "infer-tag.at:78"
13201 ( $at_check_trace; $LIBTOOL --mode=compile $FC $FCFLAGS -c a.f
13202 ) >>"$at_stdout" 2>>"$at_stderr"
13203 at_status=$? at_failed=false
13204 $at_check_filter
13205 echo stderr:; cat "$at_stderr"
13206 echo stdout:; cat "$at_stdout"
13207 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:78"
13208 $at_failed && at_fn_log_failure
13209 $at_traceon; }
13210
13211
13212   set +x
13213   $at_times_p && times >"$at_times_file"
13214 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13215 read at_status <"$at_status_file"
13216 #AT_STOP_62
13217 #AT_START_63
13218 at_fn_group_banner 63 'infer-tag.at:83' \
13219   "GCJ inferred tag" "                               " 3
13220 at_xfail=no
13221 (
13222   $as_echo "63. $at_setup_line: testing $at_desc ..."
13223   $at_traceon
13224
13225
13226 { set +x
13227 $as_echo "$at_srcdir/infer-tag.at:84: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)"
13228 at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "infer-tag.at:84"
13229 ( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77)
13230 ) >>"$at_stdout" 2>>"$at_stderr"
13231 at_status=$? at_failed=false
13232 $at_check_filter
13233 at_fn_diff_devnull "$at_stderr" || at_failed=:
13234 at_fn_diff_devnull "$at_stdout" || at_failed=:
13235 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84"
13236 $at_failed && at_fn_log_failure
13237 $at_traceon; }
13238
13239 # There are just too many broken gcj installations out there, either missing
13240    # libgcj.spec or unable to find it.  Skip the test for them.
13241    cat >gcj_test.java <<'_ATEOF'
13242 public class gcj_test {
13243     public static void main(String[] argv) { }
13244   }
13245 _ATEOF
13246
13247    { set +x
13248 $as_echo "$at_srcdir/infer-tag.at:84: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77"
13249 at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "infer-tag.at:84"
13250 ( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77
13251 ) >>"$at_stdout" 2>>"$at_stderr"
13252 at_status=$? at_failed=false
13253 $at_check_filter
13254 echo stderr:; cat "$at_stderr"
13255 echo stdout:; cat "$at_stdout"
13256 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84"
13257 $at_failed && at_fn_log_failure
13258 $at_traceon; }
13259
13260
13261
13262
13263 cat >A.java <<'_ATEOF'
13264 public class A {
13265   private int a;
13266   public A () { a = 0; }
13267 };
13268 _ATEOF
13269
13270
13271 { set +x
13272 $as_echo "$at_srcdir/infer-tag.at:94: \$LIBTOOL --mode=compile \$GCJ \$GCJCFLAGS -c A.java"
13273 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java" "infer-tag.at:94"
13274 ( $at_check_trace; $LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java
13275 ) >>"$at_stdout" 2>>"$at_stderr"
13276 at_status=$? at_failed=false
13277 $at_check_filter
13278 echo stderr:; cat "$at_stderr"
13279 echo stdout:; cat "$at_stdout"
13280 at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:94"
13281 $at_failed && at_fn_log_failure
13282 $at_traceon; }
13283
13284
13285   set +x
13286   $at_times_p && times >"$at_times_file"
13287 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13288 read at_status <"$at_status_file"
13289 #AT_STOP_63
13290 #AT_START_64
13291 at_fn_group_banner 64 'localization.at:24' \
13292   "localized compiler messages" "                    " 3
13293 at_xfail=no
13294 (
13295   $as_echo "64. $at_setup_line: testing $at_desc ..."
13296   $at_traceon
13297
13298
13299
13300 # Let's try German locale.  :-)
13301
13302
13303 cat >a.c <<'_ATEOF'
13304 int x[-1];
13305 _ATEOF
13306
13307 cat >b.c <<'_ATEOF'
13308 int y;
13309 _ATEOF
13310
13311
13312 # First see if setting a locale is accepted at all.
13313 { set +x
13314 $as_echo "$at_srcdir/localization.at:39: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$CC \$CPPFLAGS \$CFLAGS -c b.c) || exit 77"
13315 at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c b.c) || exit 77" "localization.at:39"
13316 ( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c b.c) || exit 77
13317 ) >>"$at_stdout" 2>>"$at_stderr"
13318 at_status=$? at_failed=false
13319 $at_check_filter
13320 echo stderr:; tee stderr <"$at_stderr"
13321 echo stdout:; tee stdout <"$at_stdout"
13322 at_fn_check_status 0 $at_status "$at_srcdir/localization.at:39"
13323 $at_failed && at_fn_log_failure
13324 $at_traceon; }
13325
13326
13327 # Find out about expected output.
13328 { set +x
13329 $as_echo "$at_srcdir/localization.at:43: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$CC \$CPPFLAGS \$CFLAGS -c a.c) || exit 1"
13330 at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1" "localization.at:43"
13331 ( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1
13332 ) >>"$at_stdout" 2>>"$at_stderr"
13333 at_status=$? at_failed=false
13334 $at_check_filter
13335 echo stderr:; tee stderr <"$at_stderr"
13336 echo stdout:; tee stdout <"$at_stdout"
13337 at_fn_check_status 1 $at_status "$at_srcdir/localization.at:43"
13338 $at_failed && at_fn_log_failure
13339 $at_traceon; }
13340
13341 _ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
13342 sed "/^distcc\[[0-9]*\]/d
13343       /^$_ltbase: compile/d
13344       s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stdout > stdout.t
13345 case $host_os in
13346   mingw*)
13347     tr -d '\015' < stdout.t > expected-stdout ;;
13348   *)
13349     cp stdout.t expected-stdout ;;
13350 esac
13351 _ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
13352 sed "/^distcc\[[0-9]*\]/d
13353       /^$_ltbase: compile/d
13354       s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stderr > stderr.t
13355 case $host_os in
13356   mingw*)
13357     tr -d '\015' < stderr.t > expected-stderr ;;
13358   *)
13359     cp stderr.t expected-stderr ;;
13360 esac
13361 { set +x
13362 $as_echo "$at_srcdir/localization.at:47: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c) || exit 1"
13363 at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1" "localization.at:47"
13364 ( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1
13365 ) >>"$at_stdout" 2>>"$at_stderr"
13366 at_status=$? at_failed=false
13367 $at_check_filter
13368 echo stderr:; tee stderr <"$at_stderr"
13369 echo stdout:; tee stdout <"$at_stdout"
13370 at_fn_check_status 1 $at_status "$at_srcdir/localization.at:47"
13371 $at_failed && at_fn_log_failure
13372 $at_traceon; }
13373
13374 _ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
13375 sed "/^distcc\[[0-9]*\]/d
13376       /^$_ltbase: compile/d
13377       s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stdout > stdout.t
13378 case $host_os in
13379   mingw*)
13380     tr -d '\015' < stdout.t > libtool-stdout ;;
13381   *)
13382     cp stdout.t libtool-stdout ;;
13383 esac
13384 _ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
13385 sed "/^distcc\[[0-9]*\]/d
13386       /^$_ltbase: compile/d
13387       s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stderr > stderr.t
13388 case $host_os in
13389   mingw*)
13390     tr -d '\015' < stderr.t > libtool-stderr ;;
13391   *)
13392     cp stderr.t libtool-stderr ;;
13393 esac
13394 # Avoid these errors:
13395 # GNU/Linux:
13396 #   /bin/sh: warning: setlocale: LC_ALL: cannot change locale (de_DE)
13397 # HP-UX:
13398 #   Warning! One or more of your selected locales are not available.
13399 #   Please invoke the commands "locale" and "locale -a" to verify your
13400 #   selections and the available locales.
13401 #
13402 #   Continuing processing using the "C" locale.
13403 { set +x
13404 $as_echo "$at_srcdir/localization.at:60: grep locale stdout stderr && exit 77"
13405 at_fn_check_prepare_trace "localization.at:60"
13406 ( $at_check_trace; grep locale stdout stderr && exit 77
13407 ) >>"$at_stdout" 2>>"$at_stderr"
13408 at_status=$? at_failed=false
13409 $at_check_filter
13410 at_fn_diff_devnull "$at_stderr" || at_failed=:
13411 at_fn_diff_devnull "$at_stdout" || at_failed=:
13412 at_fn_check_status 1 $at_status "$at_srcdir/localization.at:60"
13413 $at_failed && at_fn_log_failure
13414 $at_traceon; }
13415
13416 { set +x
13417 $as_echo "$at_srcdir/localization.at:61: diff expected-stderr libtool-stderr"
13418 at_fn_check_prepare_trace "localization.at:61"
13419 ( $at_check_trace; diff expected-stderr libtool-stderr
13420 ) >>"$at_stdout" 2>>"$at_stderr"
13421 at_status=$? at_failed=false
13422 $at_check_filter
13423 at_fn_diff_devnull "$at_stderr" || at_failed=:
13424 at_fn_diff_devnull "$at_stdout" || at_failed=:
13425 at_fn_check_status 0 $at_status "$at_srcdir/localization.at:61"
13426 $at_failed && at_fn_log_failure
13427 $at_traceon; }
13428
13429 { set +x
13430 $as_echo "$at_srcdir/localization.at:62: diff expected-stdout libtool-stdout"
13431 at_fn_check_prepare_trace "localization.at:62"
13432 ( $at_check_trace; diff expected-stdout libtool-stdout
13433 ) >>"$at_stdout" 2>>"$at_stderr"
13434 at_status=$? at_failed=false
13435 $at_check_filter
13436 at_fn_diff_devnull "$at_stderr" || at_failed=:
13437 at_fn_diff_devnull "$at_stdout" || at_failed=:
13438 at_fn_check_status 0 $at_status "$at_srcdir/localization.at:62"
13439 $at_failed && at_fn_log_failure
13440 $at_traceon; }
13441
13442
13443 # check that we get our quoting right.
13444
13445 { set +x
13446 $as_echo "$at_srcdir/localization.at:67: (LANGUAGE='a; nosuchprogram \" '\\''  & \$x /#+*(){}|,:\`\\ !%' \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c b.c)"
13447 at_fn_check_prepare_notrace 'a `...` command substitution' "localization.at:67"
13448 ( $at_check_trace; (LANGUAGE='a; nosuchprogram " '\''  & $x /#+*(){}|,:`\ !%' $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c)
13449 ) >>"$at_stdout" 2>>"$at_stderr"
13450 at_status=$? at_failed=false
13451 $at_check_filter
13452 echo stderr:; tee stderr <"$at_stderr"
13453 echo stdout:; tee stdout <"$at_stdout"
13454 at_fn_check_status 0 $at_status "$at_srcdir/localization.at:67"
13455 $at_failed && at_fn_log_failure
13456 $at_traceon; }
13457
13458 { set +x
13459 $as_echo "$at_srcdir/localization.at:69: grep nosuchprogram stdout stderr"
13460 at_fn_check_prepare_trace "localization.at:69"
13461 ( $at_check_trace; grep nosuchprogram stdout stderr
13462 ) >>"$at_stdout" 2>>"$at_stderr"
13463 at_status=$? at_failed=false
13464 $at_check_filter
13465 at_fn_diff_devnull "$at_stderr" || at_failed=:
13466 at_fn_diff_devnull "$at_stdout" || at_failed=:
13467 at_fn_check_status 1 $at_status "$at_srcdir/localization.at:69"
13468 $at_failed && at_fn_log_failure
13469 $at_traceon; }
13470
13471
13472
13473
13474   set +x
13475   $at_times_p && times >"$at_times_file"
13476 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13477 read at_status <"$at_status_file"
13478 #AT_STOP_64
13479 #AT_START_65
13480 at_fn_group_banner 65 'nocase.at:26' \
13481   "nocase library search" "                          " 3
13482 at_xfail=no
13483 (
13484   $as_echo "65. $at_setup_line: testing $at_desc ..."
13485   $at_traceon
13486
13487
13488
13489 eval `$LIBTOOL --config | $EGREP '^(want_nocaseglob|file_magic_glob)='`
13490
13491 { set +x
13492 $as_echo "$at_srcdir/nocase.at:31: test \"\$want_nocaseglob\" != yes &&          test -z \"\$file_magic_glob\" && exit 77"
13493 at_fn_check_prepare_dynamic "test \"$want_nocaseglob\" != yes &&          test -z \"$file_magic_glob\" && exit 77" "nocase.at:31"
13494 ( $at_check_trace; test "$want_nocaseglob" != yes &&          test -z "$file_magic_glob" && exit 77
13495 ) >>"$at_stdout" 2>>"$at_stderr"
13496 at_status=$? at_failed=false
13497 $at_check_filter
13498 echo stderr:; cat "$at_stderr"
13499 echo stdout:; cat "$at_stdout"
13500 at_fn_check_status 1 $at_status "$at_srcdir/nocase.at:31"
13501 $at_failed && at_fn_log_failure
13502 $at_traceon; }
13503
13504
13505 mkdir foo
13506 cat >foo/Foo.c <<'_ATEOF'
13507
13508 int Foo (void) { return 1; }
13509 _ATEOF
13510
13511
13512 mkdir bar
13513 cat >bar/bar.c <<'_ATEOF'
13514
13515 extern int Foo (void);
13516 int bar (void) { return Foo (); }
13517 _ATEOF
13518
13519
13520 cat >main.c <<'_ATEOF'
13521
13522 extern int bar (void);
13523 int main (void) { return bar (); }
13524 _ATEOF
13525
13526
13527 libdir=`pwd`/inst/lib
13528 mkdir inst inst/bin inst/lib
13529
13530 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo/Foo.lo foo/Foo.c
13531 { set +x
13532 $as_echo "$at_srcdir/nocase.at:58: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o foo/libFoo.la foo/Foo.lo    -no-undefined -version-info 1:0:0 -rpath \$libdir"
13533 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo      -no-undefined -version-info 1:0:0 -rpath $libdir" "nocase.at:58"
13534 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo        -no-undefined -version-info 1:0:0 -rpath $libdir
13535 ) >>"$at_stdout" 2>>"$at_stderr"
13536 at_status=$? at_failed=false
13537 $at_check_filter
13538 echo stderr:; cat "$at_stderr"
13539 echo stdout:; cat "$at_stdout"
13540 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:58"
13541 $at_failed && at_fn_log_failure
13542 $at_traceon; }
13543
13544 { set +x
13545 $as_echo "$at_srcdir/nocase.at:61: \$LIBTOOL --mode=install cp foo/libFoo.la \$libdir"
13546 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp foo/libFoo.la $libdir" "nocase.at:61"
13547 ( $at_check_trace; $LIBTOOL --mode=install cp foo/libFoo.la $libdir
13548 ) >>"$at_stdout" 2>>"$at_stderr"
13549 at_status=$? at_failed=false
13550 $at_check_filter
13551 echo stderr:; cat "$at_stderr"
13552 echo stdout:; cat "$at_stdout"
13553 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:61"
13554 $at_failed && at_fn_log_failure
13555 $at_traceon; }
13556
13557 { set +x
13558 $as_echo "$at_srcdir/nocase.at:63: \$LIBTOOL --mode=clean rm -f foo/libFoo.la"
13559 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f foo/libFoo.la" "nocase.at:63"
13560 ( $at_check_trace; $LIBTOOL --mode=clean rm -f foo/libFoo.la
13561 ) >>"$at_stdout" 2>>"$at_stderr"
13562 at_status=$? at_failed=false
13563 $at_check_filter
13564 echo stderr:; cat "$at_stderr"
13565 echo stdout:; cat "$at_stdout"
13566 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:63"
13567 $at_failed && at_fn_log_failure
13568 $at_traceon; }
13569
13570
13571 rm -f $libdir/libFoo.la
13572
13573 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar/bar.lo bar/bar.c
13574 { set +x
13575 $as_echo "$at_srcdir/nocase.at:69: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o bar/libbar.la bar/bar.lo    -L\$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath \$libdir"
13576 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo      -L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir" "nocase.at:69"
13577 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo        -L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir
13578 ) >>"$at_stdout" 2>>"$at_stderr"
13579 at_status=$? at_failed=false
13580 $at_check_filter
13581 echo stderr:; cat "$at_stderr"
13582 echo stdout:; cat "$at_stdout"
13583 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:69"
13584 $at_failed && at_fn_log_failure
13585 $at_traceon; }
13586
13587 { set +x
13588 $as_echo "$at_srcdir/nocase.at:72: \$LIBTOOL --mode=install cp bar/libbar.la \$libdir"
13589 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp bar/libbar.la $libdir" "nocase.at:72"
13590 ( $at_check_trace; $LIBTOOL --mode=install cp bar/libbar.la $libdir
13591 ) >>"$at_stdout" 2>>"$at_stderr"
13592 at_status=$? at_failed=false
13593 $at_check_filter
13594 echo stderr:; cat "$at_stderr"
13595 echo stdout:; cat "$at_stdout"
13596 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:72"
13597 $at_failed && at_fn_log_failure
13598 $at_traceon; }
13599
13600
13601 str=`$EGREP '^(old_library)=' < $libdir/libbar.la`
13602 eval "$str"
13603 libbar=$old_library
13604 rm -f $libdir/$libbar
13605
13606 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.$OBJEXT main.c
13607
13608 { set +x
13609 $as_echo "$at_srcdir/nocase.at:82: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -L\$libdir -lbar"
13610 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar" "nocase.at:82"
13611 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar
13612 ) >>"$at_stdout" 2>>"$at_stderr"
13613 at_status=$? at_failed=false
13614 $at_check_filter
13615 echo stderr:; cat "$at_stderr"
13616 echo stdout:; cat "$at_stdout"
13617 at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:82"
13618 $at_failed && at_fn_log_failure
13619 $at_traceon; }
13620
13621
13622   set +x
13623   $at_times_p && times >"$at_times_file"
13624 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13625 read at_status <"$at_status_file"
13626 #AT_STOP_65
13627 #AT_START_66
13628 at_fn_group_banner 66 'install.at:25' \
13629   "Install tests" "                                  " 3
13630 at_xfail=no
13631 (
13632   $as_echo "66. $at_setup_line: testing $at_desc ..."
13633   $at_traceon
13634
13635
13636
13637 # Ensure that install_override_mode overrides the mode of the shared
13638 # library (and only the shared library).
13639
13640 { set +x
13641 $as_echo "$at_srcdir/install.at:31: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
13642 at_fn_check_prepare_notrace 'a shell pipeline' "install.at:31"
13643 ( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
13644 ) >>"$at_stdout" 2>>"$at_stderr"
13645 at_status=$? at_failed=false
13646 $at_check_filter
13647 at_fn_diff_devnull "$at_stderr" || at_failed=:
13648 echo stdout:; cat "$at_stdout"
13649 at_fn_check_status 0 $at_status "$at_srcdir/install.at:31"
13650 $at_failed && at_fn_log_failure
13651 $at_traceon; }
13652
13653 sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool
13654 LIBTOOL=./libtool
13655 chmod a+rx $LIBTOOL
13656
13657 inst=`pwd`/inst
13658 mkdir inst
13659
13660 echo 'int a () { return 0; }' > a.c
13661 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
13662 { set +x
13663 $as_echo "$at_srcdir/install.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo        -rpath \$inst -no-undefined"
13664 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo   -rpath $inst -no-undefined" "install.at:42"
13665 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo     -rpath $inst -no-undefined
13666 ) >>"$at_stdout" 2>>"$at_stderr"
13667 at_status=$? at_failed=false
13668 $at_check_filter
13669 echo stderr:; cat "$at_stderr"
13670 echo stdout:; cat "$at_stdout"
13671 at_fn_check_status 0 $at_status "$at_srcdir/install.at:42"
13672 $at_failed && at_fn_log_failure
13673 $at_traceon; }
13674
13675 { set +x
13676 $as_echo "$at_srcdir/install.at:44: \$LIBTOOL --mode=install \$lt_INSTALL liba.la \$inst"
13677 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL liba.la $inst" "install.at:44"
13678 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL liba.la $inst
13679 ) >>"$at_stdout" 2>>"$at_stderr"
13680 at_status=$? at_failed=false
13681 $at_check_filter
13682 echo stderr:; cat "$at_stderr"
13683 echo stdout:; tee stdout <"$at_stdout"
13684 at_fn_check_status 0 $at_status "$at_srcdir/install.at:44"
13685 $at_failed && at_fn_log_failure
13686 $at_traceon; }
13687
13688 { set +x
13689 $as_echo "$at_srcdir/install.at:46: grep ' -m 755' stdout"
13690 at_fn_check_prepare_trace "install.at:46"
13691 ( $at_check_trace; grep ' -m 755' stdout
13692 ) >>"$at_stdout" 2>>"$at_stderr"
13693 at_status=$? at_failed=false
13694 $at_check_filter
13695 at_fn_diff_devnull "$at_stderr" || at_failed=:
13696 echo stdout:; cat "$at_stdout"
13697 at_fn_check_status 0 $at_status "$at_srcdir/install.at:46"
13698 $at_failed && at_fn_log_failure
13699 $at_traceon; }
13700
13701 { set +x
13702 $as_echo "$at_srcdir/install.at:47: \$LIBTOOL --mode=install \$lt_INSTALL -m 644 liba.la \$inst"
13703 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst" "install.at:47"
13704 ( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst
13705 ) >>"$at_stdout" 2>>"$at_stderr"
13706 at_status=$? at_failed=false
13707 $at_check_filter
13708 echo stderr:; cat "$at_stderr"
13709 echo stdout:; tee stdout <"$at_stdout"
13710 at_fn_check_status 0 $at_status "$at_srcdir/install.at:47"
13711 $at_failed && at_fn_log_failure
13712 $at_traceon; }
13713
13714 { set +x
13715 $as_echo "$at_srcdir/install.at:49: grep ' -m 755' stdout"
13716 at_fn_check_prepare_trace "install.at:49"
13717 ( $at_check_trace; grep ' -m 755' stdout
13718 ) >>"$at_stdout" 2>>"$at_stderr"
13719 at_status=$? at_failed=false
13720 $at_check_filter
13721 at_fn_diff_devnull "$at_stderr" || at_failed=:
13722 echo stdout:; cat "$at_stdout"
13723 at_fn_check_status 0 $at_status "$at_srcdir/install.at:49"
13724 $at_failed && at_fn_log_failure
13725 $at_traceon; }
13726
13727 { set +x
13728 $as_echo "$at_srcdir/install.at:50: grep ' -m 644.*liba.la' stdout"
13729 at_fn_check_prepare_trace "install.at:50"
13730 ( $at_check_trace; grep ' -m 644.*liba.la' stdout
13731 ) >>"$at_stdout" 2>>"$at_stderr"
13732 at_status=$? at_failed=false
13733 $at_check_filter
13734 at_fn_diff_devnull "$at_stderr" || at_failed=:
13735 echo stdout:; cat "$at_stdout"
13736 at_fn_check_status 0 $at_status "$at_srcdir/install.at:50"
13737 $at_failed && at_fn_log_failure
13738 $at_traceon; }
13739
13740
13741   set +x
13742   $at_times_p && times >"$at_times_file"
13743 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13744 read at_status <"$at_status_file"
13745 #AT_STOP_66
13746 #AT_START_67
13747 at_fn_group_banner 67 'versioning.at:24' \
13748   "versioning" "                                     " 3
13749 at_xfail=no
13750 (
13751   $as_echo "67. $at_setup_line: testing $at_desc ..."
13752   $at_traceon
13753
13754
13755
13756 eval "`$LIBTOOL --config | $EGREP '^(objdir|host_os)='`"
13757
13758 # Setup some library and program sources:
13759 # a library (a1), a new revision (a2), a compatible update (a3),
13760 # an incompatible update (a4).
13761 # Another library (libb) using liba, and a couple of programs,
13762 # using liba directly and indirectly through libb.
13763
13764 cat >liba1.c <<'_ATEOF'
13765
13766 int a (void)
13767 {
13768   return 0;
13769 }
13770 _ATEOF
13771
13772
13773 cat >liba2.c <<'_ATEOF'
13774
13775 /* The internal detail should be static.  It isn't static in this test,
13776    so we can later find out that it's this revision of the library. */
13777 int internal_detail = 42;
13778 int a (void)
13779 {
13780   return internal_detail - 42;
13781 }
13782 _ATEOF
13783
13784
13785 cat >liba3.c <<'_ATEOF'
13786
13787 int a (void)
13788 {
13789   return 0;
13790 }
13791 int aa (void)
13792 {
13793   return 0;
13794 }
13795 _ATEOF
13796
13797
13798 cat >liba4.c <<'_ATEOF'
13799
13800 int aa (void)
13801 {
13802   return 0;
13803 }
13804 _ATEOF
13805
13806
13807 cat >libb.c <<'_ATEOF'
13808
13809 extern int a (void);
13810 int b (void)
13811 {
13812   return a ();
13813 }
13814 _ATEOF
13815
13816
13817 cat >prog1.c <<'_ATEOF'
13818
13819 extern int a (void);
13820 int main (void)
13821 {
13822   return a ();
13823 }
13824 _ATEOF
13825
13826
13827 cat >prog2.c <<'_ATEOF'
13828
13829 extern int b (void);
13830 int main (void)
13831 {
13832   return b ();
13833 }
13834 _ATEOF
13835
13836
13837
13838 inst=`pwd`/inst
13839 libdir=$inst/lib
13840 bindir=$inst/bin
13841 LDFLAGS="$LDFLAGS -no-undefined"
13842 mkdir $inst $libdir $bindir
13843
13844 for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
13845   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
13846 done
13847 for file in prog1.c prog2.c; do
13848   $CC $CPPFLAGS $CFLAGS -c $file
13849 done
13850
13851 # Setup is finished here.
13852
13853 # Hypothesis: -version-info is ignored for convenience archives.
13854 { set +x
13855 $as_echo "$at_srcdir/versioning.at:111: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo        -version-info 0:0:0"
13856 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo       -version-info 0:0:0" "versioning.at:111"
13857 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-info 0:0:0
13858 ) >>"$at_stdout" 2>>"$at_stderr"
13859 at_status=$? at_failed=false
13860 $at_check_filter
13861 echo stderr:; tee stderr <"$at_stderr"
13862 echo stdout:; cat "$at_stdout"
13863 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:111"
13864 $at_failed && at_fn_log_failure
13865 $at_traceon; }
13866
13867 { set +x
13868 $as_echo "$at_srcdir/versioning.at:113: grep 'version-info.*ignored for convenience' stderr"
13869 at_fn_check_prepare_trace "versioning.at:113"
13870 ( $at_check_trace; grep 'version-info.*ignored for convenience' stderr
13871 ) >>"$at_stdout" 2>>"$at_stderr"
13872 at_status=$? at_failed=false
13873 $at_check_filter
13874 at_fn_diff_devnull "$at_stderr" || at_failed=:
13875 echo stdout:; cat "$at_stdout"
13876 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:113"
13877 $at_failed && at_fn_log_failure
13878 $at_traceon; }
13879
13880
13881 # Hypothesis: the deprecated -version-number works.
13882 # Be sure not to use zero here, it's not portable.
13883 for version_number in 1 1:1 2:1 1:1:1 3:2:1; do
13884   { set +x
13885 $as_echo "$at_srcdir/versioning.at:118: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo          -version-number \$version_number -rpath \$libdir"
13886 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-number $version_number -rpath $libdir" "versioning.at:118"
13887 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo           -version-number $version_number -rpath $libdir
13888 ) >>"$at_stdout" 2>>"$at_stderr"
13889 at_status=$? at_failed=false
13890 $at_check_filter
13891 echo stderr:; cat "$at_stderr"
13892 echo stdout:; cat "$at_stdout"
13893 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:118"
13894 $at_failed && at_fn_log_failure
13895 $at_traceon; }
13896
13897 done
13898
13899 # Hypothesis: -version-info can be passed kinds of values, esp. zero ones
13900 # and large ones.
13901 # TODO: check something like 1001:2419:189 after fixing issues
13902 # for `version_type's of `irix', `nonstopux', or `osf'.
13903 for version_info in 1 1:2 0:0:0 1:1:1 13:241:7; do
13904   { set +x
13905 $as_echo "$at_srcdir/versioning.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo          -version-info \$version_info -rpath \$libdir"
13906 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-info $version_info -rpath $libdir" "versioning.at:127"
13907 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo           -version-info $version_info -rpath $libdir
13908 ) >>"$at_stdout" 2>>"$at_stderr"
13909 at_status=$? at_failed=false
13910 $at_check_filter
13911 echo stderr:; cat "$at_stderr"
13912 echo stdout:; cat "$at_stdout"
13913 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:127"
13914 $at_failed && at_fn_log_failure
13915 $at_traceon; }
13916
13917 done
13918
13919 # Hypothesis: we diagnose when AGE is higher than CURRENT.
13920 { set +x
13921 $as_echo "$at_srcdir/versioning.at:132: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo        -version-info 1:3:2 -rpath \$libdir"
13922 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo       -version-info 1:3:2 -rpath $libdir" "versioning.at:132"
13923 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-info 1:3:2 -rpath $libdir
13924 ) >>"$at_stdout" 2>>"$at_stderr"
13925 at_status=$? at_failed=false
13926 $at_check_filter
13927 echo stderr:; tee stderr <"$at_stderr"
13928 echo stdout:; cat "$at_stdout"
13929 at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:132"
13930 $at_failed && at_fn_log_failure
13931 $at_traceon; }
13932
13933 { set +x
13934 $as_echo "$at_srcdir/versioning.at:134: grep 'AGE.*is greater than' stderr"
13935 at_fn_check_prepare_trace "versioning.at:134"
13936 ( $at_check_trace; grep 'AGE.*is greater than' stderr
13937 ) >>"$at_stdout" 2>>"$at_stderr"
13938 at_status=$? at_failed=false
13939 $at_check_filter
13940 at_fn_diff_devnull "$at_stderr" || at_failed=:
13941 echo stdout:; cat "$at_stdout"
13942 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:134"
13943 $at_failed && at_fn_log_failure
13944 $at_traceon; }
13945
13946
13947 # Hypothesis: we diagnose invalid values.
13948 for version_info in 1:2:3:4 -1 0:-1 0:0:-1; do
13949   { set +x
13950 $as_echo "$at_srcdir/versioning.at:138: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo          -version-info \$version_info -rpath \$libdir"
13951 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-info $version_info -rpath $libdir" "versioning.at:138"
13952 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo           -version-info $version_info -rpath $libdir
13953 ) >>"$at_stdout" 2>>"$at_stderr"
13954 at_status=$? at_failed=false
13955 $at_check_filter
13956 echo stderr:; cat "$at_stderr"
13957 echo stdout:; cat "$at_stdout"
13958 at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:138"
13959 $at_failed && at_fn_log_failure
13960 $at_traceon; }
13961
13962 done
13963
13964
13965 # Now, create an original version of the library and associated users.
13966 # This setup will be reused for further hypotheses below, and these
13967 # functions will be used to test working programs.
13968
13969 test_uninstalled ()
13970 {
13971   # temporarily move installed libraries out of the way in order to avoid
13972   # skewing test results:
13973   mv $libdir temp-lib
13974   mv $bindir temp-bin
13975   lt_exe=./prog1; if test -f "./prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
13976 { set +x
13977 $as_echo "$at_srcdir/versioning.at:153: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
13978 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "versioning.at:153"
13979 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
13980 ) >>"$at_stdout" 2>>"$at_stderr"
13981 at_status=$? at_failed=false
13982 $at_check_filter
13983 at_fn_diff_devnull "$at_stderr" || at_failed=:
13984 at_fn_diff_devnull "$at_stdout" || at_failed=:
13985 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:153"
13986 $at_failed && at_fn_log_failure
13987 $at_traceon; }
13988
13989
13990   lt_exe=./prog2; if test -f "./prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
13991 { set +x
13992 $as_echo "$at_srcdir/versioning.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
13993 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "versioning.at:154"
13994 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
13995 ) >>"$at_stdout" 2>>"$at_stderr"
13996 at_status=$? at_failed=false
13997 $at_check_filter
13998 at_fn_diff_devnull "$at_stderr" || at_failed=:
13999 at_fn_diff_devnull "$at_stdout" || at_failed=:
14000 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:154"
14001 $at_failed && at_fn_log_failure
14002 $at_traceon; }
14003
14004
14005   mv temp-lib $libdir
14006   mv temp-bin $bindir
14007 }
14008
14009 test_installed ()
14010 {
14011   # temporarily move uninstalled libraries out of the way in order to avoid
14012   # skewing test results:
14013   mv $objdir temp
14014   lt_exe=$bindir/prog1; if test -f "$bindir/prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
14015 { set +x
14016 $as_echo "$at_srcdir/versioning.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
14017 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "versioning.at:164"
14018 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
14019 ) >>"$at_stdout" 2>>"$at_stderr"
14020 at_status=$? at_failed=false
14021 $at_check_filter
14022 at_fn_diff_devnull "$at_stderr" || at_failed=:
14023 at_fn_diff_devnull "$at_stdout" || at_failed=:
14024 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:164"
14025 $at_failed && at_fn_log_failure
14026 $at_traceon; }
14027
14028
14029   lt_exe=$bindir/prog2; if test -f "$bindir/prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
14030 { set +x
14031 $as_echo "$at_srcdir/versioning.at:165: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
14032 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "versioning.at:165"
14033 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
14034 ) >>"$at_stdout" 2>>"$at_stderr"
14035 at_status=$? at_failed=false
14036 $at_check_filter
14037 at_fn_diff_devnull "$at_stderr" || at_failed=:
14038 at_fn_diff_devnull "$at_stdout" || at_failed=:
14039 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:165"
14040 $at_failed && at_fn_log_failure
14041 $at_traceon; }
14042
14043
14044   mv temp $objdir
14045 }
14046
14047 { set +x
14048 $as_echo "$at_srcdir/versioning.at:169: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo        -version-info 0:0:0 -rpath \$libdir"
14049 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo       -version-info 0:0:0 -rpath $libdir" "versioning.at:169"
14050 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo         -version-info 0:0:0 -rpath $libdir
14051 ) >>"$at_stdout" 2>>"$at_stderr"
14052 at_status=$? at_failed=false
14053 $at_check_filter
14054 echo stderr:; cat "$at_stderr"
14055 echo stdout:; cat "$at_stdout"
14056 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:169"
14057 $at_failed && at_fn_log_failure
14058 $at_traceon; }
14059
14060 { set +x
14061 $as_echo "$at_srcdir/versioning.at:171: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la libb.lo liba.la         -version-info 0:0:0 -rpath \$libdir"
14062 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la        -version-info 0:0:0 -rpath $libdir" "versioning.at:171"
14063 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la          -version-info 0:0:0 -rpath $libdir
14064 ) >>"$at_stdout" 2>>"$at_stderr"
14065 at_status=$? at_failed=false
14066 $at_check_filter
14067 echo stderr:; cat "$at_stderr"
14068 echo stdout:; cat "$at_stdout"
14069 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:171"
14070 $at_failed && at_fn_log_failure
14071 $at_traceon; }
14072
14073 { set +x
14074 $as_echo "$at_srcdir/versioning.at:173: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog1\$EXEEXT prog1.\$OBJEXT    liba.la"
14075 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT     liba.la" "versioning.at:173"
14076 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT       liba.la
14077 ) >>"$at_stdout" 2>>"$at_stderr"
14078 at_status=$? at_failed=false
14079 $at_check_filter
14080 echo stderr:; cat "$at_stderr"
14081 echo stdout:; cat "$at_stdout"
14082 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:173"
14083 $at_failed && at_fn_log_failure
14084 $at_traceon; }
14085
14086 { set +x
14087 $as_echo "$at_srcdir/versioning.at:175: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog2\$EXEEXT prog2.\$OBJEXT    libb.la"
14088 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT     libb.la" "versioning.at:175"
14089 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT       libb.la
14090 ) >>"$at_stdout" 2>>"$at_stderr"
14091 at_status=$? at_failed=false
14092 $at_check_filter
14093 echo stderr:; cat "$at_stderr"
14094 echo stdout:; cat "$at_stdout"
14095 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:175"
14096 $at_failed && at_fn_log_failure
14097 $at_traceon; }
14098
14099 test_uninstalled
14100 { set +x
14101 $as_echo "$at_srcdir/versioning.at:178: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir"
14102 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "versioning.at:178"
14103 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir
14104 ) >>"$at_stdout" 2>>"$at_stderr"
14105 at_status=$? at_failed=false
14106 $at_check_filter
14107 echo stderr:; cat "$at_stderr"
14108 echo stdout:; cat "$at_stdout"
14109 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:178"
14110 $at_failed && at_fn_log_failure
14111 $at_traceon; }
14112
14113 { set +x
14114 $as_echo "$at_srcdir/versioning.at:180: \$LIBTOOL --mode=install cp prog1\$EXEEXT prog2\$EXEEXT \$bindir"
14115 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir" "versioning.at:180"
14116 ( $at_check_trace; $LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir
14117 ) >>"$at_stdout" 2>>"$at_stderr"
14118 at_status=$? at_failed=false
14119 $at_check_filter
14120 echo stderr:; cat "$at_stderr"
14121 echo stdout:; cat "$at_stdout"
14122 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:180"
14123 $at_failed && at_fn_log_failure
14124 $at_traceon; }
14125
14126 { set +x
14127 $as_echo "$at_srcdir/versioning.at:182: \$LIBTOOL --mode=clean rm -f liba.la"
14128 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:182"
14129 ( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
14130 ) >>"$at_stdout" 2>>"$at_stderr"
14131 at_status=$? at_failed=false
14132 $at_check_filter
14133 echo stderr:; cat "$at_stderr"
14134 echo stdout:; cat "$at_stdout"
14135 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:182"
14136 $at_failed && at_fn_log_failure
14137 $at_traceon; }
14138
14139 test_installed
14140 { set +x
14141 $as_echo "$at_srcdir/versioning.at:184: \$LIBTOOL --mode=uninstall rm -f \$libdir/liba.la"
14142 at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $libdir/liba.la" "versioning.at:184"
14143 ( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $libdir/liba.la
14144 ) >>"$at_stdout" 2>>"$at_stderr"
14145 at_status=$? at_failed=false
14146 $at_check_filter
14147 echo stderr:; cat "$at_stderr"
14148 echo stdout:; cat "$at_stdout"
14149 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:184"
14150 $at_failed && at_fn_log_failure
14151 $at_traceon; }
14152
14153
14154
14155 # Hypothesis: library revision updates do not require (uninstalled
14156 # nor installed) programs or libraries to be relinked.
14157 { set +x
14158 $as_echo "$at_srcdir/versioning.at:189: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba2.lo        -version-info 0:1:0 -rpath \$libdir"
14159 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo       -version-info 0:1:0 -rpath $libdir" "versioning.at:189"
14160 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo         -version-info 0:1:0 -rpath $libdir
14161 ) >>"$at_stdout" 2>>"$at_stderr"
14162 at_status=$? at_failed=false
14163 $at_check_filter
14164 echo stderr:; cat "$at_stderr"
14165 echo stdout:; cat "$at_stdout"
14166 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:189"
14167 $at_failed && at_fn_log_failure
14168 $at_traceon; }
14169
14170 test_uninstalled
14171 { set +x
14172 $as_echo "$at_srcdir/versioning.at:192: \$LIBTOOL --mode=install cp liba.la \$libdir"
14173 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:192"
14174 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
14175 ) >>"$at_stdout" 2>>"$at_stderr"
14176 at_status=$? at_failed=false
14177 $at_check_filter
14178 echo stderr:; cat "$at_stderr"
14179 echo stdout:; cat "$at_stdout"
14180 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:192"
14181 $at_failed && at_fn_log_failure
14182 $at_traceon; }
14183
14184 { set +x
14185 $as_echo "$at_srcdir/versioning.at:193: \$LIBTOOL --mode=clean rm -f liba.la"
14186 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:193"
14187 ( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
14188 ) >>"$at_stdout" 2>>"$at_stderr"
14189 at_status=$? at_failed=false
14190 $at_check_filter
14191 echo stderr:; cat "$at_stderr"
14192 echo stdout:; cat "$at_stdout"
14193 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:193"
14194 $at_failed && at_fn_log_failure
14195 $at_traceon; }
14196
14197 test_installed
14198 # do not uninstall here: the library may be reused in the next test.
14199
14200 # Hypothesis: backward compatible library updates do not require
14201 # (uninstalled nor installed) programs or libraries to be relinked.
14202 # This can have one of several reasons:
14203 # - the soname is the difference between $current and $age, thus
14204 #   unchanged; in this case, the newly installed library will be used,
14205 # - the soname is only $current, or we are linking statically, in which case
14206 #   the old installed library code will be used,
14207 # - the numbers are not encoded at all, in which case the newly installed
14208 #   library will be used.
14209 { set +x
14210 $as_echo "$at_srcdir/versioning.at:206: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba3.lo        -version-info 1:0:1 -rpath \$libdir"
14211 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo       -version-info 1:0:1 -rpath $libdir" "versioning.at:206"
14212 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo         -version-info 1:0:1 -rpath $libdir
14213 ) >>"$at_stdout" 2>>"$at_stderr"
14214 at_status=$? at_failed=false
14215 $at_check_filter
14216 echo stderr:; cat "$at_stderr"
14217 echo stdout:; cat "$at_stdout"
14218 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:206"
14219 $at_failed && at_fn_log_failure
14220 $at_traceon; }
14221
14222 # Do not test the uninstalled program, it may be broken (in the second case).
14223 { set +x
14224 $as_echo "$at_srcdir/versioning.at:209: \$LIBTOOL --mode=install cp liba.la \$libdir"
14225 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:209"
14226 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
14227 ) >>"$at_stdout" 2>>"$at_stderr"
14228 at_status=$? at_failed=false
14229 $at_check_filter
14230 echo stderr:; cat "$at_stderr"
14231 echo stdout:; cat "$at_stdout"
14232 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:209"
14233 $at_failed && at_fn_log_failure
14234 $at_traceon; }
14235
14236 { set +x
14237 $as_echo "$at_srcdir/versioning.at:210: \$LIBTOOL --mode=clean rm -f liba.la"
14238 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:210"
14239 ( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
14240 ) >>"$at_stdout" 2>>"$at_stderr"
14241 at_status=$? at_failed=false
14242 $at_check_filter
14243 echo stderr:; cat "$at_stderr"
14244 echo stdout:; cat "$at_stdout"
14245 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:210"
14246 $at_failed && at_fn_log_failure
14247 $at_traceon; }
14248
14249 test_installed
14250 # do not uninstall here: the library may be reused in the next test.
14251
14252
14253 # Hypothesis: with shared libraries, incompatible library updates
14254 # will not cause old installed programs or libraries (linked against the old
14255 # library version) to break.
14256 # This can have one of several reasons:
14257 # - the soname has changed, so the old installed library will still be
14258 #   available,
14259 # - we are linking statically, so the old library code will still be used.
14260 # In order to be sure we are still linking against the old library version,
14261 # we must ensure that libb is not relinked, so we must not reinstall libb here.
14262 { set +x
14263 $as_echo "$at_srcdir/versioning.at:224: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba4.lo        -version-info 2:0:0 -rpath \$libdir"
14264 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo       -version-info 2:0:0 -rpath $libdir" "versioning.at:224"
14265 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo         -version-info 2:0:0 -rpath $libdir
14266 ) >>"$at_stdout" 2>>"$at_stderr"
14267 at_status=$? at_failed=false
14268 $at_check_filter
14269 echo stderr:; cat "$at_stderr"
14270 echo stdout:; cat "$at_stdout"
14271 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:224"
14272 $at_failed && at_fn_log_failure
14273 $at_traceon; }
14274
14275 # We do not guarantee that old versions of an uninstalled library are still
14276 # available, so test_uninstalled will not necessarily work here any more.
14277 { set +x
14278 $as_echo "$at_srcdir/versioning.at:228: \$LIBTOOL --mode=install cp liba.la \$libdir"
14279 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:228"
14280 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
14281 ) >>"$at_stdout" 2>>"$at_stderr"
14282 at_status=$? at_failed=false
14283 $at_check_filter
14284 echo stderr:; cat "$at_stderr"
14285 echo stdout:; cat "$at_stdout"
14286 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:228"
14287 $at_failed && at_fn_log_failure
14288 $at_traceon; }
14289
14290 { set +x
14291 $as_echo "$at_srcdir/versioning.at:229: \$LIBTOOL --mode=clean rm -f liba.la"
14292 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:229"
14293 ( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
14294 ) >>"$at_stdout" 2>>"$at_stderr"
14295 at_status=$? at_failed=false
14296 $at_check_filter
14297 echo stderr:; cat "$at_stderr"
14298 echo stdout:; cat "$at_stdout"
14299 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:229"
14300 $at_failed && at_fn_log_failure
14301 $at_traceon; }
14302
14303
14304 # This test does not work on AIX, not even with runtimelinking, because
14305 # the linker always records the unversioned name as dependency.
14306 { set +x
14307 $as_echo "$at_srcdir/versioning.at:233: :; case \$host_os in aix*) exit 77;; esac"
14308 at_fn_check_prepare_dynamic ":; case $host_os in aix*) exit 77;; esac" "versioning.at:233"
14309 ( $at_check_trace; :; case $host_os in aix*) exit 77;; esac
14310 ) >>"$at_stdout" 2>>"$at_stderr"
14311 at_status=$? at_failed=false
14312 $at_check_filter
14313 at_fn_diff_devnull "$at_stderr" || at_failed=:
14314 at_fn_diff_devnull "$at_stdout" || at_failed=:
14315 at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:233"
14316 $at_failed && at_fn_log_failure
14317 $at_traceon; }
14318
14319
14320 test_installed
14321
14322
14323   set +x
14324   $at_times_p && times >"$at_times_file"
14325 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14326 read at_status <"$at_status_file"
14327 #AT_STOP_67
14328 #AT_START_68
14329 at_fn_group_banner 68 'destdir.at:48' \
14330   "Simple DESTDIR install" "                         " 4
14331 at_xfail=no
14332       eval `$LIBTOOL --config | grep '^fast_install='`
14333            case $fast_install in no) :;; *) false;; esac && at_xfail=yes
14334 (
14335   $as_echo "68. $at_setup_line: testing $at_desc ..."
14336   $at_traceon
14337
14338
14339
14340 # A program that depends upon a library, both in the same package.
14341 # DESTDIR installs do not work with relink at install time.
14342
14343 LDFLAGS="$LDFLAGS -no-undefined"
14344 if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines.
14345   DESTDIR=/tmp/dest
14346   prefix=/tmp/inst
14347   rm -rf $DESTDIR $prefix
14348 else
14349   DESTDIR=`pwd`/dest
14350   prefix=`pwd`/inst
14351 fi
14352 libdir=$prefix/lib
14353 bindir=$prefix/bin
14354 $mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
14355 eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
14356
14357 cd src
14358 echo 'int a() { return 0; }' > a.c
14359 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
14360 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir
14361 echo 'extern int a(); int main() { return a(); }' > m.c
14362 $CC $CPPFLAGS $CFLAGS -c m.c
14363 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la
14364 mkdir $DESTDIR$libdir $DESTDIR$bindir
14365 { set +x
14366 $as_echo "$at_srcdir/destdir.at:61: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
14367 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:61"
14368 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la
14369 ) >>"$at_stdout" 2>>"$at_stderr"
14370 at_status=$? at_failed=false
14371 $at_check_filter
14372 echo stderr:; cat "$at_stderr"
14373 echo stdout:; cat "$at_stdout"
14374 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:61"
14375 $at_failed && at_fn_log_failure
14376 $at_traceon; }
14377
14378 { set +x
14379 $as_echo "$at_srcdir/destdir.at:63: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
14380 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:63"
14381 ( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT
14382 ) >>"$at_stdout" 2>>"$at_stderr"
14383 at_status=$? at_failed=false
14384 $at_check_filter
14385 echo stderr:; cat "$at_stderr"
14386 echo stdout:; cat "$at_stdout"
14387 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:63"
14388 $at_failed && at_fn_log_failure
14389 $at_traceon; }
14390
14391 $LIBTOOL --mode=clean rm -f liba.la m
14392 $mkdir_p "$libdir"
14393 (cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p)
14394 for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print`
14395 do
14396   mv "$DESTDIR$libdir"/$file "$libdir"/$file
14397 done
14398 rm -rf "$DESTDIR$libdir"
14399
14400 $mkdir_p "$bindir"
14401 (cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p)
14402 for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print`
14403 do
14404   mv "$DESTDIR$bindir"/$file "$bindir"/$file
14405 done
14406 rm -rf "$DESTDIR$bindir"
14407
14408 # We ignore failure on purpose here: we may not be root.
14409 { set +x
14410 $as_echo "$at_srcdir/destdir.at:69: \$LIBTOOL --mode=finish \$libdir"
14411 at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $libdir" "destdir.at:69"
14412 ( $at_check_trace; $LIBTOOL --mode=finish $libdir
14413 ) >>"$at_stdout" 2>>"$at_stderr"
14414 at_status=$? at_failed=false
14415 $at_check_filter
14416 echo stderr:; cat "$at_stderr"
14417 echo stdout:; cat "$at_stdout"
14418 at_fn_check_skip $at_status "$at_srcdir/destdir.at:69"
14419 $at_failed && at_fn_log_failure
14420 $at_traceon; }
14421
14422 lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
14423 { set +x
14424 $as_echo "$at_srcdir/destdir.at:70: if \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
14425 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "destdir.at:70"
14426 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
14427 ) >>"$at_stdout" 2>>"$at_stderr"
14428 at_status=$? at_failed=false
14429 $at_check_filter
14430 at_fn_diff_devnull "$at_stderr" || at_failed=:
14431 at_fn_diff_devnull "$at_stdout" || at_failed=:
14432 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:70"
14433 $at_failed && at_fn_log_failure
14434 $at_traceon; }
14435
14436
14437
14438   set +x
14439   $at_times_p && times >"$at_times_file"
14440 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14441 read at_status <"$at_status_file"
14442 #AT_STOP_68
14443 #AT_START_69
14444 at_fn_group_banner 69 'destdir.at:75' \
14445   "DESTDIR with in-package deplibs" "                " 4
14446 at_xfail=no
14447       eval `$LIBTOOL --config | grep '^fast_install='`
14448            case $fast_install in no) :;; *) false;; esac && at_xfail=yes
14449 (
14450   $as_echo "69. $at_setup_line: testing $at_desc ..."
14451   $at_traceon
14452
14453
14454
14455 # A program that depends upon a library that depends upon another
14456 # library, all in the same package.  Use two deplibs, one in $libdir
14457 # and one in another directory.
14458 # DESTDIR installs do not work with relink at install time.
14459
14460 LDFLAGS="$LDFLAGS -no-undefined"
14461 if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines.
14462   DESTDIR=/tmp/dest
14463   prefix=/tmp/inst
14464   rm -rf $DESTDIR $prefix
14465 else
14466   DESTDIR=`pwd`/dest
14467   prefix=`pwd`/inst
14468 fi
14469 libdir=$prefix/lib
14470 bindir=$prefix/bin
14471 $mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
14472 eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
14473
14474 cd src
14475 echo 'int a1dep() { return 0; }' > a1dep.c
14476 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a1dep.c
14477 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1dep.la a1dep.lo -rpath $libdir
14478 echo 'int a2dep() { return 0; }' > a2dep.c
14479 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a2dep.c
14480 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba2dep.la a2dep.lo -rpath ${libdir}2
14481 echo 'extern int a1dep(), a2dep(); int a() { return a1dep() + a2dep(); }' > a.c
14482 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
14483 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir liba1dep.la liba2dep.la
14484 echo 'extern int a(); int main() { return a(); }' > m.c
14485 $CC $CPPFLAGS $CFLAGS -c m.c
14486 $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la
14487 mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir
14488 { set +x
14489 $as_echo "$at_srcdir/destdir.at:96: \$LIBTOOL --mode=install cp liba1dep.la \$DESTDIR\$libdir/liba1dep.la"
14490 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la" "destdir.at:96"
14491 ( $at_check_trace; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la
14492 ) >>"$at_stdout" 2>>"$at_stderr"
14493 at_status=$? at_failed=false
14494 $at_check_filter
14495 echo stderr:; cat "$at_stderr"
14496 echo stdout:; cat "$at_stdout"
14497 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:96"
14498 $at_failed && at_fn_log_failure
14499 $at_traceon; }
14500
14501 { set +x
14502 $as_echo "$at_srcdir/destdir.at:98: \$LIBTOOL --mode=install cp liba2dep.la \$DESTDIR\${libdir}2/liba2dep.la"
14503 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:98"
14504 ( $at_check_trace; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la
14505 ) >>"$at_stdout" 2>>"$at_stderr"
14506 at_status=$? at_failed=false
14507 $at_check_filter
14508 echo stderr:; cat "$at_stderr"
14509 echo stdout:; cat "$at_stdout"
14510 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:98"
14511 $at_failed && at_fn_log_failure
14512 $at_traceon; }
14513
14514 { set +x
14515 $as_echo "$at_srcdir/destdir.at:100: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la"
14516 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:100"
14517 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la
14518 ) >>"$at_stdout" 2>>"$at_stderr"
14519 at_status=$? at_failed=false
14520 $at_check_filter
14521 echo stderr:; cat "$at_stderr"
14522 echo stdout:; cat "$at_stdout"
14523 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:100"
14524 $at_failed && at_fn_log_failure
14525 $at_traceon; }
14526
14527 { set +x
14528 $as_echo "$at_srcdir/destdir.at:102: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT"
14529 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:102"
14530 ( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT
14531 ) >>"$at_stdout" 2>>"$at_stderr"
14532 at_status=$? at_failed=false
14533 $at_check_filter
14534 echo stderr:; cat "$at_stderr"
14535 echo stdout:; cat "$at_stdout"
14536 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:102"
14537 $at_failed && at_fn_log_failure
14538 $at_traceon; }
14539
14540 $LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m
14541 $mkdir_p "$libdir"
14542 (cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p)
14543 for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print`
14544 do
14545   mv "$DESTDIR$libdir"/$file "$libdir"/$file
14546 done
14547 rm -rf "$DESTDIR$libdir"
14548
14549 $mkdir_p "${libdir}2"
14550 (cd "$DESTDIR${libdir}2" && find . -type d) | (cd "${libdir}2" && xargs $mkdir_p)
14551 for file in `cd "$DESTDIR${libdir}2" && find . -type f -print -o -type l -print`
14552 do
14553   mv "$DESTDIR${libdir}2"/$file "${libdir}2"/$file
14554 done
14555 rm -rf "$DESTDIR${libdir}2"
14556
14557 $mkdir_p "$bindir"
14558 (cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p)
14559 for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print`
14560 do
14561   mv "$DESTDIR$bindir"/$file "$bindir"/$file
14562 done
14563 rm -rf "$DESTDIR$bindir"
14564
14565 # We ignore failure on purpose here: we may not be root.
14566 { set +x
14567 $as_echo "$at_srcdir/destdir.at:109: \$LIBTOOL --mode=finish \$libdir \${libdir}2"
14568 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:109"
14569 ( $at_check_trace; $LIBTOOL --mode=finish $libdir ${libdir}2
14570 ) >>"$at_stdout" 2>>"$at_stderr"
14571 at_status=$? at_failed=false
14572 $at_check_filter
14573 echo stderr:; cat "$at_stderr"
14574 echo stdout:; cat "$at_stdout"
14575 at_fn_check_skip $at_status "$at_srcdir/destdir.at:109"
14576 $at_failed && at_fn_log_failure
14577 $at_traceon; }
14578
14579
14580 # put false libraries in the DESTDIR paths: if the installed program
14581 # refers to them, that is a bug.
14582 mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir
14583 for lib in a1dep a2dep a; do
14584   case $lib in
14585   a2dep) ldir=${libdir}2;;
14586   *)     ldir=$libdir;;
14587   esac
14588   echo "int this_should_not_be_linked_against () { return 0; }" > $lib.c
14589   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $lib.c
14590   # Note the rpath argument includes $DESTDIR: the installed false libs
14591   # should be functional (i.e., not need `libtool --mode=finish').
14592   $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o lib$lib.la $lib.lo -rpath $DESTDIR$ldir
14593   $LIBTOOL --mode=install cp lib$lib.la $DESTDIR$ldir/lib$lib.la
14594 done
14595
14596 lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
14597 { set +x
14598 $as_echo "$at_srcdir/destdir.at:127: if \"\$lt_exe\" ; then :; else lt_status=\$?;                 test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
14599 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "destdir.at:127"
14600 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
14601 ) >>"$at_stdout" 2>>"$at_stderr"
14602 at_status=$? at_failed=false
14603 $at_check_filter
14604 at_fn_diff_devnull "$at_stderr" || at_failed=:
14605 at_fn_diff_devnull "$at_stdout" || at_failed=:
14606 at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:127"
14607 $at_failed && at_fn_log_failure
14608 $at_traceon; }
14609
14610
14611
14612 # TODO: make this more portable:
14613 if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then
14614   { set +x
14615 $as_echo "$at_srcdir/destdir.at:131: \$OBJDUMP -p \$bindir/m\$EXEEXT | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
14616 at_fn_check_prepare_notrace 'a shell pipeline' "destdir.at:131"
14617 ( $at_check_trace; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR"
14618 ) >>"$at_stdout" 2>>"$at_stderr"
14619 at_status=$? at_failed=false
14620 $at_check_filter
14621 at_fn_diff_devnull "$at_stderr" || at_failed=:
14622 at_fn_diff_devnull "$at_stdout" || at_failed=:
14623 at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:131"
14624 $at_failed && at_fn_log_failure
14625 $at_traceon; }
14626
14627   . $libdir/liba.la
14628   set x $library_names
14629   lname=$2
14630   if test -n "$lname"; then
14631     { set +x
14632 $as_echo "$at_srcdir/destdir.at:136: \$OBJDUMP -p \$libdir/\$lname | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\""
14633 at_fn_check_prepare_notrace 'a shell pipeline' "destdir.at:136"
14634 ( $at_check_trace; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR"
14635 ) >>"$at_stdout" 2>>"$at_stderr"
14636 at_status=$? at_failed=false
14637 $at_check_filter
14638 at_fn_diff_devnull "$at_stderr" || at_failed=:
14639 at_fn_diff_devnull "$at_stdout" || at_failed=:
14640 at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:136"
14641 $at_failed && at_fn_log_failure
14642 $at_traceon; }
14643
14644   fi
14645 fi
14646
14647   set +x
14648   $at_times_p && times >"$at_times_file"
14649 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14650 read at_status <"$at_status_file"
14651 #AT_STOP_69
14652 #AT_START_70
14653 at_fn_group_banner 70 'old-m4-iface.at:40' \
14654   "AM_PROG_LIBTOOL" "                                " 5
14655 at_xfail=no
14656       test "$AUTOCONF" = no && at_xfail=yes
14657 (
14658   $as_echo "70. $at_setup_line: testing $at_desc ..."
14659   $at_traceon
14660
14661
14662 cat >configure.in <<'_ATEOF'
14663 AC_INIT(old.c)
14664 AM_PROG_LIBTOOL
14665 AC_SUBST([LIBTOOL_DEPS])
14666 AC_OUTPUT(Makefile)
14667 _ATEOF
14668
14669
14670 cat >Makefile.in <<'_ATEOF'
14671 COMPILE = @CC@ @CPPFLAGS@ @CFLAGS@
14672 LINK      = @CC@ @CFLAGS@ @LDFLAGS@ -o $@
14673 SHELL     = @SHELL@
14674 LIBTOOL_DEPS = @LIBTOOL_DEPS@
14675
14676 all: libtool old@EXEEXT@
14677
14678 old@EXEEXT@: old.@OBJEXT@
14679         $(LINK) old.@OBJEXT@
14680
14681 .SUFFIXES:
14682 .SUFFIXES: .c .@OBJEXT@
14683
14684 .c.@OBJEXT@:
14685         $(COMPILE) -c $<
14686
14687 libtool: $(LIBTOOL_DEPS)
14688         $(SHELL) ./config.status --recheck
14689 _ATEOF
14690
14691
14692
14693 cat >old.c <<'_ATEOF'
14694 #include <stdio.h>
14695
14696 int main (void)
14697 {
14698   printf ("Hello, World!");
14699   return 0;
14700 }
14701 _ATEOF
14702
14703
14704 $LIBTOOLIZE --install
14705
14706
14707
14708 # This is slightly bogus, since only libtool.m4 was required in aclocal.m4
14709 # with libtool-1.5x...
14710 { set +x
14711 $as_echo "$at_srcdir/old-m4-iface.at:85: test -f aclocal.m4 ||
14712   cat \"\$tst_aclocaldir/libtool.m4\" \"\$tst_aclocaldir/ltoptions.m4\" \\
14713     \"\$tst_aclocaldir/ltsugar.m4\" \"\$tst_aclocaldir/ltversion.m4\" \\
14714     \"\$tst_aclocaldir/lt~obsolete.m4\" > aclocal.m4"
14715 at_fn_check_prepare_notrace 'an embedded newline' "old-m4-iface.at:85"
14716 ( $at_check_trace; test -f aclocal.m4 ||
14717   cat "$tst_aclocaldir/libtool.m4" "$tst_aclocaldir/ltoptions.m4" \
14718     "$tst_aclocaldir/ltsugar.m4" "$tst_aclocaldir/ltversion.m4" \
14719     "$tst_aclocaldir/lt~obsolete.m4" > aclocal.m4
14720 ) >>"$at_stdout" 2>>"$at_stderr"
14721 at_status=$? at_failed=false
14722 $at_check_filter
14723 at_fn_diff_devnull "$at_stderr" || at_failed=:
14724 at_fn_diff_devnull "$at_stdout" || at_failed=:
14725 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:85"
14726 $at_failed && at_fn_log_failure
14727 $at_traceon; }
14728
14729
14730
14731
14732
14733
14734 { set +x
14735 $as_echo "$at_srcdir/old-m4-iface.at:90: \$AUTOCONF --force"
14736 at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:90"
14737 ( $at_check_trace; $AUTOCONF --force
14738 ) >>"$at_stdout" 2>>"$at_stderr"
14739 at_status=$? at_failed=false
14740 $at_check_filter
14741 echo stderr:; cat "$at_stderr"
14742 echo stdout:; cat "$at_stdout"
14743 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
14744 $at_failed && at_fn_log_failure
14745 $at_traceon; }
14746
14747
14748
14749
14750 { set +x
14751 $as_echo "$at_srcdir/old-m4-iface.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;         \$CONFIG_SHELL ./configure \$configure_options "
14752 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:90"
14753 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
14754 ) >>"$at_stdout" 2>>"$at_stderr"
14755 at_status=$? at_failed=false
14756 $at_check_filter
14757 echo stderr:; cat "$at_stderr"
14758 echo stdout:; cat "$at_stdout"
14759 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
14760 $at_failed && at_fn_log_failure
14761 $at_traceon; }
14762
14763
14764 for target in all
14765 do
14766   { set +x
14767 $as_echo "$at_srcdir/old-m4-iface.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
14768 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:90"
14769 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
14770 ) >>"$at_stdout" 2>>"$at_stderr"
14771 at_status=$? at_failed=false
14772 $at_check_filter
14773 echo stderr:; cat "$at_stderr"
14774 echo stdout:; cat "$at_stdout"
14775 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90"
14776 $at_failed && at_fn_log_failure
14777 $at_traceon; }
14778
14779 done
14780
14781
14782
14783 lt_exe=./old; if test -f "./old$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
14784 { set +x
14785 $as_echo "$at_srcdir/old-m4-iface.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?;     test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
14786 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "old-m4-iface.at:92"
14787 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
14788 ) >>"$at_stdout" 2>>"$at_stderr"
14789 at_status=$? at_failed=false
14790 $at_check_filter
14791 at_fn_diff_devnull "$at_stderr" || at_failed=:
14792 echo >>"$at_stdout"; $as_echo "Hello, World!" | \
14793   $at_diff - "$at_stdout" || at_failed=:
14794 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:92"
14795 $at_failed && at_fn_log_failure
14796 $at_traceon; }
14797
14798
14799
14800 # Now, test that libtoolize doesn't mistakenly think the user called
14801 # any libtool macros if in fact she didn't.
14802 sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int
14803 mv -f configure.int configure.in
14804 { set +x
14805 $as_echo "$at_srcdir/old-m4-iface.at:98: \$LIBTOOLIZE -n"
14806 at_fn_check_prepare_dynamic "$LIBTOOLIZE -n" "old-m4-iface.at:98"
14807 ( $at_check_trace; $LIBTOOLIZE -n
14808 ) >>"$at_stdout" 2>>"$at_stderr"
14809 at_status=$? at_failed=false
14810 $at_check_filter
14811 echo stderr:; tee stderr <"$at_stderr"
14812 echo stdout:; tee stdout <"$at_stdout"
14813 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:98"
14814 $at_failed && at_fn_log_failure
14815 $at_traceon; }
14816
14817 # ensure no shell errors:
14818 { set +x
14819 $as_echo "$at_srcdir/old-m4-iface.at:100: grep -v \"^libtoolize: \" stderr"
14820 at_fn_check_prepare_trace "old-m4-iface.at:100"
14821 ( $at_check_trace; grep -v "^libtoolize: " stderr
14822 ) >>"$at_stdout" 2>>"$at_stderr"
14823 at_status=$? at_failed=false
14824 $at_check_filter
14825 at_fn_diff_devnull "$at_stderr" || at_failed=:
14826 at_fn_diff_devnull "$at_stdout" || at_failed=:
14827 at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:100"
14828 $at_failed && at_fn_log_failure
14829 $at_traceon; }
14830
14831 { set +x
14832 $as_echo "$at_srcdir/old-m4-iface.at:101: grep \"Remember to add.*LT_INIT.*to configure.in\" stdout"
14833 at_fn_check_prepare_trace "old-m4-iface.at:101"
14834 ( $at_check_trace; grep "Remember to add.*LT_INIT.*to configure.in" stdout
14835 ) >>"$at_stdout" 2>>"$at_stderr"
14836 at_status=$? at_failed=false
14837 $at_check_filter
14838 at_fn_diff_devnull "$at_stderr" || at_failed=:
14839 echo stdout:; cat "$at_stdout"
14840 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:101"
14841 $at_failed && at_fn_log_failure
14842 $at_traceon; }
14843
14844 { set +x
14845 $as_echo "$at_srcdir/old-m4-iface.at:102: grep \"Consider adding.*LT_WITH_LTDL\" stdout"
14846 at_fn_check_prepare_trace "old-m4-iface.at:102"
14847 ( $at_check_trace; grep "Consider adding.*LT_WITH_LTDL" stdout
14848 ) >>"$at_stdout" 2>>"$at_stderr"
14849 at_status=$? at_failed=false
14850 $at_check_filter
14851 at_fn_diff_devnull "$at_stderr" || at_failed=:
14852 at_fn_diff_devnull "$at_stdout" || at_failed=:
14853 at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:102"
14854 $at_failed && at_fn_log_failure
14855 $at_traceon; }
14856
14857 { set +x
14858 $as_echo "$at_srcdir/old-m4-iface.at:103: grep \"Remember to add.*LT_CONFIG_LTDL_DIR\" stdout"
14859 at_fn_check_prepare_trace "old-m4-iface.at:103"
14860 ( $at_check_trace; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout
14861 ) >>"$at_stdout" 2>>"$at_stderr"
14862 at_status=$? at_failed=false
14863 $at_check_filter
14864 at_fn_diff_devnull "$at_stderr" || at_failed=:
14865 at_fn_diff_devnull "$at_stdout" || at_failed=:
14866 at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:103"
14867 $at_failed && at_fn_log_failure
14868 $at_traceon; }
14869
14870
14871   set +x
14872   $at_times_p && times >"$at_times_file"
14873 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14874 read at_status <"$at_status_file"
14875 #AT_STOP_70
14876 #AT_START_71
14877 at_fn_group_banner 71 'old-m4-iface.at:112' \
14878   "AC_WITH_LTDL" "                                   " 5
14879 at_xfail=no
14880       test "$ACLOCAL" = no && at_xfail=yes
14881       test "$AUTOCONF" = no && at_xfail=yes
14882 (
14883   $as_echo "71. $at_setup_line: testing $at_desc ..."
14884   $at_traceon
14885
14886
14887 cat >module.c <<'_ATEOF'
14888 #ifdef __cplusplus
14889 extern "C"
14890 #endif
14891 const char *
14892 hello (void)
14893 {
14894   return "Hello!";
14895 }
14896 _ATEOF
14897
14898
14899 cat >main.c <<'_ATEOF'
14900 #include <stdio.h>
14901 #include "ltdl.h"
14902
14903 int
14904 main ()
14905 {
14906   lt_dlhandle module;
14907   const char *(*func) (void) = 0;
14908   int status = 1;
14909
14910   LTDL_SET_PRELOADED_SYMBOLS();
14911   if (lt_dlinit() != 0) {
14912     fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
14913     return 1;
14914   }
14915
14916   module = lt_dlopen("./module.la");
14917   if (!module) {
14918     fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
14919     goto finish;
14920   }
14921
14922   func = (const char *(*)(void)) lt_dlsym (module, "hello");
14923   if (!func) {
14924     fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
14925     goto finish;
14926   }
14927
14928   printf ("%s\n", (*func) ());
14929   status = 0;
14930
14931 finish:
14932   if (lt_dlexit() != 0) {
14933     fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
14934     status = 1;
14935   }
14936
14937   return status;
14938 }
14939 _ATEOF
14940
14941
14942
14943
14944
14945
14946
14947 cat >configure.in <<'_ATEOF'
14948 AC_PREREQ(2.50)
14949 AC_INIT([main.c])
14950 AC_PROG_MAKE_SET
14951 AC_LIBTOOL_DLOPEN
14952 AM_PROG_LIBTOOL
14953 AC_WITH_LTDL
14954 AC_OUTPUT(Makefile)
14955 _ATEOF
14956
14957
14958 cat >Makefile.in <<'_ATEOF'
14959 top_srcdir      = .
14960 top_builddir    = .
14961 COMPILE         = @CC@ @INCLTDL@  @CPPFLAGS@ @CFLAGS@
14962 LTCOMPILE       = @LIBTOOL@ --mode=compile $(COMPILE)
14963 LTLINK          = @LIBTOOL@ --mode=link @CC@ -no-undefined @CFLAGS@ @LDFLAGS@ -o $@
14964 SHELL           = @SHELL@
14965 @SET_MAKE@
14966
14967 TARGETS    = libltdl/libltdlc.la module.la ltdldemo@EXEEXT@
14968
14969 all: $(TARGETS)
14970
14971 libltdl/libltdlc.la:
14972         cd libltdl && $(MAKE)
14973
14974 module.la: module.lo
14975         $(LTLINK) module.lo -module -avoid-version -rpath /dev/null
14976
14977 ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la
14978         $(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@ @LIBS@
14979
14980 .SUFFIXES:
14981 .SUFFIXES: .c .@OBJEXT@ .lo
14982
14983 .c.@OBJEXT@:
14984         $(COMPILE) -c $<
14985
14986 .c.lo:
14987         $(LTCOMPILE) -c -o $@ $<
14988 _ATEOF
14989
14990
14991 # Be sure to use the in-tree libltdl, somebody might have removed
14992 # an installed libltdl.la file.
14993 $LIBTOOLIZE --ltdl --install
14994
14995
14996 { set +x
14997 $as_echo "$at_srcdir/old-m4-iface.at:160: \$ACLOCAL -I libltdl/m4"
14998 at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "old-m4-iface.at:160"
14999 ( $at_check_trace; $ACLOCAL -I libltdl/m4
15000 ) >>"$at_stdout" 2>>"$at_stderr"
15001 at_status=$? at_failed=false
15002 $at_check_filter
15003 echo stderr:; cat "$at_stderr"
15004 echo stdout:; cat "$at_stdout"
15005 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
15006 $at_failed && at_fn_log_failure
15007 $at_traceon; }
15008
15009
15010
15011
15012
15013
15014 { set +x
15015 $as_echo "$at_srcdir/old-m4-iface.at:160: \$AUTOCONF --force"
15016 at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:160"
15017 ( $at_check_trace; $AUTOCONF --force
15018 ) >>"$at_stdout" 2>>"$at_stderr"
15019 at_status=$? at_failed=false
15020 $at_check_filter
15021 echo stderr:; cat "$at_stderr"
15022 echo stdout:; cat "$at_stdout"
15023 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
15024 $at_failed && at_fn_log_failure
15025 $at_traceon; }
15026
15027
15028
15029
15030 { set +x
15031 $as_echo "$at_srcdir/old-m4-iface.at:160: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl"
15032 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:160"
15033 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --with-included-ltdl
15034 ) >>"$at_stdout" 2>>"$at_stderr"
15035 at_status=$? at_failed=false
15036 $at_check_filter
15037 echo stderr:; cat "$at_stderr"
15038 echo stdout:; cat "$at_stdout"
15039 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
15040 $at_failed && at_fn_log_failure
15041 $at_traceon; }
15042
15043
15044 for target in all
15045 do
15046   { set +x
15047 $as_echo "$at_srcdir/old-m4-iface.at:160: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
15048 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:160"
15049 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
15050 ) >>"$at_stdout" 2>>"$at_stderr"
15051 at_status=$? at_failed=false
15052 $at_check_filter
15053 echo stderr:; cat "$at_stderr"
15054 echo stdout:; cat "$at_stdout"
15055 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160"
15056 $at_failed && at_fn_log_failure
15057 $at_traceon; }
15058
15059 done
15060
15061
15062
15063 lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
15064 { set +x
15065 $as_echo "$at_srcdir/old-m4-iface.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?;            test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
15066 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "old-m4-iface.at:163"
15067 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
15068 ) >>"$at_stdout" 2>>"$at_stderr"
15069 at_status=$? at_failed=false
15070 $at_check_filter
15071 at_fn_diff_devnull "$at_stderr" || at_failed=:
15072 echo stdout:; cat "$at_stdout"
15073 at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:163"
15074 $at_failed && at_fn_log_failure
15075 $at_traceon; }
15076
15077
15078
15079   set +x
15080   $at_times_p && times >"$at_times_file"
15081 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15082 read at_status <"$at_status_file"
15083 #AT_STOP_71
15084 #AT_START_72
15085 at_fn_group_banner 72 'am-subdir.at:33' \
15086   "C subdir-objects" "                               " 6
15087 at_xfail=no
15088       test "$ACLOCAL" = no && at_xfail=yes
15089       test "$AUTOMAKE" = no && at_xfail=yes
15090       test "$AUTOCONF" = no && at_xfail=yes
15091 (
15092   $as_echo "72. $at_setup_line: testing $at_desc ..."
15093   $at_traceon
15094
15095
15096 cat >configure.ac <<'_ATEOF'
15097 AC_INIT([subdir-demo], 2.4.2, bug-libtool@gnu.org)
15098 AM_INIT_AUTOMAKE
15099 LT_INIT([win32-dll])
15100 AC_PROG_CC
15101 AM_PROG_CC_C_O
15102 AC_CONFIG_FILES([Makefile])
15103 AC_OUTPUT
15104 _ATEOF
15105
15106
15107 cat >Makefile.am <<'_ATEOF'
15108 ACLOCAL_AMFLAGS = -I m4
15109 AUTOMAKE_OPTIONS = subdir-objects foreign 1.6
15110 AM_CPPFLAGS     = -I$(top_srcdir)/../..
15111
15112 lib_LTLIBRARIES         = subdir/libsub.la
15113 subdir_libsub_la_SOURCES= subdir/sub.c
15114
15115 bin_PROGRAMS            = subdir/subdemo
15116 subdir_subdemo_SOURCES  = subdir/main.c
15117 subdir_subdemo_LDADD    = subdir/libsub.la
15118 _ATEOF
15119
15120
15121 test -d subdir || { rm -f subdir && mkdir subdir; }
15122
15123 cat >subdir/main.c <<'_ATEOF'
15124 #include <stdio.h>
15125
15126 extern void sub (void);
15127
15128 int main (void)
15129 {
15130   printf ("Welcome to GNU Libtool subdir-objects test!\n");
15131   sub();
15132   return 0;
15133 }
15134 _ATEOF
15135
15136
15137 cat >subdir/sub.c <<'_ATEOF'
15138 #include <stdio.h>
15139 void sub (void) { printf ("** This is libsub **\n"); }
15140 _ATEOF
15141
15142
15143 $LIBTOOLIZE --copy
15144
15145
15146 { set +x
15147 $as_echo "$at_srcdir/am-subdir.at:78: \$ACLOCAL -I m4"
15148 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:78"
15149 ( $at_check_trace; $ACLOCAL -I m4
15150 ) >>"$at_stdout" 2>>"$at_stderr"
15151 at_status=$? at_failed=false
15152 $at_check_filter
15153 echo stderr:; cat "$at_stderr"
15154 echo stdout:; cat "$at_stdout"
15155 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
15156 $at_failed && at_fn_log_failure
15157 $at_traceon; }
15158
15159
15160
15161
15162
15163 { set +x
15164 $as_echo "$at_srcdir/am-subdir.at:78: \$AUTOMAKE --add-missing"
15165 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:78"
15166 ( $at_check_trace; $AUTOMAKE --add-missing
15167 ) >>"$at_stdout" 2>>"$at_stderr"
15168 at_status=$? at_failed=false
15169 $at_check_filter
15170 echo stderr:; tee stderr <"$at_stderr"
15171 echo stdout:; cat "$at_stdout"
15172 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
15173 if $at_failed; then :
15174   { set +x
15175 $as_echo "$at_srcdir/am-subdir.at:78: grep 'require .*but have' stderr && (exit 77)"
15176 at_fn_check_prepare_trace "am-subdir.at:78"
15177 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
15178 ) >>"$at_stdout" 2>>"$at_stderr"
15179 at_status=$? at_failed=false
15180 $at_check_filter
15181 at_fn_diff_devnull "$at_stderr" || at_failed=:
15182 at_fn_diff_devnull "$at_stdout" || at_failed=:
15183 at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:78"
15184 $at_failed && at_fn_log_failure
15185 $at_traceon; }
15186
15187 fi
15188 $at_failed && at_fn_log_failure
15189 $at_traceon; }
15190
15191
15192
15193
15194 { set +x
15195 $as_echo "$at_srcdir/am-subdir.at:78: \$AUTOCONF "
15196 at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:78"
15197 ( $at_check_trace; $AUTOCONF
15198 ) >>"$at_stdout" 2>>"$at_stderr"
15199 at_status=$? at_failed=false
15200 $at_check_filter
15201 echo stderr:; cat "$at_stderr"
15202 echo stdout:; cat "$at_stdout"
15203 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
15204 $at_failed && at_fn_log_failure
15205 $at_traceon; }
15206
15207
15208
15209
15210 { set +x
15211 $as_echo "$at_srcdir/am-subdir.at:78: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;    \$CONFIG_SHELL ./configure \$configure_options "
15212 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:78"
15213 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
15214 ) >>"$at_stdout" 2>>"$at_stderr"
15215 at_status=$? at_failed=false
15216 $at_check_filter
15217 echo stderr:; cat "$at_stderr"
15218 echo stdout:; cat "$at_stdout"
15219 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
15220 $at_failed && at_fn_log_failure
15221 $at_traceon; }
15222
15223
15224 for target in all
15225 do
15226   { set +x
15227 $as_echo "$at_srcdir/am-subdir.at:78: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
15228 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:78"
15229 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
15230 ) >>"$at_stdout" 2>>"$at_stderr"
15231 at_status=$? at_failed=false
15232 $at_check_filter
15233 echo stderr:; cat "$at_stderr"
15234 echo stdout:; cat "$at_stdout"
15235 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78"
15236 $at_failed && at_fn_log_failure
15237 $at_traceon; }
15238
15239 done
15240
15241
15242
15243 lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
15244 { set +x
15245 $as_echo "$at_srcdir/am-subdir.at:80: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
15246 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "am-subdir.at:80"
15247 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
15248 ) >>"$at_stdout" 2>>"$at_stderr"
15249 at_status=$? at_failed=false
15250 $at_check_filter
15251 at_fn_diff_devnull "$at_stderr" || at_failed=:
15252 echo stdout:; tee stdout <"$at_stdout"
15253 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:80"
15254 $at_failed && at_fn_log_failure
15255 $at_traceon; }
15256
15257
15258 { set +x
15259 $as_echo "$at_srcdir/am-subdir.at:81: grep 'Welcome to GNU Libtool subdir-objects test' stdout"
15260 at_fn_check_prepare_trace "am-subdir.at:81"
15261 ( $at_check_trace; grep 'Welcome to GNU Libtool subdir-objects test' stdout
15262 ) >>"$at_stdout" 2>>"$at_stderr"
15263 at_status=$? at_failed=false
15264 $at_check_filter
15265 at_fn_diff_devnull "$at_stderr" || at_failed=:
15266 echo stdout:; cat "$at_stdout"
15267 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:81"
15268 $at_failed && at_fn_log_failure
15269 $at_traceon; }
15270
15271 { set +x
15272 $as_echo "$at_srcdir/am-subdir.at:83: grep 'This is libsub' stdout"
15273 at_fn_check_prepare_trace "am-subdir.at:83"
15274 ( $at_check_trace; grep 'This is libsub' stdout
15275 ) >>"$at_stdout" 2>>"$at_stderr"
15276 at_status=$? at_failed=false
15277 $at_check_filter
15278 at_fn_diff_devnull "$at_stderr" || at_failed=:
15279 echo stdout:; cat "$at_stdout"
15280 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:83"
15281 $at_failed && at_fn_log_failure
15282 $at_traceon; }
15283
15284
15285   set +x
15286   $at_times_p && times >"$at_times_file"
15287 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15288 read at_status <"$at_status_file"
15289 #AT_STOP_72
15290 #AT_START_73
15291 at_fn_group_banner 73 'am-subdir.at:93' \
15292   "C++ subdir-objects" "                             " 6
15293 at_xfail=no
15294       test "$ACLOCAL" = no && at_xfail=yes
15295       test "$AUTOMAKE" = no && at_xfail=yes
15296       test "$AUTOCONF" = no && at_xfail=yes
15297 (
15298   $as_echo "73. $at_setup_line: testing $at_desc ..."
15299   $at_traceon
15300
15301
15302 { set +x
15303 $as_echo "$at_srcdir/am-subdir.at:94: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
15304 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "am-subdir.at:94"
15305 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
15306 ) >>"$at_stdout" 2>>"$at_stderr"
15307 at_status=$? at_failed=false
15308 $at_check_filter
15309 at_fn_diff_devnull "$at_stderr" || at_failed=:
15310 at_fn_diff_devnull "$at_stdout" || at_failed=:
15311 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94"
15312 $at_failed && at_fn_log_failure
15313 $at_traceon; }
15314
15315 { set +x
15316 $as_echo "$at_srcdir/am-subdir.at:94: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
15317 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "am-subdir.at:94"
15318 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
15319 ) >>"$at_stdout" 2>>"$at_stderr"
15320 at_status=$? at_failed=false
15321 $at_check_filter
15322 at_fn_diff_devnull "$at_stderr" || at_failed=:
15323 at_fn_diff_devnull "$at_stdout" || at_failed=:
15324 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94"
15325 $at_failed && at_fn_log_failure
15326 $at_traceon; }
15327
15328
15329
15330 cat >configure.ac <<'_ATEOF'
15331 AC_INIT([subdir-demo], 2.4.2, bug-libtool@gnu.org)
15332 AM_INIT_AUTOMAKE
15333 AC_PROG_CC
15334 AM_PROG_CC_C_O
15335 AC_PROG_CXX
15336 AC_PROG_CXXCPP
15337
15338 AC_LANG([C++])
15339 LT_INIT([win32-dll])
15340
15341 AC_CONFIG_FILES([Makefile])
15342 AC_OUTPUT
15343 _ATEOF
15344
15345
15346 cat >Makefile.am <<'_ATEOF'
15347 ACLOCAL_AMFLAGS = -I m4
15348 AUTOMAKE_OPTIONS = subdir-objects foreign 1.6
15349 AM_CPPFLAGS     = -I$(top_srcdir)/../..
15350
15351 lib_LTLIBRARIES         = subdir/libsub.la
15352 subdir_libsub_la_SOURCES= subdir/sub.cxx subdir/sub.hxx
15353
15354 bin_PROGRAMS            = subdir/subdemo
15355 subdir_subdemo_SOURCES  = subdir/main.cxx
15356 subdir_subdemo_LDADD    = subdir/libsub.la
15357 _ATEOF
15358
15359
15360 test -d subdir || { rm -f subdir && mkdir subdir; }
15361
15362 cat >subdir/sub.hxx <<'_ATEOF'
15363 class libsub { public: int sub (void); };
15364 _ATEOF
15365
15366
15367 cat >subdir/main.cxx <<'_ATEOF'
15368 #include "sub.hxx"
15369
15370 int main (void)
15371 {
15372   libsub SUB;
15373   return SUB.sub() != 27;
15374 }
15375 _ATEOF
15376
15377
15378 cat >subdir/sub.cxx <<'_ATEOF'
15379 #include "sub.hxx"
15380
15381 int libsub::sub (void) { return 27; }
15382 _ATEOF
15383
15384
15385 $LIBTOOLIZE --copy
15386
15387
15388 { set +x
15389 $as_echo "$at_srcdir/am-subdir.at:146: \$ACLOCAL -I m4"
15390 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:146"
15391 ( $at_check_trace; $ACLOCAL -I m4
15392 ) >>"$at_stdout" 2>>"$at_stderr"
15393 at_status=$? at_failed=false
15394 $at_check_filter
15395 echo stderr:; cat "$at_stderr"
15396 echo stdout:; cat "$at_stdout"
15397 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
15398 $at_failed && at_fn_log_failure
15399 $at_traceon; }
15400
15401
15402
15403
15404
15405 { set +x
15406 $as_echo "$at_srcdir/am-subdir.at:146: \$AUTOMAKE --add-missing"
15407 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:146"
15408 ( $at_check_trace; $AUTOMAKE --add-missing
15409 ) >>"$at_stdout" 2>>"$at_stderr"
15410 at_status=$? at_failed=false
15411 $at_check_filter
15412 echo stderr:; tee stderr <"$at_stderr"
15413 echo stdout:; cat "$at_stdout"
15414 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
15415 if $at_failed; then :
15416   { set +x
15417 $as_echo "$at_srcdir/am-subdir.at:146: grep 'require .*but have' stderr && (exit 77)"
15418 at_fn_check_prepare_trace "am-subdir.at:146"
15419 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
15420 ) >>"$at_stdout" 2>>"$at_stderr"
15421 at_status=$? at_failed=false
15422 $at_check_filter
15423 at_fn_diff_devnull "$at_stderr" || at_failed=:
15424 at_fn_diff_devnull "$at_stdout" || at_failed=:
15425 at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:146"
15426 $at_failed && at_fn_log_failure
15427 $at_traceon; }
15428
15429 fi
15430 $at_failed && at_fn_log_failure
15431 $at_traceon; }
15432
15433
15434
15435
15436 { set +x
15437 $as_echo "$at_srcdir/am-subdir.at:146: \$AUTOCONF "
15438 at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:146"
15439 ( $at_check_trace; $AUTOCONF
15440 ) >>"$at_stdout" 2>>"$at_stderr"
15441 at_status=$? at_failed=false
15442 $at_check_filter
15443 echo stderr:; cat "$at_stderr"
15444 echo stdout:; cat "$at_stdout"
15445 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
15446 $at_failed && at_fn_log_failure
15447 $at_traceon; }
15448
15449
15450
15451
15452 { set +x
15453 $as_echo "$at_srcdir/am-subdir.at:146: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options "
15454 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:146"
15455 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
15456 ) >>"$at_stdout" 2>>"$at_stderr"
15457 at_status=$? at_failed=false
15458 $at_check_filter
15459 echo stderr:; cat "$at_stderr"
15460 echo stdout:; cat "$at_stdout"
15461 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
15462 $at_failed && at_fn_log_failure
15463 $at_traceon; }
15464
15465
15466 for target in all
15467 do
15468   { set +x
15469 $as_echo "$at_srcdir/am-subdir.at:146: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
15470 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:146"
15471 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
15472 ) >>"$at_stdout" 2>>"$at_stderr"
15473 at_status=$? at_failed=false
15474 $at_check_filter
15475 echo stderr:; cat "$at_stderr"
15476 echo stdout:; cat "$at_stdout"
15477 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146"
15478 $at_failed && at_fn_log_failure
15479 $at_traceon; }
15480
15481 done
15482
15483
15484
15485 lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
15486 { set +x
15487 $as_echo "$at_srcdir/am-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?;       test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
15488 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "am-subdir.at:148"
15489 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
15490 ) >>"$at_stdout" 2>>"$at_stderr"
15491 at_status=$? at_failed=false
15492 $at_check_filter
15493 at_fn_diff_devnull "$at_stderr" || at_failed=:
15494 at_fn_diff_devnull "$at_stdout" || at_failed=:
15495 at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:148"
15496 $at_failed && at_fn_log_failure
15497 $at_traceon; }
15498
15499
15500
15501   set +x
15502   $at_times_p && times >"$at_times_file"
15503 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15504 read at_status <"$at_status_file"
15505 #AT_STOP_73
15506 #AT_START_74
15507 at_fn_group_banner 74 'lt_dlexit.at:30' \
15508   "lt_dlexit unloading libs" "                       " 7
15509 at_xfail=no
15510 (
15511   $as_echo "74. $at_setup_line: testing $at_desc ..."
15512   $at_traceon
15513
15514
15515
15516 # Test for
15517 # http://lists.gnu.org/archive/html/bug-libtool/2007-01/msg00014.html
15518 # http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00013.html
15519
15520 cat >main.c <<'_ATEOF'
15521 #include <ltdl.h>
15522 #include <stdio.h>
15523 #include <string.h>
15524
15525 typedef int (*pfun_T) (int);
15526 typedef int *pvar_T;
15527
15528 /* lt_dlopen wrapper */
15529 static lt_dlhandle
15530 xdlopen (const char *filename)
15531 {
15532   lt_dlhandle handle = lt_dlopen (filename);
15533   if (!handle) {
15534     fprintf (stderr, "can't open the module %s!\n", filename);
15535     fprintf (stderr, "error was: %s\n", lt_dlerror());
15536   }
15537   return handle;
15538 }
15539
15540 /* lt_dlsym wrapper: try one function and one variable */
15541 static int
15542 xdlsymtest (lt_dlhandle handle, const char *func, const char *var)
15543 {
15544   pfun_T pf = (pfun_T) lt_dlsym (handle, func);
15545   pvar_T pv = (pvar_T) lt_dlsym (handle, var);
15546   if (pf == NULL) {
15547     fprintf (stderr, "function `%s' not found\n", func);
15548     return 1;
15549   }
15550   if (pv == NULL) {
15551     fprintf (stderr, "variable `%s' not found\n", var);
15552     return 1;
15553   }
15554   return (*pf) (*pv);
15555 }
15556
15557 int
15558 main (void)
15559 {
15560   lt_dlhandle b1;
15561
15562   LTDL_SET_PRELOADED_SYMBOLS();
15563   if (lt_dlinit() != 0) {
15564     fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
15565     return 1;
15566   }
15567   if (lt_dlexit() != 0) {
15568     fprintf (stderr, "error during first lt_dlexit: %s\n", lt_dlerror());
15569     return 1;
15570   }
15571   if (lt_dlinit() != 0) {
15572     fprintf (stderr, "error during second initialization: %s\n", lt_dlerror());
15573     return 1;
15574   }
15575   if (!(b1 = xdlopen ("modb1.la"))) return 1;
15576   if (xdlsymtest (b1, "fb1", "vb1")) return 1;
15577   /* do not lt_dlclose here on purpose.  */
15578
15579   if (lt_dlexit() != 0) {
15580     fprintf (stderr, "error during exit: %s\n", lt_dlerror());
15581     return 1;
15582   }
15583   return 0;
15584 }
15585 _ATEOF
15586
15587
15588
15589 cat >a1.c <<'_ATEOF'
15590 #ifdef __cplusplus
15591 extern "C" {
15592 #endif
15593 int f1 (int x) { return x - 1; }
15594 int v1 = 1;
15595 #ifdef __cplusplus
15596 }
15597 #endif
15598 _ATEOF
15599
15600
15601 cat >b1.c <<'_ATEOF'
15602 #ifdef __cplusplus
15603 extern "C" {
15604 #endif
15605 #if defined DLL_EXPORT && defined _WIN32 && defined _MSC_VER
15606 #  define LIBA1_SCOPE extern __declspec (dllimport)
15607 #endif
15608 #if !defined LIBA1_SCOPE
15609 #  define LIBA1_SCOPE extern
15610 #endif
15611 LIBA1_SCOPE int f1 (int);
15612 LIBA1_SCOPE int v1;
15613 int fb1 (int x) { return f1 (v1) + x - 3; }
15614 int vb1 = 3;
15615 #ifdef __cplusplus
15616 }
15617 #endif
15618 _ATEOF
15619
15620
15621
15622 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
15623 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
15624
15625 # Skip this test when called from:
15626 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
15627 { set +x
15628 $as_echo "$at_srcdir/lt_dlexit.at:141: case \$LIBLTDL in #(
15629  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
15630 esac"
15631 at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:141"
15632 ( $at_check_trace; case $LIBLTDL in #(
15633  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
15634 esac
15635 ) >>"$at_stdout" 2>>"$at_stderr"
15636 at_status=$? at_failed=false
15637 $at_check_filter
15638 at_fn_diff_devnull "$at_stderr" || at_failed=:
15639 echo stdout:; cat "$at_stdout"
15640 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:141"
15641 $at_failed && at_fn_log_failure
15642 $at_traceon; }
15643
15644
15645 CPPFLAGS="$LTDLINCL $CPPFLAGS"
15646 LDFLAGS="$LDFLAGS -no-undefined"
15647
15648 for file in a1 b1; do
15649   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
15650 done
15651 $CC $CPPFLAGS $CFLAGS -c main.c
15652 { set +x
15653 $as_echo "$at_srcdir/lt_dlexit.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba1.la a1.lo \\
15654           -rpath /foo -avoid-version"
15655 at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:152"
15656 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \
15657           -rpath /foo -avoid-version
15658 ) >>"$at_stdout" 2>>"$at_stderr"
15659 at_status=$? at_failed=false
15660 $at_check_filter
15661 echo stderr:; cat "$at_stderr"
15662 echo stdout:; cat "$at_stdout"
15663 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:152"
15664 $at_failed && at_fn_log_failure
15665 $at_traceon; }
15666
15667 { set +x
15668 $as_echo "$at_srcdir/lt_dlexit.at:154: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o modb1.la b1.lo \\
15669           -rpath /foo -module -avoid-version liba1.la"
15670 at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:154"
15671 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o modb1.la b1.lo \
15672           -rpath /foo -module -avoid-version liba1.la
15673 ) >>"$at_stdout" 2>>"$at_stderr"
15674 at_status=$? at_failed=false
15675 $at_check_filter
15676 echo stderr:; cat "$at_stderr"
15677 echo stdout:; cat "$at_stdout"
15678 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:154"
15679 $at_failed && at_fn_log_failure
15680 $at_traceon; }
15681
15682
15683 # TODO: test -dlpreopen
15684 for dlopen in -dlopen; do
15685   { set +x
15686 $as_echo "$at_srcdir/lt_dlexit.at:159: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \\
15687            \$dlopen modb1.la \$LIBLTDL"
15688 at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:159"
15689 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT \
15690            $dlopen modb1.la $LIBLTDL
15691 ) >>"$at_stdout" 2>>"$at_stderr"
15692 at_status=$? at_failed=false
15693 $at_check_filter
15694 echo stderr:; cat "$at_stderr"
15695 echo stdout:; cat "$at_stdout"
15696 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:159"
15697 $at_failed && at_fn_log_failure
15698 $at_traceon; }
15699
15700   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
15701 { set +x
15702 $as_echo "$at_srcdir/lt_dlexit.at:161: if \$LIBTOOL --mode=execute -dlopen modb1.la \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
15703 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen modb1.la \"$lt_exe\" ; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlexit.at:161"
15704 ( $at_check_trace; if $LIBTOOL --mode=execute -dlopen modb1.la "$lt_exe" ; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
15705 ) >>"$at_stdout" 2>>"$at_stderr"
15706 at_status=$? at_failed=false
15707 $at_check_filter
15708 at_fn_diff_devnull "$at_stderr" || at_failed=:
15709 at_fn_diff_devnull "$at_stdout" || at_failed=:
15710 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:161"
15711 $at_failed && at_fn_log_failure
15712 $at_traceon; }
15713
15714
15715 done
15716
15717   set +x
15718   $at_times_p && times >"$at_times_file"
15719 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15720 read at_status <"$at_status_file"
15721 #AT_STOP_74
15722 #AT_START_75
15723 at_fn_group_banner 75 'lt_dladvise.at:28' \
15724   "lt_dlopenadvise library loading" "                " 7
15725 at_xfail=no
15726 (
15727   $as_echo "75. $at_setup_line: testing $at_desc ..."
15728   $at_traceon
15729
15730
15731
15732 cat >main.c <<'_ATEOF'
15733 #include <ltdl.h>
15734 #include <stdio.h>
15735
15736 typedef int funcp (int);
15737
15738 static int errors = 0;
15739
15740 static void
15741 complain (const char *msg)
15742 {
15743   const char *errmsg = lt_dlerror ();
15744   fprintf (stderr, "%s", msg);
15745   if (errmsg)
15746     fprintf (stderr, ": %s\n", errmsg);
15747   else
15748     fprintf (stderr, ".\n");
15749   ++errors;
15750 }
15751
15752 static lt_dlhandle
15753 moduleopen (const char *filename, lt_dladvise advise)
15754 {
15755   lt_dlhandle handle;
15756
15757   handle = lt_dlopenadvise (filename, advise);
15758   if (!handle)
15759     {
15760       fprintf (stderr, "can't open the module %s!\n", filename);
15761       complain ("error was");
15762     }
15763
15764   return handle;
15765 }
15766
15767 static int
15768 moduletest (lt_dlhandle handle, const char *fname, const char *vname)
15769 {
15770   funcp *f = (funcp *) lt_dlsym (handle, fname);
15771   int   *v = (int *)   lt_dlsym (handle, vname);
15772
15773   if (!f)
15774     {
15775       fprintf (stderr, "function `%s' not found\n", fname);
15776       ++errors;
15777       return -1;
15778     }
15779   if (!v)
15780     {
15781       fprintf (stderr, "variable `%s' not found\n", vname);
15782       ++errors;
15783       return -1;
15784     }
15785   return f (*v);
15786 }
15787
15788 void
15789 hint_ext (void)
15790 {
15791   lt_dlhandle handle;
15792   lt_dladvise advise;
15793
15794   if (lt_dladvise_init (&advise) || lt_dladvise_ext (&advise))
15795     complain ("error setting advise ext");
15796
15797   handle = moduleopen ("libdepend", advise);
15798
15799   if (handle)
15800     printf ("depend: %d\n", moduletest (handle, "g", "j"));
15801
15802   lt_dladvise_destroy (&advise);
15803 }
15804
15805 void
15806 hint_resident (void)
15807 {
15808   const lt_dlinfo *info;
15809   lt_dlhandle handle;
15810   lt_dladvise advise;
15811
15812   if (lt_dladvise_init (&advise) || lt_dladvise_resident (&advise))
15813     complain ("error setting advise resident");
15814
15815   handle = moduleopen ("libresident.la", advise);
15816
15817   if (handle)
15818     {
15819       info = lt_dlgetinfo (handle);
15820       if (!info->is_resident)
15821         complain ("error taking advise resident");
15822
15823       /* cannot close resident modules */
15824       if (lt_dlclose (handle) == 0)
15825         complain ("successfully unloaded resident module");
15826
15827       printf ("resident: %d\n", moduletest (handle, "func", "numb"));
15828     }
15829
15830   lt_dladvise_destroy (&advise);
15831 }
15832
15833 void
15834 hint_local (void)
15835 {
15836   const lt_dlinfo *info;
15837   lt_dlhandle handle;
15838   lt_dladvise advise;
15839
15840   if (lt_dladvise_init (&advise) || lt_dladvise_local (&advise))
15841     complain ("error setting advise local");
15842
15843   handle = moduleopen ("liblocal.la", advise);
15844
15845   if (handle)
15846     {
15847       info = lt_dlgetinfo (handle);
15848       printf ("local: %d\n", moduletest (handle, "f", "i"));
15849
15850       /* If the symlocal hint was taken, don't unload this module
15851          and test that our local symbolnames won't clash with modglobal.  */
15852       if (!info->is_symlocal && lt_dlclose (handle))
15853         complain ("error unloading modlocal");
15854     }
15855
15856   lt_dladvise_destroy (&advise);
15857 }
15858
15859 void
15860 hint_global (void)
15861 {
15862   const lt_dlinfo *info;
15863   lt_dlhandle handle;
15864   lt_dladvise advise;
15865
15866   if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise))
15867     complain ("error setting advise global");
15868
15869   handle = moduleopen ("libglobal.la", advise);
15870
15871   if (handle)
15872     {
15873       info = lt_dlgetinfo (handle);
15874       printf ("global: %d\n", moduletest (handle, "f", "i"));
15875
15876       /* Don't attempt to load moddepend unless modglobal was successfully
15877          loaded and the symglobal hint was taken, and the system allows to
15878          to have undefined symbols.  */
15879       if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
15880         {
15881           hint_ext ();
15882         }
15883       else
15884         {
15885           /* Fake the output so the test won't fail when using a dlloader
15886              unable to take symglobal hints.  */
15887           printf ("depend: 5\n");
15888         }
15889     }
15890
15891   lt_dladvise_destroy (&advise);
15892 }
15893
15894 void
15895 hint_preload (void)
15896 {
15897   lt_dlhandle handle;
15898   lt_dladvise advise;
15899
15900   if (lt_dladvise_init (&advise) || lt_dladvise_preload (&advise))
15901     complain ("error setting advise preload");
15902
15903   handle = moduleopen ("libpreload.la", advise);
15904
15905   if (handle)
15906     {
15907       printf("preload: %d\n", moduletest (handle, "h", "k"));
15908     }
15909
15910   lt_dladvise_destroy (&advise);
15911 }
15912
15913 int
15914 main (void)
15915 {
15916
15917   LTDL_SET_PRELOADED_SYMBOLS();
15918
15919   if (lt_dlinit() != 0)
15920     {
15921       fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
15922       return 1;
15923     }
15924
15925   hint_resident ();
15926   hint_local ();
15927 #ifdef HAVE_SHARED
15928   hint_global ();
15929 #else
15930   /* This ugly hack is because we have symbols with the same name in both the
15931      global module and the local one, we can't lt_dlopen the local module
15932      locally and then later load the global module globally because of this.
15933      Instead of skipping the test entirely, we test what we can and
15934      have this hack. */
15935   printf ("global: 4\n");
15936   printf ("depend: 5\n");
15937 #endif
15938   hint_preload ();
15939
15940   if (lt_dlexit () != 0)
15941     complain ("error during exit");
15942
15943   return (errors != 0);
15944 }
15945 _ATEOF
15946
15947
15948 cat >modresident.c <<'_ATEOF'
15949 #ifdef __cplusplus
15950 extern "C" {
15951 #endif
15952 int func (int x) { return x / 3; }
15953 int numb = 7;
15954 #ifdef __cplusplus
15955 }
15956 #endif
15957 _ATEOF
15958
15959
15960 cat >modlocal.c <<'_ATEOF'
15961 #ifdef __cplusplus
15962 extern "C" {
15963 #endif
15964 int f (int x) { return (x * x) / 10; }
15965 int i = 6;
15966 #ifdef __cplusplus
15967 }
15968 #endif
15969 _ATEOF
15970
15971
15972 cat >modglobal.c <<'_ATEOF'
15973 #ifdef __cplusplus
15974 extern "C" {
15975 #endif
15976 int f (int x) { return x - 1; }
15977 int i = 5;
15978 #ifdef __cplusplus
15979 }
15980 #endif
15981 _ATEOF
15982
15983
15984 cat >moddepend.c <<'_ATEOF'
15985 #ifdef __cplusplus
15986 extern "C" {
15987 #endif
15988 extern int f (int), i;
15989 int g (int x) { return f (i) + x - 3; }
15990 int j = 4;
15991 #ifdef __cplusplus
15992 }
15993 #endif
15994 _ATEOF
15995
15996
15997 cat >modpreload.c <<'_ATEOF'
15998 #ifdef __cplusplus
15999 extern "C" {
16000 #endif
16001 int h (int x) { return 2 * x; }
16002 int k = 3;
16003 #ifdef __cplusplus
16004 }
16005 #endif
16006 _ATEOF
16007
16008
16009 cat >expout <<'_ATEOF'
16010 resident: 2
16011 local: 3
16012 global: 4
16013 depend: 5
16014 preload: 6
16015 _ATEOF
16016
16017 case $host_os in mingw*)
16018   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
16019   mv -f expout.t expout ;;
16020 esac
16021
16022 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
16023 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
16024
16025 # Skip this test when called from:
16026 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
16027 { set +x
16028 $as_echo "$at_srcdir/lt_dladvise.at:315: case \$LIBLTDL in #(
16029  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
16030 esac"
16031 at_fn_check_prepare_notrace 'an embedded newline' "lt_dladvise.at:315"
16032 ( $at_check_trace; case $LIBLTDL in #(
16033  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
16034 esac
16035 ) >>"$at_stdout" 2>>"$at_stderr"
16036 at_status=$? at_failed=false
16037 $at_check_filter
16038 at_fn_diff_devnull "$at_stderr" || at_failed=:
16039 echo stdout:; cat "$at_stdout"
16040 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:315"
16041 $at_failed && at_fn_log_failure
16042 $at_traceon; }
16043
16044
16045 CPPFLAGS="$LTDLINCL $CPPFLAGS"
16046
16047 dlopenable='resident local global'
16048 dlpreloadable='preload'
16049
16050 # ------------------------------------------------------------------------- #
16051 # The depend test makes no sense unless compiled without -no-undefined. By  #
16052 # not building the depend module in that case, when this test passes we can #
16053 # be sure that hint_global() above, is being correctly informed those hosts #
16054 # are reporting not able to accept the global hint to lt_dlopenadvise().    #
16055 # ------------------------------------------------------------------------- #
16056
16057 have_shared=false
16058 $LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
16059
16060 case $host_os,$have_shared in
16061 cygwin* | mingw* | cegcc* | *,false)
16062   # These hosts do not support linking without -no-undefined
16063   CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
16064   ;;
16065 *)
16066   CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
16067   dlopenable="$dlopen depend"
16068   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
16069   { set +x
16070 $as_echo "$at_srcdir/lt_dladvise.at:343: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o libdepend.la            moddepend.lo -rpath /foo -avoid-version"
16071 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la            moddepend.lo -rpath /foo -avoid-version" "lt_dladvise.at:343"
16072 ( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la            moddepend.lo -rpath /foo -avoid-version
16073 ) >>"$at_stdout" 2>>"$at_stderr"
16074 at_status=$? at_failed=false
16075 $at_check_filter
16076 echo stderr:; cat "$at_stderr"
16077 echo stdout:; cat "$at_stdout"
16078 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:343"
16079 $at_failed && at_fn_log_failure
16080 $at_traceon; }
16081
16082   ;;
16083 esac
16084
16085 $have_shared && CPPFLAGS="$CPPFLAGS -DHAVE_SHARED"
16086
16087 # ------------------------------------------------------------------------- #
16088 # Other modules can be tested correctly even when built with -no-undefined. #
16089 # ------------------------------------------------------------------------- #
16090
16091 LDFLAGS="$LDFLAGS -no-undefined"
16092
16093 $CC $CPPFLAGS $CFLAGS -c main.c
16094 for name in resident local global preload; do
16095   # FIXME: adding -static to libpreload shouldn't be necessary.
16096   #        Fix this properly in ltmain, then remove this workaround.
16097   if test $name = preload; then
16098     st=-static
16099   else
16100     st=
16101   fi
16102   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c
16103   { set +x
16104 $as_echo "$at_srcdir/lt_dladvise.at:366: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o lib\$name.la            mod\$name.lo \$st -rpath /foo -avoid-version"
16105 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la            mod$name.lo $st -rpath /foo -avoid-version" "lt_dladvise.at:366"
16106 ( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la            mod$name.lo $st -rpath /foo -avoid-version
16107 ) >>"$at_stdout" 2>>"$at_stderr"
16108 at_status=$? at_failed=false
16109 $at_check_filter
16110 echo stderr:; cat "$at_stderr"
16111 echo stdout:; cat "$at_stdout"
16112 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:366"
16113 $at_failed && at_fn_log_failure
16114 $at_traceon; }
16115
16116 done
16117
16118 preloaded=
16119 for module in $dlpreloadable; do
16120   preloaded="${preloaded+$preloaded }-dlpreopen lib$module.la"
16121 done
16122
16123 modules=
16124 for module in $dlopenable; do
16125   modules="${modules+$modules }-dlopen lib$module.la"
16126 done
16127
16128 { set +x
16129 $as_echo "$at_srcdir/lt_dladvise.at:380: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$preloaded \$modules \$LIBLTDL"
16130 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL" "lt_dladvise.at:380"
16131 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL
16132 ) >>"$at_stdout" 2>>"$at_stderr"
16133 at_status=$? at_failed=false
16134 $at_check_filter
16135 echo stderr:; cat "$at_stderr"
16136 echo stdout:; cat "$at_stdout"
16137 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:380"
16138 $at_failed && at_fn_log_failure
16139 $at_traceon; }
16140
16141
16142 # Remove loadable libpreload module, so we know it is the preloaded module
16143 # that is being executed by a successful test invocation:
16144 { set +x
16145 $as_echo "$at_srcdir/lt_dladvise.at:385: \$LIBTOOL --mode=clean rm -f libpreload.la"
16146 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f libpreload.la" "lt_dladvise.at:385"
16147 ( $at_check_trace; $LIBTOOL --mode=clean rm -f libpreload.la
16148 ) >>"$at_stdout" 2>>"$at_stderr"
16149 at_status=$? at_failed=false
16150 $at_check_filter
16151 echo stderr:; cat "$at_stderr"
16152 echo stdout:; cat "$at_stdout"
16153 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:385"
16154 $at_failed && at_fn_log_failure
16155 $at_traceon; }
16156
16157
16158 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16159 { set +x
16160 $as_echo "$at_srcdir/lt_dladvise.at:387: if \$LIBTOOL --mode=execute \$modules \"\$lt_exe\" ; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16161 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute $modules \"$lt_exe\" ; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dladvise.at:387"
16162 ( $at_check_trace; if $LIBTOOL --mode=execute $modules "$lt_exe" ; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16163 ) >>"$at_stdout" 2>>"$at_stderr"
16164 at_status=$? at_failed=false
16165 $at_check_filter
16166 at_fn_diff_devnull "$at_stderr" || at_failed=:
16167 $at_diff expout "$at_stdout" || at_failed=:
16168 at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:387"
16169 $at_failed && at_fn_log_failure
16170 $at_traceon; }
16171
16172
16173
16174   set +x
16175   $at_times_p && times >"$at_times_file"
16176 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16177 read at_status <"$at_status_file"
16178 #AT_STOP_75
16179 #AT_START_76
16180 at_fn_group_banner 76 'lt_dlopen.at:23' \
16181   "lt_dlopen error messages" "                       " 7
16182 at_xfail=yes
16183 (
16184   $as_echo "76. $at_setup_line: testing $at_desc ..."
16185   $at_traceon
16186
16187
16188
16189 # The bug is not fixed:
16190
16191
16192 # This test only works if the system allows undefined symbols.
16193 eval `$LIBTOOL --config | grep '^allow_undefined_flag='`
16194 { set +x
16195 $as_echo "$at_srcdir/lt_dlopen.at:31: test unsupported != \"\$allow_undefined_flag\" || exit 77"
16196 at_fn_check_prepare_dynamic "test unsupported != \"$allow_undefined_flag\" || exit 77" "lt_dlopen.at:31"
16197 ( $at_check_trace; test unsupported != "$allow_undefined_flag" || exit 77
16198 ) >>"$at_stdout" 2>>"$at_stderr"
16199 at_status=$? at_failed=false
16200 $at_check_filter
16201 at_fn_diff_devnull "$at_stderr" || at_failed=:
16202 at_fn_diff_devnull "$at_stdout" || at_failed=:
16203 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:31"
16204 $at_failed && at_fn_log_failure
16205 $at_traceon; }
16206
16207
16208 cat >main.c <<'_ATEOF'
16209 #include <ltdl.h>
16210 #include <stdio.h>
16211
16212 int
16213 main (int argc, char* argv[])
16214 {
16215   int err = 0;
16216   lt_dlhandle plugin_handle;
16217
16218   if (argc < 2)
16219     {
16220       fprintf (stderr, "usage: %s plugin\n", argv[0]);
16221       return 1;
16222     }
16223
16224   lt_dlinit ();
16225   plugin_handle = lt_dlopenext (argv[1]);
16226   if (NULL != plugin_handle)
16227     {
16228       printf ("plugin opened successfully!\n");
16229       lt_dlclose (plugin_handle);
16230     }
16231   else
16232     {
16233       printf ("plugin failed to open: %s\n", lt_dlerror());
16234       err = 1;
16235     }
16236   lt_dlexit ();
16237   return err;
16238 }
16239 _ATEOF
16240
16241
16242 cat >good-plugin.c <<'_ATEOF'
16243 int foo;
16244 int *i = &foo;
16245 _ATEOF
16246
16247
16248 cat >missing-symbol-plugin.c <<'_ATEOF'
16249 /* On systems that allow undefined symbols, this will compile,
16250      but the symbol "foo" won't be found at runtime */
16251 extern int foo;
16252 int *i = &foo;
16253 _ATEOF
16254
16255
16256 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
16257 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
16258
16259 CPPFLAGS="$LTDLINCL $CPPFLAGS"
16260 inst=`pwd`/inst
16261 libdir=$inst/lib
16262
16263 { set +x
16264 $as_echo "$at_srcdir/lt_dlopen.at:85: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
16265 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lt_dlopen.at:85"
16266 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
16267 ) >>"$at_stdout" 2>>"$at_stderr"
16268 at_status=$? at_failed=false
16269 $at_check_filter
16270 echo stderr:; cat "$at_stderr"
16271 echo stdout:; cat "$at_stdout"
16272 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:85"
16273 $at_failed && at_fn_log_failure
16274 $at_traceon; }
16275
16276 for file in good-plugin.c missing-symbol-plugin.c; do
16277   { set +x
16278 $as_echo "$at_srcdir/lt_dlopen.at:87: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file"
16279 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "lt_dlopen.at:87"
16280 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
16281 ) >>"$at_stdout" 2>>"$at_stderr"
16282 at_status=$? at_failed=false
16283 $at_check_filter
16284 echo stderr:; cat "$at_stderr"
16285 echo stdout:; cat "$at_stdout"
16286 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:87"
16287 $at_failed && at_fn_log_failure
16288 $at_traceon; }
16289
16290 done
16291 { set +x
16292 $as_echo "$at_srcdir/lt_dlopen.at:90: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o good-plugin.la -rpath \$libdir    -module -avoid-version good-plugin.lo"
16293 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir          -module -avoid-version good-plugin.lo" "lt_dlopen.at:90"
16294 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir    -module -avoid-version good-plugin.lo
16295 ) >>"$at_stdout" 2>>"$at_stderr"
16296 at_status=$? at_failed=false
16297 $at_check_filter
16298 echo stderr:; cat "$at_stderr"
16299 echo stdout:; cat "$at_stdout"
16300 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:90"
16301 $at_failed && at_fn_log_failure
16302 $at_traceon; }
16303
16304 { set +x
16305 $as_echo "$at_srcdir/lt_dlopen.at:92: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o missing-symbol-plugin.la -rpath \$libdir  -module -avoid-version missing-symbol-plugin.lo"
16306 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir        -module -avoid-version missing-symbol-plugin.lo" "lt_dlopen.at:92"
16307 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir  -module -avoid-version missing-symbol-plugin.lo
16308 ) >>"$at_stdout" 2>>"$at_stderr"
16309 at_status=$? at_failed=false
16310 $at_check_filter
16311 echo stderr:; cat "$at_stderr"
16312 echo stdout:; cat "$at_stdout"
16313 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:92"
16314 $at_failed && at_fn_log_failure
16315 $at_traceon; }
16316
16317
16318 { set +x
16319 $as_echo "$at_srcdir/lt_dlopen.at:95: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT        -dlopen good-plugin.la -dlopen missing-symbol-plugin.la \$LIBLTDL"
16320 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT       -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL" "lt_dlopen.at:95"
16321 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT         -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL
16322 ) >>"$at_stdout" 2>>"$at_stderr"
16323 at_status=$? at_failed=false
16324 $at_check_filter
16325 echo stderr:; cat "$at_stderr"
16326 echo stdout:; cat "$at_stdout"
16327 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:95"
16328 $at_failed && at_fn_log_failure
16329 $at_traceon; }
16330
16331
16332 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16333 { set +x
16334 $as_echo "$at_srcdir/lt_dlopen.at:99: if \"\$lt_exe\" ./good-plugin.la; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16335 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./good-plugin.la; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlopen.at:99"
16336 ( $at_check_trace; if "$lt_exe" ./good-plugin.la; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16337 ) >>"$at_stdout" 2>>"$at_stderr"
16338 at_status=$? at_failed=false
16339 $at_check_filter
16340 echo stderr:; cat "$at_stderr"
16341 echo stdout:; cat "$at_stdout"
16342 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:99"
16343 $at_failed && at_fn_log_failure
16344 $at_traceon; }
16345
16346
16347 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16348 { set +x
16349 $as_echo "$at_srcdir/lt_dlopen.at:100: if \"\$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=\$?;     test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16350 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=$?;         test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlopen.at:100"
16351 ( $at_check_trace; if "$lt_exe" ./missing-symbol-plugin.la; then :; else lt_status=$?;     test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16352 ) >>"$at_stdout" 2>>"$at_stderr"
16353 at_status=$? at_failed=false
16354 $at_check_filter
16355 echo stderr:; tee stderr <"$at_stderr"
16356 echo stdout:; cat "$at_stdout"
16357 at_fn_check_status 1 $at_status "$at_srcdir/lt_dlopen.at:100"
16358 $at_failed && at_fn_log_failure
16359 $at_traceon; }
16360
16361
16362 { set +x
16363 $as_echo "$at_srcdir/lt_dlopen.at:101: grep 'missing symbol' stderr"
16364 at_fn_check_prepare_trace "lt_dlopen.at:101"
16365 ( $at_check_trace; grep 'missing symbol' stderr
16366 ) >>"$at_stdout" 2>>"$at_stderr"
16367 at_status=$? at_failed=false
16368 $at_check_filter
16369 at_fn_diff_devnull "$at_stderr" || at_failed=:
16370 echo stdout:; cat "$at_stdout"
16371 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:101"
16372 $at_failed && at_fn_log_failure
16373 $at_traceon; }
16374
16375
16376   set +x
16377   $at_times_p && times >"$at_times_file"
16378 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16379 read at_status <"$at_status_file"
16380 #AT_STOP_76
16381 #AT_START_77
16382 at_fn_group_banner 77 'lt_dlopen_a.at:23' \
16383   "lt_dlopen archive" "                              " 7
16384 at_xfail=no
16385 (
16386   $as_echo "77. $at_setup_line: testing $at_desc ..."
16387   $at_traceon
16388
16389
16390
16391 cat >main.c <<'_ATEOF'
16392 #include <ltdl.h>
16393 #include <stdio.h>
16394
16395 /* This dlopen() in the main executable should override any dlopen()s in
16396    shared libraries etc.
16397
16398    If that is not the case (or the platform does not use dlopen()) then this
16399    test should exit 77, causing the test to SKIP.
16400 */
16401 static int retcde = 77;
16402
16403 void * dlopen(const char *path, int mode) {
16404   if (!(strcmp(path,"plugin.a") && strcmp(path,"plugin.lib")))
16405     {
16406       fprintf(stderr,"Tried to open archive %s\n",path);
16407       retcde = 1;
16408     }
16409   else
16410     {
16411       fprintf(stderr,"Opening ... %s\n", path);
16412       if (retcde == 77) retcde = 0;
16413     }
16414   return NULL;
16415 }
16416
16417 int
16418 main (int argc, char* argv[])
16419 {
16420   int err = 0;
16421   lt_dlhandle plugin_handle;
16422
16423   lt_dlinit ();
16424   plugin_handle = lt_dlopenext (argv[1]);
16425   lt_dlexit ();
16426   return retcde;
16427 }
16428 _ATEOF
16429
16430
16431 cat >plugin.c <<'_ATEOF'
16432
16433 int i = 1;
16434 _ATEOF
16435
16436
16437 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
16438 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
16439
16440 CPPFLAGS="$LTDLINCL $CPPFLAGS"
16441 inst=`pwd`/inst
16442 libdir=$inst/lib
16443 bindir=$inst/bin
16444
16445 { set +x
16446 $as_echo "$at_srcdir/lt_dlopen_a.at:78: \$CC \$CPPFLAGS \$CFLAGS -c main.c || exit 77"
16447 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c || exit 77" "lt_dlopen_a.at:78"
16448 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c || exit 77
16449 ) >>"$at_stdout" 2>>"$at_stderr"
16450 at_status=$? at_failed=false
16451 $at_check_filter
16452 echo stderr:; cat "$at_stderr"
16453 echo stdout:; cat "$at_stdout"
16454 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:78"
16455 $at_failed && at_fn_log_failure
16456 $at_traceon; }
16457
16458 { set +x
16459 $as_echo "$at_srcdir/lt_dlopen_a.at:79: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c || exit 77"
16460 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77" "lt_dlopen_a.at:79"
16461 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77
16462 ) >>"$at_stdout" 2>>"$at_stderr"
16463 at_status=$? at_failed=false
16464 $at_check_filter
16465 echo stderr:; cat "$at_stderr"
16466 echo stdout:; cat "$at_stdout"
16467 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:79"
16468 $at_failed && at_fn_log_failure
16469 $at_traceon; }
16470
16471 { set +x
16472 $as_echo "$at_srcdir/lt_dlopen_a.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath        \$libdir -module -no-undefined -avoid-version plugin.lo || exit 77"
16473 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath       $libdir -module -no-undefined -avoid-version plugin.lo || exit 77" "lt_dlopen_a.at:81"
16474 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath         $libdir -module -no-undefined -avoid-version plugin.lo || exit 77
16475 ) >>"$at_stdout" 2>>"$at_stderr"
16476 at_status=$? at_failed=false
16477 $at_check_filter
16478 echo stderr:; cat "$at_stderr"
16479 echo stdout:; cat "$at_stdout"
16480 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:81"
16481 $at_failed && at_fn_log_failure
16482 $at_traceon; }
16483
16484
16485 { set +x
16486 $as_echo "$at_srcdir/lt_dlopen_a.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT    main.\$OBJEXT -dlopen plugin.la \$LIBLTDL || exit 77"
16487 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT    main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77" "lt_dlopen_a.at:85"
16488 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT      main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77
16489 ) >>"$at_stdout" 2>>"$at_stderr"
16490 at_status=$? at_failed=false
16491 $at_check_filter
16492 echo stderr:; cat "$at_stderr"
16493 echo stdout:; cat "$at_stdout"
16494 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:85"
16495 $at_failed && at_fn_log_failure
16496 $at_traceon; }
16497
16498
16499 mkdir -p $libdir
16500 mkdir -p $bindir
16501
16502 { set +x
16503 $as_echo "$at_srcdir/lt_dlopen_a.at:92: \$LIBTOOL --mode=install cp plugin.la \$libdir"
16504 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp plugin.la $libdir" "lt_dlopen_a.at:92"
16505 ( $at_check_trace; $LIBTOOL --mode=install cp plugin.la $libdir
16506 ) >>"$at_stdout" 2>>"$at_stderr"
16507 at_status=$? at_failed=false
16508 $at_check_filter
16509 echo stderr:; cat "$at_stderr"
16510 echo stdout:; cat "$at_stdout"
16511 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:92"
16512 $at_failed && at_fn_log_failure
16513 $at_traceon; }
16514
16515 { set +x
16516 $as_echo "$at_srcdir/lt_dlopen_a.at:93: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir"
16517 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "lt_dlopen_a.at:93"
16518 ( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir
16519 ) >>"$at_stdout" 2>>"$at_stderr"
16520 at_status=$? at_failed=false
16521 $at_check_filter
16522 echo stderr:; cat "$at_stderr"
16523 echo stdout:; cat "$at_stdout"
16524 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:93"
16525 $at_failed && at_fn_log_failure
16526 $at_traceon; }
16527
16528 { set +x
16529 $as_echo "$at_srcdir/lt_dlopen_a.at:94: test -f \$libdir/plugin.a || exit 77"
16530 at_fn_check_prepare_dynamic "test -f $libdir/plugin.a || exit 77" "lt_dlopen_a.at:94"
16531 ( $at_check_trace; test -f $libdir/plugin.a || exit 77
16532 ) >>"$at_stdout" 2>>"$at_stderr"
16533 at_status=$? at_failed=false
16534 $at_check_filter
16535 at_fn_diff_devnull "$at_stderr" || at_failed=:
16536 at_fn_diff_devnull "$at_stdout" || at_failed=:
16537 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:94"
16538 $at_failed && at_fn_log_failure
16539 $at_traceon; }
16540
16541 lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16542 { set +x
16543 $as_echo "$at_srcdir/lt_dlopen_a.at:95: if \"\$lt_exe\" \$libdir/plugin.la; then :; else lt_status=\$?;                    test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16544 at_fn_check_prepare_dynamic "if \"$lt_exe\" $libdir/plugin.la; then :; else lt_status=$?;                  test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlopen_a.at:95"
16545 ( $at_check_trace; if "$lt_exe" $libdir/plugin.la; then :; else lt_status=$?;              test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16546 ) >>"$at_stdout" 2>>"$at_stderr"
16547 at_status=$? at_failed=false
16548 $at_check_filter
16549 echo stderr:; cat "$at_stderr"
16550 echo stdout:; cat "$at_stdout"
16551 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:95"
16552 $at_failed && at_fn_log_failure
16553 $at_traceon; }
16554
16555
16556
16557   set +x
16558   $at_times_p && times >"$at_times_file"
16559 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16560 read at_status <"$at_status_file"
16561 #AT_STOP_77
16562 #AT_START_78
16563 at_fn_group_banner 78 'lt_dlopenext.at:23' \
16564   "lt_dlopenext error messages" "                    " 7
16565 at_xfail=no
16566 (
16567   $as_echo "78. $at_setup_line: testing $at_desc ..."
16568   $at_traceon
16569
16570
16571
16572 # This test requires shared library support.
16573 { set +x
16574 $as_echo "$at_srcdir/lt_dlopenext.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
16575 at_fn_check_prepare_notrace 'a shell pipeline' "lt_dlopenext.at:27"
16576 ( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
16577 ) >>"$at_stdout" 2>>"$at_stderr"
16578 at_status=$? at_failed=false
16579 $at_check_filter
16580 at_fn_diff_devnull "$at_stderr" || at_failed=:
16581 echo stdout:; cat "$at_stdout"
16582 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:27"
16583 $at_failed && at_fn_log_failure
16584 $at_traceon; }
16585
16586
16587 prefix=`pwd`/inst
16588 libdir=$prefix/lib
16589 bindir=$prefix/bin
16590 mkdir $prefix $libdir $bindir
16591
16592 # This code is copied from the Autobook:
16593 # <http://sources.redhat.com/autobook/autobook/autobook_169.html>
16594 # so if it needs changes, be sure to notify the Autobook authors
16595 # about them.
16596
16597 cat >simple-module.c <<'_ATEOF'
16598
16599 #include <stdio.h>
16600
16601 #ifdef __cplusplus
16602 extern "C"
16603 #endif
16604 int
16605 run (const char *argument)
16606 {
16607   printf ("Hello, %s!\n", argument);
16608   return 0;
16609 }
16610 _ATEOF
16611
16612
16613 cat >ltdl-loader.c <<'_ATEOF'
16614
16615 #include <stdio.h>
16616 #include <stdlib.h>
16617 #ifndef EXIT_FAILURE
16618 #  define EXIT_FAILURE        1
16619 #  define EXIT_SUCCESS        0
16620 #endif
16621
16622 #include <limits.h>
16623 #ifndef PATH_MAX
16624 #  define PATH_MAX 255
16625 #endif
16626
16627 #include <string.h>
16628 #include <ltdl.h>
16629
16630 #ifndef MODULE_PATH_ENV
16631 #  define MODULE_PATH_ENV        "MODULE_PATH"
16632 #endif
16633
16634 typedef int entrypoint (const char *argument);
16635
16636 /* Save and return a copy of the dlerror() error  message,
16637    since the next API call may overwrite the original. */
16638 static char *dlerrordup (char *errormsg);
16639
16640 int
16641 main (int argc, const char *argv[])
16642 {
16643   char *errormsg = NULL;
16644   lt_dlhandle module = NULL;
16645   entrypoint *run = NULL;
16646   int errors = 0;
16647
16648   if (argc != 3)
16649     {
16650       fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n");
16651       exit (EXIT_FAILURE);
16652     }
16653
16654   /* Initialise libltdl. */
16655   errors = lt_dlinit ();
16656
16657   /* Set the module search path. */
16658   if (!errors)
16659     {
16660       const char *path = getenv (MODULE_PATH_ENV);
16661
16662       if (path != NULL)
16663         errors = lt_dlsetsearchpath (path);
16664     }
16665
16666   /* Load the module. */
16667   if (!errors)
16668     module = lt_dlopenext (argv[1]);
16669
16670   /* Find the entry point. */
16671   if (module)
16672     {
16673       run = (entrypoint *) lt_dlsym (module, "run");
16674
16675       /* In principle, run might legitimately be NULL, so
16676          I don't use run == NULL as an error indicator
16677          in general. */
16678       errormsg = dlerrordup (errormsg);
16679       if (errormsg != NULL)
16680         {
16681           errors = lt_dlclose (module);
16682           module = NULL;
16683         }
16684     }
16685   else
16686     errors = 1;
16687
16688   /* Call the entry point function. */
16689   if (!errors)
16690     {
16691       int result = (*run) (argv[2]);
16692       if (result < 0)
16693         errormsg = strdup ("module entry point execution failed");
16694       else
16695         printf ("\t=> %d\n", result);
16696     }
16697
16698   /* Unload the module, now that we are done with it. */
16699   if (!errors)
16700     errors = lt_dlclose (module);
16701
16702   if (errors)
16703     {
16704       /* Diagnose the encountered error. */
16705       errormsg = dlerrordup (errormsg);
16706
16707       if (!errormsg)
16708         {
16709           fprintf (stderr, "%s: dlerror() failed.\n", argv[0]);
16710           return EXIT_FAILURE;
16711         }
16712     }
16713
16714   /* Finished with ltdl now. */
16715   if (!errors)
16716     if (lt_dlexit () != 0)
16717       errormsg = dlerrordup (errormsg);
16718
16719   if (errormsg)
16720     {
16721       fprintf (stderr, "%s: %s.\n", argv[0], errormsg);
16722       free (errormsg);
16723       exit (EXIT_FAILURE);
16724     }
16725
16726   return EXIT_SUCCESS;
16727 }
16728
16729 /* Be careful to save a copy of the error message,
16730    since the  next API call may overwrite the original. */
16731 static char *
16732 dlerrordup (char *errormsg)
16733 {
16734   char *error = (char *) lt_dlerror ();
16735   if (error && !errormsg)
16736     errormsg = strdup (error);
16737   return errormsg;
16738 }
16739 _ATEOF
16740
16741
16742 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
16743 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
16744
16745 # Skip this test when called from:
16746 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
16747 { set +x
16748 $as_echo "$at_srcdir/lt_dlopenext.at:188: case \$LIBLTDL in #(
16749  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
16750 esac"
16751 at_fn_check_prepare_notrace 'an embedded newline' "lt_dlopenext.at:188"
16752 ( $at_check_trace; case $LIBLTDL in #(
16753  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
16754 esac
16755 ) >>"$at_stdout" 2>>"$at_stderr"
16756 at_status=$? at_failed=false
16757 $at_check_filter
16758 at_fn_diff_devnull "$at_stderr" || at_failed=:
16759 echo stdout:; cat "$at_stdout"
16760 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:188"
16761 $at_failed && at_fn_log_failure
16762 $at_traceon; }
16763
16764
16765 CPPFLAGS="$LTDLINCL $CPPFLAGS"
16766 LDFLAGS="$LDFLAGS -no-undefined"
16767
16768 { set +x
16769 $as_echo "$at_srcdir/lt_dlopenext.at:195: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c simple-module.c"
16770 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c" "lt_dlopenext.at:195"
16771 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c
16772 ) >>"$at_stdout" 2>>"$at_stderr"
16773 at_status=$? at_failed=false
16774 $at_check_filter
16775 echo stderr:; cat "$at_stderr"
16776 echo stdout:; cat "$at_stdout"
16777 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:195"
16778 $at_failed && at_fn_log_failure
16779 $at_traceon; }
16780
16781 { set +x
16782 $as_echo "$at_srcdir/lt_dlopenext.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o simple-module.la      simple-module.lo -rpath \$libdir -module -avoid-version"
16783 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la       simple-module.lo -rpath $libdir -module -avoid-version" "lt_dlopenext.at:197"
16784 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la         simple-module.lo -rpath $libdir -module -avoid-version
16785 ) >>"$at_stdout" 2>>"$at_stderr"
16786 at_status=$? at_failed=false
16787 $at_check_filter
16788 echo stderr:; cat "$at_stderr"
16789 echo stdout:; cat "$at_stdout"
16790 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:197"
16791 $at_failed && at_fn_log_failure
16792 $at_traceon; }
16793
16794 { set +x
16795 $as_echo "$at_srcdir/lt_dlopenext.at:200: \$CC \$CPPFLAGS \$CFLAGS -c ltdl-loader.c"
16796 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c ltdl-loader.c" "lt_dlopenext.at:200"
16797 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c
16798 ) >>"$at_stdout" 2>>"$at_stderr"
16799 at_status=$? at_failed=false
16800 $at_check_filter
16801 echo stderr:; cat "$at_stderr"
16802 echo stdout:; cat "$at_stdout"
16803 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:200"
16804 $at_failed && at_fn_log_failure
16805 $at_traceon; }
16806
16807 { set +x
16808 $as_echo "$at_srcdir/lt_dlopenext.at:202: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o ltdl-loader\$EXEEXT   ltdl-loader.\$OBJEXT -dlopen self \$LIBLTDL"
16809 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT     ltdl-loader.$OBJEXT -dlopen self $LIBLTDL" "lt_dlopenext.at:202"
16810 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT       ltdl-loader.$OBJEXT -dlopen self $LIBLTDL
16811 ) >>"$at_stdout" 2>>"$at_stderr"
16812 at_status=$? at_failed=false
16813 $at_check_filter
16814 echo stderr:; cat "$at_stderr"
16815 echo stdout:; cat "$at_stdout"
16816 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:202"
16817 $at_failed && at_fn_log_failure
16818 $at_traceon; }
16819
16820 { set +x
16821 $as_echo "$at_srcdir/lt_dlopenext.at:205: \$LIBTOOL --mode=install cp simple-module.la \$libdir/simple-module.la"
16822 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la" "lt_dlopenext.at:205"
16823 ( $at_check_trace; $LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la
16824 ) >>"$at_stdout" 2>>"$at_stderr"
16825 at_status=$? at_failed=false
16826 $at_check_filter
16827 echo stderr:; cat "$at_stderr"
16828 echo stdout:; cat "$at_stdout"
16829 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:205"
16830 $at_failed && at_fn_log_failure
16831 $at_traceon; }
16832
16833 { set +x
16834 $as_echo "$at_srcdir/lt_dlopenext.at:206: \$LIBTOOL --mode=clean rm -f simple-module.la"
16835 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f simple-module.la" "lt_dlopenext.at:206"
16836 ( $at_check_trace; $LIBTOOL --mode=clean rm -f simple-module.la
16837 ) >>"$at_stdout" 2>>"$at_stderr"
16838 at_status=$? at_failed=false
16839 $at_check_filter
16840 echo stderr:; cat "$at_stderr"
16841 echo stdout:; cat "$at_stdout"
16842 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:206"
16843 $at_failed && at_fn_log_failure
16844 $at_traceon; }
16845
16846
16847 # Try finding the module with and without the .la file, with absolute
16848 # path, relative path, or one of the path variables.  Do not override
16849 # $PATH for w32, see shlibpath.at for the hacks this requires.
16850 #
16851 # Finding the module without the .la file will not work if MODULE_EXT
16852 # aka. shared_ext is empty.
16853
16854 eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shrext_cmds)='`
16855
16856 module=no
16857 eval shared_ext=\"$shrext_cmds\"
16858 if test -n "$shared_ext"; then
16859   have_lafile="with without"
16860 else
16861   have="with"
16862 fi
16863
16864 if test "$shlibpath_var" = PATH; then
16865   $unset shlibpath_var || shlibpath_var=
16866 fi
16867
16868 for lafile in $have_lafile; do
16869   if test $lafile = without; then
16870     rm $libdir/simple-module.la
16871   fi
16872
16873   for dir in inst/lib "$libdir"; do
16874     lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16875 { set +x
16876 $as_echo "$at_srcdir/lt_dlopenext.at:235: if \"\$lt_exe\" \$dir/simple-module World; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16877 at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/simple-module World; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlopenext.at:235"
16878 ( $at_check_trace; if "$lt_exe" $dir/simple-module World; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16879 ) >>"$at_stdout" 2>>"$at_stderr"
16880 at_status=$? at_failed=false
16881 $at_check_filter
16882 echo stderr:; cat "$at_stderr"
16883 echo stdout:; tee stdout <"$at_stdout"
16884 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:235"
16885 $at_failed && at_fn_log_failure
16886 $at_traceon; }
16887
16888
16889     { set +x
16890 $as_echo "$at_srcdir/lt_dlopenext.at:237: grep \"Hello, World\" stdout"
16891 at_fn_check_prepare_trace "lt_dlopenext.at:237"
16892 ( $at_check_trace; grep "Hello, World" stdout
16893 ) >>"$at_stdout" 2>>"$at_stderr"
16894 at_status=$? at_failed=false
16895 $at_check_filter
16896 at_fn_diff_devnull "$at_stderr" || at_failed=:
16897 echo stdout:; cat "$at_stdout"
16898 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:237"
16899 $at_failed && at_fn_log_failure
16900 $at_traceon; }
16901
16902
16903     for var in MODULE_PATH LTDL_LIBRARY_PATH $shlibpath_var
16904     do
16905       eval $var=\$dir
16906       export $var
16907       lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
16908 { set +x
16909 $as_echo "$at_srcdir/lt_dlopenext.at:243: if \"\$lt_exe\" simple-module World; then :; else lt_status=\$?;                 test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
16910 at_fn_check_prepare_dynamic "if \"$lt_exe\" simple-module World; then :; else lt_status=$?;                test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lt_dlopenext.at:243"
16911 ( $at_check_trace; if "$lt_exe" simple-module World; then :; else lt_status=$?;                    test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
16912 ) >>"$at_stdout" 2>>"$at_stderr"
16913 at_status=$? at_failed=false
16914 $at_check_filter
16915 echo stderr:; cat "$at_stderr"
16916 echo stdout:; tee stdout <"$at_stdout"
16917 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:243"
16918 $at_failed && at_fn_log_failure
16919 $at_traceon; }
16920
16921
16922       { set +x
16923 $as_echo "$at_srcdir/lt_dlopenext.at:245: grep \"Hello, World\" stdout"
16924 at_fn_check_prepare_trace "lt_dlopenext.at:245"
16925 ( $at_check_trace; grep "Hello, World" stdout
16926 ) >>"$at_stdout" 2>>"$at_stderr"
16927 at_status=$? at_failed=false
16928 $at_check_filter
16929 at_fn_diff_devnull "$at_stderr" || at_failed=:
16930 echo stdout:; cat "$at_stdout"
16931 at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:245"
16932 $at_failed && at_fn_log_failure
16933 $at_traceon; }
16934
16935       $unset $var || eval $var=
16936     done
16937   done
16938 done
16939
16940   set +x
16941   $at_times_p && times >"$at_times_file"
16942 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16943 read at_status <"$at_status_file"
16944 #AT_STOP_78
16945 #AT_START_79
16946 at_fn_group_banner 79 'ltdl-libdir.at:23' \
16947   "libdir of installed modules" "                    " 7
16948 at_xfail=no
16949 (
16950   $as_echo "79. $at_setup_line: testing $at_desc ..."
16951   $at_traceon
16952
16953
16954
16955 # This test requires shared library support.
16956 { set +x
16957 $as_echo "$at_srcdir/ltdl-libdir.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
16958 at_fn_check_prepare_notrace 'a shell pipeline' "ltdl-libdir.at:27"
16959 ( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
16960 ) >>"$at_stdout" 2>>"$at_stderr"
16961 at_status=$? at_failed=false
16962 $at_check_filter
16963 at_fn_diff_devnull "$at_stderr" || at_failed=:
16964 echo stdout:; cat "$at_stdout"
16965 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:27"
16966 $at_failed && at_fn_log_failure
16967 $at_traceon; }
16968
16969
16970 # With MinGW, try Windows-style paths only.
16971 if pwd -W >/dev/null 2>&1; then
16972   prefix=`pwd -W`/inst
16973 else
16974   prefix=`pwd`/inst
16975 fi
16976 libdir=$prefix/lib
16977 bindir=$prefix/bin
16978 mkdir $prefix $libdir $bindir
16979
16980 cat >a.c <<'_ATEOF'
16981 #ifdef __cplusplus
16982 extern "C"
16983 #endif
16984 int f (void)
16985 {
16986   return 42;
16987 }
16988 _ATEOF
16989
16990
16991 cat >m.c <<'_ATEOF'
16992
16993 #include <stdio.h>
16994 #include <ltdl.h>
16995
16996 typedef int func_f(void);
16997
16998 int
16999 main (int argc, const char *argv[])
17000 {
17001   lt_dlhandle module = NULL;
17002   func_f *f = NULL;
17003
17004   if (lt_dlinit()) {
17005     fprintf(stderr, "lt_dlinit failed '%s'\n", lt_dlerror());
17006     return 1;
17007   }
17008
17009   module = lt_dlopen("./a.la");
17010
17011   if (!module) {
17012     fprintf(stderr, "lt_dlopen failed '%s'\n", lt_dlerror());
17013     return 1;
17014   }
17015
17016   f = (func_f *)lt_dlsym(module, "f");
17017
17018   if (!f) {
17019     fprintf(stderr, "lt_dlsym failed '%s'\n", lt_dlerror());
17020     return 1;
17021   }
17022
17023   if (f() != 42) {
17024     fprintf(stderr, "f did not return 42\n");
17025     return 1;
17026   }
17027
17028   lt_dlclose(module);
17029   lt_dlexit();
17030   return 0;
17031 }
17032 _ATEOF
17033
17034
17035 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
17036 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
17037
17038 # Skip installcheck if --disable-ltdl-install was used.
17039 { set +x
17040 $as_echo "$at_srcdir/ltdl-libdir.at:97: test -f \"\$LIBLTDL\" || exit 77"
17041 at_fn_check_prepare_dynamic "test -f \"$LIBLTDL\" || exit 77" "ltdl-libdir.at:97"
17042 ( $at_check_trace; test -f "$LIBLTDL" || exit 77
17043 ) >>"$at_stdout" 2>>"$at_stderr"
17044 at_status=$? at_failed=false
17045 $at_check_filter
17046 at_fn_diff_devnull "$at_stderr" || at_failed=:
17047 at_fn_diff_devnull "$at_stdout" || at_failed=:
17048 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:97"
17049 $at_failed && at_fn_log_failure
17050 $at_traceon; }
17051
17052
17053 CPPFLAGS="$LTDLINCL $CPPFLAGS"
17054 LDFLAGS="$LDFLAGS -no-undefined"
17055
17056 { set +x
17057 $as_echo "$at_srcdir/ltdl-libdir.at:102: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c"
17058 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "ltdl-libdir.at:102"
17059 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
17060 ) >>"$at_stdout" 2>>"$at_stderr"
17061 at_status=$? at_failed=false
17062 $at_check_filter
17063 echo stderr:; cat "$at_stderr"
17064 echo stdout:; cat "$at_stdout"
17065 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:102"
17066 $at_failed && at_fn_log_failure
17067 $at_traceon; }
17068
17069 { set +x
17070 $as_echo "$at_srcdir/ltdl-libdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a.la   a.lo -rpath \$libdir -module -shared -avoid-version"
17071 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a.la   a.lo -rpath $libdir -module -shared -avoid-version" "ltdl-libdir.at:104"
17072 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a.la     a.lo -rpath $libdir -module -shared -avoid-version
17073 ) >>"$at_stdout" 2>>"$at_stderr"
17074 at_status=$? at_failed=false
17075 $at_check_filter
17076 echo stderr:; cat "$at_stderr"
17077 echo stdout:; cat "$at_stdout"
17078 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:104"
17079 $at_failed && at_fn_log_failure
17080 $at_traceon; }
17081
17082 { set +x
17083 $as_echo "$at_srcdir/ltdl-libdir.at:107: \$CC \$CPPFLAGS \$CFLAGS -c m.c"
17084 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c m.c" "ltdl-libdir.at:107"
17085 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c m.c
17086 ) >>"$at_stdout" 2>>"$at_stderr"
17087 at_status=$? at_failed=false
17088 $at_check_filter
17089 echo stderr:; cat "$at_stderr"
17090 echo stdout:; cat "$at_stdout"
17091 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:107"
17092 $at_failed && at_fn_log_failure
17093 $at_traceon; }
17094
17095 { set +x
17096 $as_echo "$at_srcdir/ltdl-libdir.at:109: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT      m.\$OBJEXT \$LIBLTDL"
17097 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT       m.$OBJEXT $LIBLTDL" "ltdl-libdir.at:109"
17098 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT         m.$OBJEXT $LIBLTDL
17099 ) >>"$at_stdout" 2>>"$at_stderr"
17100 at_status=$? at_failed=false
17101 $at_check_filter
17102 echo stderr:; cat "$at_stderr"
17103 echo stdout:; cat "$at_stdout"
17104 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:109"
17105 $at_failed && at_fn_log_failure
17106 $at_traceon; }
17107
17108 { set +x
17109 $as_echo "$at_srcdir/ltdl-libdir.at:112: \$LIBTOOL --mode=install cp a.la \$libdir/a.la"
17110 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp a.la $libdir/a.la" "ltdl-libdir.at:112"
17111 ( $at_check_trace; $LIBTOOL --mode=install cp a.la $libdir/a.la
17112 ) >>"$at_stdout" 2>>"$at_stderr"
17113 at_status=$? at_failed=false
17114 $at_check_filter
17115 echo stderr:; cat "$at_stderr"
17116 echo stdout:; cat "$at_stdout"
17117 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:112"
17118 $at_failed && at_fn_log_failure
17119 $at_traceon; }
17120
17121 { set +x
17122 $as_echo "$at_srcdir/ltdl-libdir.at:114: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT"
17123 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "ltdl-libdir.at:114"
17124 ( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT
17125 ) >>"$at_stdout" 2>>"$at_stderr"
17126 at_status=$? at_failed=false
17127 $at_check_filter
17128 echo stderr:; cat "$at_stderr"
17129 echo stdout:; cat "$at_stdout"
17130 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:114"
17131 $at_failed && at_fn_log_failure
17132 $at_traceon; }
17133
17134
17135 # Try finding the module via the libdir entry in a misplaced .la file.
17136
17137 mv $libdir/a.la $bindir/a.la
17138 cd $bindir
17139 lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
17140 { set +x
17141 $as_echo "$at_srcdir/ltdl-libdir.at:121: if \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
17142 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "ltdl-libdir.at:121"
17143 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
17144 ) >>"$at_stdout" 2>>"$at_stderr"
17145 at_status=$? at_failed=false
17146 $at_check_filter
17147 echo stderr:; cat "$at_stderr"
17148 echo stdout:; cat "$at_stdout"
17149 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:121"
17150 $at_failed && at_fn_log_failure
17151 $at_traceon; }
17152
17153
17154
17155   set +x
17156   $at_times_p && times >"$at_times_file"
17157 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17158 read at_status <"$at_status_file"
17159 #AT_STOP_79
17160 #AT_START_80
17161 at_fn_group_banner 80 'ltdl-api.at:25' \
17162   "ltdl API" "                                       " 7
17163 at_xfail=no
17164 (
17165   $as_echo "80. $at_setup_line: testing $at_desc ..."
17166   $at_traceon
17167
17168
17169
17170 # Ensure that no symbols from argz are unrenamed.
17171 eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
17172 argz_o=$abs_top_builddir/libltdl/argz.$objext
17173 { set +x
17174 $as_echo "$at_srcdir/ltdl-api.at:31: test -f \"\$argz_o\" || exit 77"
17175 at_fn_check_prepare_dynamic "test -f \"$argz_o\" || exit 77" "ltdl-api.at:31"
17176 ( $at_check_trace; test -f "$argz_o" || exit 77
17177 ) >>"$at_stdout" 2>>"$at_stderr"
17178 at_status=$? at_failed=false
17179 $at_check_filter
17180 at_fn_diff_devnull "$at_stderr" || at_failed=:
17181 at_fn_diff_devnull "$at_stdout" || at_failed=:
17182 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:31"
17183 $at_failed && at_fn_log_failure
17184 $at_traceon; }
17185
17186 { set +x
17187 $as_echo "$at_srcdir/ltdl-api.at:32: eval \"\$NM \\\"\\\$argz_o\\\" | \$global_symbol_pipe\""
17188 at_fn_check_prepare_notrace 'a shell pipeline' "ltdl-api.at:32"
17189 ( $at_check_trace; eval "$NM \"\$argz_o\" | $global_symbol_pipe"
17190 ) >>"$at_stdout" 2>>"$at_stderr"
17191 at_status=$? at_failed=false
17192 $at_check_filter
17193 echo stderr:; cat "$at_stderr"
17194 echo stdout:; tee stdout <"$at_stdout"
17195 at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:32"
17196 $at_failed && at_fn_log_failure
17197 $at_traceon; }
17198
17199 # Check for global symbols beginning with "argz_"
17200 { set +x
17201 $as_echo "$at_srcdir/ltdl-api.at:35: grep \"^T argz_\" stdout"
17202 at_fn_check_prepare_trace "ltdl-api.at:35"
17203 ( $at_check_trace; grep "^T argz_" stdout
17204 ) >>"$at_stdout" 2>>"$at_stderr"
17205 at_status=$? at_failed=false
17206 $at_check_filter
17207 at_fn_diff_devnull "$at_stderr" || at_failed=:
17208 at_fn_diff_devnull "$at_stdout" || at_failed=:
17209 at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:35"
17210 $at_failed && at_fn_log_failure
17211 $at_traceon; }
17212
17213 # and also for the _ prefixed version "_argz_"
17214 { set +x
17215 $as_echo "$at_srcdir/ltdl-api.at:37: grep \"^T _argz_\" stdout"
17216 at_fn_check_prepare_trace "ltdl-api.at:37"
17217 ( $at_check_trace; grep "^T _argz_" stdout
17218 ) >>"$at_stdout" 2>>"$at_stderr"
17219 at_status=$? at_failed=false
17220 $at_check_filter
17221 at_fn_diff_devnull "$at_stderr" || at_failed=:
17222 at_fn_diff_devnull "$at_stdout" || at_failed=:
17223 at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:37"
17224 $at_failed && at_fn_log_failure
17225 $at_traceon; }
17226
17227
17228   set +x
17229   $at_times_p && times >"$at_times_file"
17230 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17231 read at_status <"$at_status_file"
17232 #AT_STOP_80
17233 #AT_START_81
17234 at_fn_group_banner 81 'dlloader-api.at:23' \
17235   "dlloader API" "                                   " 7
17236 at_xfail=no
17237 (
17238   $as_echo "81. $at_setup_line: testing $at_desc ..."
17239   $at_traceon
17240
17241
17242
17243 cat >main.c <<'_ATEOF'
17244 #include <ltdl.h>
17245 #include <stdio.h>
17246 #include <stdlib.h>
17247 #include <string.h>
17248
17249 static int
17250 first_init (lt_user_data data)
17251 {
17252   const char *ctx = (const char *) data;
17253
17254   printf ("first_init: %s\n", ctx);
17255
17256   return 0;
17257 }
17258
17259 static lt_module
17260 first_open (lt_user_data data, const char *filename, lt_dladvise advise)
17261 {
17262   static const char *first_module = "first";
17263   const char *ctx = (const char *) data;
17264
17265   /* Use a magic string to avoid possible interactions with filesystem
17266    * objects.  Prepend '/' to short-circuit libltdl's search of
17267    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
17268    */
17269   if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_first"))
17270     {
17271       printf ("first_open denies a request\n");
17272       lt_dlseterror (LT_ERROR_FILE_NOT_FOUND);
17273       return NULL;
17274     }
17275
17276   printf ("first_open (\"%s\"): %s\n", filename, ctx);
17277
17278   return (lt_module) first_module;
17279 }
17280
17281 static const char *
17282 first_symbol (void)
17283 {
17284   return "first_symbol";
17285 }
17286
17287 static void *
17288 first_sym (lt_user_data data, lt_module module, const char *symbolname)
17289 {
17290   const char *ctx = (const char *) data;
17291   const char *filename = (const char *) module;
17292
17293   printf ("first_sym (%s): %s\n", filename, ctx);
17294
17295   return (void *) first_symbol;
17296 }
17297
17298 static int
17299 first_close (lt_user_data data, lt_module module)
17300 {
17301   const char *ctx = (const char *) data;
17302   const char *filename = (const char *) module;
17303
17304   printf ("first_close (%s): %s\n", filename, ctx);
17305
17306   return 0;
17307 }
17308
17309 static int
17310 first_exit (lt_user_data data)
17311 {
17312   const char *ctx = (const char *) data;
17313
17314   printf ("first_exit: %s\n", ctx);
17315
17316   return 0;
17317 }
17318
17319 static int
17320 last_init (lt_user_data data)
17321 {
17322   const char *ctx = (const char *) data;
17323
17324   printf ("last_init: %s\n", ctx);
17325
17326   return 0;
17327 }
17328
17329 static lt_module
17330 last_open (lt_user_data data, const char *filename, lt_dladvise advise)
17331 {
17332   static const char *last_module = "last";
17333   const char *ctx = (const char *) data;
17334
17335   /* Use a magic string to avoid possible interactions with filesystem
17336    * objects.  Prepend '/' to short-circuit libltdl's search of
17337    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
17338    */
17339   if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_last"))
17340     {
17341       printf ("last_open denies a request\n");
17342       lt_dlseterror (LT_ERROR_FILE_NOT_FOUND);
17343       return NULL;
17344     }
17345
17346   printf ("last_open (\"%s\"): %s\n", filename, ctx);
17347
17348   return (lt_module) last_module;
17349 }
17350
17351 static const char *
17352 last_symbol (void)
17353 {
17354   return "last_symbol";
17355 }
17356
17357 static void *
17358 last_sym (lt_user_data data, lt_module module, const char *symbolname)
17359 {
17360   const char *ctx = (const char *) data;
17361   const char *filename = (const char *) module;
17362
17363   printf ("last_sym (%s): %s\n", filename, ctx);
17364
17365   return (void *) last_symbol;
17366 }
17367
17368 static int
17369 last_close (lt_user_data data, lt_module module)
17370 {
17371   const char *ctx = (const char *) data;
17372   const char *filename = (const char *) module;
17373
17374   printf ("last_close (%s): %s\n", filename, ctx);
17375
17376   return 0;
17377 }
17378
17379 static int
17380 last_exit (lt_user_data data)
17381 {
17382   const char *ctx = (const char *) data;
17383
17384   printf ("last_exit: %s\n", ctx);
17385
17386   return 0;
17387 }
17388
17389 typedef const char *module_func (void);
17390
17391 int
17392 main (int argc, char* argv[])
17393 {
17394   int err = 0;
17395   lt_dlvtable *first;
17396   lt_dlvtable *last;
17397   lt_dlhandle module = NULL;
17398   module_func *symbol;
17399   const char *first_ctx = "first_ctx";
17400   const char *last_ctx = "last_ctx";
17401   const lt_dlvtable *finder;
17402
17403   LTDL_SET_PRELOADED_SYMBOLS ();
17404
17405   if (lt_dlinit ())
17406     {
17407       printf ("lt_dlinit failed\n");
17408       return 1;
17409     }
17410
17411   first = (lt_dlvtable *) malloc (sizeof (*first));
17412   if (!first)
17413     {
17414       printf ("malloc failed\n");
17415       err = 1;
17416       goto cleanup;
17417     }
17418
17419   first->name = "first";
17420   first->sym_prefix = NULL;
17421   first->module_open = first_open;
17422   first->module_close = first_close;
17423   first->find_sym = first_sym;
17424   first->dlloader_init = first_init; /* test that it isn't called twice */
17425   first->dlloader_exit = first_exit;
17426   first->dlloader_data = (lt_user_data) first_ctx;
17427   first->priority = LT_DLLOADER_PREPEND;
17428
17429   if (first_init (first->dlloader_data))
17430     {
17431       printf ("first_init failed\n");
17432       err = 1;
17433       goto cleanup;
17434     }
17435
17436   if (lt_dlloader_add (first))
17437     {
17438       printf ("lt_dlloader_add failed: %s\n", lt_dlerror ());
17439       err = 1;
17440       goto cleanup;
17441     }
17442
17443   finder = lt_dlloader_find ("first");
17444
17445   if (!finder)
17446     {
17447       printf ("lt_dlloader_find failed: %s\n", lt_dlerror ());
17448       err = 1;
17449       goto cleanup;
17450     }
17451
17452   printf ("Found loader \"%s\"\n", finder->name);
17453
17454   last = (lt_dlvtable *) malloc (sizeof (*last));
17455   if (!last)
17456     {
17457       printf ("malloc failed\n");
17458       err = 1;
17459       goto cleanup;
17460     }
17461
17462   last->name = "last";
17463   last->sym_prefix = NULL;
17464   last->module_open = last_open;
17465   last->module_close = last_close;
17466   last->find_sym = last_sym;
17467   last->dlloader_init = last_init; /* test that it isn't called twice */
17468   last->dlloader_exit = last_exit;
17469   last->dlloader_data = (lt_user_data) last_ctx;
17470   last->priority = LT_DLLOADER_APPEND;
17471
17472   if (last_init (last->dlloader_data))
17473     {
17474       printf ("last_init failed\n");
17475       err = 1;
17476       goto cleanup;
17477     }
17478
17479   if (lt_dlloader_add (last))
17480     {
17481       printf ("lt_dlloader_add failed: %s\n", lt_dlerror ());
17482       err = 1;
17483       goto cleanup;
17484     }
17485
17486   finder = lt_dlloader_find ("last");
17487
17488   if (!finder)
17489     {
17490       printf ("lt_dlloader_find failed: %s\n", lt_dlerror ());
17491       err = 1;
17492       goto cleanup;
17493     }
17494
17495   printf ("Found loader \"%s\"\n", finder->name);
17496
17497   /* Use a magic string to avoid possible interactions with filesystem
17498    * objects.  Prepend '/' to short-circuit libltdl's search of
17499    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
17500    */
17501   module = lt_dlopen ("/libltdl_dlloader_api_test_first");
17502
17503   if (!module)
17504     {
17505       printf ("lt_dlopen failed: %s\n", lt_dlerror ());
17506       err = 1;
17507       goto cleanup;
17508     }
17509
17510   symbol = (module_func *) lt_dlsym (module, "symbol");
17511
17512   if (!symbol)
17513     {
17514       printf ("lt_dlsym failed: %s\n", lt_dlerror ());
17515       err = 1;
17516       goto cleanup;
17517     }
17518
17519   printf ("result: %s\n", symbol ());
17520
17521   lt_dlclose (module);
17522   module = lt_dlopen ("./module.la");
17523
17524   if (!module)
17525     {
17526       printf ("lt_dlopen failed: %s\n", lt_dlerror ());
17527       err = 1;
17528       goto cleanup;
17529     }
17530
17531   symbol = (module_func *) lt_dlsym (module, "symbol");
17532
17533   if (!symbol)
17534     {
17535       printf ("lt_dlsym failed: %s\n", lt_dlerror ());
17536       err = 1;
17537       goto cleanup;
17538     }
17539
17540   printf ("result: %s\n", symbol ());
17541
17542   lt_dlclose (module);
17543
17544   /* Use a magic string to avoid possible interactions with filesystem
17545    * objects.  Prepend '/' to short-circuit libltdl's search of
17546    * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar).
17547    */
17548   module = lt_dlopen ("/libltdl_dlloader_api_test_last");
17549
17550   if (!module)
17551     {
17552       printf ("lt_dlopen failed: %s\n", lt_dlerror ());
17553       err = 1;
17554       goto cleanup;
17555     }
17556
17557   symbol = (module_func *) lt_dlsym (module, "symbol");
17558
17559   if (!symbol)
17560     {
17561       printf ("lt_dlsym failed: %s\n", lt_dlerror ());
17562       err = 1;
17563       goto cleanup;
17564     }
17565
17566   printf ("result: %s\n", symbol ());
17567
17568   if (lt_dlopen ("no-module"))
17569     {
17570       printf ("lt_dlopen unexpectedly opened \"no-module\"\n");
17571       err = 1;
17572       goto cleanup;
17573     }
17574
17575   if (lt_dlloader_remove ("first") != first)
17576     {
17577       printf ("vtable of first loader has changed\n");
17578       err = 1;
17579       goto cleanup;
17580     }
17581
17582   free (first);
17583
17584 cleanup:
17585   if (module)
17586     {
17587       lt_dlclose (module);
17588     }
17589   lt_dlexit ();
17590   return err;
17591 }
17592 _ATEOF
17593
17594
17595 cat >module.c <<'_ATEOF'
17596
17597 #ifdef __cplusplus
17598 extern "C"
17599 #endif
17600 const char *symbol (void);
17601 const char *
17602 symbol (void)
17603 {
17604   return "module_symbol";
17605 }
17606 _ATEOF
17607
17608
17609 cat >expout <<'_ATEOF'
17610 first_init: first_ctx
17611 Found loader "first"
17612 last_init: last_ctx
17613 Found loader "last"
17614 first_open ("/libltdl_dlloader_api_test_first"): first_ctx
17615 first_sym (first): first_ctx
17616 result: first_symbol
17617 first_close (first): first_ctx
17618 first_open denies a request
17619 result: module_symbol
17620 first_open denies a request
17621 last_open ("/libltdl_dlloader_api_test_last"): last_ctx
17622 last_sym (last): last_ctx
17623 result: last_symbol
17624 first_open denies a request
17625 last_open denies a request
17626 first_exit: first_ctx
17627 last_close (last): last_ctx
17628 last_exit: last_ctx
17629 _ATEOF
17630
17631 case $host_os in mingw*)
17632   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
17633   mv -f expout.t expout ;;
17634 esac
17635
17636 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
17637 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
17638
17639 # Skip this test when called from:
17640 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
17641 { set +x
17642 $as_echo "$at_srcdir/dlloader-api.at:417: case \$LIBLTDL in #(
17643  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
17644 esac"
17645 at_fn_check_prepare_notrace 'an embedded newline' "dlloader-api.at:417"
17646 ( $at_check_trace; case $LIBLTDL in #(
17647  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
17648 esac
17649 ) >>"$at_stdout" 2>>"$at_stderr"
17650 at_status=$? at_failed=false
17651 $at_check_filter
17652 at_fn_diff_devnull "$at_stderr" || at_failed=:
17653 echo stdout:; cat "$at_stdout"
17654 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:417"
17655 $at_failed && at_fn_log_failure
17656 $at_traceon; }
17657
17658
17659 CPPFLAGS="$LTDLINCL $CPPFLAGS"
17660
17661 { set +x
17662 $as_echo "$at_srcdir/dlloader-api.at:423: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c"
17663 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "dlloader-api.at:423"
17664 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c
17665 ) >>"$at_stdout" 2>>"$at_stderr"
17666 at_status=$? at_failed=false
17667 $at_check_filter
17668 echo stderr:; cat "$at_stderr"
17669 echo stdout:; cat "$at_stdout"
17670 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:423"
17671 $at_failed && at_fn_log_failure
17672 $at_traceon; }
17673
17674 { set +x
17675 $as_echo "$at_srcdir/dlloader-api.at:425: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la     -rpath /nowhere -module -avoid-version -no-undefined    module.lo"
17676 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la      -rpath /nowhere -module -avoid-version -no-undefined    module.lo" "dlloader-api.at:425"
17677 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la        -rpath /nowhere -module -avoid-version -no-undefined    module.lo
17678 ) >>"$at_stdout" 2>>"$at_stderr"
17679 at_status=$? at_failed=false
17680 $at_check_filter
17681 echo stderr:; cat "$at_stderr"
17682 echo stdout:; cat "$at_stdout"
17683 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:425"
17684 $at_failed && at_fn_log_failure
17685 $at_traceon; }
17686
17687
17688 . ./module.la
17689 { set +x
17690 $as_echo "$at_srcdir/dlloader-api.at:432: test -n \"\$dlname\" || (exit 77)"
17691 at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "dlloader-api.at:432"
17692 ( $at_check_trace; test -n "$dlname" || (exit 77)
17693 ) >>"$at_stdout" 2>>"$at_stderr"
17694 at_status=$? at_failed=false
17695 $at_check_filter
17696 at_fn_diff_devnull "$at_stderr" || at_failed=:
17697 at_fn_diff_devnull "$at_stdout" || at_failed=:
17698 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:432"
17699 $at_failed && at_fn_log_failure
17700 $at_traceon; }
17701
17702
17703 { set +x
17704 $as_echo "$at_srcdir/dlloader-api.at:434: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
17705 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "dlloader-api.at:434"
17706 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
17707 ) >>"$at_stdout" 2>>"$at_stderr"
17708 at_status=$? at_failed=false
17709 $at_check_filter
17710 echo stderr:; cat "$at_stderr"
17711 echo stdout:; cat "$at_stdout"
17712 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:434"
17713 $at_failed && at_fn_log_failure
17714 $at_traceon; }
17715
17716 { set +x
17717 $as_echo "$at_srcdir/dlloader-api.at:435: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT          main.\$OBJEXT -dlopen module.la \$LIBLTDL"
17718 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT    main.$OBJEXT -dlopen module.la $LIBLTDL" "dlloader-api.at:435"
17719 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT      main.$OBJEXT -dlopen module.la $LIBLTDL
17720 ) >>"$at_stdout" 2>>"$at_stderr"
17721 at_status=$? at_failed=false
17722 $at_check_filter
17723 echo stderr:; cat "$at_stderr"
17724 echo stdout:; cat "$at_stdout"
17725 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:435"
17726 $at_failed && at_fn_log_failure
17727 $at_traceon; }
17728
17729
17730 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
17731 { set +x
17732 $as_echo "$at_srcdir/dlloader-api.at:439: if \"\$lt_exe\" ; then :; else lt_status=\$?;                    test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
17733 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "dlloader-api.at:439"
17734 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
17735 ) >>"$at_stdout" 2>>"$at_stderr"
17736 at_status=$? at_failed=false
17737 $at_check_filter
17738 echo stderr:; cat "$at_stderr"
17739 $at_diff expout "$at_stdout" || at_failed=:
17740 at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:439"
17741 $at_failed && at_fn_log_failure
17742 $at_traceon; }
17743
17744
17745
17746   set +x
17747   $at_times_p && times >"$at_times_file"
17748 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17749 read at_status <"$at_status_file"
17750 #AT_STOP_81
17751 #AT_START_82
17752 at_fn_group_banner 82 'loadlibrary.at:23' \
17753   "loadlibrary error messages" "                     " 7
17754 at_xfail=no
17755 (
17756   $as_echo "82. $at_setup_line: testing $at_desc ..."
17757   $at_traceon
17758
17759
17760
17761 eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
17762
17763 cat >main.c <<'_ATEOF'
17764 #include <ltdl.h>
17765 #include <stdio.h>
17766
17767 static int
17768 standard_error_message(const char *error)
17769 {
17770   int error_number;
17771
17772   for (error_number = 0; error_number < LT_ERROR_MAX; ++error_number)
17773     {
17774       lt_dlseterror (error_number);
17775       if (error == lt_dlerror ())
17776         {
17777           return 1;
17778         }
17779     }
17780
17781   lt_dlseterror (LT_ERROR_UNKNOWN);
17782   return 0;
17783 }
17784
17785 int
17786 main (int argc, char* argv[])
17787 {
17788   int err = 0;
17789   lt_dlhandle module = NULL;
17790   const lt_dlvtable *loadlibrary;
17791   const lt_dlvtable *preopen;
17792   lt_dlloader loader = NULL;
17793   lt_dlloader next;
17794   const lt_dlvtable *vtable;
17795   void *symbol;
17796   const char *error;
17797
17798   if (argc < 2)
17799     {
17800       fprintf (stderr, "usage: %s plugin [symbol]\n", argv[0]);
17801       return 1;
17802     }
17803
17804   lt_dlinit ();
17805
17806   loadlibrary = lt_dlloader_find ("lt_loadlibrary");
17807   if (!loadlibrary)
17808     {
17809       /* Skip if the loadlibrary loader isn't supported */
17810       printf ("loadlibrary loader not found\n");
17811       err = 77;
17812       goto cleanup;
17813     }
17814
17815   preopen = lt_dlloader_find ("lt_preopen");
17816   if (!loadlibrary)
17817     {
17818       printf ("preopen loader not found\n");
17819       err = 2;
17820       goto cleanup;
17821     }
17822
17823   /* Remove all loaders except the preopen and loadlibrary loaders. */
17824   while (next = lt_dlloader_next (loader))
17825     {
17826       if (lt_dlloader_get (next) == loadlibrary)
17827         {
17828           loader = next;
17829           continue;
17830         }
17831
17832       if (lt_dlloader_get (next) == preopen)
17833         {
17834           loader = next;
17835           continue;
17836         }
17837
17838       lt_dlloader_remove (lt_dlloader_get (next)->name);
17839     }
17840
17841   module = lt_dlopen (argv[1]);
17842   error = lt_dlerror ();
17843
17844   if (module)
17845     {
17846       printf ("lt_dlopen: success!\n");
17847
17848       if (argc == 2)
17849         {
17850           /* But failure was the desired result... */
17851           printf ("expected failure\n");
17852           err = 2;
17853           goto cleanup;
17854         }
17855     }
17856   else if (argc > 2)
17857     {
17858       /* Didn't expect failure... */
17859       printf ("lt_dlopen: failure: %s\n", error);
17860       err = 2;
17861       goto cleanup;
17862     }
17863   else if (standard_error_message (error))
17864     {
17865       /* Expected custom error message... */
17866       printf ("lt_dlopen: standard error (bad): %s\n", error);
17867       err = 1;
17868       goto cleanup;
17869     }
17870   else
17871     {
17872       printf ("lt_dlopen: custom error (good): %s\n", error);
17873       goto cleanup;
17874     }
17875
17876   symbol = lt_dlsym (module, argv[2]);
17877   error = lt_dlerror ();
17878
17879   if (symbol)
17880     {
17881       printf ("lt_dlsym: success!\n");
17882     }
17883   else if (standard_error_message (error))
17884     {
17885       /* Expected custom failure message... */
17886       printf ("lt_dlsym: standard error (bad): %s\n", error);
17887       err = 1;
17888     }
17889   else
17890     {
17891       printf ("lt_dlsym: custom error (good): %s\n", error);
17892     }
17893
17894 cleanup:
17895   if (module)
17896     {
17897       lt_dlclose (module);
17898     }
17899   lt_dlexit ();
17900   return err;
17901 }
17902 _ATEOF
17903
17904
17905 cat >foomod.c <<'_ATEOF'
17906
17907 #ifdef __cplusplus
17908 extern "C"
17909 #endif
17910 int foosym (void);
17911 int
17912 foosym (void)
17913 {
17914   return 0;
17915 }
17916 _ATEOF
17917
17918
17919 cat >bardep.c <<'_ATEOF'
17920
17921 #ifdef __cplusplus
17922 extern "C"
17923 #endif
17924 int bardep (void);
17925 int
17926 bardep (void)
17927 {
17928   return 0;
17929 }
17930 _ATEOF
17931
17932
17933 cat >barmod.c <<'_ATEOF'
17934
17935 #ifdef __cplusplus
17936 extern "C" {
17937 #endif
17938 int bardep (void);
17939 int barsym (void);
17940 #ifdef __cplusplus
17941 }
17942 #endif
17943 int
17944 barsym (void)
17945 {
17946   return bardep ();
17947 }
17948 _ATEOF
17949
17950
17951 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
17952 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
17953
17954 # Skip this test when called from:
17955 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
17956 { set +x
17957 $as_echo "$at_srcdir/loadlibrary.at:217: case \$LIBLTDL in #(
17958  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
17959 esac"
17960 at_fn_check_prepare_notrace 'an embedded newline' "loadlibrary.at:217"
17961 ( $at_check_trace; case $LIBLTDL in #(
17962  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
17963 esac
17964 ) >>"$at_stdout" 2>>"$at_stderr"
17965 at_status=$? at_failed=false
17966 $at_check_filter
17967 at_fn_diff_devnull "$at_stderr" || at_failed=:
17968 echo stdout:; cat "$at_stdout"
17969 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:217"
17970 $at_failed && at_fn_log_failure
17971 $at_traceon; }
17972
17973
17974 CPPFLAGS="$LTDLINCL $CPPFLAGS"
17975 inst=`pwd`/inst
17976 libdir=$inst/lib
17977
17978 { set +x
17979 $as_echo "$at_srcdir/loadlibrary.at:225: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
17980 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "loadlibrary.at:225"
17981 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
17982 ) >>"$at_stdout" 2>>"$at_stderr"
17983 at_status=$? at_failed=false
17984 $at_check_filter
17985 echo stderr:; cat "$at_stderr"
17986 echo stdout:; cat "$at_stdout"
17987 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:225"
17988 $at_failed && at_fn_log_failure
17989 $at_traceon; }
17990
17991 for file in foomod.c bardep.c barmod.c; do
17992   { set +x
17993 $as_echo "$at_srcdir/loadlibrary.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file"
17994 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "loadlibrary.at:227"
17995 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
17996 ) >>"$at_stdout" 2>>"$at_stderr"
17997 at_status=$? at_failed=false
17998 $at_check_filter
17999 echo stderr:; cat "$at_stderr"
18000 echo stdout:; cat "$at_stdout"
18001 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:227"
18002 $at_failed && at_fn_log_failure
18003 $at_traceon; }
18004
18005 done
18006 { set +x
18007 $as_echo "$at_srcdir/loadlibrary.at:230: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o foomod.la      -rpath \$libdir -module -avoid-version -no-undefined    foomod.lo"
18008 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la      -rpath $libdir -module -avoid-version -no-undefined     foomod.lo" "loadlibrary.at:230"
18009 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la        -rpath $libdir -module -avoid-version -no-undefined     foomod.lo
18010 ) >>"$at_stdout" 2>>"$at_stderr"
18011 at_status=$? at_failed=false
18012 $at_check_filter
18013 echo stderr:; cat "$at_stderr"
18014 echo stdout:; cat "$at_stdout"
18015 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:230"
18016 $at_failed && at_fn_log_failure
18017 $at_traceon; }
18018
18019 { set +x
18020 $as_echo "$at_srcdir/loadlibrary.at:234: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbardep.la   -rpath \$libdir -avoid-version -no-undefined    bardep.lo"
18021 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la   -rpath $libdir -avoid-version -no-undefined     bardep.lo" "loadlibrary.at:234"
18022 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la     -rpath $libdir -avoid-version -no-undefined     bardep.lo
18023 ) >>"$at_stdout" 2>>"$at_stderr"
18024 at_status=$? at_failed=false
18025 $at_check_filter
18026 echo stderr:; cat "$at_stderr"
18027 echo stdout:; cat "$at_stdout"
18028 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:234"
18029 $at_failed && at_fn_log_failure
18030 $at_traceon; }
18031
18032 { set +x
18033 $as_echo "$at_srcdir/loadlibrary.at:238: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o barmod.la      -rpath \$libdir -module -avoid-version -no-undefined    barmod.lo ./libbardep.la"
18034 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la      -rpath $libdir -module -avoid-version -no-undefined     barmod.lo ./libbardep.la" "loadlibrary.at:238"
18035 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la        -rpath $libdir -module -avoid-version -no-undefined     barmod.lo ./libbardep.la
18036 ) >>"$at_stdout" 2>>"$at_stderr"
18037 at_status=$? at_failed=false
18038 $at_check_filter
18039 echo stderr:; cat "$at_stderr"
18040 echo stdout:; cat "$at_stdout"
18041 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:238"
18042 $at_failed && at_fn_log_failure
18043 $at_traceon; }
18044
18045
18046 { set +x
18047 $as_echo "$at_srcdir/loadlibrary.at:243: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT   main.\$OBJEXT \$LIBLTDL"
18048 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT    main.$OBJEXT $LIBLTDL" "loadlibrary.at:243"
18049 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT      main.$OBJEXT $LIBLTDL
18050 ) >>"$at_stdout" 2>>"$at_stderr"
18051 at_status=$? at_failed=false
18052 $at_check_filter
18053 echo stderr:; cat "$at_stderr"
18054 echo stdout:; cat "$at_stdout"
18055 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:243"
18056 $at_failed && at_fn_log_failure
18057 $at_traceon; }
18058
18059
18060 . ./foomod.la
18061 { set +x
18062 $as_echo "$at_srcdir/loadlibrary.at:248: test -n \"\$dlname\" || (exit 77)"
18063 at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "loadlibrary.at:248"
18064 ( $at_check_trace; test -n "$dlname" || (exit 77)
18065 ) >>"$at_stdout" 2>>"$at_stderr"
18066 at_status=$? at_failed=false
18067 $at_check_filter
18068 at_fn_diff_devnull "$at_stderr" || at_failed=:
18069 at_fn_diff_devnull "$at_stdout" || at_failed=:
18070 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:248"
18071 $at_failed && at_fn_log_failure
18072 $at_traceon; }
18073
18074
18075 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18076 { set +x
18077 $as_echo "$at_srcdir/loadlibrary.at:250: if \"\$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18078 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=$?;              test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "loadlibrary.at:250"
18079 ( $at_check_trace; if "$lt_exe" ./foomod.la no_symbol; then :; else lt_status=$?;                  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18080 ) >>"$at_stdout" 2>>"$at_stderr"
18081 at_status=$? at_failed=false
18082 $at_check_filter
18083 echo stderr:; cat "$at_stderr"
18084 echo stdout:; cat "$at_stdout"
18085 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:250"
18086 $at_failed && at_fn_log_failure
18087 $at_traceon; }
18088
18089
18090
18091 #   chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls.
18092
18093 rm -f $objdir/$dlname
18094 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18095 { set +x
18096 $as_echo "$at_srcdir/loadlibrary.at:257: if \"\$lt_exe\" ./foomod.la; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18097 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la; then :; else lt_status=$?;                test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "loadlibrary.at:257"
18098 ( $at_check_trace; if "$lt_exe" ./foomod.la; then :; else lt_status=$?;                    test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18099 ) >>"$at_stdout" 2>>"$at_stderr"
18100 at_status=$? at_failed=false
18101 $at_check_filter
18102 echo stderr:; cat "$at_stderr"
18103 echo stdout:; cat "$at_stdout"
18104 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:257"
18105 $at_failed && at_fn_log_failure
18106 $at_traceon; }
18107
18108
18109
18110 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18111 { set +x
18112 $as_echo "$at_srcdir/loadlibrary.at:259: if \"\$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18113 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=$?;              test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "loadlibrary.at:259"
18114 ( $at_check_trace; if "$lt_exe" ./barmod.la no_symbol; then :; else lt_status=$?;                  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18115 ) >>"$at_stdout" 2>>"$at_stderr"
18116 at_status=$? at_failed=false
18117 $at_check_filter
18118 echo stderr:; cat "$at_stderr"
18119 echo stdout:; cat "$at_stdout"
18120 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:259"
18121 $at_failed && at_fn_log_failure
18122 $at_traceon; }
18123
18124
18125
18126 . ./libbardep.la
18127 #   chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls.
18128
18129 rm -f $objdir/$dlname
18130 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18131 { set +x
18132 $as_echo "$at_srcdir/loadlibrary.at:267: if \"\$lt_exe\" ./barmod.la; then :; else lt_status=\$?;                  test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18133 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la; then :; else lt_status=$?;                test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "loadlibrary.at:267"
18134 ( $at_check_trace; if "$lt_exe" ./barmod.la; then :; else lt_status=$?;                    test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18135 ) >>"$at_stdout" 2>>"$at_stderr"
18136 at_status=$? at_failed=false
18137 $at_check_filter
18138 echo stderr:; cat "$at_stderr"
18139 echo stdout:; cat "$at_stdout"
18140 at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:267"
18141 $at_failed && at_fn_log_failure
18142 $at_traceon; }
18143
18144
18145
18146   set +x
18147   $at_times_p && times >"$at_times_file"
18148 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18149 read at_status <"$at_status_file"
18150 #AT_STOP_82
18151 #AT_START_83
18152 at_fn_group_banner 83 'lalib-syntax.at:24' \
18153   "syntax of .la files" "                            " 7
18154 at_xfail=yes
18155 (
18156   $as_echo "83. $at_setup_line: testing $at_desc ..."
18157   $at_traceon
18158
18159
18160
18161
18162
18163 cat >main.c <<'_ATEOF'
18164 #include <ltdl.h>
18165 #include <stdio.h>
18166 #include <assert.h>
18167
18168 int
18169 main (int argc, char* argv[])
18170 {
18171   int err = 0;
18172   lt_dlhandle plugin_handle;
18173
18174   if (argc < 2)
18175     {
18176       fprintf (stderr, "usage: %s plugin\n", argv[0]);
18177       return 1;
18178     }
18179
18180   lt_dlinit ();
18181   plugin_handle = lt_dlopenext (argv[1]);
18182   if (NULL != plugin_handle)
18183     {
18184       printf ("plugin opened successfully!\n");
18185       lt_dlclose (plugin_handle);
18186     }
18187   else
18188     {
18189       const char *error = lt_dlerror ();
18190       assert (error != NULL);
18191       printf ("plugin failed to open: %s\n", error);
18192       err = 1;
18193     }
18194   lt_dlexit ();
18195   return err;
18196 }
18197 _ATEOF
18198
18199
18200 cat >module.c <<'_ATEOF'
18201 int foo (void) { return 0; }
18202 _ATEOF
18203
18204
18205 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
18206 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
18207
18208 # Skip this test when called from:
18209 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
18210 { set +x
18211 $as_echo "$at_srcdir/lalib-syntax.at:75: case \$LIBLTDL in #(
18212  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
18213 esac"
18214 at_fn_check_prepare_notrace 'an embedded newline' "lalib-syntax.at:75"
18215 ( $at_check_trace; case $LIBLTDL in #(
18216  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
18217 esac
18218 ) >>"$at_stdout" 2>>"$at_stderr"
18219 at_status=$? at_failed=false
18220 $at_check_filter
18221 at_fn_diff_devnull "$at_stderr" || at_failed=:
18222 echo stdout:; cat "$at_stdout"
18223 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:75"
18224 $at_failed && at_fn_log_failure
18225 $at_traceon; }
18226
18227
18228 CPPFLAGS="$CPPFLAGS $LTDLINCL"
18229
18230 { set +x
18231 $as_echo "$at_srcdir/lalib-syntax.at:81: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
18232 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lalib-syntax.at:81"
18233 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
18234 ) >>"$at_stdout" 2>>"$at_stderr"
18235 at_status=$? at_failed=false
18236 $at_check_filter
18237 echo stderr:; cat "$at_stderr"
18238 echo stdout:; cat "$at_stdout"
18239 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:81"
18240 $at_failed && at_fn_log_failure
18241 $at_traceon; }
18242
18243 { set +x
18244 $as_echo "$at_srcdir/lalib-syntax.at:82: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c"
18245 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "lalib-syntax.at:82"
18246 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c
18247 ) >>"$at_stdout" 2>>"$at_stderr"
18248 at_status=$? at_failed=false
18249 $at_check_filter
18250 echo stderr:; cat "$at_stderr"
18251 echo stdout:; cat "$at_stdout"
18252 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:82"
18253 $at_failed && at_fn_log_failure
18254 $at_traceon; }
18255
18256 { set +x
18257 $as_echo "$at_srcdir/lalib-syntax.at:84: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la module.lo    -module -avoid-version -rpath /somewhere"
18258 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo    -module -avoid-version -rpath /somewhere" "lalib-syntax.at:84"
18259 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo      -module -avoid-version -rpath /somewhere
18260 ) >>"$at_stdout" 2>>"$at_stderr"
18261 at_status=$? at_failed=false
18262 $at_check_filter
18263 echo stderr:; cat "$at_stderr"
18264 echo stdout:; cat "$at_stdout"
18265 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:84"
18266 $at_failed && at_fn_log_failure
18267 $at_traceon; }
18268
18269 { set +x
18270 $as_echo "$at_srcdir/lalib-syntax.at:86: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \$LIBLTDL"
18271 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL" "lalib-syntax.at:86"
18272 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL
18273 ) >>"$at_stdout" 2>>"$at_stderr"
18274 at_status=$? at_failed=false
18275 $at_check_filter
18276 echo stderr:; cat "$at_stderr"
18277 echo stdout:; cat "$at_stdout"
18278 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:86"
18279 $at_failed && at_fn_log_failure
18280 $at_traceon; }
18281
18282
18283
18284 # Several bogus test cases.
18285
18286 cat >missing-closing-quote.la <<'_ATEOF'
18287 # missing-closing-quote.la - a libtool library file
18288 # Generated by libtool
18289 dlname='module.so
18290 library_names='module.so module.so module.so'
18291 old_library='module.a'
18292 installed=no
18293 shouldnotlink=yes
18294 libdir='/somewhere'
18295 _ATEOF
18296
18297
18298 cat >wrong-quotes.la <<'_ATEOF'
18299 # wrong-quotes.la - a libtool library file
18300 # Generated by libtool
18301 dlname="module.so"
18302 library_names='module.so module.so module.so'
18303 old_library='module.a'
18304 installed=no
18305 shouldnotlink=yes
18306 libdir='/somewhere'
18307 _ATEOF
18308
18309
18310 cat >no-dlname.la <<'_ATEOF'
18311 # no-dlname.la - a libtool library file
18312 # Generated by libtool
18313 installed=no
18314 shouldnotlink=yes
18315 libdir='/somewhere'
18316 _ATEOF
18317
18318
18319 cat >nonexistent-dlname.la <<'_ATEOF'
18320 # nonexistent-dlname.la - a libtool library file
18321 # Generated by libtool
18322 dlname='does-not-exist.so'
18323 installed=no
18324 shouldnotlink=yes
18325 libdir='/somewhere'
18326 _ATEOF
18327
18328
18329 for file in ./missing-closing-quote.la ./wrong-quotes.la \
18330             ./no-dlname.la ./nonexistent-dlname.la; do
18331   lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18332 { set +x
18333 $as_echo "$at_srcdir/lalib-syntax.at:133: if \"\$lt_exe\" \$file; then :; else lt_status=\$?;      test \$lt_status != 1 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18334 at_fn_check_prepare_dynamic "if \"$lt_exe\" $file; then :; else lt_status=$?;      test $lt_status != 1 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "lalib-syntax.at:133"
18335 ( $at_check_trace; if "$lt_exe" $file; then :; else lt_status=$?;          test $lt_status != 1 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18336 ) >>"$at_stdout" 2>>"$at_stderr"
18337 at_status=$? at_failed=false
18338 $at_check_filter
18339 echo stderr:; cat "$at_stderr"
18340 echo stdout:; tee stdout <"$at_stdout"
18341 at_fn_check_status 1 $at_status "$at_srcdir/lalib-syntax.at:133"
18342 $at_failed && at_fn_log_failure
18343 $at_traceon; }
18344
18345
18346   { set +x
18347 $as_echo "$at_srcdir/lalib-syntax.at:134: grep 'plugin failed to open' stdout"
18348 at_fn_check_prepare_trace "lalib-syntax.at:134"
18349 ( $at_check_trace; grep 'plugin failed to open' stdout
18350 ) >>"$at_stdout" 2>>"$at_stderr"
18351 at_status=$? at_failed=false
18352 $at_check_filter
18353 at_fn_diff_devnull "$at_stderr" || at_failed=:
18354 echo stdout:; cat "$at_stdout"
18355 at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:134"
18356 $at_failed && at_fn_log_failure
18357 $at_traceon; }
18358
18359 done
18360
18361   set +x
18362   $at_times_p && times >"$at_times_file"
18363 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18364 read at_status <"$at_status_file"
18365 #AT_STOP_83
18366 #AT_START_84
18367 at_fn_group_banner 84 'resident.at:27' \
18368   "resident modules" "                               " 7
18369 at_xfail=no
18370 (
18371   $as_echo "84. $at_setup_line: testing $at_desc ..."
18372   $at_traceon
18373
18374
18375
18376 cat >main.c <<'_ATEOF'
18377 #include <ltdl.h>
18378 #include <stdio.h>
18379
18380 int
18381 main (int argc, char* argv[])
18382 {
18383   int err = 0;
18384   lt_dlhandle plugin_handle;
18385   lt_dladvise advise;
18386
18387   LTDL_SET_PRELOADED_SYMBOLS();
18388
18389   if (argc < 2)
18390     {
18391       fprintf (stderr, "usage: %s plugin\n", argv[0]);
18392       return 1;
18393     }
18394
18395   lt_dlinit ();
18396   if (lt_dladvise_init (&advise) != 0
18397       || lt_dladvise_ext (&advise) != 0
18398       || lt_dladvise_resident (&advise) != 0)
18399     {
18400       printf ("advise failure: %s\n", lt_dlerror ());
18401       err = 1;
18402     }
18403   else
18404     {
18405       plugin_handle = lt_dlopenadvise (argv[1], advise);
18406       if (NULL != plugin_handle)
18407         {
18408           int (*pf) (void);
18409           printf ("plugin opened successfully!\n");
18410           pf = (int (*) (void)) lt_dlsym (plugin_handle, "setup_plugin");
18411           if (pf)
18412             pf ();
18413           else
18414             {
18415               printf ("dlsym failure: %s\n", lt_dlerror ());
18416               err = 1;
18417             }
18418           if (!lt_dlisresident (plugin_handle))
18419             {
18420               printf ("module wrongly not marked resident\n");
18421               err = 1;
18422             }
18423           if (lt_dlclose (plugin_handle) != 0)
18424             {
18425               printf ("close failure (expected): %s\n", lt_dlerror ());
18426             }
18427           else
18428             {
18429               printf ("wrongly closed resident module\n");
18430               err = 1;
18431             }
18432         }
18433       else
18434         {
18435           printf ("plugin failed to open: %s\n", lt_dlerror ());
18436           err = 1;
18437         }
18438       if (lt_dladvise_destroy (&advise) != 0)
18439         {
18440           printf ("advise destroy failure: %s\n", lt_dlerror ());
18441           err = 1;
18442         }
18443     }
18444   lt_dlexit ();
18445   return err;
18446 }
18447 _ATEOF
18448
18449
18450 cat >plugin.c <<'_ATEOF'
18451 #include <stdlib.h>
18452 #include <stdio.h>
18453
18454 void
18455 bye (void)
18456 {
18457   puts ("called from atexit handler");
18458 }
18459
18460 #ifdef __cplusplus
18461 extern "C"
18462 #endif
18463 int
18464 setup_plugin (void)
18465 {
18466   atexit (bye);
18467 }
18468 _ATEOF
18469
18470
18471 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
18472 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
18473
18474 # Skip this test when called from:
18475 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
18476 { set +x
18477 $as_echo "$at_srcdir/resident.at:128: case \$LIBLTDL in #(
18478  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
18479 esac"
18480 at_fn_check_prepare_notrace 'an embedded newline' "resident.at:128"
18481 ( $at_check_trace; case $LIBLTDL in #(
18482  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
18483 esac
18484 ) >>"$at_stdout" 2>>"$at_stderr"
18485 at_status=$? at_failed=false
18486 $at_check_filter
18487 at_fn_diff_devnull "$at_stderr" || at_failed=:
18488 echo stdout:; cat "$at_stdout"
18489 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:128"
18490 $at_failed && at_fn_log_failure
18491 $at_traceon; }
18492
18493
18494 CPPFLAGS="$LTDLINCL $CPPFLAGS"
18495 LDFLAGS="$LDFLAGS -no-undefined"
18496 inst=`pwd`/inst
18497 libdir=$inst/lib
18498
18499 { set +x
18500 $as_echo "$at_srcdir/resident.at:137: \$CC \$CPPFLAGS \$CFLAGS -c main.c"
18501 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "resident.at:137"
18502 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c
18503 ) >>"$at_stdout" 2>>"$at_stderr"
18504 at_status=$? at_failed=false
18505 $at_check_filter
18506 echo stderr:; cat "$at_stderr"
18507 echo stdout:; cat "$at_stdout"
18508 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:137"
18509 $at_failed && at_fn_log_failure
18510 $at_traceon; }
18511
18512 { set +x
18513 $as_echo "$at_srcdir/resident.at:138: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c"
18514 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c" "resident.at:138"
18515 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c
18516 ) >>"$at_stdout" 2>>"$at_stderr"
18517 at_status=$? at_failed=false
18518 $at_check_filter
18519 echo stderr:; cat "$at_stderr"
18520 echo stdout:; cat "$at_stdout"
18521 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:138"
18522 $at_failed && at_fn_log_failure
18523 $at_traceon; }
18524
18525 { set +x
18526 $as_echo "$at_srcdir/resident.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir         -module -avoid-version plugin.lo"
18527 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir       -module -avoid-version plugin.lo" "resident.at:140"
18528 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir         -module -avoid-version plugin.lo
18529 ) >>"$at_stdout" 2>>"$at_stderr"
18530 at_status=$? at_failed=false
18531 $at_check_filter
18532 echo stderr:; cat "$at_stderr"
18533 echo stdout:; cat "$at_stdout"
18534 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:140"
18535 $at_failed && at_fn_log_failure
18536 $at_traceon; }
18537
18538 { set +x
18539 $as_echo "$at_srcdir/resident.at:142: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT        -dlopen plugin.la \$LIBLTDL"
18540 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT       -dlopen plugin.la $LIBLTDL" "resident.at:142"
18541 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT         -dlopen plugin.la $LIBLTDL
18542 ) >>"$at_stdout" 2>>"$at_stderr"
18543 at_status=$? at_failed=false
18544 $at_check_filter
18545 echo stderr:; cat "$at_stderr"
18546 echo stdout:; cat "$at_stdout"
18547 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:142"
18548 $at_failed && at_fn_log_failure
18549 $at_traceon; }
18550
18551 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18552 { set +x
18553 $as_echo "$at_srcdir/resident.at:145: if \"\$lt_exe\" ./plugin.la; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18554 at_fn_check_prepare_dynamic "if \"$lt_exe\" ./plugin.la; then :; else lt_status=$?;                test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "resident.at:145"
18555 ( $at_check_trace; if "$lt_exe" ./plugin.la; then :; else lt_status=$?;                    test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18556 ) >>"$at_stdout" 2>>"$at_stderr"
18557 at_status=$? at_failed=false
18558 $at_check_filter
18559 echo stderr:; cat "$at_stderr"
18560 echo stdout:; tee stdout <"$at_stdout"
18561 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:145"
18562 $at_failed && at_fn_log_failure
18563 $at_traceon; }
18564
18565
18566 { set +x
18567 $as_echo "$at_srcdir/resident.at:146: grep 'called from atexit handler' stdout"
18568 at_fn_check_prepare_trace "resident.at:146"
18569 ( $at_check_trace; grep 'called from atexit handler' stdout
18570 ) >>"$at_stdout" 2>>"$at_stderr"
18571 at_status=$? at_failed=false
18572 $at_check_filter
18573 at_fn_diff_devnull "$at_stderr" || at_failed=:
18574 echo stdout:; cat "$at_stdout"
18575 at_fn_check_status 0 $at_status "$at_srcdir/resident.at:146"
18576 $at_failed && at_fn_log_failure
18577 $at_traceon; }
18578
18579
18580   set +x
18581   $at_times_p && times >"$at_times_file"
18582 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18583 read at_status <"$at_status_file"
18584 #AT_STOP_84
18585 #AT_START_85
18586 at_fn_group_banner 85 'slist.at:24' \
18587   "SList functionality" "                            " 7
18588 at_xfail=no
18589 (
18590   $as_echo "85. $at_setup_line: testing $at_desc ..."
18591   $at_traceon
18592
18593
18594 cat >test-slist.c <<'_ATEOF'
18595
18596 #include <config.h>
18597 #include <stdlib.h>
18598 #include <string.h>
18599 #include <assert.h>
18600 #include <stdio.h>
18601 #include "slist.h"
18602
18603 void *find_string (SList *item, void *data)
18604 {
18605   if (data != NULL && !strcmp ((const char *) item->userdata, (const char *)data))
18606     return item;
18607   else
18608     return NULL;
18609 }
18610
18611 void boxed_delete (void *item)
18612 {
18613   free (slist_unbox ((SList *) item));
18614 }
18615
18616 void *print_item (SList *item, void *userdata)
18617 {
18618   userdata = userdata; /* unused */
18619   printf ("%s\n", (const char*)item->userdata);
18620   return NULL;
18621 }
18622
18623 int list_compare (const SList *item1, const SList *item2, void *userdata)
18624 {
18625   userdata = userdata;
18626   return strcmp ((const char *) item1->userdata, (const char *)item2->userdata);
18627 }
18628
18629 int main ()
18630 {
18631   int i;
18632   SList *empty_list = NULL, *list = NULL, *item, *list_save;
18633   char *data = NULL;
18634
18635   /* slist_cons */
18636   list = slist_cons (NULL, NULL);
18637
18638   for (i=0; i < 10; ++i) {
18639     data = (char *) malloc (42);
18640     assert (data);
18641     sprintf (data, "foo%d", i);
18642     list = slist_cons (slist_box (data), list);
18643   }
18644   list_save = list;
18645   list = slist_cons (NULL, list);
18646   assert (list == list_save);
18647
18648
18649   /* slist_find */
18650   assert (slist_find (NULL, find_string, (void *) "whatever") == NULL);
18651   assert (slist_find (empty_list, find_string, (void *) "whatever") == NULL);
18652   assert (slist_find (list, find_string, (void *) "foo10") == NULL);
18653   item = (SList *) slist_find (list, find_string, (void *) "foo1");
18654   assert (item != NULL);
18655   assert (!strcmp ((const char *) item->userdata, "foo1"));
18656
18657   item = slist_nth (list, 10);
18658   assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
18659
18660   puts ("list as inserted:");
18661   slist_foreach (list, print_item, NULL);
18662   puts ("reversed list:");
18663   list = slist_reverse (list);
18664   slist_foreach (list, print_item, NULL);
18665
18666   item = slist_nth (list, 1);
18667   assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0"));
18668
18669   assert (10 == slist_length (list));
18670
18671   /* slist_tail is the second item, not the last one */
18672   item = slist_tail (list);
18673   assert (item != NULL && !strcmp ((const char *) item->userdata, "foo1"));
18674
18675   assert (slist_tail (slist_nth (list, 10)) == NULL);
18676
18677   /* slist_sort and implicitly, slist_sort_merge */
18678   assert (slist_sort (NULL, list_compare, NULL) == NULL);
18679   list = slist_sort (list, list_compare, NULL);
18680   puts ("list after no-op sort:");
18681   slist_foreach (list, print_item, NULL);
18682
18683   list = slist_reverse (list);
18684   puts ("reversed list:");
18685   slist_foreach (list, print_item, NULL);
18686   puts ("sorting reversed list:");
18687   list = slist_sort (list, list_compare, NULL);
18688   slist_foreach (list, print_item, NULL);
18689
18690   /* slist_remove */
18691   assert (slist_remove (NULL, find_string, NULL) == NULL);
18692   assert (slist_remove (&empty_list, find_string, NULL) == NULL);
18693
18694   list_save = list;
18695   assert (slist_remove (&list, find_string, NULL) == NULL);
18696   assert (list_save == list);
18697
18698   /* remove entries: middle, last, first, not present */
18699   /* slist_reverse above has left us with increasing order */
18700   list_save = list;
18701   item = slist_remove (&list, find_string, (void *) "foo5");
18702   assert (list_save == list);
18703   assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo5"));
18704   free (data);
18705
18706   list_save = list;
18707   item = slist_remove (&list, find_string, (void *) "foo9");
18708   assert (list_save == list);
18709   assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo9"));
18710   free (data);
18711
18712   list_save = list;
18713   item = slist_remove (&list, find_string, (void *) "foo0");
18714   assert (list_save != list);
18715   assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo0"));
18716   free (data);
18717
18718   list_save = list;
18719   item = slist_remove (&list, find_string, (void *) "foo5");
18720   assert (list_save == list);
18721   assert (item == NULL);
18722
18723   assert (slist_delete (list, boxed_delete) == NULL);
18724   return 0;
18725 }
18726 _ATEOF
18727
18728
18729 CPPFLAGS="-I$top_srcdir/libltdl -I$top_srcdir/libltdl/libltdl -I$abs_top_builddir"
18730 { set +x
18731 $as_echo "$at_srcdir/slist.at:160: \$CC \$CPPFLAGS \$CFLAGS -c test-slist.c"
18732 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c test-slist.c" "slist.at:160"
18733 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c test-slist.c
18734 ) >>"$at_stdout" 2>>"$at_stderr"
18735 at_status=$? at_failed=false
18736 $at_check_filter
18737 echo stderr:; cat "$at_stderr"
18738 echo stdout:; cat "$at_stdout"
18739 at_fn_check_status 0 $at_status "$at_srcdir/slist.at:160"
18740 $at_failed && at_fn_log_failure
18741 $at_traceon; }
18742
18743 { set +x
18744 $as_echo "$at_srcdir/slist.at:162: \$CC \$CPPFLAGS \$CFLAGS -c \$top_srcdir/libltdl/slist.c"
18745 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c" "slist.at:162"
18746 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c
18747 ) >>"$at_stdout" 2>>"$at_stderr"
18748 at_status=$? at_failed=false
18749 $at_check_filter
18750 echo stderr:; cat "$at_stderr"
18751 echo stdout:; cat "$at_stdout"
18752 at_fn_check_status 0 $at_status "$at_srcdir/slist.at:162"
18753 $at_failed && at_fn_log_failure
18754 $at_traceon; }
18755
18756 { set +x
18757 $as_echo "$at_srcdir/slist.at:164: \$CC \$CFLAGS \$LDFLAGS -o test-slist test-slist.\$OBJEXT slist.\$OBJEXT"
18758 at_fn_check_prepare_dynamic "$CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT" "slist.at:164"
18759 ( $at_check_trace; $CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT
18760 ) >>"$at_stdout" 2>>"$at_stderr"
18761 at_status=$? at_failed=false
18762 $at_check_filter
18763 echo stderr:; cat "$at_stderr"
18764 echo stdout:; cat "$at_stdout"
18765 at_fn_check_status 0 $at_status "$at_srcdir/slist.at:164"
18766 $at_failed && at_fn_log_failure
18767 $at_traceon; }
18768
18769 lt_exe=./test-slist; if test -f "./test-slist$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
18770 { set +x
18771 $as_echo "$at_srcdir/slist.at:166: if \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
18772 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "slist.at:166"
18773 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
18774 ) >>"$at_stdout" 2>>"$at_stderr"
18775 at_status=$? at_failed=false
18776 $at_check_filter
18777 echo stderr:; cat "$at_stderr"
18778 echo stdout:; cat "$at_stdout"
18779 at_fn_check_status 0 $at_status "$at_srcdir/slist.at:166"
18780 $at_failed && at_fn_log_failure
18781 $at_traceon; }
18782
18783
18784
18785   set +x
18786   $at_times_p && times >"$at_times_file"
18787 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18788 read at_status <"$at_status_file"
18789 #AT_STOP_85
18790 #AT_START_86
18791 at_fn_group_banner 86 'need_lib_prefix.at:25' \
18792   "enforced lib prefix" "                            " 7
18793 at_xfail=no
18794 (
18795   $as_echo "86. $at_setup_line: testing $at_desc ..."
18796   $at_traceon
18797
18798
18799
18800 # Originally written to simulate a failure visible on systems
18801 # which need a library prefix like 'lib', such as BeOS.  Currently
18802 # the prefix is hardcoded as 'lib', so systems that require a
18803 # different prefix skips the test.
18804
18805 cat >main.c <<'_ATEOF'
18806 #include <ltdl.h>
18807 #include <stdio.h>
18808
18809 typedef int fun (int);
18810
18811 static int errors = 0;
18812
18813 static void
18814 complain (const char *msg)
18815 {
18816   const char *errmsg = lt_dlerror ();
18817   fprintf (stderr, "%s", msg);
18818   if (errmsg)
18819     fprintf (stderr, ": %s\n", errmsg);
18820   else
18821     fprintf (stderr, ".\n");
18822   ++errors;
18823 }
18824
18825 static lt_dlhandle
18826 moduleopen (const char *filename)
18827 {
18828   lt_dlhandle handle;
18829
18830   handle = lt_dlopen (filename);
18831   if (!handle)
18832     {
18833       fprintf (stderr, "can't open the module %s!\n", filename);
18834       complain ("error was");
18835     }
18836
18837   return handle;
18838 }
18839
18840 static int
18841 moduletest (lt_dlhandle handle)
18842 {
18843   const lt_dlinfo *info = lt_dlgetinfo (handle);
18844   fun *f = (fun *) lt_dlsym (handle, "f");
18845   int *v = (int *) lt_dlsym (handle, "i");
18846
18847   if (!f)
18848     {
18849       complain ("function `f' not found");
18850       return 1;
18851     }
18852   if (!v)
18853     {
18854       complain ("variable `i' not found");
18855       return 1;
18856     }
18857   printf ("%s: %d\n", info->name, f (*v));
18858
18859   return 0;
18860 }
18861
18862 int
18863 main (int argc, char **argv)
18864 {
18865   lt_dlhandle handle;
18866
18867   LTDL_SET_PRELOADED_SYMBOLS();
18868
18869   if (lt_dlinit() != 0)
18870     {
18871       fprintf (stderr, "error during initialization: %s\n", lt_dlerror());
18872       return 1;
18873     }
18874
18875   if (lt_dlpreload_open (0, moduletest) != 0)
18876     complain ("error during preloading");
18877
18878   if (lt_dlexit () != 0)
18879     complain ("error during exit");
18880
18881   return (errors != 0);
18882 }
18883 _ATEOF
18884
18885
18886 cat >foo1.c <<'_ATEOF'
18887 #define f foo1_LTX_f
18888 #define i foo1_LTX_i
18889 #ifdef __cplusplus
18890 extern "C" {
18891 #endif
18892 int f (int x) { return x / 3; }
18893 int i = 7;
18894 #ifdef __cplusplus
18895 }
18896 #endif
18897 _ATEOF
18898
18899
18900 cat >foo2.c <<'_ATEOF'
18901 #define f libfoo2_LTX_f
18902 #define i libfoo2_LTX_i
18903 #ifdef __cplusplus
18904 extern "C" {
18905 #endif
18906 int f (int x) { return (x * x) / 10; }
18907 int i = 6;
18908 #ifdef __cplusplus
18909 }
18910 #endif
18911 _ATEOF
18912
18913
18914 cat >expout <<'_ATEOF'
18915 libfoo1: 2
18916 libfoo2: 3
18917 _ATEOF
18918
18919 case $host_os in mingw*)
18920   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
18921   mv -f expout.t expout ;;
18922 esac
18923
18924 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
18925 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
18926
18927 # Skip this test when called from:
18928 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
18929 { set +x
18930 $as_echo "$at_srcdir/need_lib_prefix.at:149: case \$LIBLTDL in #(
18931  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
18932 esac"
18933 at_fn_check_prepare_notrace 'an embedded newline' "need_lib_prefix.at:149"
18934 ( $at_check_trace; case $LIBLTDL in #(
18935  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
18936 esac
18937 ) >>"$at_stdout" 2>>"$at_stderr"
18938 at_status=$? at_failed=false
18939 $at_check_filter
18940 at_fn_diff_devnull "$at_stderr" || at_failed=:
18941 echo stdout:; cat "$at_stdout"
18942 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:149"
18943 $at_failed && at_fn_log_failure
18944 $at_traceon; }
18945
18946
18947 CPPFLAGS="$LTDLINCL $CPPFLAGS"
18948 LDFLAGS="$LDFLAGS"
18949
18950 # Skip this test when libraries are not normally prefixed with lib.
18951 # E.g., for MSVC and OS/2.
18952 eval "`$LIBTOOL --config | $EGREP '^(libname_spec)='`"
18953 name=
18954 eval libname=\"$libname_spec\"
18955 { set +x
18956 $as_echo "$at_srcdir/need_lib_prefix.at:161: test \"\$libname\" = lib || exit 77"
18957 at_fn_check_prepare_dynamic "test \"$libname\" = lib || exit 77" "need_lib_prefix.at:161"
18958 ( $at_check_trace; test "$libname" = lib || exit 77
18959 ) >>"$at_stdout" 2>>"$at_stderr"
18960 at_status=$? at_failed=false
18961 $at_check_filter
18962 at_fn_diff_devnull "$at_stderr" || at_failed=:
18963 at_fn_diff_devnull "$at_stdout" || at_failed=:
18964 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:161"
18965 $at_failed && at_fn_log_failure
18966 $at_traceon; }
18967
18968
18969 # Create our own libtool, forcing need_lib_prefix setting
18970 sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool
18971 LIBTOOL="$SHELL ./libtool"
18972
18973 # Installation directory:
18974 instdir=`pwd`/_inst
18975
18976 $CC $CPPFLAGS $CFLAGS -c main.c
18977 for file in foo1 foo2; do
18978   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
18979 done
18980
18981 { set +x
18982 $as_echo "$at_srcdir/need_lib_prefix.at:175: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o foo1.la foo1.lo -rpath \$instdir/lib"
18983 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib" "need_lib_prefix.at:175"
18984 ( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib
18985 ) >>"$at_stdout" 2>>"$at_stderr"
18986 at_status=$? at_failed=false
18987 $at_check_filter
18988 echo stderr:; cat "$at_stderr"
18989 echo stdout:; cat "$at_stdout"
18990 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:175"
18991 $at_failed && at_fn_log_failure
18992 $at_traceon; }
18993
18994 { set +x
18995 $as_echo "$at_srcdir/need_lib_prefix.at:177: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o libfoo2.la foo2.lo -rpath \$instdir/lib"
18996 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib" "need_lib_prefix.at:177"
18997 ( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib
18998 ) >>"$at_stdout" 2>>"$at_stderr"
18999 at_status=$? at_failed=false
19000 $at_check_filter
19001 echo stderr:; cat "$at_stderr"
19002 echo stdout:; cat "$at_stdout"
19003 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:177"
19004 $at_failed && at_fn_log_failure
19005 $at_traceon; }
19006
19007 { set +x
19008 $as_echo "$at_srcdir/need_lib_prefix.at:179: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la \$LIBLTDL"
19009 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL" "need_lib_prefix.at:179"
19010 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL
19011 ) >>"$at_stdout" 2>>"$at_stderr"
19012 at_status=$? at_failed=false
19013 $at_check_filter
19014 echo stderr:; cat "$at_stderr"
19015 echo stdout:; cat "$at_stdout"
19016 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:179"
19017 $at_failed && at_fn_log_failure
19018 $at_traceon; }
19019
19020
19021 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
19022 { set +x
19023 $as_echo "$at_srcdir/need_lib_prefix.at:182: if \$LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"\$lt_exe\" ; then :; else lt_status=\$?;             test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
19024 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"$lt_exe\" ; then :; else lt_status=$?;                test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "need_lib_prefix.at:182"
19025 ( $at_check_trace; if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la "$lt_exe" ; then :; else lt_status=$?;                    test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
19026 ) >>"$at_stdout" 2>>"$at_stderr"
19027 at_status=$? at_failed=false
19028 $at_check_filter
19029 at_fn_diff_devnull "$at_stderr" || at_failed=:
19030 $at_diff expout "$at_stdout" || at_failed=:
19031 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:182"
19032 $at_failed && at_fn_log_failure
19033 $at_traceon; }
19034
19035
19036
19037 # Install the libraries.
19038 mkdir $instdir
19039 mkdir $instdir/lib
19040 $LIBTOOL --mode=install cp foo1.la $instdir/lib/foo1.la
19041 $LIBTOOL --mode=install cp libfoo2.la $instdir/lib/libfoo2.la
19042
19043 # Install the binary
19044 mkdir $instdir/bin
19045 $LIBTOOL --mode=install cp main$EXEEXT $instdir/bin/main$EXEEXT
19046
19047 lt_exe=$instdir/bin/main; if test -f "$instdir/bin/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
19048 { set +x
19049 $as_echo "$at_srcdir/need_lib_prefix.at:195: if \"\$lt_exe\" ; then :; else lt_status=\$?;                 test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
19050 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "need_lib_prefix.at:195"
19051 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
19052 ) >>"$at_stdout" 2>>"$at_stderr"
19053 at_status=$? at_failed=false
19054 $at_check_filter
19055 at_fn_diff_devnull "$at_stderr" || at_failed=:
19056 $at_diff expout "$at_stdout" || at_failed=:
19057 at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:195"
19058 $at_failed && at_fn_log_failure
19059 $at_traceon; }
19060
19061
19062
19063   set +x
19064   $at_times_p && times >"$at_times_file"
19065 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19066 read at_status <"$at_status_file"
19067 #AT_STOP_86
19068 #AT_START_87
19069 at_fn_group_banner 87 'standalone.at:31' \
19070   "compiling softlinked libltdl" "                   " 8
19071 at_xfail=no
19072 (
19073   $as_echo "87. $at_setup_line: testing $at_desc ..."
19074   $at_traceon
19075
19076
19077 { set +x
19078 $as_echo "$at_srcdir/standalone.at:33: \$LIBTOOLIZE --ltdl=.
19079
19080 "
19081 at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:33"
19082 ( $at_check_trace; $LIBTOOLIZE --ltdl=.
19083
19084
19085 ) >>"$at_stdout" 2>>"$at_stderr"
19086 at_status=$? at_failed=false
19087 $at_check_filter
19088 at_fn_diff_devnull "$at_stderr" || at_failed=:
19089 echo stdout:; cat "$at_stdout"
19090 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:33"
19091 $at_failed && at_fn_log_failure
19092 $at_traceon; }
19093
19094
19095 { set +x
19096 $as_echo "$at_srcdir/standalone.at:34: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options "
19097 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:34"
19098 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
19099 ) >>"$at_stdout" 2>>"$at_stderr"
19100 at_status=$? at_failed=false
19101 $at_check_filter
19102 echo stderr:; cat "$at_stderr"
19103 echo stdout:; cat "$at_stdout"
19104 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:34"
19105 $at_failed && at_fn_log_failure
19106 $at_traceon; }
19107
19108
19109 for target in all $tst_dist
19110 do
19111   { set +x
19112 $as_echo "$at_srcdir/standalone.at:35: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19113 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:35"
19114 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19115 ) >>"$at_stdout" 2>>"$at_stderr"
19116 at_status=$? at_failed=false
19117 $at_check_filter
19118 echo stderr:; cat "$at_stderr"
19119 echo stdout:; cat "$at_stdout"
19120 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:35"
19121 $at_failed && at_fn_log_failure
19122 $at_traceon; }
19123
19124 done
19125
19126
19127 { set +x
19128 $as_echo "$at_srcdir/standalone.at:37: test -f libltdlc.la"
19129 at_fn_check_prepare_trace "standalone.at:37"
19130 ( $at_check_trace; test -f libltdlc.la
19131 ) >>"$at_stdout" 2>>"$at_stderr"
19132 at_status=$? at_failed=false
19133 $at_check_filter
19134 at_fn_diff_devnull "$at_stderr" || at_failed=:
19135 at_fn_diff_devnull "$at_stdout" || at_failed=:
19136 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:37"
19137 $at_failed && at_fn_log_failure
19138 $at_traceon; }
19139
19140
19141   set +x
19142   $at_times_p && times >"$at_times_file"
19143 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19144 read at_status <"$at_status_file"
19145 #AT_STOP_87
19146 #AT_START_88
19147 at_fn_group_banner 88 'standalone.at:46' \
19148   "compiling copied libltdl" "                       " 8
19149 at_xfail=no
19150 (
19151   $as_echo "88. $at_setup_line: testing $at_desc ..."
19152   $at_traceon
19153
19154
19155 { set +x
19156 $as_echo "$at_srcdir/standalone.at:48: \$LIBTOOLIZE --copy --ltdl=.
19157
19158 "
19159 at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:48"
19160 ( $at_check_trace; $LIBTOOLIZE --copy --ltdl=.
19161
19162
19163 ) >>"$at_stdout" 2>>"$at_stderr"
19164 at_status=$? at_failed=false
19165 $at_check_filter
19166 at_fn_diff_devnull "$at_stderr" || at_failed=:
19167 echo stdout:; cat "$at_stdout"
19168 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:48"
19169 $at_failed && at_fn_log_failure
19170 $at_traceon; }
19171
19172
19173 { set +x
19174 $as_echo "$at_srcdir/standalone.at:49: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options "
19175 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:49"
19176 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
19177 ) >>"$at_stdout" 2>>"$at_stderr"
19178 at_status=$? at_failed=false
19179 $at_check_filter
19180 echo stderr:; cat "$at_stderr"
19181 echo stdout:; cat "$at_stdout"
19182 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:49"
19183 $at_failed && at_fn_log_failure
19184 $at_traceon; }
19185
19186
19187 for target in all $tst_dist
19188 do
19189   { set +x
19190 $as_echo "$at_srcdir/standalone.at:50: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19191 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:50"
19192 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19193 ) >>"$at_stdout" 2>>"$at_stderr"
19194 at_status=$? at_failed=false
19195 $at_check_filter
19196 echo stderr:; cat "$at_stderr"
19197 echo stdout:; cat "$at_stdout"
19198 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:50"
19199 $at_failed && at_fn_log_failure
19200 $at_traceon; }
19201
19202 done
19203
19204
19205 { set +x
19206 $as_echo "$at_srcdir/standalone.at:52: test -f libltdlc.la"
19207 at_fn_check_prepare_trace "standalone.at:52"
19208 ( $at_check_trace; test -f libltdlc.la
19209 ) >>"$at_stdout" 2>>"$at_stderr"
19210 at_status=$? at_failed=false
19211 $at_check_filter
19212 at_fn_diff_devnull "$at_stderr" || at_failed=:
19213 at_fn_diff_devnull "$at_stdout" || at_failed=:
19214 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:52"
19215 $at_failed && at_fn_log_failure
19216 $at_traceon; }
19217
19218
19219   set +x
19220   $at_times_p && times >"$at_times_file"
19221 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19222 read at_status <"$at_status_file"
19223 #AT_STOP_88
19224 #AT_START_89
19225 at_fn_group_banner 89 'standalone.at:61' \
19226   "installable libltdl" "                            " 8
19227 at_xfail=no
19228 (
19229   $as_echo "89. $at_setup_line: testing $at_desc ..."
19230   $at_traceon
19231
19232
19233 prefix=`pwd`/_inst
19234
19235 { set +x
19236 $as_echo "$at_srcdir/standalone.at:65: \$LIBTOOLIZE --copy --ltdl=.
19237
19238 "
19239 at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:65"
19240 ( $at_check_trace; $LIBTOOLIZE --copy --ltdl=.
19241
19242
19243 ) >>"$at_stdout" 2>>"$at_stderr"
19244 at_status=$? at_failed=false
19245 $at_check_filter
19246 at_fn_diff_devnull "$at_stderr" || at_failed=:
19247 echo stdout:; cat "$at_stdout"
19248 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:65"
19249 $at_failed && at_fn_log_failure
19250 $at_traceon; }
19251
19252
19253 { set +x
19254 $as_echo "$at_srcdir/standalone.at:66: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
19255 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:66"
19256 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
19257 ) >>"$at_stdout" 2>>"$at_stderr"
19258 at_status=$? at_failed=false
19259 $at_check_filter
19260 echo stderr:; cat "$at_stderr"
19261 echo stdout:; cat "$at_stdout"
19262 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:66"
19263 $at_failed && at_fn_log_failure
19264 $at_traceon; }
19265
19266
19267 for target in all install $tst_dist
19268 do
19269   { set +x
19270 $as_echo "$at_srcdir/standalone.at:67: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19271 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:67"
19272 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19273 ) >>"$at_stdout" 2>>"$at_stderr"
19274 at_status=$? at_failed=false
19275 $at_check_filter
19276 echo stderr:; cat "$at_stderr"
19277 echo stdout:; cat "$at_stdout"
19278 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:67"
19279 $at_failed && at_fn_log_failure
19280 $at_traceon; }
19281
19282 done
19283
19284
19285 { set +x
19286 $as_echo "$at_srcdir/standalone.at:69: test -f \$prefix/lib/libltdl.la"
19287 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "standalone.at:69"
19288 ( $at_check_trace; test -f $prefix/lib/libltdl.la
19289 ) >>"$at_stdout" 2>>"$at_stderr"
19290 at_status=$? at_failed=false
19291 $at_check_filter
19292 at_fn_diff_devnull "$at_stderr" || at_failed=:
19293 at_fn_diff_devnull "$at_stdout" || at_failed=:
19294 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:69"
19295 $at_failed && at_fn_log_failure
19296 $at_traceon; }
19297
19298 { set +x
19299 $as_echo "$at_srcdir/standalone.at:70: test -f \$prefix/include/ltdl.h"
19300 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "standalone.at:70"
19301 ( $at_check_trace; test -f $prefix/include/ltdl.h
19302 ) >>"$at_stdout" 2>>"$at_stderr"
19303 at_status=$? at_failed=false
19304 $at_check_filter
19305 at_fn_diff_devnull "$at_stderr" || at_failed=:
19306 at_fn_diff_devnull "$at_stdout" || at_failed=:
19307 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:70"
19308 $at_failed && at_fn_log_failure
19309 $at_traceon; }
19310
19311
19312   set +x
19313   $at_times_p && times >"$at_times_file"
19314 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19315 read at_status <"$at_status_file"
19316 #AT_STOP_89
19317 #AT_START_90
19318 at_fn_group_banner 90 'standalone.at:79' \
19319   "linking libltdl without autotools" "              " 8
19320 at_xfail=no
19321 (
19322   $as_echo "90. $at_setup_line: testing $at_desc ..."
19323   $at_traceon
19324
19325
19326 cat >module.c <<'_ATEOF'
19327 #ifdef __cplusplus
19328 extern "C"
19329 #endif
19330 const char *
19331 hello (void)
19332 {
19333   return "Hello!";
19334 }
19335 _ATEOF
19336
19337
19338 cat >main.c <<'_ATEOF'
19339 #include <stdio.h>
19340 #include "ltdl.h"
19341
19342 int
19343 main ()
19344 {
19345   lt_dlhandle module;
19346   const char *(*func) (void) = 0;
19347   int status = 1;
19348
19349   LTDL_SET_PRELOADED_SYMBOLS();
19350   if (lt_dlinit() != 0) {
19351     fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
19352     return 1;
19353   }
19354
19355   module = lt_dlopen("./module.la");
19356   if (!module) {
19357     fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
19358     goto finish;
19359   }
19360
19361   func = (const char *(*)(void)) lt_dlsym (module, "hello");
19362   if (!func) {
19363     fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
19364     goto finish;
19365   }
19366
19367   printf ("%s\n", (*func) ());
19368   status = 0;
19369
19370 finish:
19371   if (lt_dlexit() != 0) {
19372     fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
19373     status = 1;
19374   }
19375
19376   return status;
19377 }
19378 _ATEOF
19379
19380
19381
19382 cat >Makefile <<'_ATEOF'
19383 top_builddir    = .
19384 LIBTOOL         = ./libltdl/libtool
19385 INCLUDES        = -I./libltdl
19386 MODFLAGS        = -module -avoid-version -no-undefined
19387
19388 LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
19389         $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
19390 LTLINK    = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \
19391         $(CC) $(CFLAGS) $(LDFLAGS)
19392
19393 TARGETS         = libltdl/libltdlc.la module.la ltdldemo$(EXEEXT)
19394
19395 all: $(TARGETS)
19396
19397 libltdl/libltdlc.la: $(LIBTOOL) libltdl/Makefile
19398         MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \
19399         cd libltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \
19400           CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
19401           CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)"
19402
19403 $(LIBTOOL): libltdl/Makefile
19404
19405 libltdl/Makefile:
19406         cd libltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS)
19407
19408 ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo
19409         $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./libltdl/libltdlc.la
19410
19411 main.lo: $(LIBTOOL) main.c
19412         $(LTCOMPILE) -c main.c
19413
19414 module.la: $(LIBTOOL) module.lo
19415         $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null
19416
19417 module.lo: $(LIBTOOL) module.c
19418         $(LTCOMPILE) -c module.c
19419 _ATEOF
19420
19421 cat >> Makefile <<EOF
19422 SHELL = $SHELL
19423 EOF
19424
19425
19426
19427 { set +x
19428 $as_echo "$at_srcdir/standalone.at:82: \$LIBTOOLIZE --copy --ltdl
19429
19430 "
19431 at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:82"
19432 ( $at_check_trace; $LIBTOOLIZE --copy --ltdl
19433
19434
19435 ) >>"$at_stdout" 2>>"$at_stderr"
19436 at_status=$? at_failed=false
19437 $at_check_filter
19438 at_fn_diff_devnull "$at_stderr" || at_failed=:
19439 echo stdout:; cat "$at_stdout"
19440 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:82"
19441 $at_failed && at_fn_log_failure
19442 $at_traceon; }
19443
19444
19445 for target in all
19446 do
19447   { set +x
19448 $as_echo "$at_srcdir/standalone.at:83: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\"         CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\"        CONFIGURE_OPTIONS=\"\$configure_options\""
19449 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target CC=\"$CC\" LIBTOOLFLAGS=\"$LIBTOOLFLAGS\" CPPFLAGS=\"$CPPFLAGS\"         CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\"  CONFIGURE_OPTIONS=\"$configure_options\"" "standalone.at:83"
19450 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS"         CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"      CONFIGURE_OPTIONS="$configure_options"
19451 ) >>"$at_stdout" 2>>"$at_stderr"
19452 at_status=$? at_failed=false
19453 $at_check_filter
19454 echo stderr:; cat "$at_stderr"
19455 echo stdout:; cat "$at_stdout"
19456 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:83"
19457 $at_failed && at_fn_log_failure
19458 $at_traceon; }
19459
19460 done
19461
19462
19463 lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
19464 { set +x
19465 $as_echo "$at_srcdir/standalone.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?;       test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
19466 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "standalone.at:87"
19467 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
19468 ) >>"$at_stdout" 2>>"$at_stderr"
19469 at_status=$? at_failed=false
19470 $at_check_filter
19471 at_fn_diff_devnull "$at_stderr" || at_failed=:
19472 echo stdout:; cat "$at_stdout"
19473 at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:87"
19474 $at_failed && at_fn_log_failure
19475 $at_traceon; }
19476
19477
19478
19479   set +x
19480   $at_times_p && times >"$at_times_file"
19481 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19482 read at_status <"$at_status_file"
19483 #AT_STOP_90
19484 #AT_START_91
19485 at_fn_group_banner 91 'subproject.at:57' \
19486   "compiling softlinked libltdl" "                   " 9
19487 at_xfail=no
19488       test "$ACLOCAL" = no && at_xfail=yes
19489       test "$AUTOMAKE" = no && at_xfail=yes
19490       test "$AUTOCONF" = no && at_xfail=yes
19491 (
19492   $as_echo "91. $at_setup_line: testing $at_desc ..."
19493   $at_traceon
19494
19495
19496 cat >configure.ac <<'_ATEOF'
19497 AC_INIT([subproject-demo], 2.4.2, bug-libtool@gnu.org)
19498 LT_CONFIG_LTDL_DIR([sub/ltdl])
19499 AC_CONFIG_AUX_DIR([sub/ltdl/config])
19500 AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
19501 AM_INIT_AUTOMAKE([foreign])
19502 LT_INIT
19503 LT_WITH_LTDL
19504 AC_CONFIG_FILES([Makefile])
19505 AC_OUTPUT
19506 _ATEOF
19507
19508
19509 cat >Makefile.am <<'_ATEOF'
19510 ACLOCAL_AMFLAGS = -I sub/ltdl/m4
19511 AUTOMAKE_OPTIONS = 1.9
19512 SUBDIRS = sub/ltdl
19513 lib_LTLIBRARIES = foo.la
19514 foo_la_LDFLAGS = -module -avoid-version -no-undefined
19515 _ATEOF
19516
19517
19518 echo 'int dummy = 0;' > foo.c
19519
19520
19521 $LIBTOOLIZE --ltdl
19522
19523
19524 { set +x
19525 $as_echo "$at_srcdir/subproject.at:61: \$ACLOCAL -I sub/ltdl/m4"
19526 at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:61"
19527 ( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
19528 ) >>"$at_stdout" 2>>"$at_stderr"
19529 at_status=$? at_failed=false
19530 $at_check_filter
19531 echo stderr:; cat "$at_stderr"
19532 echo stdout:; cat "$at_stdout"
19533 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
19534 $at_failed && at_fn_log_failure
19535 $at_traceon; }
19536
19537
19538
19539
19540
19541 { set +x
19542 $as_echo "$at_srcdir/subproject.at:61: \$AUTOMAKE --add-missing --copy"
19543 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:61"
19544 ( $at_check_trace; $AUTOMAKE --add-missing --copy
19545 ) >>"$at_stdout" 2>>"$at_stderr"
19546 at_status=$? at_failed=false
19547 $at_check_filter
19548 echo stderr:; tee stderr <"$at_stderr"
19549 echo stdout:; cat "$at_stdout"
19550 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
19551 if $at_failed; then :
19552   { set +x
19553 $as_echo "$at_srcdir/subproject.at:61: grep 'require .*but have' stderr && (exit 77)"
19554 at_fn_check_prepare_trace "subproject.at:61"
19555 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
19556 ) >>"$at_stdout" 2>>"$at_stderr"
19557 at_status=$? at_failed=false
19558 $at_check_filter
19559 at_fn_diff_devnull "$at_stderr" || at_failed=:
19560 at_fn_diff_devnull "$at_stdout" || at_failed=:
19561 at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:61"
19562 $at_failed && at_fn_log_failure
19563 $at_traceon; }
19564
19565 fi
19566 $at_failed && at_fn_log_failure
19567 $at_traceon; }
19568
19569
19570
19571
19572 { set +x
19573 $as_echo "$at_srcdir/subproject.at:61: \$AUTOCONF "
19574 at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:61"
19575 ( $at_check_trace; $AUTOCONF
19576 ) >>"$at_stdout" 2>>"$at_stderr"
19577 at_status=$? at_failed=false
19578 $at_check_filter
19579 echo stderr:; cat "$at_stderr"
19580 echo stdout:; cat "$at_stdout"
19581 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
19582 $at_failed && at_fn_log_failure
19583 $at_traceon; }
19584
19585
19586
19587
19588 { set +x
19589 $as_echo "$at_srcdir/subproject.at:61: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options "
19590 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:61"
19591 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
19592 ) >>"$at_stdout" 2>>"$at_stderr"
19593 at_status=$? at_failed=false
19594 $at_check_filter
19595 echo stderr:; cat "$at_stderr"
19596 echo stdout:; cat "$at_stdout"
19597 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
19598 $at_failed && at_fn_log_failure
19599 $at_traceon; }
19600
19601
19602 for target in all $tst_dist
19603 do
19604   { set +x
19605 $as_echo "$at_srcdir/subproject.at:61: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19606 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:61"
19607 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19608 ) >>"$at_stdout" 2>>"$at_stderr"
19609 at_status=$? at_failed=false
19610 $at_check_filter
19611 echo stderr:; cat "$at_stderr"
19612 echo stdout:; cat "$at_stdout"
19613 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61"
19614 $at_failed && at_fn_log_failure
19615 $at_traceon; }
19616
19617 done
19618
19619
19620
19621 { set +x
19622 $as_echo "$at_srcdir/subproject.at:64: test -f sub/ltdl/libltdlc.la"
19623 at_fn_check_prepare_trace "subproject.at:64"
19624 ( $at_check_trace; test -f sub/ltdl/libltdlc.la
19625 ) >>"$at_stdout" 2>>"$at_stderr"
19626 at_status=$? at_failed=false
19627 $at_check_filter
19628 at_fn_diff_devnull "$at_stderr" || at_failed=:
19629 at_fn_diff_devnull "$at_stdout" || at_failed=:
19630 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:64"
19631 $at_failed && at_fn_log_failure
19632 $at_traceon; }
19633
19634
19635   set +x
19636   $at_times_p && times >"$at_times_file"
19637 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19638 read at_status <"$at_status_file"
19639 #AT_STOP_91
19640 #AT_START_92
19641 at_fn_group_banner 92 'subproject.at:73' \
19642   "compiling copied libltdl" "                       " 9
19643 at_xfail=no
19644       test "$ACLOCAL" = no && at_xfail=yes
19645       test "$AUTOMAKE" = no && at_xfail=yes
19646       test "$AUTOCONF" = no && at_xfail=yes
19647 (
19648   $as_echo "92. $at_setup_line: testing $at_desc ..."
19649   $at_traceon
19650
19651
19652 cat >configure.ac <<'_ATEOF'
19653 AC_INIT([subproject-demo], 2.4.2, bug-libtool@gnu.org)
19654 LT_CONFIG_LTDL_DIR([sub/ltdl])
19655 AC_CONFIG_AUX_DIR([sub/ltdl/config])
19656 AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
19657 AM_INIT_AUTOMAKE([foreign])
19658 LT_INIT
19659 LT_WITH_LTDL
19660 AC_CONFIG_FILES([Makefile])
19661 AC_OUTPUT
19662 _ATEOF
19663
19664
19665 cat >Makefile.am <<'_ATEOF'
19666 ACLOCAL_AMFLAGS = -I sub/ltdl/m4
19667 AUTOMAKE_OPTIONS = 1.9
19668 SUBDIRS = sub/ltdl
19669 lib_LTLIBRARIES = foo.la
19670 foo_la_LDFLAGS = -module -avoid-version -no-undefined
19671 _ATEOF
19672
19673
19674 echo 'int dummy = 0;' > foo.c
19675
19676
19677 $LIBTOOLIZE --copy --ltdl
19678
19679
19680 { set +x
19681 $as_echo "$at_srcdir/subproject.at:77: \$ACLOCAL -I sub/ltdl/m4"
19682 at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:77"
19683 ( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
19684 ) >>"$at_stdout" 2>>"$at_stderr"
19685 at_status=$? at_failed=false
19686 $at_check_filter
19687 echo stderr:; cat "$at_stderr"
19688 echo stdout:; cat "$at_stdout"
19689 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
19690 $at_failed && at_fn_log_failure
19691 $at_traceon; }
19692
19693
19694
19695
19696
19697 { set +x
19698 $as_echo "$at_srcdir/subproject.at:77: \$AUTOMAKE --add-missing --copy"
19699 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:77"
19700 ( $at_check_trace; $AUTOMAKE --add-missing --copy
19701 ) >>"$at_stdout" 2>>"$at_stderr"
19702 at_status=$? at_failed=false
19703 $at_check_filter
19704 echo stderr:; tee stderr <"$at_stderr"
19705 echo stdout:; cat "$at_stdout"
19706 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
19707 if $at_failed; then :
19708   { set +x
19709 $as_echo "$at_srcdir/subproject.at:77: grep 'require .*but have' stderr && (exit 77)"
19710 at_fn_check_prepare_trace "subproject.at:77"
19711 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
19712 ) >>"$at_stdout" 2>>"$at_stderr"
19713 at_status=$? at_failed=false
19714 $at_check_filter
19715 at_fn_diff_devnull "$at_stderr" || at_failed=:
19716 at_fn_diff_devnull "$at_stdout" || at_failed=:
19717 at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:77"
19718 $at_failed && at_fn_log_failure
19719 $at_traceon; }
19720
19721 fi
19722 $at_failed && at_fn_log_failure
19723 $at_traceon; }
19724
19725
19726
19727
19728 { set +x
19729 $as_echo "$at_srcdir/subproject.at:77: \$AUTOCONF "
19730 at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:77"
19731 ( $at_check_trace; $AUTOCONF
19732 ) >>"$at_stdout" 2>>"$at_stderr"
19733 at_status=$? at_failed=false
19734 $at_check_filter
19735 echo stderr:; cat "$at_stderr"
19736 echo stdout:; cat "$at_stdout"
19737 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
19738 $at_failed && at_fn_log_failure
19739 $at_traceon; }
19740
19741
19742
19743
19744 { set +x
19745 $as_echo "$at_srcdir/subproject.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options "
19746 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:77"
19747 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
19748 ) >>"$at_stdout" 2>>"$at_stderr"
19749 at_status=$? at_failed=false
19750 $at_check_filter
19751 echo stderr:; cat "$at_stderr"
19752 echo stdout:; cat "$at_stdout"
19753 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
19754 $at_failed && at_fn_log_failure
19755 $at_traceon; }
19756
19757
19758 for target in all $tst_dist
19759 do
19760   { set +x
19761 $as_echo "$at_srcdir/subproject.at:77: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19762 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:77"
19763 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19764 ) >>"$at_stdout" 2>>"$at_stderr"
19765 at_status=$? at_failed=false
19766 $at_check_filter
19767 echo stderr:; cat "$at_stderr"
19768 echo stdout:; cat "$at_stdout"
19769 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77"
19770 $at_failed && at_fn_log_failure
19771 $at_traceon; }
19772
19773 done
19774
19775
19776
19777 { set +x
19778 $as_echo "$at_srcdir/subproject.at:80: test -f sub/ltdl/libltdlc.la"
19779 at_fn_check_prepare_trace "subproject.at:80"
19780 ( $at_check_trace; test -f sub/ltdl/libltdlc.la
19781 ) >>"$at_stdout" 2>>"$at_stderr"
19782 at_status=$? at_failed=false
19783 $at_check_filter
19784 at_fn_diff_devnull "$at_stderr" || at_failed=:
19785 at_fn_diff_devnull "$at_stdout" || at_failed=:
19786 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:80"
19787 $at_failed && at_fn_log_failure
19788 $at_traceon; }
19789
19790
19791   set +x
19792   $at_times_p && times >"$at_times_file"
19793 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19794 read at_status <"$at_status_file"
19795 #AT_STOP_92
19796 #AT_START_93
19797 at_fn_group_banner 93 'subproject.at:89' \
19798   "installable libltdl" "                            " 9
19799 at_xfail=no
19800       test "$ACLOCAL" = no && at_xfail=yes
19801       test "$AUTOMAKE" = no && at_xfail=yes
19802       test "$AUTOCONF" = no && at_xfail=yes
19803 (
19804   $as_echo "93. $at_setup_line: testing $at_desc ..."
19805   $at_traceon
19806
19807
19808 prefix=`pwd`/_inst
19809
19810 cat >configure.ac <<'_ATEOF'
19811 AC_INIT([subproject-demo], 2.4.2, bug-libtool@gnu.org)
19812 LT_CONFIG_LTDL_DIR([sub/ltdl])
19813 AC_CONFIG_AUX_DIR([sub/ltdl/config])
19814 AC_CONFIG_MACRO_DIR([sub/ltdl/m4])
19815 AM_INIT_AUTOMAKE([foreign])
19816 LT_INIT
19817 LT_WITH_LTDL
19818 AC_CONFIG_FILES([Makefile])
19819 AC_OUTPUT
19820 _ATEOF
19821
19822
19823 cat >Makefile.am <<'_ATEOF'
19824 ACLOCAL_AMFLAGS = -I sub/ltdl/m4
19825 AUTOMAKE_OPTIONS = 1.9
19826 SUBDIRS = sub/ltdl
19827 lib_LTLIBRARIES = foo.la
19828 foo_la_LDFLAGS = -module -avoid-version -no-undefined
19829 _ATEOF
19830
19831
19832 echo 'int dummy = 0;' > foo.c
19833
19834
19835 $LIBTOOLIZE --copy --ltdl
19836
19837
19838 { set +x
19839 $as_echo "$at_srcdir/subproject.at:95: \$ACLOCAL -I sub/ltdl/m4"
19840 at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:95"
19841 ( $at_check_trace; $ACLOCAL -I sub/ltdl/m4
19842 ) >>"$at_stdout" 2>>"$at_stderr"
19843 at_status=$? at_failed=false
19844 $at_check_filter
19845 echo stderr:; cat "$at_stderr"
19846 echo stdout:; cat "$at_stdout"
19847 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
19848 $at_failed && at_fn_log_failure
19849 $at_traceon; }
19850
19851
19852
19853
19854
19855 { set +x
19856 $as_echo "$at_srcdir/subproject.at:95: \$AUTOMAKE --add-missing --copy"
19857 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:95"
19858 ( $at_check_trace; $AUTOMAKE --add-missing --copy
19859 ) >>"$at_stdout" 2>>"$at_stderr"
19860 at_status=$? at_failed=false
19861 $at_check_filter
19862 echo stderr:; tee stderr <"$at_stderr"
19863 echo stdout:; cat "$at_stdout"
19864 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
19865 if $at_failed; then :
19866   { set +x
19867 $as_echo "$at_srcdir/subproject.at:95: grep 'require .*but have' stderr && (exit 77)"
19868 at_fn_check_prepare_trace "subproject.at:95"
19869 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
19870 ) >>"$at_stdout" 2>>"$at_stderr"
19871 at_status=$? at_failed=false
19872 $at_check_filter
19873 at_fn_diff_devnull "$at_stderr" || at_failed=:
19874 at_fn_diff_devnull "$at_stdout" || at_failed=:
19875 at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:95"
19876 $at_failed && at_fn_log_failure
19877 $at_traceon; }
19878
19879 fi
19880 $at_failed && at_fn_log_failure
19881 $at_traceon; }
19882
19883
19884
19885
19886 { set +x
19887 $as_echo "$at_srcdir/subproject.at:95: \$AUTOCONF "
19888 at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:95"
19889 ( $at_check_trace; $AUTOCONF
19890 ) >>"$at_stdout" 2>>"$at_stderr"
19891 at_status=$? at_failed=false
19892 $at_check_filter
19893 echo stderr:; cat "$at_stderr"
19894 echo stdout:; cat "$at_stdout"
19895 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
19896 $at_failed && at_fn_log_failure
19897 $at_traceon; }
19898
19899
19900
19901
19902 { set +x
19903 $as_echo "$at_srcdir/subproject.at:95: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
19904 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:95"
19905 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
19906 ) >>"$at_stdout" 2>>"$at_stderr"
19907 at_status=$? at_failed=false
19908 $at_check_filter
19909 echo stderr:; cat "$at_stderr"
19910 echo stdout:; cat "$at_stdout"
19911 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
19912 $at_failed && at_fn_log_failure
19913 $at_traceon; }
19914
19915
19916 for target in all install $tst_dist
19917 do
19918   { set +x
19919 $as_echo "$at_srcdir/subproject.at:95: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
19920 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:95"
19921 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
19922 ) >>"$at_stdout" 2>>"$at_stderr"
19923 at_status=$? at_failed=false
19924 $at_check_filter
19925 echo stderr:; cat "$at_stderr"
19926 echo stdout:; cat "$at_stdout"
19927 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95"
19928 $at_failed && at_fn_log_failure
19929 $at_traceon; }
19930
19931 done
19932
19933
19934
19935 { set +x
19936 $as_echo "$at_srcdir/subproject.at:99: test -f \$prefix/lib/libltdl.la"
19937 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "subproject.at:99"
19938 ( $at_check_trace; test -f $prefix/lib/libltdl.la
19939 ) >>"$at_stdout" 2>>"$at_stderr"
19940 at_status=$? at_failed=false
19941 $at_check_filter
19942 at_fn_diff_devnull "$at_stderr" || at_failed=:
19943 at_fn_diff_devnull "$at_stdout" || at_failed=:
19944 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:99"
19945 $at_failed && at_fn_log_failure
19946 $at_traceon; }
19947
19948 { set +x
19949 $as_echo "$at_srcdir/subproject.at:100: test -f \$prefix/include/ltdl.h"
19950 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "subproject.at:100"
19951 ( $at_check_trace; test -f $prefix/include/ltdl.h
19952 ) >>"$at_stdout" 2>>"$at_stderr"
19953 at_status=$? at_failed=false
19954 $at_check_filter
19955 at_fn_diff_devnull "$at_stderr" || at_failed=:
19956 at_fn_diff_devnull "$at_stdout" || at_failed=:
19957 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:100"
19958 $at_failed && at_fn_log_failure
19959 $at_traceon; }
19960
19961
19962   set +x
19963   $at_times_p && times >"$at_times_file"
19964 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19965 read at_status <"$at_status_file"
19966 #AT_STOP_93
19967 #AT_START_94
19968 at_fn_group_banner 94 'subproject.at:109' \
19969   "linking libltdl without autotools" "              " 9
19970 at_xfail=no
19971 (
19972   $as_echo "94. $at_setup_line: testing $at_desc ..."
19973   $at_traceon
19974
19975
19976 cat >module.c <<'_ATEOF'
19977 #ifdef __cplusplus
19978 extern "C"
19979 #endif
19980 const char *
19981 hello (void)
19982 {
19983   return "Hello!";
19984 }
19985 _ATEOF
19986
19987
19988 cat >main.c <<'_ATEOF'
19989 #include <stdio.h>
19990 #include "ltdl.h"
19991
19992 int
19993 main ()
19994 {
19995   lt_dlhandle module;
19996   const char *(*func) (void) = 0;
19997   int status = 1;
19998
19999   LTDL_SET_PRELOADED_SYMBOLS();
20000   if (lt_dlinit() != 0) {
20001     fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
20002     return 1;
20003   }
20004
20005   module = lt_dlopen("./module.la");
20006   if (!module) {
20007     fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
20008     goto finish;
20009   }
20010
20011   func = (const char *(*)(void)) lt_dlsym (module, "hello");
20012   if (!func) {
20013     fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
20014     goto finish;
20015   }
20016
20017   printf ("%s\n", (*func) ());
20018   status = 0;
20019
20020 finish:
20021   if (lt_dlexit() != 0) {
20022     fprintf (stderr, "error during finalisation: %s\n", lt_dlerror());
20023     status = 1;
20024   }
20025
20026   return status;
20027 }
20028 _ATEOF
20029
20030
20031
20032 cat >Makefile <<'_ATEOF'
20033 top_builddir    = .
20034 LIBTOOL         = ./sub/ltdl/libtool
20035 INCLUDES        = -I./sub/ltdl
20036 MODFLAGS        = -module -avoid-version -no-undefined
20037
20038 LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \
20039         $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
20040 LTLINK    = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \
20041         $(CC) $(CFLAGS) $(LDFLAGS)
20042
20043 TARGETS         = sub/ltdl/libltdlc.la module.la ltdldemo$(EXEEXT)
20044
20045 all: $(TARGETS)
20046
20047 sub/ltdl/libltdlc.la: $(LIBTOOL) sub/ltdl/Makefile
20048         MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \
20049         cd sub/ltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \
20050           CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
20051           CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)"
20052
20053 $(LIBTOOL): sub/ltdl/Makefile
20054
20055 sub/ltdl/Makefile:
20056         cd sub/ltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS)
20057
20058 ltdldemo$(EXEEXT): $(LIBTOOL) module.la sub/ltdl/libltdlc.la main.lo
20059         $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./sub/ltdl/libltdlc.la
20060
20061 main.lo: $(LIBTOOL) main.c
20062         $(LTCOMPILE) -c main.c
20063
20064 module.la: $(LIBTOOL) module.lo
20065         $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null
20066
20067 module.lo: $(LIBTOOL) module.c
20068         $(LTCOMPILE) -c module.c
20069 _ATEOF
20070
20071 cat >> Makefile <<EOF
20072 SHELL = $SHELL
20073 EOF
20074
20075
20076
20077 $LIBTOOLIZE --copy --ltdl=sub/ltdl
20078
20079
20080 for target in all
20081 do
20082   { set +x
20083 $as_echo "$at_srcdir/subproject.at:113: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\"      CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" SHELL=\"\$SHELL\" MAKE=\"\${MAKE-make}\"      CONFIGURE_OPTIONS=\"\$configure_options\""
20084 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:113"
20085 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS"      CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" SHELL="$SHELL" MAKE="${MAKE-make}"      CONFIGURE_OPTIONS="$configure_options"
20086 ) >>"$at_stdout" 2>>"$at_stderr"
20087 at_status=$? at_failed=false
20088 $at_check_filter
20089 echo stderr:; cat "$at_stderr"
20090 echo stdout:; cat "$at_stdout"
20091 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:113"
20092 $at_failed && at_fn_log_failure
20093 $at_traceon; }
20094
20095 done
20096
20097
20098 lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
20099 { set +x
20100 $as_echo "$at_srcdir/subproject.at:117: if \"\$lt_exe\" ; then :; else lt_status=\$?;      test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
20101 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "subproject.at:117"
20102 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
20103 ) >>"$at_stdout" 2>>"$at_stderr"
20104 at_status=$? at_failed=false
20105 $at_check_filter
20106 at_fn_diff_devnull "$at_stderr" || at_failed=:
20107 echo stdout:; cat "$at_stdout"
20108 at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:117"
20109 $at_failed && at_fn_log_failure
20110 $at_traceon; }
20111
20112
20113
20114   set +x
20115   $at_times_p && times >"$at_times_file"
20116 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20117 read at_status <"$at_status_file"
20118 #AT_STOP_94
20119 #AT_START_95
20120 at_fn_group_banner 95 'nonrecursive.at:78' \
20121   "compiling softlinked libltdl" "                   " 10
20122 at_xfail=no
20123       test "$ACLOCAL" = no && at_xfail=yes
20124       test "$AUTOHEADER" = no && at_xfail=yes
20125       test "$AUTOMAKE" = no && at_xfail=yes
20126       test "$AUTOCONF" = no && at_xfail=yes
20127 (
20128   $as_echo "95. $at_setup_line: testing $at_desc ..."
20129   $at_traceon
20130
20131
20132 cat >configure.ac <<'_ATEOF'
20133 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
20134 LT_CONFIG_LTDL_DIR([ltdl])
20135 AC_CONFIG_AUX_DIR([ltdl/config])
20136 AC_CONFIG_MACRO_DIR([ltdl/m4])
20137 AC_CONFIG_LIBOBJ_DIR([ltdl])
20138 AC_CONFIG_HEADERS([config.h:config.hin])
20139 AM_INIT_AUTOMAKE([foreign subdir-objects])
20140 AC_PROG_CC
20141 AM_PROG_CC_C_O
20142 LT_INIT
20143 LTDL_INIT([nonrecursive])
20144 AC_CONFIG_FILES([Makefile])
20145 AC_OUTPUT
20146 _ATEOF
20147
20148
20149 cat >Makefile.am <<'_ATEOF'
20150 ACLOCAL_AMFLAGS = -I ltdl/m4
20151 AUTOMAKE_OPTIONS        = 1.9.6
20152 BUILT_SOURCES           =
20153
20154 AM_CPPFLAGS             =
20155 AM_LDFLAGS              =
20156
20157 include_HEADERS         =
20158 noinst_LTLIBRARIES      =
20159 lib_LTLIBRARIES         = foo.la
20160 EXTRA_LTLIBRARIES       =
20161
20162 EXTRA_DIST              =
20163
20164 CLEANFILES              =
20165 MOSTLYCLEANFILES        =
20166
20167 include ltdl/Makefile.inc
20168
20169 foo_la_LDFLAGS          = -module -avoid-version -no-undefined
20170 foo_la_SOURCES          = foo.c
20171 _ATEOF
20172
20173
20174 echo 'int dummy = 0;' > foo.c
20175
20176
20177 $LIBTOOLIZE --ltdl
20178
20179
20180 { set +x
20181 $as_echo "$at_srcdir/nonrecursive.at:83: if test -f ltdl/configure.ac; then false; fi"
20182 at_fn_check_prepare_trace "nonrecursive.at:83"
20183 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
20184 ) >>"$at_stdout" 2>>"$at_stderr"
20185 at_status=$? at_failed=false
20186 $at_check_filter
20187 at_fn_diff_devnull "$at_stderr" || at_failed=:
20188 at_fn_diff_devnull "$at_stdout" || at_failed=:
20189 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:83"
20190 $at_failed && at_fn_log_failure
20191 $at_traceon; }
20192
20193
20194 # Support vanilla autoconf-2.59 & automake-1.9.6
20195 for file in argz.c lt__dirent.c lt__strl.c; do
20196   cp ltdl/$file $file
20197 done
20198
20199
20200 { set +x
20201 $as_echo "$at_srcdir/nonrecursive.at:90: \$ACLOCAL -I ltdl/m4"
20202 at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:90"
20203 ( $at_check_trace; $ACLOCAL -I ltdl/m4
20204 ) >>"$at_stdout" 2>>"$at_stderr"
20205 at_status=$? at_failed=false
20206 $at_check_filter
20207 echo stderr:; cat "$at_stderr"
20208 echo stdout:; cat "$at_stdout"
20209 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20210 $at_failed && at_fn_log_failure
20211 $at_traceon; }
20212
20213
20214
20215
20216 { set +x
20217 $as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOHEADER "
20218 at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:90"
20219 ( $at_check_trace; $AUTOHEADER
20220 ) >>"$at_stdout" 2>>"$at_stderr"
20221 at_status=$? at_failed=false
20222 $at_check_filter
20223 echo stderr:; cat "$at_stderr"
20224 echo stdout:; cat "$at_stdout"
20225 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20226 $at_failed && at_fn_log_failure
20227 $at_traceon; }
20228
20229
20230
20231
20232 { set +x
20233 $as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOMAKE --add-missing --copy"
20234 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:90"
20235 ( $at_check_trace; $AUTOMAKE --add-missing --copy
20236 ) >>"$at_stdout" 2>>"$at_stderr"
20237 at_status=$? at_failed=false
20238 $at_check_filter
20239 echo stderr:; tee stderr <"$at_stderr"
20240 echo stdout:; cat "$at_stdout"
20241 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20242 if $at_failed; then :
20243   { set +x
20244 $as_echo "$at_srcdir/nonrecursive.at:90: grep 'require .*but have' stderr && (exit 77)"
20245 at_fn_check_prepare_trace "nonrecursive.at:90"
20246 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
20247 ) >>"$at_stdout" 2>>"$at_stderr"
20248 at_status=$? at_failed=false
20249 $at_check_filter
20250 at_fn_diff_devnull "$at_stderr" || at_failed=:
20251 at_fn_diff_devnull "$at_stdout" || at_failed=:
20252 at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:90"
20253 $at_failed && at_fn_log_failure
20254 $at_traceon; }
20255
20256 fi
20257 $at_failed && at_fn_log_failure
20258 $at_traceon; }
20259
20260
20261
20262
20263 { set +x
20264 $as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOCONF "
20265 at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:90"
20266 ( $at_check_trace; $AUTOCONF
20267 ) >>"$at_stdout" 2>>"$at_stderr"
20268 at_status=$? at_failed=false
20269 $at_check_filter
20270 echo stderr:; cat "$at_stderr"
20271 echo stdout:; cat "$at_stdout"
20272 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20273 $at_failed && at_fn_log_failure
20274 $at_traceon; }
20275
20276
20277
20278
20279 { set +x
20280 $as_echo "$at_srcdir/nonrecursive.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;         \$CONFIG_SHELL ./configure \$configure_options "
20281 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:90"
20282 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
20283 ) >>"$at_stdout" 2>>"$at_stderr"
20284 at_status=$? at_failed=false
20285 $at_check_filter
20286 echo stderr:; cat "$at_stderr"
20287 echo stdout:; cat "$at_stdout"
20288 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20289 $at_failed && at_fn_log_failure
20290 $at_traceon; }
20291
20292
20293 for target in all $tst_dist
20294 do
20295   { set +x
20296 $as_echo "$at_srcdir/nonrecursive.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
20297 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:90"
20298 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
20299 ) >>"$at_stdout" 2>>"$at_stderr"
20300 at_status=$? at_failed=false
20301 $at_check_filter
20302 echo stderr:; cat "$at_stderr"
20303 echo stdout:; cat "$at_stdout"
20304 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90"
20305 $at_failed && at_fn_log_failure
20306 $at_traceon; }
20307
20308 done
20309
20310
20311
20312 { set +x
20313 $as_echo "$at_srcdir/nonrecursive.at:93: test -f ltdl/libltdlc.la"
20314 at_fn_check_prepare_trace "nonrecursive.at:93"
20315 ( $at_check_trace; test -f ltdl/libltdlc.la
20316 ) >>"$at_stdout" 2>>"$at_stderr"
20317 at_status=$? at_failed=false
20318 $at_check_filter
20319 at_fn_diff_devnull "$at_stderr" || at_failed=:
20320 at_fn_diff_devnull "$at_stdout" || at_failed=:
20321 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:93"
20322 $at_failed && at_fn_log_failure
20323 $at_traceon; }
20324
20325
20326   set +x
20327   $at_times_p && times >"$at_times_file"
20328 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20329 read at_status <"$at_status_file"
20330 #AT_STOP_95
20331 #AT_START_96
20332 at_fn_group_banner 96 'nonrecursive.at:102' \
20333   "compiling copied libltdl" "                       " 10
20334 at_xfail=no
20335       test "$ACLOCAL" = no && at_xfail=yes
20336       test "$AUTOHEADER" = no && at_xfail=yes
20337       test "$AUTOMAKE" = no && at_xfail=yes
20338       test "$AUTOCONF" = no && at_xfail=yes
20339 (
20340   $as_echo "96. $at_setup_line: testing $at_desc ..."
20341   $at_traceon
20342
20343
20344 cat >configure.ac <<'_ATEOF'
20345 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
20346 LT_CONFIG_LTDL_DIR([ltdl])
20347 AC_CONFIG_AUX_DIR([ltdl/config])
20348 AC_CONFIG_MACRO_DIR([ltdl/m4])
20349 AC_CONFIG_LIBOBJ_DIR([ltdl])
20350 AC_CONFIG_HEADERS([config.h:config.hin])
20351 AM_INIT_AUTOMAKE([foreign subdir-objects])
20352 AC_PROG_CC
20353 AM_PROG_CC_C_O
20354 LT_INIT
20355 LTDL_INIT([nonrecursive])
20356 AC_CONFIG_FILES([Makefile])
20357 AC_OUTPUT
20358 _ATEOF
20359
20360
20361 cat >Makefile.am <<'_ATEOF'
20362 ACLOCAL_AMFLAGS = -I ltdl/m4
20363 AUTOMAKE_OPTIONS        = 1.9.6
20364 BUILT_SOURCES           =
20365
20366 AM_CPPFLAGS             =
20367 AM_LDFLAGS              =
20368
20369 include_HEADERS         =
20370 noinst_LTLIBRARIES      =
20371 lib_LTLIBRARIES         = foo.la
20372 EXTRA_LTLIBRARIES       =
20373
20374 EXTRA_DIST              =
20375
20376 CLEANFILES              =
20377 MOSTLYCLEANFILES        =
20378
20379 include ltdl/Makefile.inc
20380
20381 foo_la_LDFLAGS          = -module -avoid-version -no-undefined
20382 foo_la_SOURCES          = foo.c
20383 _ATEOF
20384
20385
20386 echo 'int dummy = 0;' > foo.c
20387
20388
20389 $LIBTOOLIZE --copy --ltdl
20390
20391
20392 { set +x
20393 $as_echo "$at_srcdir/nonrecursive.at:107: if test -f ltdl/configure.ac; then false; fi"
20394 at_fn_check_prepare_trace "nonrecursive.at:107"
20395 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
20396 ) >>"$at_stdout" 2>>"$at_stderr"
20397 at_status=$? at_failed=false
20398 $at_check_filter
20399 at_fn_diff_devnull "$at_stderr" || at_failed=:
20400 at_fn_diff_devnull "$at_stdout" || at_failed=:
20401 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:107"
20402 $at_failed && at_fn_log_failure
20403 $at_traceon; }
20404
20405
20406 # Support vanilla autoconf-2.59 & automake-1.9.6
20407 for file in argz.c lt__dirent.c lt__strl.c; do
20408   cp ltdl/$file $file
20409 done
20410
20411
20412 { set +x
20413 $as_echo "$at_srcdir/nonrecursive.at:114: \$ACLOCAL -I ltdl/m4"
20414 at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:114"
20415 ( $at_check_trace; $ACLOCAL -I ltdl/m4
20416 ) >>"$at_stdout" 2>>"$at_stderr"
20417 at_status=$? at_failed=false
20418 $at_check_filter
20419 echo stderr:; cat "$at_stderr"
20420 echo stdout:; cat "$at_stdout"
20421 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20422 $at_failed && at_fn_log_failure
20423 $at_traceon; }
20424
20425
20426
20427
20428 { set +x
20429 $as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOHEADER "
20430 at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:114"
20431 ( $at_check_trace; $AUTOHEADER
20432 ) >>"$at_stdout" 2>>"$at_stderr"
20433 at_status=$? at_failed=false
20434 $at_check_filter
20435 echo stderr:; cat "$at_stderr"
20436 echo stdout:; cat "$at_stdout"
20437 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20438 $at_failed && at_fn_log_failure
20439 $at_traceon; }
20440
20441
20442
20443
20444 { set +x
20445 $as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOMAKE --add-missing --copy"
20446 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:114"
20447 ( $at_check_trace; $AUTOMAKE --add-missing --copy
20448 ) >>"$at_stdout" 2>>"$at_stderr"
20449 at_status=$? at_failed=false
20450 $at_check_filter
20451 echo stderr:; tee stderr <"$at_stderr"
20452 echo stdout:; cat "$at_stdout"
20453 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20454 if $at_failed; then :
20455   { set +x
20456 $as_echo "$at_srcdir/nonrecursive.at:114: grep 'require .*but have' stderr && (exit 77)"
20457 at_fn_check_prepare_trace "nonrecursive.at:114"
20458 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
20459 ) >>"$at_stdout" 2>>"$at_stderr"
20460 at_status=$? at_failed=false
20461 $at_check_filter
20462 at_fn_diff_devnull "$at_stderr" || at_failed=:
20463 at_fn_diff_devnull "$at_stdout" || at_failed=:
20464 at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:114"
20465 $at_failed && at_fn_log_failure
20466 $at_traceon; }
20467
20468 fi
20469 $at_failed && at_fn_log_failure
20470 $at_traceon; }
20471
20472
20473
20474
20475 { set +x
20476 $as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOCONF "
20477 at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:114"
20478 ( $at_check_trace; $AUTOCONF
20479 ) >>"$at_stdout" 2>>"$at_stderr"
20480 at_status=$? at_failed=false
20481 $at_check_filter
20482 echo stderr:; cat "$at_stderr"
20483 echo stdout:; cat "$at_stdout"
20484 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20485 $at_failed && at_fn_log_failure
20486 $at_traceon; }
20487
20488
20489
20490
20491 { set +x
20492 $as_echo "$at_srcdir/nonrecursive.at:114: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        \$CONFIG_SHELL ./configure \$configure_options "
20493 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:114"
20494 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
20495 ) >>"$at_stdout" 2>>"$at_stderr"
20496 at_status=$? at_failed=false
20497 $at_check_filter
20498 echo stderr:; cat "$at_stderr"
20499 echo stdout:; cat "$at_stdout"
20500 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20501 $at_failed && at_fn_log_failure
20502 $at_traceon; }
20503
20504
20505 for target in all $tst_dist
20506 do
20507   { set +x
20508 $as_echo "$at_srcdir/nonrecursive.at:114: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
20509 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:114"
20510 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
20511 ) >>"$at_stdout" 2>>"$at_stderr"
20512 at_status=$? at_failed=false
20513 $at_check_filter
20514 echo stderr:; cat "$at_stderr"
20515 echo stdout:; cat "$at_stdout"
20516 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114"
20517 $at_failed && at_fn_log_failure
20518 $at_traceon; }
20519
20520 done
20521
20522
20523
20524 { set +x
20525 $as_echo "$at_srcdir/nonrecursive.at:117: test -f ltdl/libltdlc.la"
20526 at_fn_check_prepare_trace "nonrecursive.at:117"
20527 ( $at_check_trace; test -f ltdl/libltdlc.la
20528 ) >>"$at_stdout" 2>>"$at_stderr"
20529 at_status=$? at_failed=false
20530 $at_check_filter
20531 at_fn_diff_devnull "$at_stderr" || at_failed=:
20532 at_fn_diff_devnull "$at_stdout" || at_failed=:
20533 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:117"
20534 $at_failed && at_fn_log_failure
20535 $at_traceon; }
20536
20537
20538   set +x
20539   $at_times_p && times >"$at_times_file"
20540 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20541 read at_status <"$at_status_file"
20542 #AT_STOP_96
20543 #AT_START_97
20544 at_fn_group_banner 97 'nonrecursive.at:126' \
20545   "installable libltdl" "                            " 10
20546 at_xfail=no
20547       test "$ACLOCAL" = no && at_xfail=yes
20548       test "$AUTOHEADER" = no && at_xfail=yes
20549       test "$AUTOMAKE" = no && at_xfail=yes
20550       test "$AUTOCONF" = no && at_xfail=yes
20551 (
20552   $as_echo "97. $at_setup_line: testing $at_desc ..."
20553   $at_traceon
20554
20555
20556 cat >configure.ac <<'_ATEOF'
20557 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
20558 LT_CONFIG_LTDL_DIR([ltdl])
20559 AC_CONFIG_AUX_DIR([ltdl/config])
20560 AC_CONFIG_MACRO_DIR([ltdl/m4])
20561 AC_CONFIG_LIBOBJ_DIR([ltdl])
20562 AC_CONFIG_HEADERS([config.h:config.hin])
20563 AM_INIT_AUTOMAKE([foreign subdir-objects])
20564 AC_PROG_CC
20565 AM_PROG_CC_C_O
20566 LT_INIT
20567 LTDL_INIT([nonrecursive])
20568 AC_CONFIG_FILES([Makefile])
20569 AC_OUTPUT
20570 _ATEOF
20571
20572
20573 cat >Makefile.am <<'_ATEOF'
20574 ACLOCAL_AMFLAGS = -I ltdl/m4
20575 AUTOMAKE_OPTIONS        = 1.9.6
20576 BUILT_SOURCES           =
20577
20578 AM_CPPFLAGS             =
20579 AM_LDFLAGS              =
20580
20581 include_HEADERS         =
20582 noinst_LTLIBRARIES      =
20583 lib_LTLIBRARIES         = foo.la
20584 EXTRA_LTLIBRARIES       =
20585
20586 EXTRA_DIST              =
20587
20588 CLEANFILES              =
20589 MOSTLYCLEANFILES        =
20590
20591 include ltdl/Makefile.inc
20592
20593 foo_la_LDFLAGS          = -module -avoid-version -no-undefined
20594 foo_la_SOURCES          = foo.c
20595 _ATEOF
20596
20597
20598 echo 'int dummy = 0;' > foo.c
20599
20600
20601 prefix=`pwd`/_inst
20602
20603 $LIBTOOLIZE --copy --ltdl
20604
20605
20606 { set +x
20607 $as_echo "$at_srcdir/nonrecursive.at:133: if test -f ltdl/configure.ac; then false; fi"
20608 at_fn_check_prepare_trace "nonrecursive.at:133"
20609 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
20610 ) >>"$at_stdout" 2>>"$at_stderr"
20611 at_status=$? at_failed=false
20612 $at_check_filter
20613 at_fn_diff_devnull "$at_stderr" || at_failed=:
20614 at_fn_diff_devnull "$at_stdout" || at_failed=:
20615 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:133"
20616 $at_failed && at_fn_log_failure
20617 $at_traceon; }
20618
20619
20620 # Support vanilla autoconf-2.59 & automake-1.9.6
20621 for file in argz.c lt__dirent.c lt__strl.c; do
20622   cp ltdl/$file $file
20623 done
20624
20625
20626 { set +x
20627 $as_echo "$at_srcdir/nonrecursive.at:140: \$ACLOCAL -I ltdl/m4"
20628 at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:140"
20629 ( $at_check_trace; $ACLOCAL -I ltdl/m4
20630 ) >>"$at_stdout" 2>>"$at_stderr"
20631 at_status=$? at_failed=false
20632 $at_check_filter
20633 echo stderr:; cat "$at_stderr"
20634 echo stdout:; cat "$at_stdout"
20635 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20636 $at_failed && at_fn_log_failure
20637 $at_traceon; }
20638
20639
20640
20641
20642 { set +x
20643 $as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOHEADER "
20644 at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:140"
20645 ( $at_check_trace; $AUTOHEADER
20646 ) >>"$at_stdout" 2>>"$at_stderr"
20647 at_status=$? at_failed=false
20648 $at_check_filter
20649 echo stderr:; cat "$at_stderr"
20650 echo stdout:; cat "$at_stdout"
20651 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20652 $at_failed && at_fn_log_failure
20653 $at_traceon; }
20654
20655
20656
20657
20658 { set +x
20659 $as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOMAKE --add-missing --copy"
20660 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:140"
20661 ( $at_check_trace; $AUTOMAKE --add-missing --copy
20662 ) >>"$at_stdout" 2>>"$at_stderr"
20663 at_status=$? at_failed=false
20664 $at_check_filter
20665 echo stderr:; tee stderr <"$at_stderr"
20666 echo stdout:; cat "$at_stdout"
20667 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20668 if $at_failed; then :
20669   { set +x
20670 $as_echo "$at_srcdir/nonrecursive.at:140: grep 'require .*but have' stderr && (exit 77)"
20671 at_fn_check_prepare_trace "nonrecursive.at:140"
20672 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
20673 ) >>"$at_stdout" 2>>"$at_stderr"
20674 at_status=$? at_failed=false
20675 $at_check_filter
20676 at_fn_diff_devnull "$at_stderr" || at_failed=:
20677 at_fn_diff_devnull "$at_stdout" || at_failed=:
20678 at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:140"
20679 $at_failed && at_fn_log_failure
20680 $at_traceon; }
20681
20682 fi
20683 $at_failed && at_fn_log_failure
20684 $at_traceon; }
20685
20686
20687
20688
20689 { set +x
20690 $as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOCONF "
20691 at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:140"
20692 ( $at_check_trace; $AUTOCONF
20693 ) >>"$at_stdout" 2>>"$at_stderr"
20694 at_status=$? at_failed=false
20695 $at_check_filter
20696 echo stderr:; cat "$at_stderr"
20697 echo stdout:; cat "$at_stdout"
20698 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20699 $at_failed && at_fn_log_failure
20700 $at_traceon; }
20701
20702
20703
20704
20705 { set +x
20706 $as_echo "$at_srcdir/nonrecursive.at:140: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
20707 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:140"
20708 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
20709 ) >>"$at_stdout" 2>>"$at_stderr"
20710 at_status=$? at_failed=false
20711 $at_check_filter
20712 echo stderr:; cat "$at_stderr"
20713 echo stdout:; cat "$at_stdout"
20714 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20715 $at_failed && at_fn_log_failure
20716 $at_traceon; }
20717
20718
20719 for target in all install $tst_dist
20720 do
20721   { set +x
20722 $as_echo "$at_srcdir/nonrecursive.at:140: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
20723 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:140"
20724 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
20725 ) >>"$at_stdout" 2>>"$at_stderr"
20726 at_status=$? at_failed=false
20727 $at_check_filter
20728 echo stderr:; cat "$at_stderr"
20729 echo stdout:; cat "$at_stdout"
20730 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140"
20731 $at_failed && at_fn_log_failure
20732 $at_traceon; }
20733
20734 done
20735
20736
20737
20738 { set +x
20739 $as_echo "$at_srcdir/nonrecursive.at:143: test -f \$prefix/lib/libltdl.la"
20740 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "nonrecursive.at:143"
20741 ( $at_check_trace; test -f $prefix/lib/libltdl.la
20742 ) >>"$at_stdout" 2>>"$at_stderr"
20743 at_status=$? at_failed=false
20744 $at_check_filter
20745 at_fn_diff_devnull "$at_stderr" || at_failed=:
20746 at_fn_diff_devnull "$at_stdout" || at_failed=:
20747 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:143"
20748 $at_failed && at_fn_log_failure
20749 $at_traceon; }
20750
20751 { set +x
20752 $as_echo "$at_srcdir/nonrecursive.at:144: test -f \$prefix/include/ltdl.h"
20753 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "nonrecursive.at:144"
20754 ( $at_check_trace; test -f $prefix/include/ltdl.h
20755 ) >>"$at_stdout" 2>>"$at_stderr"
20756 at_status=$? at_failed=false
20757 $at_check_filter
20758 at_fn_diff_devnull "$at_stderr" || at_failed=:
20759 at_fn_diff_devnull "$at_stdout" || at_failed=:
20760 at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:144"
20761 $at_failed && at_fn_log_failure
20762 $at_traceon; }
20763
20764
20765   set +x
20766   $at_times_p && times >"$at_times_file"
20767 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20768 read at_status <"$at_status_file"
20769 #AT_STOP_97
20770 #AT_START_98
20771 at_fn_group_banner 98 'recursive.at:60' \
20772   "compiling softlinked libltdl" "                   " 11
20773 at_xfail=no
20774       case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
20775 (
20776   $as_echo "98. $at_setup_line: testing $at_desc ..."
20777   $at_traceon
20778
20779
20780 cat >configure.ac <<'_ATEOF'
20781 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
20782 LT_CONFIG_LTDL_DIR([ltdl])
20783 AC_CONFIG_AUX_DIR([ltdl/config])
20784 AC_CONFIG_MACRO_DIR([ltdl/m4])
20785 AC_CONFIG_LIBOBJ_DIR([ltdl])
20786 AC_CONFIG_HEADERS([config.h:config.hin])
20787 AM_INIT_AUTOMAKE([foreign])
20788 LT_INIT
20789 LTDL_INIT([recursive])
20790 AC_CONFIG_FILES([Makefile ltdl/Makefile])
20791 AC_OUTPUT
20792 _ATEOF
20793
20794
20795 cat >Makefile.am <<'_ATEOF'
20796 ACLOCAL_AMFLAGS = -I ltdl/m4
20797 AUTOMAKE_OPTIONS = 1.7
20798 SUBDIRS = ltdl
20799 lib_LTLIBRARIES = foo.la
20800 foo_la_LDFLAGS = -module -avoid-version -no-undefined
20801 foo_la_SOURCES = foo.c
20802 _ATEOF
20803
20804
20805 echo 'int dummy = 0;' > foo.c
20806
20807
20808 $LIBTOOLIZE --ltdl
20809
20810
20811 { set +x
20812 $as_echo "$at_srcdir/recursive.at:65: if test -f ltdl/configure.ac; then false; fi"
20813 at_fn_check_prepare_trace "recursive.at:65"
20814 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
20815 ) >>"$at_stdout" 2>>"$at_stderr"
20816 at_status=$? at_failed=false
20817 $at_check_filter
20818 at_fn_diff_devnull "$at_stderr" || at_failed=:
20819 at_fn_diff_devnull "$at_stdout" || at_failed=:
20820 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:65"
20821 $at_failed && at_fn_log_failure
20822 $at_traceon; }
20823
20824
20825 { set +x
20826 $as_echo "$at_srcdir/recursive.at:67: \$AUTORECONF --force --verbose --install"
20827 at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:67"
20828 ( $at_check_trace; $AUTORECONF --force --verbose --install
20829 ) >>"$at_stdout" 2>>"$at_stderr"
20830 at_status=$? at_failed=false
20831 $at_check_filter
20832 echo stderr:; tee stderr <"$at_stderr"
20833 echo stdout:; cat "$at_stdout"
20834 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:67"
20835 if $at_failed; then :
20836   { set +x
20837 $as_echo "$at_srcdir/recursive.at:67: grep 'require .*but have' stderr && (exit 77)"
20838 at_fn_check_prepare_trace "recursive.at:67"
20839 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
20840 ) >>"$at_stdout" 2>>"$at_stderr"
20841 at_status=$? at_failed=false
20842 $at_check_filter
20843 at_fn_diff_devnull "$at_stderr" || at_failed=:
20844 at_fn_diff_devnull "$at_stdout" || at_failed=:
20845 at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:67"
20846 $at_failed && at_fn_log_failure
20847 $at_traceon; }
20848
20849 fi
20850 $at_failed && at_fn_log_failure
20851 $at_traceon; }
20852
20853
20854
20855
20856 { set +x
20857 $as_echo "$at_srcdir/recursive.at:68: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;    \$CONFIG_SHELL ./configure \$configure_options "
20858 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:68"
20859 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
20860 ) >>"$at_stdout" 2>>"$at_stderr"
20861 at_status=$? at_failed=false
20862 $at_check_filter
20863 echo stderr:; cat "$at_stderr"
20864 echo stdout:; cat "$at_stdout"
20865 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:68"
20866 $at_failed && at_fn_log_failure
20867 $at_traceon; }
20868
20869
20870 for target in all $tst_dist
20871 do
20872   { set +x
20873 $as_echo "$at_srcdir/recursive.at:69: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
20874 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:69"
20875 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
20876 ) >>"$at_stdout" 2>>"$at_stderr"
20877 at_status=$? at_failed=false
20878 $at_check_filter
20879 echo stderr:; cat "$at_stderr"
20880 echo stdout:; cat "$at_stdout"
20881 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:69"
20882 $at_failed && at_fn_log_failure
20883 $at_traceon; }
20884
20885 done
20886
20887
20888 { set +x
20889 $as_echo "$at_srcdir/recursive.at:71: test -f ltdl/libltdlc.la"
20890 at_fn_check_prepare_trace "recursive.at:71"
20891 ( $at_check_trace; test -f ltdl/libltdlc.la
20892 ) >>"$at_stdout" 2>>"$at_stderr"
20893 at_status=$? at_failed=false
20894 $at_check_filter
20895 at_fn_diff_devnull "$at_stderr" || at_failed=:
20896 at_fn_diff_devnull "$at_stdout" || at_failed=:
20897 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:71"
20898 $at_failed && at_fn_log_failure
20899 $at_traceon; }
20900
20901
20902   set +x
20903   $at_times_p && times >"$at_times_file"
20904 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20905 read at_status <"$at_status_file"
20906 #AT_STOP_98
20907 #AT_START_99
20908 at_fn_group_banner 99 'recursive.at:80' \
20909   "compiling copied libltdl" "                       " 11
20910 at_xfail=no
20911       case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
20912 (
20913   $as_echo "99. $at_setup_line: testing $at_desc ..."
20914   $at_traceon
20915
20916
20917 cat >configure.ac <<'_ATEOF'
20918 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
20919 LT_CONFIG_LTDL_DIR([ltdl])
20920 AC_CONFIG_AUX_DIR([ltdl/config])
20921 AC_CONFIG_MACRO_DIR([ltdl/m4])
20922 AC_CONFIG_LIBOBJ_DIR([ltdl])
20923 AC_CONFIG_HEADERS([config.h:config.hin])
20924 AM_INIT_AUTOMAKE([foreign])
20925 LT_INIT
20926 LTDL_INIT([recursive])
20927 AC_CONFIG_FILES([Makefile ltdl/Makefile])
20928 AC_OUTPUT
20929 _ATEOF
20930
20931
20932 cat >Makefile.am <<'_ATEOF'
20933 ACLOCAL_AMFLAGS = -I ltdl/m4
20934 AUTOMAKE_OPTIONS = 1.7
20935 SUBDIRS = ltdl
20936 lib_LTLIBRARIES = foo.la
20937 foo_la_LDFLAGS = -module -avoid-version -no-undefined
20938 foo_la_SOURCES = foo.c
20939 _ATEOF
20940
20941
20942 echo 'int dummy = 0;' > foo.c
20943
20944
20945 $LIBTOOLIZE --copy --ltdl
20946
20947
20948 { set +x
20949 $as_echo "$at_srcdir/recursive.at:85: if test -f ltdl/configure.ac; then false; fi"
20950 at_fn_check_prepare_trace "recursive.at:85"
20951 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
20952 ) >>"$at_stdout" 2>>"$at_stderr"
20953 at_status=$? at_failed=false
20954 $at_check_filter
20955 at_fn_diff_devnull "$at_stderr" || at_failed=:
20956 at_fn_diff_devnull "$at_stdout" || at_failed=:
20957 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:85"
20958 $at_failed && at_fn_log_failure
20959 $at_traceon; }
20960
20961
20962 { set +x
20963 $as_echo "$at_srcdir/recursive.at:87: \$AUTORECONF --force --verbose --install"
20964 at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:87"
20965 ( $at_check_trace; $AUTORECONF --force --verbose --install
20966 ) >>"$at_stdout" 2>>"$at_stderr"
20967 at_status=$? at_failed=false
20968 $at_check_filter
20969 echo stderr:; tee stderr <"$at_stderr"
20970 echo stdout:; cat "$at_stdout"
20971 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:87"
20972 if $at_failed; then :
20973   { set +x
20974 $as_echo "$at_srcdir/recursive.at:87: grep 'require .*but have' stderr && (exit 77)"
20975 at_fn_check_prepare_trace "recursive.at:87"
20976 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
20977 ) >>"$at_stdout" 2>>"$at_stderr"
20978 at_status=$? at_failed=false
20979 $at_check_filter
20980 at_fn_diff_devnull "$at_stderr" || at_failed=:
20981 at_fn_diff_devnull "$at_stdout" || at_failed=:
20982 at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:87"
20983 $at_failed && at_fn_log_failure
20984 $at_traceon; }
20985
20986 fi
20987 $at_failed && at_fn_log_failure
20988 $at_traceon; }
20989
20990
20991
20992
20993 { set +x
20994 $as_echo "$at_srcdir/recursive.at:88: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;    \$CONFIG_SHELL ./configure \$configure_options "
20995 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:88"
20996 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
20997 ) >>"$at_stdout" 2>>"$at_stderr"
20998 at_status=$? at_failed=false
20999 $at_check_filter
21000 echo stderr:; cat "$at_stderr"
21001 echo stdout:; cat "$at_stdout"
21002 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:88"
21003 $at_failed && at_fn_log_failure
21004 $at_traceon; }
21005
21006
21007 for target in all $tst_dist
21008 do
21009   { set +x
21010 $as_echo "$at_srcdir/recursive.at:89: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
21011 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:89"
21012 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
21013 ) >>"$at_stdout" 2>>"$at_stderr"
21014 at_status=$? at_failed=false
21015 $at_check_filter
21016 echo stderr:; cat "$at_stderr"
21017 echo stdout:; cat "$at_stdout"
21018 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:89"
21019 $at_failed && at_fn_log_failure
21020 $at_traceon; }
21021
21022 done
21023
21024
21025 { set +x
21026 $as_echo "$at_srcdir/recursive.at:91: test -f ltdl/libltdlc.la"
21027 at_fn_check_prepare_trace "recursive.at:91"
21028 ( $at_check_trace; test -f ltdl/libltdlc.la
21029 ) >>"$at_stdout" 2>>"$at_stderr"
21030 at_status=$? at_failed=false
21031 $at_check_filter
21032 at_fn_diff_devnull "$at_stderr" || at_failed=:
21033 at_fn_diff_devnull "$at_stdout" || at_failed=:
21034 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:91"
21035 $at_failed && at_fn_log_failure
21036 $at_traceon; }
21037
21038
21039   set +x
21040   $at_times_p && times >"$at_times_file"
21041 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21042 read at_status <"$at_status_file"
21043 #AT_STOP_99
21044 #AT_START_100
21045 at_fn_group_banner 100 'recursive.at:100' \
21046   "installable libltdl" "                            " 11
21047 at_xfail=no
21048       case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
21049 (
21050   $as_echo "100. $at_setup_line: testing $at_desc ..."
21051   $at_traceon
21052
21053
21054 cat >configure.ac <<'_ATEOF'
21055 AC_INIT([subdirectory-demo], 2.4.2, bug-libtool@gnu.org)
21056 LT_CONFIG_LTDL_DIR([ltdl])
21057 AC_CONFIG_AUX_DIR([ltdl/config])
21058 AC_CONFIG_MACRO_DIR([ltdl/m4])
21059 AC_CONFIG_LIBOBJ_DIR([ltdl])
21060 AC_CONFIG_HEADERS([config.h:config.hin])
21061 AM_INIT_AUTOMAKE([foreign])
21062 LT_INIT
21063 LTDL_INIT([recursive])
21064 AC_CONFIG_FILES([Makefile ltdl/Makefile])
21065 AC_OUTPUT
21066 _ATEOF
21067
21068
21069 cat >Makefile.am <<'_ATEOF'
21070 ACLOCAL_AMFLAGS = -I ltdl/m4
21071 AUTOMAKE_OPTIONS = 1.7
21072 SUBDIRS = ltdl
21073 lib_LTLIBRARIES = foo.la
21074 foo_la_LDFLAGS = -module -avoid-version -no-undefined
21075 foo_la_SOURCES = foo.c
21076 _ATEOF
21077
21078
21079 echo 'int dummy = 0;' > foo.c
21080
21081
21082 prefix=`pwd`/_inst
21083
21084 $LIBTOOLIZE --copy --ltdl
21085
21086
21087 { set +x
21088 $as_echo "$at_srcdir/recursive.at:107: if test -f ltdl/configure.ac; then false; fi"
21089 at_fn_check_prepare_trace "recursive.at:107"
21090 ( $at_check_trace; if test -f ltdl/configure.ac; then false; fi
21091 ) >>"$at_stdout" 2>>"$at_stderr"
21092 at_status=$? at_failed=false
21093 $at_check_filter
21094 at_fn_diff_devnull "$at_stderr" || at_failed=:
21095 at_fn_diff_devnull "$at_stdout" || at_failed=:
21096 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:107"
21097 $at_failed && at_fn_log_failure
21098 $at_traceon; }
21099
21100
21101 { set +x
21102 $as_echo "$at_srcdir/recursive.at:109: \$AUTORECONF --force --verbose --install"
21103 at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:109"
21104 ( $at_check_trace; $AUTORECONF --force --verbose --install
21105 ) >>"$at_stdout" 2>>"$at_stderr"
21106 at_status=$? at_failed=false
21107 $at_check_filter
21108 echo stderr:; tee stderr <"$at_stderr"
21109 echo stdout:; cat "$at_stdout"
21110 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:109"
21111 if $at_failed; then :
21112   { set +x
21113 $as_echo "$at_srcdir/recursive.at:109: grep 'require .*but have' stderr && (exit 77)"
21114 at_fn_check_prepare_trace "recursive.at:109"
21115 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
21116 ) >>"$at_stdout" 2>>"$at_stderr"
21117 at_status=$? at_failed=false
21118 $at_check_filter
21119 at_fn_diff_devnull "$at_stderr" || at_failed=:
21120 at_fn_diff_devnull "$at_stdout" || at_failed=:
21121 at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:109"
21122 $at_failed && at_fn_log_failure
21123 $at_traceon; }
21124
21125 fi
21126 $at_failed && at_fn_log_failure
21127 $at_traceon; }
21128
21129
21130
21131
21132 { set +x
21133 $as_echo "$at_srcdir/recursive.at:110: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;           \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
21134 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:110"
21135 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
21136 ) >>"$at_stdout" 2>>"$at_stderr"
21137 at_status=$? at_failed=false
21138 $at_check_filter
21139 echo stderr:; cat "$at_stderr"
21140 echo stdout:; cat "$at_stdout"
21141 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:110"
21142 $at_failed && at_fn_log_failure
21143 $at_traceon; }
21144
21145
21146 for target in all install $tst_dist
21147 do
21148   { set +x
21149 $as_echo "$at_srcdir/recursive.at:111: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
21150 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:111"
21151 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
21152 ) >>"$at_stdout" 2>>"$at_stderr"
21153 at_status=$? at_failed=false
21154 $at_check_filter
21155 echo stderr:; cat "$at_stderr"
21156 echo stdout:; cat "$at_stdout"
21157 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:111"
21158 $at_failed && at_fn_log_failure
21159 $at_traceon; }
21160
21161 done
21162
21163
21164 { set +x
21165 $as_echo "$at_srcdir/recursive.at:113: test -f \$prefix/lib/libltdl.la"
21166 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "recursive.at:113"
21167 ( $at_check_trace; test -f $prefix/lib/libltdl.la
21168 ) >>"$at_stdout" 2>>"$at_stderr"
21169 at_status=$? at_failed=false
21170 $at_check_filter
21171 at_fn_diff_devnull "$at_stderr" || at_failed=:
21172 at_fn_diff_devnull "$at_stdout" || at_failed=:
21173 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:113"
21174 $at_failed && at_fn_log_failure
21175 $at_traceon; }
21176
21177 { set +x
21178 $as_echo "$at_srcdir/recursive.at:114: test -f \$prefix/include/ltdl.h"
21179 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "recursive.at:114"
21180 ( $at_check_trace; test -f $prefix/include/ltdl.h
21181 ) >>"$at_stdout" 2>>"$at_stderr"
21182 at_status=$? at_failed=false
21183 $at_check_filter
21184 at_fn_diff_devnull "$at_stderr" || at_failed=:
21185 at_fn_diff_devnull "$at_stdout" || at_failed=:
21186 at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:114"
21187 $at_failed && at_fn_log_failure
21188 $at_traceon; }
21189
21190
21191   set +x
21192   $at_times_p && times >"$at_times_file"
21193 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21194 read at_status <"$at_status_file"
21195 #AT_STOP_100
21196 #AT_START_101
21197 at_fn_group_banner 101 'template.at:27' \
21198   "simple template test" "                           " 12
21199 at_xfail=no
21200 (
21201   $as_echo "101. $at_setup_line: testing $at_desc ..."
21202   $at_traceon
21203
21204
21205 { set +x
21206 $as_echo "$at_srcdir/template.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
21207 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:28"
21208 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
21209 ) >>"$at_stdout" 2>>"$at_stderr"
21210 at_status=$? at_failed=false
21211 $at_check_filter
21212 at_fn_diff_devnull "$at_stderr" || at_failed=:
21213 at_fn_diff_devnull "$at_stdout" || at_failed=:
21214 at_fn_check_status 0 $at_status "$at_srcdir/template.at:28"
21215 $at_failed && at_fn_log_failure
21216 $at_traceon; }
21217
21218 { set +x
21219 $as_echo "$at_srcdir/template.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
21220 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:28"
21221 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
21222 ) >>"$at_stdout" 2>>"$at_stderr"
21223 at_status=$? at_failed=false
21224 $at_check_filter
21225 at_fn_diff_devnull "$at_stderr" || at_failed=:
21226 at_fn_diff_devnull "$at_stdout" || at_failed=:
21227 at_fn_check_status 0 $at_status "$at_srcdir/template.at:28"
21228 $at_failed && at_fn_log_failure
21229 $at_traceon; }
21230
21231
21232
21233
21234 cat >aclib.h <<'_ATEOF'
21235 int cf(int);
21236 _ATEOF
21237
21238
21239 cat >aclib.cpp <<'_ATEOF'
21240 #include "aclib.h"
21241 template<typename T>
21242
21243 T cq(T b)
21244 {
21245   return b * 3;
21246 }
21247
21248 int cf(int i)
21249 {
21250   return cq(i);
21251 }
21252 _ATEOF
21253
21254
21255 cat >alib.h <<'_ATEOF'
21256 int f(int);
21257 _ATEOF
21258
21259
21260 cat >alib.cpp <<'_ATEOF'
21261 #include "alib.h"
21262
21263 template<typename T>
21264 T q(T b)
21265 {
21266   return b * 2;
21267 }
21268
21269 int f(int i)
21270 {
21271   return q(i);
21272 }
21273 _ATEOF
21274
21275
21276 cat >prog.cpp <<'_ATEOF'
21277 #include "alib.h"
21278 #include "aclib.h"
21279
21280 int main()
21281 {
21282   return f(3) + 3 - cf(3) != 0;
21283 }
21284 _ATEOF
21285
21286
21287 { set +x
21288 $as_echo "$at_srcdir/template.at:79: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o alib.lo alib.cpp"
21289 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp" "template.at:79"
21290 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp
21291 ) >>"$at_stdout" 2>>"$at_stderr"
21292 at_status=$? at_failed=false
21293 $at_check_filter
21294 echo stderr:; cat "$at_stderr"
21295 echo stdout:; cat "$at_stdout"
21296 at_fn_check_status 0 $at_status "$at_srcdir/template.at:79"
21297 $at_failed && at_fn_log_failure
21298 $at_traceon; }
21299
21300 { set +x
21301 $as_echo "$at_srcdir/template.at:81: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o aclib.lo aclib.cpp"
21302 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp" "template.at:81"
21303 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp
21304 ) >>"$at_stdout" 2>>"$at_stderr"
21305 at_status=$? at_failed=false
21306 $at_check_filter
21307 echo stderr:; cat "$at_stderr"
21308 echo stdout:; cat "$at_stdout"
21309 at_fn_check_status 0 $at_status "$at_srcdir/template.at:81"
21310 $at_failed && at_fn_log_failure
21311 $at_traceon; }
21312
21313 { set +x
21314 $as_echo "$at_srcdir/template.at:83: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libaclib.la aclib.lo"
21315 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo" "template.at:83"
21316 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo
21317 ) >>"$at_stdout" 2>>"$at_stderr"
21318 at_status=$? at_failed=false
21319 $at_check_filter
21320 echo stderr:; cat "$at_stderr"
21321 echo stdout:; cat "$at_stdout"
21322 at_fn_check_status 0 $at_status "$at_srcdir/template.at:83"
21323 $at_failed && at_fn_log_failure
21324 $at_traceon; }
21325
21326 { set +x
21327 $as_echo "$at_srcdir/template.at:85: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la"
21328 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" "template.at:85"
21329 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la
21330 ) >>"$at_stdout" 2>>"$at_stderr"
21331 at_status=$? at_failed=false
21332 $at_check_filter
21333 echo stderr:; cat "$at_stderr"
21334 echo stdout:; cat "$at_stdout"
21335 at_fn_check_status 0 $at_status "$at_srcdir/template.at:85"
21336 $at_failed && at_fn_log_failure
21337 $at_traceon; }
21338
21339 { set +x
21340 $as_echo "$at_srcdir/template.at:87: \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c prog.cpp"
21341 at_fn_check_prepare_dynamic "$CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp" "template.at:87"
21342 ( $at_check_trace; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp
21343 ) >>"$at_stdout" 2>>"$at_stderr"
21344 at_status=$? at_failed=false
21345 $at_check_filter
21346 echo stderr:; cat "$at_stderr"
21347 echo stdout:; cat "$at_stdout"
21348 at_fn_check_status 0 $at_status "$at_srcdir/template.at:87"
21349 $at_failed && at_fn_log_failure
21350 $at_traceon; }
21351
21352 { set +x
21353 $as_echo "$at_srcdir/template.at:89: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o prog\$EXEEXT prog.\$OBJEXT libalib.la"
21354 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la" "template.at:89"
21355 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la
21356 ) >>"$at_stdout" 2>>"$at_stderr"
21357 at_status=$? at_failed=false
21358 $at_check_filter
21359 echo stderr:; cat "$at_stderr"
21360 echo stdout:; cat "$at_stdout"
21361 at_fn_check_status 0 $at_status "$at_srcdir/template.at:89"
21362 $at_failed && at_fn_log_failure
21363 $at_traceon; }
21364
21365
21366 lt_exe=./prog; if test -f "./prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21367 { set +x
21368 $as_echo "$at_srcdir/template.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?;         test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21369 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:92"
21370 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21371 ) >>"$at_stdout" 2>>"$at_stderr"
21372 at_status=$? at_failed=false
21373 $at_check_filter
21374 echo stderr:; cat "$at_stderr"
21375 echo stdout:; cat "$at_stdout"
21376 at_fn_check_status 0 $at_status "$at_srcdir/template.at:92"
21377 $at_failed && at_fn_log_failure
21378 $at_traceon; }
21379
21380
21381
21382
21383
21384
21385
21386   set +x
21387   $at_times_p && times >"$at_times_file"
21388 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21389 read at_status <"$at_status_file"
21390 #AT_STOP_101
21391 #AT_START_102
21392 at_fn_group_banner 102 'template.at:126' \
21393   "template test with subdirs" "                     " 12
21394 at_xfail=no
21395 (
21396   $as_echo "102. $at_setup_line: testing $at_desc ..."
21397   $at_traceon
21398
21399
21400 { set +x
21401 $as_echo "$at_srcdir/template.at:127: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
21402 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:127"
21403 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
21404 ) >>"$at_stdout" 2>>"$at_stderr"
21405 at_status=$? at_failed=false
21406 $at_check_filter
21407 at_fn_diff_devnull "$at_stderr" || at_failed=:
21408 at_fn_diff_devnull "$at_stdout" || at_failed=:
21409 at_fn_check_status 0 $at_status "$at_srcdir/template.at:127"
21410 $at_failed && at_fn_log_failure
21411 $at_traceon; }
21412
21413 { set +x
21414 $as_echo "$at_srcdir/template.at:127: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
21415 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:127"
21416 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
21417 ) >>"$at_stdout" 2>>"$at_stderr"
21418 at_status=$? at_failed=false
21419 $at_check_filter
21420 at_fn_diff_devnull "$at_stderr" || at_failed=:
21421 at_fn_diff_devnull "$at_stdout" || at_failed=:
21422 at_fn_check_status 0 $at_status "$at_srcdir/template.at:127"
21423 $at_failed && at_fn_log_failure
21424 $at_traceon; }
21425
21426
21427
21428
21429 noskip=:
21430 # Mac OS X.
21431 # The linker has issues with this test.
21432 case $host in
21433 *-darwin*) noskip=false ;;
21434 esac
21435
21436
21437 CPPFLAGS="$CPPFLAGS -I../src/lib -I../src/lib2"
21438
21439 mkdir src obj
21440 ( cd src; mkdir lib lib2 sub )
21441 ( cd obj; mkdir lib lib2 sub )
21442
21443 cat >src/lib/a.hh <<'_ATEOF'
21444 template <class T>
21445 unsigned int a(const T&);
21446
21447 template <class T>
21448 unsigned int a(const T& t)
21449 {
21450   return sizeof t;
21451 }
21452
21453 extern int a2(char t);
21454
21455 inline int a3(const double* t)
21456 {
21457   return a(t);
21458 }
21459 _ATEOF
21460
21461
21462 cat >src/lib/a.cpp <<'_ATEOF'
21463 #include "a.hh"
21464
21465 int a2(char t)
21466 {
21467   return a(t);
21468 }
21469 _ATEOF
21470
21471
21472 cat >src/lib2/b.hh <<'_ATEOF'
21473 #include "a.hh"
21474
21475 template <class T>
21476 unsigned int b(T& t)
21477 {
21478   return a(t);
21479 }
21480 extern int b2(char* t);
21481 struct bs { int bi; };
21482 extern int b3(bs t);
21483 _ATEOF
21484
21485
21486 cat >src/lib2/b.cpp <<'_ATEOF'
21487 #include "b.hh"
21488
21489 int b2(char* t)
21490 {
21491   return a2(t[0]);
21492 }
21493
21494 int b3(bs t)
21495 {
21496   return b(t);
21497 }
21498 _ATEOF
21499
21500
21501 cat >src/sub/main.cpp <<'_ATEOF'
21502 #include "b.hh"
21503
21504 int main()
21505 {
21506   double foo;
21507   const char s = ' ';
21508   char d;
21509   char *t = &d;
21510   return b(foo) + a3(&foo) + b2(t) - a(s)
21511          - (sizeof(double) + sizeof(double*));
21512 }
21513 _ATEOF
21514
21515
21516 cd obj
21517
21518 # If the compiler supports -c -o, we want to use it:
21519 # it may make a difference for templates
21520 eval `$LIBTOOL --tag=CXX --config | grep ^compiler_c_o=`
21521 case $compiler_c_o in
21522 yes)
21523   main_o=sub/main.$OBJEXT
21524   { set +x
21525 $as_echo "$at_srcdir/template.at:220: \$CXX \$CPPFLAGS \$CXXFLAGS -c -o \$main_o ../src/sub/main.cpp"
21526 at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp" "template.at:220"
21527 ( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp
21528 ) >>"$at_stdout" 2>>"$at_stderr"
21529 at_status=$? at_failed=false
21530 $at_check_filter
21531 echo stderr:; cat "$at_stderr"
21532 echo stdout:; cat "$at_stdout"
21533 at_fn_check_status 0 $at_status "$at_srcdir/template.at:220"
21534 $at_failed && at_fn_log_failure
21535 $at_traceon; }
21536
21537   ;;
21538 *)
21539   main_o=main.$OBJEXT
21540   { set +x
21541 $as_echo "$at_srcdir/template.at:225: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
21542 at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:225"
21543 ( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp
21544 ) >>"$at_stdout" 2>>"$at_stderr"
21545 at_status=$? at_failed=false
21546 $at_check_filter
21547 echo stderr:; cat "$at_stderr"
21548 echo stdout:; cat "$at_stdout"
21549 at_fn_check_status 0 $at_status "$at_srcdir/template.at:225"
21550 $at_failed && at_fn_log_failure
21551 $at_traceon; }
21552
21553   ;;
21554 esac
21555
21556 { set +x
21557 $as_echo "$at_srcdir/template.at:230: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp"
21558 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" "template.at:230"
21559 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp
21560 ) >>"$at_stdout" 2>>"$at_stderr"
21561 at_status=$? at_failed=false
21562 $at_check_filter
21563 echo stderr:; cat "$at_stderr"
21564 echo stdout:; cat "$at_stdout"
21565 at_fn_check_status 0 $at_status "$at_srcdir/template.at:230"
21566 $at_failed && at_fn_log_failure
21567 $at_traceon; }
21568
21569 { set +x
21570 $as_echo "$at_srcdir/template.at:232: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp"
21571 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" "template.at:232"
21572 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp
21573 ) >>"$at_stdout" 2>>"$at_stderr"
21574 at_status=$? at_failed=false
21575 $at_check_filter
21576 echo stderr:; cat "$at_stderr"
21577 echo stdout:; cat "$at_stdout"
21578 at_fn_check_status 0 $at_status "$at_srcdir/template.at:232"
21579 $at_failed && at_fn_log_failure
21580 $at_traceon; }
21581
21582 { set +x
21583 $as_echo "$at_srcdir/template.at:234: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp"
21584 at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:234"
21585 ( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp
21586 ) >>"$at_stdout" 2>>"$at_stderr"
21587 at_status=$? at_failed=false
21588 $at_check_filter
21589 echo stderr:; cat "$at_stderr"
21590 echo stdout:; cat "$at_stdout"
21591 at_fn_check_status 0 $at_status "$at_srcdir/template.at:234"
21592 $at_failed && at_fn_log_failure
21593 $at_traceon; }
21594
21595 # both convenience
21596 { set +x
21597 $as_echo "$at_srcdir/template.at:237: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
21598 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:237"
21599 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo
21600 ) >>"$at_stdout" 2>>"$at_stderr"
21601 at_status=$? at_failed=false
21602 $at_check_filter
21603 echo stderr:; cat "$at_stderr"
21604 echo stdout:; cat "$at_stdout"
21605 at_fn_check_status 0 $at_status "$at_srcdir/template.at:237"
21606 $at_failed && at_fn_log_failure
21607 $at_traceon; }
21608
21609 { set +x
21610 $as_echo "$at_srcdir/template.at:239: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo"
21611 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo" "template.at:239"
21612 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo
21613 ) >>"$at_stdout" 2>>"$at_stderr"
21614 at_status=$? at_failed=false
21615 $at_check_filter
21616 echo stderr:; cat "$at_stderr"
21617 echo stdout:; cat "$at_stdout"
21618 at_fn_check_status 0 $at_status "$at_srcdir/template.at:239"
21619 $at_failed && at_fn_log_failure
21620 $at_traceon; }
21621
21622 { set +x
21623 $as_echo "$at_srcdir/template.at:241: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
21624 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:241"
21625 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
21626 ) >>"$at_stdout" 2>>"$at_stderr"
21627 at_status=$? at_failed=false
21628 $at_check_filter
21629 echo stderr:; cat "$at_stderr"
21630 echo stdout:; cat "$at_stdout"
21631 at_fn_check_status 0 $at_status "$at_srcdir/template.at:241"
21632 $at_failed && at_fn_log_failure
21633 $at_traceon; }
21634
21635 lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21636 { set +x
21637 $as_echo "$at_srcdir/template.at:243: if \"\$lt_exe\" ; then :; else lt_status=\$?;        test \$lt_status != ignore &&           test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21638 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != ignore &&            test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:243"
21639 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != ignore &&            test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21640 ) >>"$at_stdout" 2>>"$at_stderr"
21641 at_status=$? at_failed=false
21642 $at_check_filter
21643 at_fn_diff_devnull "$at_stderr" || at_failed=:
21644 at_fn_diff_devnull "$at_stdout" || at_failed=:
21645 at_fn_check_skip $at_status "$at_srcdir/template.at:243"
21646 $at_failed && at_fn_log_failure
21647 $at_traceon; }
21648
21649
21650 # lib convenience
21651 if $noskip; then
21652   { set +x
21653 $as_echo "$at_srcdir/template.at:246: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo"
21654 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" "template.at:246"
21655 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo
21656 ) >>"$at_stdout" 2>>"$at_stderr"
21657 at_status=$? at_failed=false
21658 $at_check_filter
21659 echo stderr:; cat "$at_stderr"
21660 echo stdout:; cat "$at_stdout"
21661 at_fn_check_status 0 $at_status "$at_srcdir/template.at:246"
21662 $at_failed && at_fn_log_failure
21663 $at_traceon; }
21664
21665   { set +x
21666 $as_echo "$at_srcdir/template.at:248: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
21667 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:248"
21668 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
21669 ) >>"$at_stdout" 2>>"$at_stderr"
21670 at_status=$? at_failed=false
21671 $at_check_filter
21672 echo stderr:; cat "$at_stderr"
21673 echo stdout:; cat "$at_stdout"
21674 at_fn_check_status 0 $at_status "$at_srcdir/template.at:248"
21675 $at_failed && at_fn_log_failure
21676 $at_traceon; }
21677
21678   lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21679 { set +x
21680 $as_echo "$at_srcdir/template.at:250: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21681 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:250"
21682 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21683 ) >>"$at_stdout" 2>>"$at_stderr"
21684 at_status=$? at_failed=false
21685 $at_check_filter
21686 at_fn_diff_devnull "$at_stderr" || at_failed=:
21687 at_fn_diff_devnull "$at_stdout" || at_failed=:
21688 at_fn_check_status 0 $at_status "$at_srcdir/template.at:250"
21689 $at_failed && at_fn_log_failure
21690 $at_traceon; }
21691
21692
21693 fi
21694
21695 # both installed
21696 { set +x
21697 $as_echo "$at_srcdir/template.at:254: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo"
21698 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" "template.at:254"
21699 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo
21700 ) >>"$at_stdout" 2>>"$at_stderr"
21701 at_status=$? at_failed=false
21702 $at_check_filter
21703 echo stderr:; cat "$at_stderr"
21704 echo stdout:; cat "$at_stdout"
21705 at_fn_check_status 0 $at_status "$at_srcdir/template.at:254"
21706 $at_failed && at_fn_log_failure
21707 $at_traceon; }
21708
21709 { set +x
21710 $as_echo "$at_srcdir/template.at:256: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar"
21711 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" "template.at:256"
21712 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar
21713 ) >>"$at_stdout" 2>>"$at_stderr"
21714 at_status=$? at_failed=false
21715 $at_check_filter
21716 echo stderr:; cat "$at_stderr"
21717 echo stdout:; cat "$at_stdout"
21718 at_fn_check_status 0 $at_status "$at_srcdir/template.at:256"
21719 $at_failed && at_fn_log_failure
21720 $at_traceon; }
21721
21722 { set +x
21723 $as_echo "$at_srcdir/template.at:258: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la"
21724 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:258"
21725 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la
21726 ) >>"$at_stdout" 2>>"$at_stderr"
21727 at_status=$? at_failed=false
21728 $at_check_filter
21729 echo stderr:; cat "$at_stderr"
21730 echo stdout:; cat "$at_stdout"
21731 at_fn_check_status 0 $at_status "$at_srcdir/template.at:258"
21732 $at_failed && at_fn_log_failure
21733 $at_traceon; }
21734
21735 lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21736 { set +x
21737 $as_echo "$at_srcdir/template.at:260: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21738 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:260"
21739 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21740 ) >>"$at_stdout" 2>>"$at_stderr"
21741 at_status=$? at_failed=false
21742 $at_check_filter
21743 at_fn_diff_devnull "$at_stderr" || at_failed=:
21744 at_fn_diff_devnull "$at_stdout" || at_failed=:
21745 at_fn_check_status 0 $at_status "$at_srcdir/template.at:260"
21746 $at_failed && at_fn_log_failure
21747 $at_traceon; }
21748
21749
21750 # both convenience, libb depending on liba
21751 { set +x
21752 $as_echo "$at_srcdir/template.at:262: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo"
21753 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:262"
21754 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo
21755 ) >>"$at_stdout" 2>>"$at_stderr"
21756 at_status=$? at_failed=false
21757 $at_check_filter
21758 echo stderr:; cat "$at_stderr"
21759 echo stdout:; cat "$at_stdout"
21760 at_fn_check_status 0 $at_status "$at_srcdir/template.at:262"
21761 $at_failed && at_fn_log_failure
21762 $at_traceon; }
21763
21764 { set +x
21765 $as_echo "$at_srcdir/template.at:264: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la"
21766 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" "template.at:264"
21767 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la
21768 ) >>"$at_stdout" 2>>"$at_stderr"
21769 at_status=$? at_failed=false
21770 $at_check_filter
21771 echo stderr:; cat "$at_stderr"
21772 echo stdout:; cat "$at_stdout"
21773 at_fn_check_status 0 $at_status "$at_srcdir/template.at:264"
21774 $at_failed && at_fn_log_failure
21775 $at_traceon; }
21776
21777 { set +x
21778 $as_echo "$at_srcdir/template.at:266: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
21779 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:266"
21780 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
21781 ) >>"$at_stdout" 2>>"$at_stderr"
21782 at_status=$? at_failed=false
21783 $at_check_filter
21784 echo stderr:; cat "$at_stderr"
21785 echo stdout:; cat "$at_stdout"
21786 at_fn_check_status 0 $at_status "$at_srcdir/template.at:266"
21787 $at_failed && at_fn_log_failure
21788 $at_traceon; }
21789
21790 lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21791 { set +x
21792 $as_echo "$at_srcdir/template.at:268: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21793 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:268"
21794 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21795 ) >>"$at_stdout" 2>>"$at_stderr"
21796 at_status=$? at_failed=false
21797 $at_check_filter
21798 at_fn_diff_devnull "$at_stderr" || at_failed=:
21799 at_fn_diff_devnull "$at_stdout" || at_failed=:
21800 at_fn_check_status 0 $at_status "$at_srcdir/template.at:268"
21801 $at_failed && at_fn_log_failure
21802 $at_traceon; }
21803
21804
21805 # lib convenience
21806 if $noskip; then
21807
21808   { set +x
21809 $as_echo "$at_srcdir/template.at:272: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo"
21810 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" "template.at:272"
21811 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo
21812 ) >>"$at_stdout" 2>>"$at_stderr"
21813 at_status=$? at_failed=false
21814 $at_check_filter
21815 echo stderr:; cat "$at_stderr"
21816 echo stdout:; cat "$at_stdout"
21817 at_fn_check_status 0 $at_status "$at_srcdir/template.at:272"
21818 $at_failed && at_fn_log_failure
21819 $at_traceon; }
21820
21821   { set +x
21822 $as_echo "$at_srcdir/template.at:274: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
21823 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:274"
21824 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
21825 ) >>"$at_stdout" 2>>"$at_stderr"
21826 at_status=$? at_failed=false
21827 $at_check_filter
21828 echo stderr:; cat "$at_stderr"
21829 echo stdout:; cat "$at_stdout"
21830 at_fn_check_status 0 $at_status "$at_srcdir/template.at:274"
21831 $at_failed && at_fn_log_failure
21832 $at_traceon; }
21833
21834   lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21835 { set +x
21836 $as_echo "$at_srcdir/template.at:276: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21837 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:276"
21838 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21839 ) >>"$at_stdout" 2>>"$at_stderr"
21840 at_status=$? at_failed=false
21841 $at_check_filter
21842 at_fn_diff_devnull "$at_stderr" || at_failed=:
21843 at_fn_diff_devnull "$at_stdout" || at_failed=:
21844 at_fn_check_status 0 $at_status "$at_srcdir/template.at:276"
21845 $at_failed && at_fn_log_failure
21846 $at_traceon; }
21847
21848
21849 fi
21850 # both installed
21851 if $noskip; then
21852   { set +x
21853 $as_echo "$at_srcdir/template.at:280: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar"
21854 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" "template.at:280"
21855 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar
21856 ) >>"$at_stdout" 2>>"$at_stderr"
21857 at_status=$? at_failed=false
21858 $at_check_filter
21859 echo stderr:; cat "$at_stderr"
21860 echo stdout:; cat "$at_stdout"
21861 at_fn_check_status 0 $at_status "$at_srcdir/template.at:280"
21862 $at_failed && at_fn_log_failure
21863 $at_traceon; }
21864
21865   { set +x
21866 $as_echo "$at_srcdir/template.at:282: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la"
21867 at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:282"
21868 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la
21869 ) >>"$at_stdout" 2>>"$at_stderr"
21870 at_status=$? at_failed=false
21871 $at_check_filter
21872 echo stderr:; cat "$at_stderr"
21873 echo stdout:; cat "$at_stdout"
21874 at_fn_check_status 0 $at_status "$at_srcdir/template.at:282"
21875 $at_failed && at_fn_log_failure
21876 $at_traceon; }
21877
21878   lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
21879 { set +x
21880 $as_echo "$at_srcdir/template.at:284: if \"\$lt_exe\" ; then :; else lt_status=\$?;                test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
21881 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "template.at:284"
21882 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
21883 ) >>"$at_stdout" 2>>"$at_stderr"
21884 at_status=$? at_failed=false
21885 $at_check_filter
21886 at_fn_diff_devnull "$at_stderr" || at_failed=:
21887 at_fn_diff_devnull "$at_stdout" || at_failed=:
21888 at_fn_check_status 0 $at_status "$at_srcdir/template.at:284"
21889 $at_failed && at_fn_log_failure
21890 $at_traceon; }
21891
21892
21893 fi
21894
21895 cd ..
21896
21897 { set +x
21898 $as_echo "$at_srcdir/template.at:289: \$noskip || (exit 77)"
21899 at_fn_check_prepare_dynamic "$noskip || (exit 77)" "template.at:289"
21900 ( $at_check_trace; $noskip || (exit 77)
21901 ) >>"$at_stdout" 2>>"$at_stderr"
21902 at_status=$? at_failed=false
21903 $at_check_filter
21904 at_fn_diff_devnull "$at_stderr" || at_failed=:
21905 at_fn_diff_devnull "$at_stdout" || at_failed=:
21906 at_fn_check_status 0 $at_status "$at_srcdir/template.at:289"
21907 $at_failed && at_fn_log_failure
21908 $at_traceon; }
21909
21910
21911
21912   set +x
21913   $at_times_p && times >"$at_times_file"
21914 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21915 read at_status <"$at_status_file"
21916 #AT_STOP_102
21917 #AT_START_103
21918 at_fn_group_banner 103 'ctor.at:27' \
21919   "C++ static constructors" "                        " 13
21920 at_xfail=no
21921 (
21922   $as_echo "103. $at_setup_line: testing $at_desc ..."
21923   $at_traceon
21924
21925
21926 { set +x
21927 $as_echo "$at_srcdir/ctor.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)"
21928 at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "ctor.at:28"
21929 ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
21930 ) >>"$at_stdout" 2>>"$at_stderr"
21931 at_status=$? at_failed=false
21932 $at_check_filter
21933 at_fn_diff_devnull "$at_stderr" || at_failed=:
21934 at_fn_diff_devnull "$at_stdout" || at_failed=:
21935 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28"
21936 $at_failed && at_fn_log_failure
21937 $at_traceon; }
21938
21939 { set +x
21940 $as_echo "$at_srcdir/ctor.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)"
21941 at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "ctor.at:28"
21942 ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)
21943 ) >>"$at_stdout" 2>>"$at_stderr"
21944 at_status=$? at_failed=false
21945 $at_check_filter
21946 at_fn_diff_devnull "$at_stderr" || at_failed=:
21947 at_fn_diff_devnull "$at_stdout" || at_failed=:
21948 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28"
21949 $at_failed && at_fn_log_failure
21950 $at_traceon; }
21951
21952
21953
21954
21955 cat >class.h <<'_ATEOF'
21956 #define magic 0xaabbccdd
21957 class Foo {
21958 public:
21959         Foo() { bar = magic; }
21960         unsigned bar;
21961 };
21962
21963 extern Foo instance;
21964 _ATEOF
21965
21966
21967 cat >libctor.cpp <<'_ATEOF'
21968 #include "class.h"
21969 Foo instance;
21970 _ATEOF
21971
21972
21973 cat >main.cpp <<'_ATEOF'
21974 #include "class.h"
21975
21976 int main(void)
21977 {
21978   return instance.bar != magic;
21979 }
21980 _ATEOF
21981
21982
21983 { set +x
21984 $as_echo "$at_srcdir/ctor.at:56: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
21985           -c libctor.cpp -o libctor.lo"
21986 at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:56"
21987 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
21988           -c libctor.cpp -o libctor.lo
21989 ) >>"$at_stdout" 2>>"$at_stderr"
21990 at_status=$? at_failed=false
21991 $at_check_filter
21992 echo stderr:; cat "$at_stderr"
21993 echo stdout:; cat "$at_stdout"
21994 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:56"
21995 $at_failed && at_fn_log_failure
21996 $at_traceon; }
21997
21998 { set +x
21999 $as_echo "$at_srcdir/ctor.at:58: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\
22000           -c main.cpp -o main.lo"
22001 at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:58"
22002 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \
22003           -c main.cpp -o main.lo
22004 ) >>"$at_stdout" 2>>"$at_stderr"
22005 at_status=$? at_failed=false
22006 $at_check_filter
22007 echo stderr:; cat "$at_stderr"
22008 echo stdout:; cat "$at_stdout"
22009 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:58"
22010 $at_failed && at_fn_log_failure
22011 $at_traceon; }
22012
22013 { set +x
22014 $as_echo "$at_srcdir/ctor.at:60: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
22015           libctor.lo -o libctor.la -rpath /none"
22016 at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:60"
22017 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
22018           libctor.lo -o libctor.la -rpath /none
22019 ) >>"$at_stdout" 2>>"$at_stderr"
22020 at_status=$? at_failed=false
22021 $at_check_filter
22022 echo stderr:; cat "$at_stderr"
22023 echo stdout:; cat "$at_stdout"
22024 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:60"
22025 $at_failed && at_fn_log_failure
22026 $at_traceon; }
22027
22028 { set +x
22029 $as_echo "$at_srcdir/ctor.at:62: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\
22030           main.lo libctor.la -o main\$EXEEXT"
22031 at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:62"
22032 ( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \
22033           main.lo libctor.la -o main$EXEEXT
22034 ) >>"$at_stdout" 2>>"$at_stderr"
22035 at_status=$? at_failed=false
22036 $at_check_filter
22037 echo stderr:; cat "$at_stderr"
22038 echo stdout:; cat "$at_stdout"
22039 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:62"
22040 $at_failed && at_fn_log_failure
22041 $at_traceon; }
22042
22043
22044 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
22045 { set +x
22046 $as_echo "$at_srcdir/ctor.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?;     test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
22047 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "ctor.at:65"
22048 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
22049 ) >>"$at_stdout" 2>>"$at_stderr"
22050 at_status=$? at_failed=false
22051 $at_check_filter
22052 at_fn_diff_devnull "$at_stderr" || at_failed=:
22053 at_fn_diff_devnull "$at_stdout" || at_failed=:
22054 at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:65"
22055 $at_failed && at_fn_log_failure
22056 $at_traceon; }
22057
22058
22059
22060   set +x
22061   $at_times_p && times >"$at_times_file"
22062 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22063 read at_status <"$at_status_file"
22064 #AT_STOP_103
22065 #AT_START_104
22066 at_fn_group_banner 104 'exceptions.at:24' \
22067   "C++ exception handling" "                         " 13
22068 at_xfail=no
22069 (
22070   $as_echo "104. $at_setup_line: testing $at_desc ..."
22071   $at_traceon
22072
22073
22074
22075
22076 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
22077 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
22078
22079 # Skip this test when called from:
22080 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
22081 { set +x
22082 $as_echo "$at_srcdir/exceptions.at:33: case \$LIBLTDL in #(
22083  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
22084 esac"
22085 at_fn_check_prepare_notrace 'an embedded newline' "exceptions.at:33"
22086 ( $at_check_trace; case $LIBLTDL in #(
22087  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
22088 esac
22089 ) >>"$at_stdout" 2>>"$at_stderr"
22090 at_status=$? at_failed=false
22091 $at_check_filter
22092 at_fn_diff_devnull "$at_stderr" || at_failed=:
22093 echo stdout:; cat "$at_stdout"
22094 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:33"
22095 $at_failed && at_fn_log_failure
22096 $at_traceon; }
22097
22098
22099 CPPFLAGS="$LTDLINCL $CPPFLAGS"
22100
22101 # Win32 (and cygwin) notes
22102 # ------------------------
22103 # When using C++ and Win32 DLLs, data types used in the DLL's interface
22104 # which are other-than-POD, must have vtables, typeinfo, and other
22105 # elements resolved when the client is linked.  This includes exception
22106 # classes.  Therefore, the exception class "modexc" thrown by the
22107 # dynamically-loaded module must be defined in a separate DLL, to which
22108 # both that module and main must be directly linked; hence, the 'common'
22109 # library. Not using a 'common' library in this manner represents an
22110 # ODR violation, unless the platform's runtime loader is capable of
22111 # rationalizing vague linkage items such as vtables, typeinfo, and
22112 # typename elements) at runtime.  The Win32 loader is not capable of
22113 # this, but some ELF loaders appear to be.
22114 #
22115 # Similar treatment is not necessary for liba (e.g. the libexc
22116 # exception class), because that library is not dynamically loaded. As a
22117 # consequence, vague linkage items for the class libexc are resolved at
22118 # link time using the vague linkage rules, for both Win32 and other
22119 # (e.g. ELF) platforms.
22120 #
22121 # Also, when linking a C++ DLL with another C++ DLL, some versions of
22122 # the GNU toolchain on Win32 (or cygwin) mistakenly re-export symbols
22123 # that were imported from the other DLL, when the client DLL is linked
22124 # using -export-all-symbols.  Similar issues MAY also arise with those
22125 # versions of the GNU toolchain if using the libtool link flags
22126 # -export-symbols LIST or -export-symbols-regex REGEX, if any symbols
22127 # from the dependency, rather than client, library are listed (or match
22128 # the regex).  However, in this test, none of these situations apply,
22129 # so we don't directly address it.  Otherwise, the correct mechanism
22130 # would be to avoid all of those flags, and instead explicitly decorate
22131 # all symbols with appropriate __declspec (dllexport) or
22132 # __declspec (dllimport) flags when building the DLLs and the clients.
22133 #
22134 # For more information, see these two threads:
22135 #   http://lists.gnu.org/archive/html/bug-libtool/2010-06/msg00069.html
22136 #   http://cygwin.com/ml/cygwin/2010-06/msg00392.html
22137 # To sum up: C++ is complicated.
22138 cat >common.h <<'_ATEOF'
22139 #ifndef LIBTOOL_TEST_COMMON_HEADER
22140 #define LIBTOOL_TEST_COMMON_HEADER
22141
22142 #include <exception>
22143 #include <string>
22144
22145 #if defined(__CYGWIN__) || defined(_WIN32)
22146 # if defined(DLL_EXPORT) || defined(USING_COMMON_DLL)
22147 #  if defined(LIBTOOL_TEST_IN_COMMON)
22148 #   define COMMON_IMPEXP __declspec (dllexport)
22149 #  else
22150 #   define COMMON_IMPEXP __declspec (dllimport)
22151 #  endif
22152 # else
22153 #  define COMMON_IMPEXP
22154 # endif
22155 #else
22156 # define COMMON_IMPEXP
22157 #endif
22158
22159 class COMMON_IMPEXP modexc : public std::exception {
22160 public:
22161   modexc (std::string str) : message (str) { }
22162   ~modexc () throw () { }
22163   virtual const char *what () const throw ()
22164   {
22165     return message.c_str ();
22166   }
22167 private:
22168   std::string message;
22169 };
22170
22171 extern "C" int COMMON_IMPEXP common_dummy (void);
22172 #endif
22173 _ATEOF
22174
22175
22176 cat >common.cpp <<'_ATEOF'
22177 #define LIBTOOL_TEST_IN_COMMON
22178 #include "common.h"
22179
22180 extern "C"
22181 int common_dummy (void)
22182 {
22183   return 0;
22184 }
22185 _ATEOF
22186
22187
22188 cat >module.h <<'_ATEOF'
22189 #include "common.h"
22190
22191 #if defined(__CYGWIN__) || defined(_WIN32)
22192 # if defined(DLL_EXPORT) || defined(USING_MODULE_DLL)
22193 #  if defined(LIBTOOL_TEST_IN_MODULE)
22194 #   define MODULE_IMPEXP __declspec (dllexport)
22195 #  else
22196 #   define MODULE_IMPEXP __declspec (dllimport)
22197 #  endif
22198 # else
22199 #  define MODULE_IMPEXP
22200 # endif
22201 #else
22202 # define MODULE_IMPEXP
22203 #endif
22204
22205 extern "C" int MODULE_IMPEXP modfoo () throw (modexc);
22206 _ATEOF
22207
22208
22209 cat >module.cpp <<'_ATEOF'
22210 #include <iostream>
22211 #define LIBTOOL_TEST_IN_MODULE
22212 #include "module.h"
22213
22214 int modbar (void) throw (modexc)
22215 {
22216   throw modexc ("exception in module");
22217 }
22218
22219 extern "C"
22220 int modfoo (void) throw (modexc)
22221 {
22222   try {
22223     modbar ();
22224   }
22225   catch (modexc e) {
22226     std::cerr << "caught inside module: " << e.what () << '\n';
22227     throw modexc ("exception from module");
22228   }
22229   return 0;
22230 }
22231 _ATEOF
22232
22233
22234 cat >lib.h <<'_ATEOF'
22235 #include <exception>
22236 #include <string>
22237
22238
22239 #if defined(__CYGWIN__) || defined(_WIN32)
22240 # if defined(DLL_EXPORT) || defined(USING_LIB_DLL)
22241 #  if defined(LIBTOOL_TEST_IN_LIB)
22242 #   define LIB_IMPEXP __declspec (dllexport)
22243 #  else
22244 #   define LIB_IMPEXP __declspec (dllimport)
22245 #  endif
22246 # else
22247 #  define LIB_IMPEXP
22248 # endif
22249 #else
22250 # define LIB_IMPEXP
22251 #endif
22252
22253 class LIB_IMPEXP libexc : public std::exception {
22254 public:
22255   libexc (std::string str) : message (str) { }
22256   ~libexc () throw () { }
22257   virtual const char *what () const throw ()
22258   {
22259     return message.c_str ();
22260   }
22261 private:
22262   std::string message;
22263 };
22264 int LIB_IMPEXP libfoo () throw (libexc);
22265 _ATEOF
22266
22267
22268 cat >lib.cpp <<'_ATEOF'
22269 #include <iostream>
22270 #define LIBTOOL_TEST_IN_LIB
22271 #include "lib.h"
22272
22273 int libbar (void) throw (libexc)
22274 {
22275   throw libexc ("exception in library");
22276 }
22277
22278 int libfoo (void) throw (libexc)
22279 {
22280   try {
22281     libbar ();
22282   }
22283   catch (libexc e) {
22284     std::cerr << "caught inside lib: " << e.what () << '\n';
22285     throw libexc ("exception from library");
22286   }
22287   return 0;
22288 }
22289 _ATEOF
22290
22291
22292 cat >main.cpp <<'_ATEOF'
22293 #include <ltdl.h>
22294 #include <cstdlib>
22295 #include <iostream>
22296 #include <exception>
22297 #include <string>
22298 #include "common.h"
22299 #include "lib.h"
22300 #include "module.h"
22301
22302 class exc : public std::exception {
22303 public:
22304   exc (std::string str) : message (str) { }
22305   ~exc () throw () { }
22306   virtual const char *what () const throw ()
22307   {
22308     return message.c_str ();
22309   }
22310 private:
22311   std::string message;
22312 };
22313
22314 int foo (void) throw (exc)
22315 {
22316   throw exc ("exception in program");
22317   return 0;
22318 }
22319
22320 int exceptions_in_prog (void)
22321 {
22322   std::cerr << "exceptions_in_prog\n";
22323   try {
22324     foo ();
22325   }
22326   catch (exc e) {
22327      std::cerr << "caught: " << e.what () << '\n';
22328     return 0;
22329   }
22330   return 1;
22331 }
22332
22333 int exceptions_in_lib (void)
22334 {
22335   std::cerr << "exceptions_in_lib\n";
22336   try {
22337     libfoo ();
22338   }
22339   catch (libexc e) {
22340      std::cerr << "caught: " << e.what () << '\n';
22341     return 0;
22342   }
22343   return 1;
22344 }
22345
22346 int exceptions_in_module (void)
22347 {
22348   std::cerr << "exceptions_in_module\n";
22349
22350   if (lt_dlinit ())
22351     {
22352       std::cerr << "init error: " << lt_dlerror () << '\n';
22353       return 1;
22354     }
22355
22356   // Some systems need RTLD_GLOBAL for exceptions to work in modules.
22357   lt_dladvise advise;
22358   if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise))
22359     {
22360       std::cerr << "error setting advise global\n";
22361       return 1;
22362     }
22363
22364   lt_dlhandle handle = lt_dlopenadvise ("module.la", advise);
22365   if (handle == NULL)
22366     {
22367       std::cerr << "dlopen failed: " << lt_dlerror () << '\n';
22368       return 1;
22369     }
22370   lt_dladvise_destroy (&advise);
22371
22372   typedef int (*pfun) (void);
22373   pfun pf = (pfun) lt_dlsym (handle, "modfoo");
22374   if (pf == NULL)
22375     {
22376       std::cerr << "dlsym failed: " << lt_dlerror () << '\n';
22377       return 1;
22378     }
22379
22380   bool exception_caught = false;
22381   try {
22382     (*pf) ();
22383   }
22384   catch (modexc e) {
22385     std::cerr << "caught: " << e.what () << '\n';
22386     exception_caught = true;
22387   }
22388
22389   /* Only close the module after all of its objects have gone out of scope. */
22390   if (exception_caught)
22391   {
22392     if (lt_dlclose (handle))
22393       {
22394         std::cerr << "dlclose failed: " << lt_dlerror () << '\n';
22395         return 1;
22396       }
22397     if (lt_dlexit ())
22398       {
22399         std::cerr << "lt_dlexit failed: " << lt_dlerror () << '\n';
22400         return 1;
22401       }
22402     return 0;
22403   }
22404   return 1;
22405 }
22406
22407 int main (void)
22408 {
22409
22410   LTDL_SET_PRELOADED_SYMBOLS();
22411
22412   if (exceptions_in_prog ())
22413     return 1;
22414   if (exceptions_in_lib ())
22415     return 1;
22416   if (exceptions_in_module ())
22417     return 1;
22418   return 0;
22419 }
22420 _ATEOF
22421
22422
22423 inst=`pwd`/inst
22424 libdir=$inst/lib
22425 bindir=$inst/bin
22426 moddir=$inst/mod
22427 mkdir l m $inst $libdir $bindir $moddir
22428
22429 # If the C++ compiler isn't capable, don't bother.
22430 { set +x
22431 $as_echo "$at_srcdir/exceptions.at:361: \$CXX \$CPPFLAGS \$CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77"
22432 at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77" "exceptions.at:361"
22433 ( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77
22434 ) >>"$at_stdout" 2>>"$at_stderr"
22435 at_status=$? at_failed=false
22436 $at_check_filter
22437 echo stderr:; cat "$at_stderr"
22438 echo stdout:; cat "$at_stdout"
22439 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:361"
22440 $at_failed && at_fn_log_failure
22441 $at_traceon; }
22442
22443
22444 { set +x
22445 $as_echo "$at_srcdir/exceptions.at:363: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c common.cpp"
22446 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c common.cpp" "exceptions.at:363"
22447 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c common.cpp
22448 ) >>"$at_stdout" 2>>"$at_stderr"
22449 at_status=$? at_failed=false
22450 $at_check_filter
22451 echo stderr:; cat "$at_stderr"
22452 echo stdout:; cat "$at_stdout"
22453 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:363"
22454 $at_failed && at_fn_log_failure
22455 $at_traceon; }
22456
22457 { set +x
22458 $as_echo "$at_srcdir/exceptions.at:365: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c lib.cpp"
22459 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c lib.cpp" "exceptions.at:365"
22460 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c lib.cpp
22461 ) >>"$at_stdout" 2>>"$at_stderr"
22462 at_status=$? at_failed=false
22463 $at_check_filter
22464 echo stderr:; cat "$at_stderr"
22465 echo stdout:; cat "$at_stdout"
22466 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:365"
22467 $at_failed && at_fn_log_failure
22468 $at_traceon; }
22469
22470 { set +x
22471 $as_echo "$at_srcdir/exceptions.at:367: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -DUSING_COMMON_DLL -c module.cpp"
22472 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -c module.cpp" "exceptions.at:367"
22473 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -c module.cpp
22474 ) >>"$at_stdout" 2>>"$at_stderr"
22475 at_status=$? at_failed=false
22476 $at_check_filter
22477 echo stderr:; cat "$at_stderr"
22478 echo stdout:; cat "$at_stdout"
22479 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:367"
22480 $at_failed && at_fn_log_failure
22481 $at_traceon; }
22482
22483
22484 { set +x
22485 $as_echo "$at_srcdir/exceptions.at:370: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/libcommon.la     common.lo -no-undefined -version-info 1:0:0 -rpath \$libdir"
22486 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/libcommon.la    common.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:370"
22487 ( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/libcommon.la      common.lo -no-undefined -version-info 1:0:0 -rpath $libdir
22488 ) >>"$at_stdout" 2>>"$at_stderr"
22489 at_status=$? at_failed=false
22490 $at_check_filter
22491 echo stderr:; cat "$at_stderr"
22492 echo stdout:; cat "$at_stdout"
22493 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:370"
22494 $at_failed && at_fn_log_failure
22495 $at_traceon; }
22496
22497 { set +x
22498 $as_echo "$at_srcdir/exceptions.at:373: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/liba.la          lib.lo -no-undefined -version-info 1:0:0 -rpath \$libdir"
22499 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la         lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:373"
22500 ( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la   lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir
22501 ) >>"$at_stdout" 2>>"$at_stderr"
22502 at_status=$? at_failed=false
22503 $at_check_filter
22504 echo stderr:; cat "$at_stderr"
22505 echo stdout:; cat "$at_stdout"
22506 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:373"
22507 $at_failed && at_fn_log_failure
22508 $at_traceon; }
22509
22510 { set +x
22511 $as_echo "$at_srcdir/exceptions.at:376: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o m/module.la        module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath \$moddir"
22512 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la       module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath $moddir" "exceptions.at:376"
22513 ( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la         module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath $moddir
22514 ) >>"$at_stdout" 2>>"$at_stderr"
22515 at_status=$? at_failed=false
22516 $at_check_filter
22517 echo stderr:; cat "$at_stderr"
22518 echo stdout:; cat "$at_stdout"
22519 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:376"
22520 $at_failed && at_fn_log_failure
22521 $at_traceon; }
22522
22523
22524 # We need -export-dynamic for the exception handling in modules to work.
22525 { set +x
22526 $as_echo "$at_srcdir/exceptions.at:381: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT       main.\$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la \$LIBLTDL -export-dynamic"
22527 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT       main.$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la $LIBLTDL -export-dynamic" "exceptions.at:381"
22528 ( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT         main.$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la $LIBLTDL -export-dynamic
22529 ) >>"$at_stdout" 2>>"$at_stderr"
22530 at_status=$? at_failed=false
22531 $at_check_filter
22532 echo stderr:; cat "$at_stderr"
22533 echo stdout:; cat "$at_stdout"
22534 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:381"
22535 $at_failed && at_fn_log_failure
22536 $at_traceon; }
22537
22538
22539 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
22540 { set +x
22541 $as_echo "$at_srcdir/exceptions.at:385: if \$LIBTOOL --mode=execute -dlopen m/module.la \"\$lt_exe\" ; then :; else lt_status=\$?;                 test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
22542 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen m/module.la \"$lt_exe\" ; then :; else lt_status=$?;               test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "exceptions.at:385"
22543 ( $at_check_trace; if $LIBTOOL --mode=execute -dlopen m/module.la "$lt_exe" ; then :; else lt_status=$?;                   test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
22544 ) >>"$at_stdout" 2>>"$at_stderr"
22545 at_status=$? at_failed=false
22546 $at_check_filter
22547 echo stderr:; cat "$at_stderr"
22548 echo stdout:; cat "$at_stdout"
22549 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:385"
22550 $at_failed && at_fn_log_failure
22551 $at_traceon; }
22552
22553
22554
22555 { set +x
22556 $as_echo "$at_srcdir/exceptions.at:387: \$LIBTOOL --mode=install cp l/libcommon.la \$libdir"
22557 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/libcommon.la $libdir" "exceptions.at:387"
22558 ( $at_check_trace; $LIBTOOL --mode=install cp l/libcommon.la $libdir
22559 ) >>"$at_stdout" 2>>"$at_stderr"
22560 at_status=$? at_failed=false
22561 $at_check_filter
22562 echo stderr:; cat "$at_stderr"
22563 echo stdout:; cat "$at_stdout"
22564 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:387"
22565 $at_failed && at_fn_log_failure
22566 $at_traceon; }
22567
22568 { set +x
22569 $as_echo "$at_srcdir/exceptions.at:389: \$LIBTOOL --mode=install cp l/liba.la \$libdir"
22570 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/liba.la $libdir" "exceptions.at:389"
22571 ( $at_check_trace; $LIBTOOL --mode=install cp l/liba.la $libdir
22572 ) >>"$at_stdout" 2>>"$at_stderr"
22573 at_status=$? at_failed=false
22574 $at_check_filter
22575 echo stderr:; cat "$at_stderr"
22576 echo stdout:; cat "$at_stdout"
22577 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:389"
22578 $at_failed && at_fn_log_failure
22579 $at_traceon; }
22580
22581 { set +x
22582 $as_echo "$at_srcdir/exceptions.at:391: \$LIBTOOL --mode=install cp m/module.la \$moddir"
22583 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m/module.la $moddir" "exceptions.at:391"
22584 ( $at_check_trace; $LIBTOOL --mode=install cp m/module.la $moddir
22585 ) >>"$at_stdout" 2>>"$at_stderr"
22586 at_status=$? at_failed=false
22587 $at_check_filter
22588 echo stderr:; cat "$at_stderr"
22589 echo stdout:; cat "$at_stdout"
22590 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:391"
22591 $at_failed && at_fn_log_failure
22592 $at_traceon; }
22593
22594 { set +x
22595 $as_echo "$at_srcdir/exceptions.at:393: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir"
22596 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "exceptions.at:393"
22597 ( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir
22598 ) >>"$at_stdout" 2>>"$at_stderr"
22599 at_status=$? at_failed=false
22600 $at_check_filter
22601 echo stderr:; cat "$at_stderr"
22602 echo stdout:; cat "$at_stdout"
22603 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:393"
22604 $at_failed && at_fn_log_failure
22605 $at_traceon; }
22606
22607 rm -rf l m main$EXEEXT
22608
22609 LTDL_LIBRARY_PATH=$moddir
22610 export LTDL_LIBRARY_PATH
22611 lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
22612 { set +x
22613 $as_echo "$at_srcdir/exceptions.at:399: if \"\$lt_exe\" ; then :; else lt_status=\$?;              test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
22614 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "exceptions.at:399"
22615 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
22616 ) >>"$at_stdout" 2>>"$at_stderr"
22617 at_status=$? at_failed=false
22618 $at_check_filter
22619 echo stderr:; cat "$at_stderr"
22620 echo stdout:; cat "$at_stdout"
22621 at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:399"
22622 $at_failed && at_fn_log_failure
22623 $at_traceon; }
22624
22625
22626
22627   set +x
22628   $at_times_p && times >"$at_times_file"
22629 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22630 read at_status <"$at_status_file"
22631 #AT_STOP_104
22632 #AT_START_105
22633 at_fn_group_banner 105 'early-libtool.at:32' \
22634   "config.status" "                                  " 14
22635 at_xfail=no
22636       test "$ACLOCAL" = no && at_xfail=yes
22637       test "$AUTOCONF" = no && at_xfail=yes
22638 (
22639   $as_echo "105. $at_setup_line: testing $at_desc ..."
22640   $at_traceon
22641
22642
22643 cat >configure.ac <<'_ATEOF'
22644 AC_INIT([libtool-demo], 2.4.2, bug-libtool@gnu.org)
22645 AC_CONFIG_MACRO_DIR([m4])
22646 LT_INIT
22647 AC_CONFIG_FILES([Makefile])
22648 AC_OUTPUT
22649 _ATEOF
22650
22651
22652 cat >Makefile.in <<'_ATEOF'
22653 prefix = @prefix@
22654 libdir = @libdir@
22655 top_builddir = .
22656 SHELL = @SHELL@
22657 DEFAULT_INCLUDES = -I. -I@srcdir@
22658 EXEEXT = @EXEEXT@
22659 LIBTOOL = @LIBTOOL@
22660 OBJEXT = @OBJEXT@
22661
22662 CPPFLAGS = @CPPFLAGS@
22663 CFLAGS = @CFLAGS@
22664 LDFLAGS = @LDFLAGS@
22665
22666 COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
22667 LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
22668 LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
22669
22670 all: hell$(EXEEXT)
22671
22672 libhello.la: hello.lo
22673         $(LINK) -rpath $(libdir) hello.lo
22674 hell$(EXEEXT): main.$(OBJEXT) libhello.la
22675         $(LINK) main.$(OBJEXT) libhello.la
22676
22677 .SUFFIXES:
22678 .SUFFIXES: .c .$(OBJEXT) .lo
22679
22680 .c.$(OBJEXT):
22681         $(COMPILE) -c $<
22682 .c.lo:
22683         $(LTCOMPILE) -c -o $@ $<
22684 _ATEOF
22685
22686
22687 cat >hello.c <<'_ATEOF'
22688 #include <stdio.h>
22689
22690 void
22691 hello (void)
22692 {
22693   printf ("** This is not GNU Hello.  There is no built-in mail reader. **\n");
22694 }
22695 _ATEOF
22696
22697
22698 cat >main.c <<'_ATEOF'
22699 #include <stdio.h>
22700
22701 extern void hello (void);
22702
22703 int
22704 main (void)
22705 {
22706   printf ("Welcome to GNU Hell!\n");
22707
22708   hello ();
22709
22710   return 0;
22711 }
22712 _ATEOF
22713
22714
22715 cat > missing <<_EOF
22716 #! /bin/sh
22717 exit 0
22718 _EOF
22719 chmod a+x missing
22720
22721 $LIBTOOLIZE --copy --verbose --install
22722
22723
22724 { set +x
22725 $as_echo "$at_srcdir/early-libtool.at:109: \$ACLOCAL -I m4"
22726 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:109"
22727 ( $at_check_trace; $ACLOCAL -I m4
22728 ) >>"$at_stdout" 2>>"$at_stderr"
22729 at_status=$? at_failed=false
22730 $at_check_filter
22731 echo stderr:; cat "$at_stderr"
22732 echo stdout:; cat "$at_stdout"
22733 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:109"
22734 $at_failed && at_fn_log_failure
22735 $at_traceon; }
22736
22737
22738
22739
22740 { set +x
22741 $as_echo "$at_srcdir/early-libtool.at:110: \$AUTOCONF --force"
22742 at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:110"
22743 ( $at_check_trace; $AUTOCONF --force
22744 ) >>"$at_stdout" 2>>"$at_stderr"
22745 at_status=$? at_failed=false
22746 $at_check_filter
22747 echo stderr:; cat "$at_stderr"
22748 echo stdout:; cat "$at_stdout"
22749 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:110"
22750 $at_failed && at_fn_log_failure
22751 $at_traceon; }
22752
22753
22754
22755
22756 { set +x
22757 $as_echo "$at_srcdir/early-libtool.at:111: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;       \$CONFIG_SHELL ./configure \$configure_options "
22758 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:111"
22759 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
22760 ) >>"$at_stdout" 2>>"$at_stderr"
22761 at_status=$? at_failed=false
22762 $at_check_filter
22763 echo stderr:; cat "$at_stderr"
22764 echo stdout:; cat "$at_stdout"
22765 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:111"
22766 $at_failed && at_fn_log_failure
22767 $at_traceon; }
22768
22769
22770 for target in all
22771 do
22772   { set +x
22773 $as_echo "$at_srcdir/early-libtool.at:112: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
22774 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:112"
22775 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
22776 ) >>"$at_stdout" 2>>"$at_stderr"
22777 at_status=$? at_failed=false
22778 $at_check_filter
22779 echo stderr:; cat "$at_stderr"
22780 echo stdout:; cat "$at_stdout"
22781 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:112"
22782 $at_failed && at_fn_log_failure
22783 $at_traceon; }
22784
22785 done
22786
22787
22788 lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
22789 { set +x
22790 $as_echo "$at_srcdir/early-libtool.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
22791 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "early-libtool.at:114"
22792 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
22793 ) >>"$at_stdout" 2>>"$at_stderr"
22794 at_status=$? at_failed=false
22795 $at_check_filter
22796 at_fn_diff_devnull "$at_stderr" || at_failed=:
22797 echo stdout:; tee stdout <"$at_stdout"
22798 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:114"
22799 $at_failed && at_fn_log_failure
22800 $at_traceon; }
22801
22802
22803 { set +x
22804 $as_echo "$at_srcdir/early-libtool.at:115: grep 'Welcome to GNU Hell' stdout"
22805 at_fn_check_prepare_trace "early-libtool.at:115"
22806 ( $at_check_trace; grep 'Welcome to GNU Hell' stdout
22807 ) >>"$at_stdout" 2>>"$at_stderr"
22808 at_status=$? at_failed=false
22809 $at_check_filter
22810 at_fn_diff_devnull "$at_stderr" || at_failed=:
22811 echo stdout:; cat "$at_stdout"
22812 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:115"
22813 $at_failed && at_fn_log_failure
22814 $at_traceon; }
22815
22816 { set +x
22817 $as_echo "$at_srcdir/early-libtool.at:116: grep 'This is not GNU Hello.' stdout"
22818 at_fn_check_prepare_trace "early-libtool.at:116"
22819 ( $at_check_trace; grep 'This is not GNU Hello.' stdout
22820 ) >>"$at_stdout" 2>>"$at_stderr"
22821 at_status=$? at_failed=false
22822 $at_check_filter
22823 at_fn_diff_devnull "$at_stderr" || at_failed=:
22824 echo stdout:; cat "$at_stdout"
22825 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:116"
22826 $at_failed && at_fn_log_failure
22827 $at_traceon; }
22828
22829
22830   set +x
22831   $at_times_p && times >"$at_times_file"
22832 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22833 read at_status <"$at_status_file"
22834 #AT_STOP_105
22835 #AT_START_106
22836 at_fn_group_banner 106 'early-libtool.at:126' \
22837   "config.lt" "                                      " 14
22838 at_xfail=no
22839       test "$ACLOCAL" = no && at_xfail=yes
22840       test "$AUTOCONF" = no && at_xfail=yes
22841 (
22842   $as_echo "106. $at_setup_line: testing $at_desc ..."
22843   $at_traceon
22844
22845
22846 cat >configure.ac <<'_ATEOF'
22847 AC_INIT([libtool-demo], 2.4.2, bug-libtool@gnu.org)
22848 AC_CONFIG_MACRO_DIR([m4])
22849 LT_INIT
22850 LT_OUTPUT
22851
22852 cat >hello.c <<\_EOF
22853 #include <stdio.h>
22854
22855 void
22856 hello (void)
22857 {
22858   printf ("** This is not GNU Hello.  There is no built-in mail reader. **\n");
22859 }
22860 _EOF
22861
22862 # Prove that we can run libtool from inside configure:
22863 $SHELL ./libtool --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS \
22864     -I. -I$srcdir -c -o hello.lo hello.c  || exit 1
22865 $SHELL ./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS \
22866     -o libhello.la -rpath /notexist hello.lo || exit 1
22867
22868 AC_CONFIG_FILES([Makefile])
22869 AC_OUTPUT
22870 _ATEOF
22871
22872
22873 cat >Makefile.in <<'_ATEOF'
22874 prefix = @prefix@
22875 libdir = @libdir@
22876 top_builddir = .
22877 SHELL = @SHELL@
22878 DEFAULT_INCLUDES = -I. -I@srcdir@
22879 EXEEXT = @EXEEXT@
22880 LIBTOOL = @LIBTOOL@
22881 OBJEXT = @OBJEXT@
22882
22883 CPPFLAGS = @CPPFLAGS@
22884 CFLAGS = @CFLAGS@
22885 LDFLAGS = @LDFLAGS@
22886
22887 COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
22888 LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
22889
22890 all: hell$(EXEEXT)
22891
22892 hell$(EXEEXT): main.$(OBJEXT) libhello.la
22893         $(LINK) main.$(OBJEXT) libhello.la
22894
22895 .SUFFIXES:
22896 .SUFFIXES: .c .$(OBJEXT)
22897
22898 .c.$(OBJEXT):
22899         $(COMPILE) -c $<
22900 _ATEOF
22901
22902
22903 cat >hello.c <<'_ATEOF'
22904 #include <stdio.h>
22905
22906 void
22907 hello (void)
22908 {
22909   printf ("** This is not GNU Hello.  There is no built-in mail reader. **\n");
22910 }
22911 _ATEOF
22912
22913
22914 cat >main.c <<'_ATEOF'
22915 #include <stdio.h>
22916
22917 extern void hello (void);
22918
22919 int
22920 main (int argc, char *argv[])
22921 {
22922   printf ("Welcome to GNU Hell!\n");
22923
22924   hello ();
22925
22926   return 0;
22927 }
22928 _ATEOF
22929
22930
22931 cat > missing <<_EOF
22932 #! /bin/sh
22933 exit 0
22934 _EOF
22935 chmod a+x missing
22936
22937 $LIBTOOLIZE --copy --verbose --install
22938
22939
22940 { set +x
22941 $as_echo "$at_srcdir/early-libtool.at:216: \$ACLOCAL -I m4"
22942 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:216"
22943 ( $at_check_trace; $ACLOCAL -I m4
22944 ) >>"$at_stdout" 2>>"$at_stderr"
22945 at_status=$? at_failed=false
22946 $at_check_filter
22947 echo stderr:; cat "$at_stderr"
22948 echo stdout:; cat "$at_stdout"
22949 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:216"
22950 $at_failed && at_fn_log_failure
22951 $at_traceon; }
22952
22953
22954
22955
22956 { set +x
22957 $as_echo "$at_srcdir/early-libtool.at:217: \$AUTOCONF --force"
22958 at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:217"
22959 ( $at_check_trace; $AUTOCONF --force
22960 ) >>"$at_stdout" 2>>"$at_stderr"
22961 at_status=$? at_failed=false
22962 $at_check_filter
22963 echo stderr:; cat "$at_stderr"
22964 echo stdout:; cat "$at_stdout"
22965 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:217"
22966 $at_failed && at_fn_log_failure
22967 $at_traceon; }
22968
22969
22970
22971
22972 { set +x
22973 $as_echo "$at_srcdir/early-libtool.at:218: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;       \$CONFIG_SHELL ./configure \$configure_options "
22974 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:218"
22975 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
22976 ) >>"$at_stdout" 2>>"$at_stderr"
22977 at_status=$? at_failed=false
22978 $at_check_filter
22979 echo stderr:; cat "$at_stderr"
22980 echo stdout:; cat "$at_stdout"
22981 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:218"
22982 $at_failed && at_fn_log_failure
22983 $at_traceon; }
22984
22985
22986 for target in all
22987 do
22988   { set +x
22989 $as_echo "$at_srcdir/early-libtool.at:219: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
22990 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:219"
22991 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
22992 ) >>"$at_stdout" 2>>"$at_stderr"
22993 at_status=$? at_failed=false
22994 $at_check_filter
22995 echo stderr:; cat "$at_stderr"
22996 echo stdout:; cat "$at_stdout"
22997 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:219"
22998 $at_failed && at_fn_log_failure
22999 $at_traceon; }
23000
23001 done
23002
23003
23004 lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
23005 { set +x
23006 $as_echo "$at_srcdir/early-libtool.at:221: if \"\$lt_exe\" ; then :; else lt_status=\$?;           test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
23007 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "early-libtool.at:221"
23008 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
23009 ) >>"$at_stdout" 2>>"$at_stderr"
23010 at_status=$? at_failed=false
23011 $at_check_filter
23012 at_fn_diff_devnull "$at_stderr" || at_failed=:
23013 echo stdout:; tee stdout <"$at_stdout"
23014 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:221"
23015 $at_failed && at_fn_log_failure
23016 $at_traceon; }
23017
23018
23019 { set +x
23020 $as_echo "$at_srcdir/early-libtool.at:222: grep 'Welcome to GNU Hell' stdout"
23021 at_fn_check_prepare_trace "early-libtool.at:222"
23022 ( $at_check_trace; grep 'Welcome to GNU Hell' stdout
23023 ) >>"$at_stdout" 2>>"$at_stderr"
23024 at_status=$? at_failed=false
23025 $at_check_filter
23026 at_fn_diff_devnull "$at_stderr" || at_failed=:
23027 echo stdout:; cat "$at_stdout"
23028 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:222"
23029 $at_failed && at_fn_log_failure
23030 $at_traceon; }
23031
23032 { set +x
23033 $as_echo "$at_srcdir/early-libtool.at:223: grep 'This is not GNU Hello.' stdout"
23034 at_fn_check_prepare_trace "early-libtool.at:223"
23035 ( $at_check_trace; grep 'This is not GNU Hello.' stdout
23036 ) >>"$at_stdout" 2>>"$at_stderr"
23037 at_status=$? at_failed=false
23038 $at_check_filter
23039 at_fn_diff_devnull "$at_stderr" || at_failed=:
23040 echo stdout:; cat "$at_stdout"
23041 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:223"
23042 $at_failed && at_fn_log_failure
23043 $at_traceon; }
23044
23045
23046 # Make sure config.status --recheck updates the libtool script
23047 rm libtool
23048 { set +x
23049 $as_echo "$at_srcdir/early-libtool.at:227: \$SHELL ./config.status --recheck"
23050 at_fn_check_prepare_dynamic "$SHELL ./config.status --recheck" "early-libtool.at:227"
23051 ( $at_check_trace; $SHELL ./config.status --recheck
23052 ) >>"$at_stdout" 2>>"$at_stderr"
23053 at_status=$? at_failed=false
23054 $at_check_filter
23055 echo stderr:; cat "$at_stderr"
23056 echo stdout:; cat "$at_stdout"
23057 at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:227"
23058 $at_failed && at_fn_log_failure
23059 $at_traceon; }
23060
23061
23062   set +x
23063   $at_times_p && times >"$at_times_file"
23064 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23065 read at_status <"$at_status_file"
23066 #AT_STOP_106
23067 #AT_START_107
23068 at_fn_group_banner 107 'with-pic.at:24' \
23069   "test --with-pic" "                                " 14
23070 at_xfail=no
23071 (
23072   $as_echo "107. $at_setup_line: testing $at_desc ..."
23073   $at_traceon
23074
23075 eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
23076
23077 { set +x
23078 $as_echo "$at_srcdir/with-pic.at:27: test \"z\$pic_flag\" != \"z\" || exit 77"
23079 at_fn_check_prepare_dynamic "test \"z$pic_flag\" != \"z\" || exit 77" "with-pic.at:27"
23080 ( $at_check_trace; test "z$pic_flag" != "z" || exit 77
23081 ) >>"$at_stdout" 2>>"$at_stderr"
23082 at_status=$? at_failed=false
23083 $at_check_filter
23084 at_fn_diff_devnull "$at_stderr" || at_failed=:
23085 at_fn_diff_devnull "$at_stdout" || at_failed=:
23086 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:27"
23087 $at_failed && at_fn_log_failure
23088 $at_traceon; }
23089
23090 { set +x
23091 $as_echo "$at_srcdir/with-pic.at:28: test \"\$at_srcdir\" != . || exit 77"
23092 at_fn_check_prepare_dynamic "test \"$at_srcdir\" != . || exit 77" "with-pic.at:28"
23093 ( $at_check_trace; test "$at_srcdir" != . || exit 77
23094 ) >>"$at_stdout" 2>>"$at_stderr"
23095 at_status=$? at_failed=false
23096 $at_check_filter
23097 at_fn_diff_devnull "$at_stderr" || at_failed=:
23098 at_fn_diff_devnull "$at_stdout" || at_failed=:
23099 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:28"
23100 $at_failed && at_fn_log_failure
23101 $at_traceon; }
23102
23103
23104 CONFIGURE=$abs_top_srcdir/tests/demo/configure
23105 : ${MAKE=make}
23106
23107 { set +x
23108 $as_echo "$at_srcdir/with-pic.at:33: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL \$CONFIGURE \$configure_options --disable-shared --with-pic=no"
23109 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "with-pic.at:33"
23110 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL $CONFIGURE $configure_options --disable-shared --with-pic=no
23111 ) >>"$at_stdout" 2>>"$at_stderr"
23112 at_status=$? at_failed=false
23113 $at_check_filter
23114 echo stderr:; cat "$at_stderr"
23115 echo stdout:; cat "$at_stdout"
23116 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:33"
23117 $at_failed && at_fn_log_failure
23118 $at_traceon; }
23119
23120
23121 { set +x
23122 $as_echo "$at_srcdir/with-pic.at:34: \$MAKE"
23123 at_fn_check_prepare_dynamic "$MAKE" "with-pic.at:34"
23124 ( $at_check_trace; $MAKE
23125 ) >>"$at_stdout" 2>>"$at_stderr"
23126 at_status=$? at_failed=false
23127 $at_check_filter
23128 echo stderr:; cat "$at_stderr"
23129 echo stdout:; tee stdout <"$at_stdout"
23130 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:34"
23131 $at_failed && at_fn_log_failure
23132 $at_traceon; }
23133
23134 { set +x
23135 $as_echo "$at_srcdir/with-pic.at:35: \$FGREP -v \"\$pic_flag\" stdout"
23136 at_fn_check_prepare_dynamic "$FGREP -v \"$pic_flag\" stdout" "with-pic.at:35"
23137 ( $at_check_trace; $FGREP -v "$pic_flag" stdout
23138 ) >>"$at_stdout" 2>>"$at_stderr"
23139 at_status=$? at_failed=false
23140 $at_check_filter
23141 echo stderr:; cat "$at_stderr"
23142 echo stdout:; cat "$at_stdout"
23143 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:35"
23144 $at_failed && at_fn_log_failure
23145 $at_traceon; }
23146
23147 $MAKE clean
23148
23149 { set +x
23150 $as_echo "$at_srcdir/with-pic.at:38: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL \$CONFIGURE \$configure_options --disable-shared --with-pic=yes"
23151 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "with-pic.at:38"
23152 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL $CONFIGURE $configure_options --disable-shared --with-pic=yes
23153 ) >>"$at_stdout" 2>>"$at_stderr"
23154 at_status=$? at_failed=false
23155 $at_check_filter
23156 echo stderr:; cat "$at_stderr"
23157 echo stdout:; cat "$at_stdout"
23158 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:38"
23159 $at_failed && at_fn_log_failure
23160 $at_traceon; }
23161
23162
23163 { set +x
23164 $as_echo "$at_srcdir/with-pic.at:39: \$MAKE"
23165 at_fn_check_prepare_dynamic "$MAKE" "with-pic.at:39"
23166 ( $at_check_trace; $MAKE
23167 ) >>"$at_stdout" 2>>"$at_stderr"
23168 at_status=$? at_failed=false
23169 $at_check_filter
23170 echo stderr:; cat "$at_stderr"
23171 echo stdout:; tee stdout <"$at_stdout"
23172 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:39"
23173 $at_failed && at_fn_log_failure
23174 $at_traceon; }
23175
23176 { set +x
23177 $as_echo "$at_srcdir/with-pic.at:40: \$FGREP \"\$pic_flag\" stdout"
23178 at_fn_check_prepare_dynamic "$FGREP \"$pic_flag\" stdout" "with-pic.at:40"
23179 ( $at_check_trace; $FGREP "$pic_flag" stdout
23180 ) >>"$at_stdout" 2>>"$at_stderr"
23181 at_status=$? at_failed=false
23182 $at_check_filter
23183 echo stderr:; cat "$at_stderr"
23184 echo stdout:; cat "$at_stdout"
23185 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:40"
23186 $at_failed && at_fn_log_failure
23187 $at_traceon; }
23188
23189 $MAKE clean
23190
23191 { set +x
23192 $as_echo "$at_srcdir/with-pic.at:43: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL \$CONFIGURE \$configure_options --disable-shared --with-pic=\"demo,foo,bar\""
23193 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "with-pic.at:43"
23194 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL $CONFIGURE $configure_options --disable-shared --with-pic="demo,foo,bar"
23195 ) >>"$at_stdout" 2>>"$at_stderr"
23196 at_status=$? at_failed=false
23197 $at_check_filter
23198 echo stderr:; cat "$at_stderr"
23199 echo stdout:; cat "$at_stdout"
23200 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:43"
23201 $at_failed && at_fn_log_failure
23202 $at_traceon; }
23203
23204
23205 { set +x
23206 $as_echo "$at_srcdir/with-pic.at:44: \$MAKE"
23207 at_fn_check_prepare_dynamic "$MAKE" "with-pic.at:44"
23208 ( $at_check_trace; $MAKE
23209 ) >>"$at_stdout" 2>>"$at_stderr"
23210 at_status=$? at_failed=false
23211 $at_check_filter
23212 echo stderr:; cat "$at_stderr"
23213 echo stdout:; tee stdout <"$at_stdout"
23214 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:44"
23215 $at_failed && at_fn_log_failure
23216 $at_traceon; }
23217
23218 { set +x
23219 $as_echo "$at_srcdir/with-pic.at:45: \$FGREP \"\$pic_flag\" stdout"
23220 at_fn_check_prepare_dynamic "$FGREP \"$pic_flag\" stdout" "with-pic.at:45"
23221 ( $at_check_trace; $FGREP "$pic_flag" stdout
23222 ) >>"$at_stdout" 2>>"$at_stderr"
23223 at_status=$? at_failed=false
23224 $at_check_filter
23225 echo stderr:; cat "$at_stderr"
23226 echo stdout:; cat "$at_stdout"
23227 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:45"
23228 $at_failed && at_fn_log_failure
23229 $at_traceon; }
23230
23231 $MAKE clean
23232
23233 { set +x
23234 $as_echo "$at_srcdir/with-pic.at:48: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL \$CONFIGURE \$configure_options --disable-shared --with-pic=\"foo,bar\""
23235 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "with-pic.at:48"
23236 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL $CONFIGURE $configure_options --disable-shared --with-pic="foo,bar"
23237 ) >>"$at_stdout" 2>>"$at_stderr"
23238 at_status=$? at_failed=false
23239 $at_check_filter
23240 echo stderr:; cat "$at_stderr"
23241 echo stdout:; cat "$at_stdout"
23242 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:48"
23243 $at_failed && at_fn_log_failure
23244 $at_traceon; }
23245
23246
23247 { set +x
23248 $as_echo "$at_srcdir/with-pic.at:49: \$MAKE"
23249 at_fn_check_prepare_dynamic "$MAKE" "with-pic.at:49"
23250 ( $at_check_trace; $MAKE
23251 ) >>"$at_stdout" 2>>"$at_stderr"
23252 at_status=$? at_failed=false
23253 $at_check_filter
23254 echo stderr:; cat "$at_stderr"
23255 echo stdout:; tee stdout <"$at_stdout"
23256 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:49"
23257 $at_failed && at_fn_log_failure
23258 $at_traceon; }
23259
23260 { set +x
23261 $as_echo "$at_srcdir/with-pic.at:50: \$FGREP -v \"\$pic_flag\" stdout"
23262 at_fn_check_prepare_dynamic "$FGREP -v \"$pic_flag\" stdout" "with-pic.at:50"
23263 ( $at_check_trace; $FGREP -v "$pic_flag" stdout
23264 ) >>"$at_stdout" 2>>"$at_stderr"
23265 at_status=$? at_failed=false
23266 $at_check_filter
23267 echo stderr:; cat "$at_stderr"
23268 echo stdout:; cat "$at_stdout"
23269 at_fn_check_status 0 $at_status "$at_srcdir/with-pic.at:50"
23270 $at_failed && at_fn_log_failure
23271 $at_traceon; }
23272
23273 $MAKE clean
23274
23275   set +x
23276   $at_times_p && times >"$at_times_file"
23277 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23278 read at_status <"$at_status_file"
23279 #AT_STOP_107
23280 #AT_START_108
23281 at_fn_group_banner 108 'no-executables.at:25' \
23282   "AC_NO_EXECUTABLES" "                              " 15
23283 at_xfail=no
23284       test "$ACLOCAL" = no && at_xfail=yes
23285       test "$AUTOCONF" = no && at_xfail=yes
23286 (
23287   $as_echo "108. $at_setup_line: testing $at_desc ..."
23288   $at_traceon
23289
23290
23291 mkdir m4
23292
23293 cat >configure.ac <<'_ATEOF'
23294 AC_INIT([no-exec], [1])
23295 AC_CONFIG_MACRO_DIR([m4])
23296
23297 # We punt a bit here, to get the results of AC_PROG_CC
23298 # (and allow it to do link tests) but still error out on
23299 # link tests within Libtool macros.
23300 LDFLAGS=-lnosuchlibrary
23301 AC_NO_EXECUTABLES
23302 AC_PROG_CC
23303 AC_PROG_CXX
23304 AC_PROG_F77
23305 AC_PROG_FC
23306 AM_PROG_GCJ
23307
23308 # Consequently, we have to set cache variables for each link
23309 # test we may need.  For the purposes of this test, it shouldn't
23310 # matter much whether these values are actually wrong, the point
23311 # is that the linker should never be invoked.
23312
23313 lt_cv_shlibpath_overrides_runpath=no
23314 lt_cv_archive_cmds_need_lc=no
23315 lt_cv_cc_needs_belf=no
23316 lt_cv_ld_exported_symbols_list=no
23317 lt_cv_prog_compiler_static_works=no
23318 lt_cv_aix_libpath="/usr/lib:/lib"
23319 lt_cv_irix_exported_symbol=yes
23320
23321 # Deal with AC_LIBTOOL_DLOPEN in one of two possible ways:
23322 # - do not execute it at all in the ac_no_link case
23323 # - preset the individual Autoconf test variables
23324
23325 if ${test_ac_libtool_dlopen-false}; then
23326     ac_cv_func_shl_load=no
23327     ac_cv_lib_dld_shl_load=no
23328     ac_cv_func_dlopen=no
23329     ac_cv_lib_dl_dlopen=no
23330     ac_cv_lib_svld_dlopen=no
23331     ac_cv_lib_dld_dld_link=no
23332   AC_LIBTOOL_DLOPEN
23333 fi
23334 AC_PROG_LIBTOOL
23335
23336 AC_OUTPUT
23337 _ATEOF
23338
23339
23340 $LIBTOOLIZE --install
23341
23342
23343 { set +x
23344 $as_echo "$at_srcdir/no-executables.at:75: \$ACLOCAL -I m4"
23345 at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "no-executables.at:75"
23346 ( $at_check_trace; $ACLOCAL -I m4
23347 ) >>"$at_stdout" 2>>"$at_stderr"
23348 at_status=$? at_failed=false
23349 $at_check_filter
23350 echo stderr:; cat "$at_stderr"
23351 echo stdout:; cat "$at_stdout"
23352 at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75"
23353 $at_failed && at_fn_log_failure
23354 $at_traceon; }
23355
23356
23357
23358
23359
23360
23361 { set +x
23362 $as_echo "$at_srcdir/no-executables.at:75: \$AUTOCONF "
23363 at_fn_check_prepare_dynamic "$AUTOCONF " "no-executables.at:75"
23364 ( $at_check_trace; $AUTOCONF
23365 ) >>"$at_stdout" 2>>"$at_stderr"
23366 at_status=$? at_failed=false
23367 $at_check_filter
23368 echo stderr:; cat "$at_stderr"
23369 echo stdout:; cat "$at_stdout"
23370 at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75"
23371 $at_failed && at_fn_log_failure
23372 $at_traceon; }
23373
23374
23375
23376
23377
23378
23379
23380 { set +x
23381 $as_echo "$at_srcdir/no-executables.at:76: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;       \$CONFIG_SHELL ./configure \$configure_options "
23382 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:76"
23383 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
23384 ) >>"$at_stdout" 2>>"$at_stderr"
23385 at_status=$? at_failed=false
23386 $at_check_filter
23387 echo stderr:; cat "$at_stderr"
23388 echo stdout:; cat "$at_stdout"
23389 at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:76"
23390 $at_failed && at_fn_log_failure
23391 $at_traceon; }
23392
23393
23394 { set +x
23395 $as_echo "$at_srcdir/no-executables.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;       \$CONFIG_SHELL ./configure \$configure_options test_ac_libtool_dlopen=:"
23396 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:77"
23397 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options test_ac_libtool_dlopen=:
23398 ) >>"$at_stdout" 2>>"$at_stderr"
23399 at_status=$? at_failed=false
23400 $at_check_filter
23401 echo stderr:; cat "$at_stderr"
23402 echo stdout:; cat "$at_stdout"
23403 at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:77"
23404 $at_failed && at_fn_log_failure
23405 $at_traceon; }
23406
23407
23408
23409   set +x
23410   $at_times_p && times >"$at_times_file"
23411 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23412 read at_status <"$at_status_file"
23413 #AT_STOP_108
23414 #AT_START_109
23415 at_fn_group_banner 109 'deplibs-ident.at:32' \
23416   "build tree relpaths" "                            " 16
23417 at_xfail=no
23418       case $host in
23419                  *-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;;
23420                  *):;;
23421                esac && at_xfail=yes
23422 (
23423   $as_echo "109. $at_setup_line: testing $at_desc ..."
23424   $at_traceon
23425
23426
23427
23428 mkdir a a/b c
23429 echo 'int c() { return 0; }' > c/libcee.c
23430 { set +x
23431 $as_echo "$at_srcdir/deplibs-ident.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c c/libcee.c -o c/libcee.lo"
23432 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo" "deplibs-ident.at:37"
23433 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo
23434 ) >>"$at_stdout" 2>>"$at_stderr"
23435 at_status=$? at_failed=false
23436 $at_check_filter
23437 echo stderr:; cat "$at_stderr"
23438 echo stdout:; cat "$at_stdout"
23439 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:37"
23440 $at_failed && at_fn_log_failure
23441 $at_traceon; }
23442
23443 { set +x
23444 $as_echo "$at_srcdir/deplibs-ident.at:39: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere"
23445 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" "deplibs-ident.at:39"
23446 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere
23447 ) >>"$at_stdout" 2>>"$at_stderr"
23448 at_status=$? at_failed=false
23449 $at_check_filter
23450 echo stderr:; cat "$at_stderr"
23451 echo stdout:; cat "$at_stdout"
23452 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:39"
23453 $at_failed && at_fn_log_failure
23454 $at_traceon; }
23455
23456
23457 depl_1=../c/libcee.la
23458 depl_2=`pwd`/c/libcee.la
23459 depl_3="-L../c -lcee"
23460
23461 (
23462   cd a
23463   for i in 1 2 3; do
23464     eval depend_on_c=\"\$depl_$i\"
23465     echo "extern int c(void); int a$i() { return c(); }" > liba$i.c
23466     { set +x
23467 $as_echo "$at_srcdir/deplibs-ident.at:51: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba\$i.c"
23468 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c" "deplibs-ident.at:51"
23469 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c
23470 ) >>"$at_stdout" 2>>"$at_stderr"
23471 at_status=$? at_failed=false
23472 $at_check_filter
23473 echo stderr:; cat "$at_stderr"
23474 echo stdout:; cat "$at_stdout"
23475 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:51"
23476 $at_failed && at_fn_log_failure
23477 $at_traceon; }
23478
23479     { set +x
23480 $as_echo "$at_srcdir/deplibs-ident.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba\$i.la liba\$i.lo \$depend_on_c -rpath /nowhere"
23481 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere" "deplibs-ident.at:53"
23482 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere
23483 ) >>"$at_stdout" 2>>"$at_stderr"
23484 at_status=$? at_failed=false
23485 $at_check_filter
23486 echo stderr:; cat "$at_stderr"
23487 echo stdout:; cat "$at_stdout"
23488 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:53"
23489 $at_failed && at_fn_log_failure
23490 $at_traceon; }
23491
23492   done
23493 )
23494
23495 cat >a/b/b.c <<'_ATEOF'
23496 extern int a1(void), a2(void), a3(void), c(void);
23497 int main() { return a1() + a2() + a3() + c(); }
23498 _ATEOF
23499
23500
23501 (
23502   cd a/b
23503   { set +x
23504 $as_echo "$at_srcdir/deplibs-ident.at:65: \$CC \$CFLAGS -c b.c"
23505 at_fn_check_prepare_dynamic "$CC $CFLAGS -c b.c" "deplibs-ident.at:65"
23506 ( $at_check_trace; $CC $CFLAGS -c b.c
23507 ) >>"$at_stdout" 2>>"$at_stderr"
23508 at_status=$? at_failed=false
23509 $at_check_filter
23510 echo stderr:; cat "$at_stderr"
23511 echo stdout:; cat "$at_stdout"
23512 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:65"
23513 $at_failed && at_fn_log_failure
23514 $at_traceon; }
23515
23516   { set +x
23517 $as_echo "$at_srcdir/deplibs-ident.at:66: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o b\$EXEEXT b.\$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere"
23518 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" "deplibs-ident.at:66"
23519 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere
23520 ) >>"$at_stdout" 2>>"$at_stderr"
23521 at_status=$? at_failed=false
23522 $at_check_filter
23523 echo stderr:; cat "$at_stderr"
23524 echo stdout:; tee stdout <"$at_stdout"
23525 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:66"
23526 $at_failed && at_fn_log_failure
23527 $at_traceon; }
23528
23529   { set +x
23530 $as_echo "$at_srcdir/deplibs-ident.at:68: \$EGREP 'cee.*cee' stdout"
23531 at_fn_check_prepare_dynamic "$EGREP 'cee.*cee' stdout" "deplibs-ident.at:68"
23532 ( $at_check_trace; $EGREP 'cee.*cee' stdout
23533 ) >>"$at_stdout" 2>>"$at_stderr"
23534 at_status=$? at_failed=false
23535 $at_check_filter
23536 echo stderr:; cat "$at_stderr"
23537 echo stdout:; cat "$at_stdout"
23538 at_fn_check_status 1 $at_status "$at_srcdir/deplibs-ident.at:68"
23539 $at_failed && at_fn_log_failure
23540 $at_traceon; }
23541
23542
23543   )
23544
23545   set +x
23546   $at_times_p && times >"$at_times_file"
23547 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23548 read at_status <"$at_status_file"
23549 #AT_STOP_109
23550 #AT_START_110
23551 at_fn_group_banner 110 'configure-iface.at:102' \
23552   "installable libltdl" "                            " 17
23553 at_xfail=no
23554       test "$ACLOCAL" = no && at_xfail=yes
23555       test "$AUTOHEADER" = no && at_xfail=yes
23556       test "$AUTOMAKE" = no && at_xfail=yes
23557       test "$AUTOCONF" = no && at_xfail=yes
23558 (
23559   $as_echo "110. $at_setup_line: testing $at_desc ..."
23560   $at_traceon
23561
23562
23563
23564 cat >main.c <<'_ATEOF'
23565 #include <ltdl.h>
23566 #include <stdio.h>
23567
23568 typedef int funcp (void);
23569
23570 static int errors = 0;
23571
23572 int
23573 main (void)
23574 {
23575   lt_dlhandle handle;
23576
23577   LTDL_SET_PRELOADED_SYMBOLS();
23578
23579   if (lt_dlinit () != 0)
23580     {
23581       fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
23582       return 1;
23583     }
23584
23585   handle = lt_dlopenext ("libmodule");
23586   if (!handle)
23587     {
23588       fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
23589       ++errors;
23590     }
23591
23592   {
23593     funcp *f = (funcp *) lt_dlsym (handle, "f");
23594
23595     if (f)
23596       {
23597         printf ("%d\n", f ());
23598       }
23599     else
23600       {
23601         fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
23602         ++errors;
23603       }
23604   }
23605
23606   if (lt_dlexit () != 0)
23607     {
23608       fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
23609       ++errors;
23610     }
23611
23612   return (errors != 0);
23613 }
23614 _ATEOF
23615
23616
23617 cat >libmodule.c <<'_ATEOF'
23618 #ifdef __cplusplus
23619 extern "C" {
23620 #endif
23621 int f (void) { return 5150; }
23622 #ifdef __cplusplus
23623 }
23624 #endif
23625 _ATEOF
23626
23627
23628 cat >expout <<'_ATEOF'
23629 5150
23630 _ATEOF
23631
23632 case $host_os in mingw*)
23633   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
23634   mv -f expout.t expout ;;
23635 esac
23636
23637
23638 cat >configure.ac <<'_ATEOF'
23639 AC_INIT([installable-ltdl-demo], 2.4.2, bug-libtool@gnu.org)
23640 AC_CONFIG_AUX_DIR([libltdl/config])
23641 AC_CONFIG_MACRO_DIR([libltdl/m4])
23642 AC_CONFIG_HEADERS([config.h:config.hin])
23643 LT_CONFIG_LTDL_DIR([libltdl])
23644 AM_INIT_AUTOMAKE([foreign])
23645 AC_PROG_CC
23646 AM_PROG_CC_C_O
23647 LT_INIT([dlopen])
23648 LTDL_INIT([installable])
23649 AC_CONFIG_FILES([Makefile])
23650 AC_OUTPUT
23651 _ATEOF
23652
23653
23654 cat >Makefile.am <<'_ATEOF'
23655 AUTOMAKE_OPTIONS        = 1.7
23656
23657 SUBDIRS                 = libltdl
23658
23659 AM_CPPFLAGS             = $(LTDLINCL)
23660
23661 lib_LTLIBRARIES         = libmodule.la
23662 # Automake < 1.8 will use libmodule.la.c as default source,
23663 # while newer will choose libmodule.c; so specify it here.
23664 libmodule_la_SOURCES    = libmodule.c
23665 libmodule_la_LDFLAGS    = -module
23666
23667 bin_PROGRAMS            = main
23668 main_LDFLAGS            = -dlopen libmodule.la
23669 main_LDADD              = $(LIBLTDL)
23670 main_DEPENDENCIES       = $(LTDLDEPS) libmodule.la
23671 _ATEOF
23672
23673
23674 # Install everything!
23675 prefix=`pwd`/_inst
23676
23677 $LIBTOOLIZE --ltdl
23678
23679
23680 { set +x
23681 $as_echo "$at_srcdir/configure-iface.at:144: \$ACLOCAL -I libltdl/m4"
23682 at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:144"
23683 ( $at_check_trace; $ACLOCAL -I libltdl/m4
23684 ) >>"$at_stdout" 2>>"$at_stderr"
23685 at_status=$? at_failed=false
23686 $at_check_filter
23687 echo stderr:; cat "$at_stderr"
23688 echo stdout:; cat "$at_stdout"
23689 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23690 $at_failed && at_fn_log_failure
23691 $at_traceon; }
23692
23693
23694
23695
23696 { set +x
23697 $as_echo "$at_srcdir/configure-iface.at:144: \$AUTOHEADER "
23698 at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:144"
23699 ( $at_check_trace; $AUTOHEADER
23700 ) >>"$at_stdout" 2>>"$at_stderr"
23701 at_status=$? at_failed=false
23702 $at_check_filter
23703 echo stderr:; cat "$at_stderr"
23704 echo stdout:; cat "$at_stdout"
23705 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23706 $at_failed && at_fn_log_failure
23707 $at_traceon; }
23708
23709
23710
23711
23712 { set +x
23713 $as_echo "$at_srcdir/configure-iface.at:144: \$AUTOMAKE --add-missing"
23714 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:144"
23715 ( $at_check_trace; $AUTOMAKE --add-missing
23716 ) >>"$at_stdout" 2>>"$at_stderr"
23717 at_status=$? at_failed=false
23718 $at_check_filter
23719 echo stderr:; tee stderr <"$at_stderr"
23720 echo stdout:; cat "$at_stdout"
23721 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23722 if $at_failed; then :
23723   { set +x
23724 $as_echo "$at_srcdir/configure-iface.at:144: grep 'require .*but have' stderr && (exit 77)"
23725 at_fn_check_prepare_trace "configure-iface.at:144"
23726 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
23727 ) >>"$at_stdout" 2>>"$at_stderr"
23728 at_status=$? at_failed=false
23729 $at_check_filter
23730 at_fn_diff_devnull "$at_stderr" || at_failed=:
23731 at_fn_diff_devnull "$at_stdout" || at_failed=:
23732 at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:144"
23733 $at_failed && at_fn_log_failure
23734 $at_traceon; }
23735
23736 fi
23737 $at_failed && at_fn_log_failure
23738 $at_traceon; }
23739
23740
23741
23742
23743 { set +x
23744 $as_echo "$at_srcdir/configure-iface.at:144: \$AUTOCONF "
23745 at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:144"
23746 ( $at_check_trace; $AUTOCONF
23747 ) >>"$at_stdout" 2>>"$at_stderr"
23748 at_status=$? at_failed=false
23749 $at_check_filter
23750 echo stderr:; cat "$at_stderr"
23751 echo stdout:; cat "$at_stdout"
23752 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23753 $at_failed && at_fn_log_failure
23754 $at_traceon; }
23755
23756
23757
23758
23759 { set +x
23760 $as_echo "$at_srcdir/configure-iface.at:144: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl --prefix=\$prefix"
23761 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:144"
23762 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix
23763 ) >>"$at_stdout" 2>>"$at_stderr"
23764 at_status=$? at_failed=false
23765 $at_check_filter
23766 echo stderr:; cat "$at_stderr"
23767 echo stdout:; cat "$at_stdout"
23768 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23769 $at_failed && at_fn_log_failure
23770 $at_traceon; }
23771
23772
23773 for target in all install
23774 do
23775   { set +x
23776 $as_echo "$at_srcdir/configure-iface.at:144: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
23777 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:144"
23778 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
23779 ) >>"$at_stdout" 2>>"$at_stderr"
23780 at_status=$? at_failed=false
23781 $at_check_filter
23782 echo stderr:; cat "$at_stderr"
23783 echo stdout:; cat "$at_stdout"
23784 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144"
23785 $at_failed && at_fn_log_failure
23786 $at_traceon; }
23787
23788 done
23789
23790
23791
23792 # TODO: Check that the installed program `main' is linked against our libltdl
23793 { set +x
23794 $as_echo "$at_srcdir/configure-iface.at:148: test -f \$prefix/lib/libltdl.la"
23795 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:148"
23796 ( $at_check_trace; test -f $prefix/lib/libltdl.la
23797 ) >>"$at_stdout" 2>>"$at_stderr"
23798 at_status=$? at_failed=false
23799 $at_check_filter
23800 at_fn_diff_devnull "$at_stderr" || at_failed=:
23801 at_fn_diff_devnull "$at_stdout" || at_failed=:
23802 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:148"
23803 $at_failed && at_fn_log_failure
23804 $at_traceon; }
23805
23806 { set +x
23807 $as_echo "$at_srcdir/configure-iface.at:149: test -f \$prefix/include/ltdl.h"
23808 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:149"
23809 ( $at_check_trace; test -f $prefix/include/ltdl.h
23810 ) >>"$at_stdout" 2>>"$at_stderr"
23811 at_status=$? at_failed=false
23812 $at_check_filter
23813 at_fn_diff_devnull "$at_stderr" || at_failed=:
23814 at_fn_diff_devnull "$at_stdout" || at_failed=:
23815 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:149"
23816 $at_failed && at_fn_log_failure
23817 $at_traceon; }
23818
23819
23820 # Check that main is rebuilt if libltdl.la is newer
23821 rm -f libltdl/libltdl.la
23822 { set +x
23823 $as_echo "$at_srcdir/configure-iface.at:153: \$MAKE -q main\$EXEEXT || exit 1"
23824 at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:153"
23825 ( $at_check_trace; $MAKE -q main$EXEEXT || exit 1
23826 ) >>"$at_stdout" 2>>"$at_stderr"
23827 at_status=$? at_failed=false
23828 $at_check_filter
23829 echo stderr:; cat "$at_stderr"
23830 echo stdout:; cat "$at_stdout"
23831 at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:153"
23832 $at_failed && at_fn_log_failure
23833 $at_traceon; }
23834
23835
23836   set +x
23837   $at_times_p && times >"$at_times_file"
23838 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23839 read at_status <"$at_status_file"
23840 #AT_STOP_110
23841 #AT_START_111
23842 at_fn_group_banner 111 'configure-iface.at:162' \
23843   "--with-ltdl-include/lib" "                        " 17
23844 at_xfail=no
23845       test "$ACLOCAL" = no && at_xfail=yes
23846       test "$AUTOHEADER" = no && at_xfail=yes
23847       test "$AUTOMAKE" = no && at_xfail=yes
23848       test "$AUTOCONF" = no && at_xfail=yes
23849 (
23850   $as_echo "111. $at_setup_line: testing $at_desc ..."
23851   $at_traceon
23852
23853
23854
23855 # Install libltdl
23856 prefix=`pwd`/_inst
23857
23858 $LIBTOOLIZE --copy --ltdl=ltdl
23859
23860
23861
23862 (cd ltdl
23863 { set +x
23864 $as_echo "$at_srcdir/configure-iface.at:171: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix"
23865 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:171"
23866 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix
23867 ) >>"$at_stdout" 2>>"$at_stderr"
23868 at_status=$? at_failed=false
23869 $at_check_filter
23870 echo stderr:; cat "$at_stderr"
23871 echo stdout:; cat "$at_stdout"
23872 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:171"
23873 $at_failed && at_fn_log_failure
23874 $at_traceon; }
23875
23876
23877 for target in all install
23878 do
23879   { set +x
23880 $as_echo "$at_srcdir/configure-iface.at:172: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
23881 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:172"
23882 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
23883 ) >>"$at_stdout" 2>>"$at_stderr"
23884 at_status=$? at_failed=false
23885 $at_check_filter
23886 echo stderr:; cat "$at_stderr"
23887 echo stdout:; cat "$at_stdout"
23888 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:172"
23889 $at_failed && at_fn_log_failure
23890 $at_traceon; }
23891
23892 done
23893
23894 )
23895
23896 # Remove build files
23897 rm -rf ltdl/
23898
23899 { set +x
23900 $as_echo "$at_srcdir/configure-iface.at:178: test -f \$prefix/lib/libltdl.la"
23901 at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:178"
23902 ( $at_check_trace; test -f $prefix/lib/libltdl.la
23903 ) >>"$at_stdout" 2>>"$at_stderr"
23904 at_status=$? at_failed=false
23905 $at_check_filter
23906 at_fn_diff_devnull "$at_stderr" || at_failed=:
23907 at_fn_diff_devnull "$at_stdout" || at_failed=:
23908 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:178"
23909 $at_failed && at_fn_log_failure
23910 $at_traceon; }
23911
23912 { set +x
23913 $as_echo "$at_srcdir/configure-iface.at:179: test -f \$prefix/include/ltdl.h"
23914 at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:179"
23915 ( $at_check_trace; test -f $prefix/include/ltdl.h
23916 ) >>"$at_stdout" 2>>"$at_stderr"
23917 at_status=$? at_failed=false
23918 $at_check_filter
23919 at_fn_diff_devnull "$at_stderr" || at_failed=:
23920 at_fn_diff_devnull "$at_stdout" || at_failed=:
23921 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:179"
23922 $at_failed && at_fn_log_failure
23923 $at_traceon; }
23924
23925
23926 cat >main.c <<'_ATEOF'
23927 #include <ltdl.h>
23928 #include <stdio.h>
23929
23930 typedef int funcp (void);
23931
23932 static int errors = 0;
23933
23934 int
23935 main (void)
23936 {
23937   lt_dlhandle handle;
23938
23939   LTDL_SET_PRELOADED_SYMBOLS();
23940
23941   if (lt_dlinit () != 0)
23942     {
23943       fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
23944       return 1;
23945     }
23946
23947   handle = lt_dlopenext ("libmodule");
23948   if (!handle)
23949     {
23950       fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
23951       ++errors;
23952     }
23953
23954   {
23955     funcp *f = (funcp *) lt_dlsym (handle, "f");
23956
23957     if (f)
23958       {
23959         printf ("%d\n", f ());
23960       }
23961     else
23962       {
23963         fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
23964         ++errors;
23965       }
23966   }
23967
23968   if (lt_dlexit () != 0)
23969     {
23970       fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
23971       ++errors;
23972     }
23973
23974   return (errors != 0);
23975 }
23976 _ATEOF
23977
23978
23979 cat >libmodule.c <<'_ATEOF'
23980 #ifdef __cplusplus
23981 extern "C" {
23982 #endif
23983 int f (void) { return 5150; }
23984 #ifdef __cplusplus
23985 }
23986 #endif
23987 _ATEOF
23988
23989
23990 cat >expout <<'_ATEOF'
23991 5150
23992 _ATEOF
23993
23994 case $host_os in mingw*)
23995   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
23996   mv -f expout.t expout ;;
23997 esac
23998
23999
24000 cat >configure.ac <<'_ATEOF'
24001 AC_INIT([configure-iface-demo], 2.4.2, bug-libtool@gnu.org)
24002 AC_CONFIG_MACRO_DIR([_inst/aclocal])
24003 AC_CONFIG_HEADERS([config.h:config.hin])
24004 AM_INIT_AUTOMAKE([foreign])
24005 AC_PROG_CC
24006 AM_PROG_CC_C_O
24007 LT_INIT([dlopen])
24008 LTDL_INIT
24009 AC_CONFIG_FILES([Makefile])
24010 AC_OUTPUT
24011 _ATEOF
24012
24013
24014 cat >Makefile.am <<'_ATEOF'
24015 AUTOMAKE_OPTIONS        = 1.7
24016
24017 AM_CPPFLAGS             = $(LTDLINCL)
24018
24019 lib_LTLIBRARIES         = libmodule.la
24020 # Automake < 1.8 will use libmodule.la.c as default source,
24021 # while newer will choose libmodule.c; so specify it here.
24022 libmodule_la_SOURCES    = libmodule.c
24023 libmodule_la_LDFLAGS    = -module
24024
24025 bin_PROGRAMS            = main
24026 main_LDFLAGS            = -dlopen libmodule.la
24027 main_LDADD              = $(LIBLTDL)
24028 main_DEPENDENCIES       = $(LTDLDEPS) libmodule.la
24029 _ATEOF
24030
24031
24032 ## Try to avoid linking against a previously installed libltdl found
24033 ## with an explicit -L/path.
24034 save_LDFLAGS=$LDFLAGS
24035 LDFLAGS=
24036 for l in $save_LDFLAGS
24037 do
24038   case $l in
24039   -L*) ;;
24040   *) LDFLAGS="$LDFLAGS $l" ;;
24041   esac
24042 done
24043
24044 # We don't use 'libtoolize --ltdl', so that we get an error if the test
24045 # tries to build and link against its own ltdl sources:
24046 $LIBTOOLIZE
24047
24048
24049 { set +x
24050 $as_echo "$at_srcdir/configure-iface.at:227: \$ACLOCAL -I _inst/aclocal"
24051 at_fn_check_prepare_dynamic "$ACLOCAL -I _inst/aclocal" "configure-iface.at:227"
24052 ( $at_check_trace; $ACLOCAL -I _inst/aclocal
24053 ) >>"$at_stdout" 2>>"$at_stderr"
24054 at_status=$? at_failed=false
24055 $at_check_filter
24056 echo stderr:; cat "$at_stderr"
24057 echo stdout:; cat "$at_stdout"
24058 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24059 $at_failed && at_fn_log_failure
24060 $at_traceon; }
24061
24062
24063
24064
24065 { set +x
24066 $as_echo "$at_srcdir/configure-iface.at:227: \$AUTOHEADER "
24067 at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:227"
24068 ( $at_check_trace; $AUTOHEADER
24069 ) >>"$at_stdout" 2>>"$at_stderr"
24070 at_status=$? at_failed=false
24071 $at_check_filter
24072 echo stderr:; cat "$at_stderr"
24073 echo stdout:; cat "$at_stdout"
24074 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24075 $at_failed && at_fn_log_failure
24076 $at_traceon; }
24077
24078
24079
24080
24081 { set +x
24082 $as_echo "$at_srcdir/configure-iface.at:227: \$AUTOMAKE --add-missing"
24083 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:227"
24084 ( $at_check_trace; $AUTOMAKE --add-missing
24085 ) >>"$at_stdout" 2>>"$at_stderr"
24086 at_status=$? at_failed=false
24087 $at_check_filter
24088 echo stderr:; tee stderr <"$at_stderr"
24089 echo stdout:; cat "$at_stdout"
24090 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24091 if $at_failed; then :
24092   { set +x
24093 $as_echo "$at_srcdir/configure-iface.at:227: grep 'require .*but have' stderr && (exit 77)"
24094 at_fn_check_prepare_trace "configure-iface.at:227"
24095 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
24096 ) >>"$at_stdout" 2>>"$at_stderr"
24097 at_status=$? at_failed=false
24098 $at_check_filter
24099 at_fn_diff_devnull "$at_stderr" || at_failed=:
24100 at_fn_diff_devnull "$at_stdout" || at_failed=:
24101 at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:227"
24102 $at_failed && at_fn_log_failure
24103 $at_traceon; }
24104
24105 fi
24106 $at_failed && at_fn_log_failure
24107 $at_traceon; }
24108
24109
24110
24111
24112 { set +x
24113 $as_echo "$at_srcdir/configure-iface.at:227: \$AUTOCONF "
24114 at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:227"
24115 ( $at_check_trace; $AUTOCONF
24116 ) >>"$at_stdout" 2>>"$at_stderr"
24117 at_status=$? at_failed=false
24118 $at_check_filter
24119 echo stderr:; cat "$at_stderr"
24120 echo stdout:; cat "$at_stdout"
24121 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24122 $at_failed && at_fn_log_failure
24123 $at_traceon; }
24124
24125
24126
24127
24128 { set +x
24129 $as_echo "$at_srcdir/configure-iface.at:227: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options --with-ltdl-lib=\$prefix/lib --with-ltdl-include=\$prefix/include"
24130 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:227"
24131 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include
24132 ) >>"$at_stdout" 2>>"$at_stderr"
24133 at_status=$? at_failed=false
24134 $at_check_filter
24135 echo stderr:; cat "$at_stderr"
24136 echo stdout:; cat "$at_stdout"
24137 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24138 $at_failed && at_fn_log_failure
24139 $at_traceon; }
24140
24141
24142 for target in all
24143 do
24144   { set +x
24145 $as_echo "$at_srcdir/configure-iface.at:227: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
24146 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:227"
24147 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
24148 ) >>"$at_stdout" 2>>"$at_stderr"
24149 at_status=$? at_failed=false
24150 $at_check_filter
24151 echo stderr:; cat "$at_stderr"
24152 echo stdout:; cat "$at_stdout"
24153 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227"
24154 $at_failed && at_fn_log_failure
24155 $at_traceon; }
24156
24157 done
24158
24159
24160
24161 ## TODO: portable ldd check for correct libltdl
24162 ## Currently, this test doesn't fail if `main' ends up linking against a
24163 ## previously installed system libltdl.
24164 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
24165 { set +x
24166 $as_echo "$at_srcdir/configure-iface.at:234: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
24167 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?;              test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "configure-iface.at:234"
24168 ( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?;                  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
24169 ) >>"$at_stdout" 2>>"$at_stderr"
24170 at_status=$? at_failed=false
24171 $at_check_filter
24172 at_fn_diff_devnull "$at_stderr" || at_failed=:
24173 $at_diff expout "$at_stdout" || at_failed=:
24174 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:234"
24175 $at_failed && at_fn_log_failure
24176 $at_traceon; }
24177
24178
24179
24180   set +x
24181   $at_times_p && times >"$at_times_file"
24182 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24183 read at_status <"$at_status_file"
24184 #AT_STOP_111
24185 #AT_START_112
24186 at_fn_group_banner 112 'configure-iface.at:243' \
24187   "--with-included-ltdl" "                           " 17
24188 at_xfail=no
24189       test "$ACLOCAL" = no && at_xfail=yes
24190       test "$AUTOHEADER" = no && at_xfail=yes
24191       test "$AUTOMAKE" = no && at_xfail=yes
24192       test "$AUTOCONF" = no && at_xfail=yes
24193 (
24194   $as_echo "112. $at_setup_line: testing $at_desc ..."
24195   $at_traceon
24196
24197
24198
24199 cat >main.c <<'_ATEOF'
24200 #include <ltdl.h>
24201 #include <stdio.h>
24202
24203 typedef int funcp (void);
24204
24205 static int errors = 0;
24206
24207 int
24208 main (void)
24209 {
24210   lt_dlhandle handle;
24211
24212   LTDL_SET_PRELOADED_SYMBOLS();
24213
24214   if (lt_dlinit () != 0)
24215     {
24216       fprintf (stderr, "error during initialization: %s\n", lt_dlerror ());
24217       return 1;
24218     }
24219
24220   handle = lt_dlopenext ("libmodule");
24221   if (!handle)
24222     {
24223       fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ());
24224       ++errors;
24225     }
24226
24227   {
24228     funcp *f = (funcp *) lt_dlsym (handle, "f");
24229
24230     if (f)
24231       {
24232         printf ("%d\n", f ());
24233       }
24234     else
24235       {
24236         fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ());
24237         ++errors;
24238       }
24239   }
24240
24241   if (lt_dlexit () != 0)
24242     {
24243       fprintf (stderr, "error during exit: %s\n", lt_dlerror ());
24244       ++errors;
24245     }
24246
24247   return (errors != 0);
24248 }
24249 _ATEOF
24250
24251
24252 cat >libmodule.c <<'_ATEOF'
24253 #ifdef __cplusplus
24254 extern "C" {
24255 #endif
24256 int f (void) { return 5150; }
24257 #ifdef __cplusplus
24258 }
24259 #endif
24260 _ATEOF
24261
24262
24263 cat >expout <<'_ATEOF'
24264 5150
24265 _ATEOF
24266
24267 case $host_os in mingw*)
24268   while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t
24269   mv -f expout.t expout ;;
24270 esac
24271
24272
24273 cat >configure.ac <<'_ATEOF'
24274 AC_INIT([configure-iface-demo], 2.4.2, bug-libtool@gnu.org)
24275 AC_CONFIG_AUX_DIR([libltdl/config])
24276 AC_CONFIG_MACRO_DIR([libltdl/m4])
24277 AC_CONFIG_HEADERS([config.h:config.hin])
24278 LT_CONFIG_LTDL_DIR([libltdl])
24279 AM_INIT_AUTOMAKE([foreign])
24280 AC_PROG_CC
24281 AM_PROG_CC_C_O
24282 LT_INIT([dlopen])
24283 LTDL_INIT
24284 AC_CONFIG_FILES([Makefile])
24285 AC_OUTPUT
24286 _ATEOF
24287
24288
24289 cat >Makefile.am <<'_ATEOF'
24290 AUTOMAKE_OPTIONS        = 1.7
24291
24292 SUBDIRS                 = libltdl
24293
24294 AM_CPPFLAGS             = $(LTDLINCL)
24295
24296 lib_LTLIBRARIES         = libmodule.la
24297 # Automake < 1.8 will use libmodule.la.c as default source,
24298 # while newer will choose libmodule.c; so specify it here.
24299 libmodule_la_SOURCES    = libmodule.c
24300 libmodule_la_LDFLAGS    = -module
24301
24302 bin_PROGRAMS            = main
24303 main_LDFLAGS            = -dlopen libmodule.la
24304 main_LDADD              = $(LIBLTDL)
24305 main_DEPENDENCIES       = $(LTDLDEPS) libmodule.la
24306 _ATEOF
24307
24308
24309 $LIBTOOLIZE --ltdl
24310
24311
24312 { set +x
24313 $as_echo "$at_srcdir/configure-iface.at:282: \$ACLOCAL -I libltdl/m4"
24314 at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:282"
24315 ( $at_check_trace; $ACLOCAL -I libltdl/m4
24316 ) >>"$at_stdout" 2>>"$at_stderr"
24317 at_status=$? at_failed=false
24318 $at_check_filter
24319 echo stderr:; cat "$at_stderr"
24320 echo stdout:; cat "$at_stdout"
24321 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24322 $at_failed && at_fn_log_failure
24323 $at_traceon; }
24324
24325
24326
24327
24328 { set +x
24329 $as_echo "$at_srcdir/configure-iface.at:282: \$AUTOHEADER "
24330 at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:282"
24331 ( $at_check_trace; $AUTOHEADER
24332 ) >>"$at_stdout" 2>>"$at_stderr"
24333 at_status=$? at_failed=false
24334 $at_check_filter
24335 echo stderr:; cat "$at_stderr"
24336 echo stdout:; cat "$at_stdout"
24337 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24338 $at_failed && at_fn_log_failure
24339 $at_traceon; }
24340
24341
24342
24343
24344 { set +x
24345 $as_echo "$at_srcdir/configure-iface.at:282: \$AUTOMAKE --add-missing"
24346 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:282"
24347 ( $at_check_trace; $AUTOMAKE --add-missing
24348 ) >>"$at_stdout" 2>>"$at_stderr"
24349 at_status=$? at_failed=false
24350 $at_check_filter
24351 echo stderr:; tee stderr <"$at_stderr"
24352 echo stdout:; cat "$at_stdout"
24353 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24354 if $at_failed; then :
24355   { set +x
24356 $as_echo "$at_srcdir/configure-iface.at:282: grep 'require .*but have' stderr && (exit 77)"
24357 at_fn_check_prepare_trace "configure-iface.at:282"
24358 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
24359 ) >>"$at_stdout" 2>>"$at_stderr"
24360 at_status=$? at_failed=false
24361 $at_check_filter
24362 at_fn_diff_devnull "$at_stderr" || at_failed=:
24363 at_fn_diff_devnull "$at_stdout" || at_failed=:
24364 at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:282"
24365 $at_failed && at_fn_log_failure
24366 $at_traceon; }
24367
24368 fi
24369 $at_failed && at_fn_log_failure
24370 $at_traceon; }
24371
24372
24373
24374
24375 { set +x
24376 $as_echo "$at_srcdir/configure-iface.at:282: \$AUTOCONF "
24377 at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:282"
24378 ( $at_check_trace; $AUTOCONF
24379 ) >>"$at_stdout" 2>>"$at_stderr"
24380 at_status=$? at_failed=false
24381 $at_check_filter
24382 echo stderr:; cat "$at_stderr"
24383 echo stdout:; cat "$at_stdout"
24384 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24385 $at_failed && at_fn_log_failure
24386 $at_traceon; }
24387
24388
24389
24390
24391 { set +x
24392 $as_echo "$at_srcdir/configure-iface.at:282: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl"
24393 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:282"
24394 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options --with-included-ltdl
24395 ) >>"$at_stdout" 2>>"$at_stderr"
24396 at_status=$? at_failed=false
24397 $at_check_filter
24398 echo stderr:; cat "$at_stderr"
24399 echo stdout:; cat "$at_stdout"
24400 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24401 $at_failed && at_fn_log_failure
24402 $at_traceon; }
24403
24404
24405 for target in all
24406 do
24407   { set +x
24408 $as_echo "$at_srcdir/configure-iface.at:282: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
24409 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:282"
24410 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
24411 ) >>"$at_stdout" 2>>"$at_stderr"
24412 at_status=$? at_failed=false
24413 $at_check_filter
24414 echo stderr:; cat "$at_stderr"
24415 echo stdout:; cat "$at_stdout"
24416 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282"
24417 $at_failed && at_fn_log_failure
24418 $at_traceon; }
24419
24420 done
24421
24422
24423
24424 # --with-included-ltdl should build a convenience lib by default
24425 { set +x
24426 $as_echo "$at_srcdir/configure-iface.at:286: test -f libltdl/libltdlc.la"
24427 at_fn_check_prepare_trace "configure-iface.at:286"
24428 ( $at_check_trace; test -f libltdl/libltdlc.la
24429 ) >>"$at_stdout" 2>>"$at_stderr"
24430 at_status=$? at_failed=false
24431 $at_check_filter
24432 at_fn_diff_devnull "$at_stderr" || at_failed=:
24433 at_fn_diff_devnull "$at_stdout" || at_failed=:
24434 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:286"
24435 $at_failed && at_fn_log_failure
24436 $at_traceon; }
24437
24438
24439 ## TODO: portable ldd check for correct libltdl
24440 ## Currently, this test doesn't fail if `main' ends up linking against a
24441 ## previously installed system libltdl.
24442 lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
24443 { set +x
24444 $as_echo "$at_srcdir/configure-iface.at:291: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?;                   test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
24445 at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?;              test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "configure-iface.at:291"
24446 ( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?;                  test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
24447 ) >>"$at_stdout" 2>>"$at_stderr"
24448 at_status=$? at_failed=false
24449 $at_check_filter
24450 at_fn_diff_devnull "$at_stderr" || at_failed=:
24451 $at_diff expout "$at_stdout" || at_failed=:
24452 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:291"
24453 $at_failed && at_fn_log_failure
24454 $at_traceon; }
24455
24456
24457
24458 # Check that main is rebuilt if libltdlc.la is newer
24459 rm -f libltdl/libltdlc.la
24460 { set +x
24461 $as_echo "$at_srcdir/configure-iface.at:295: \$MAKE -q main\$EXEEXT || exit 1"
24462 at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:295"
24463 ( $at_check_trace; $MAKE -q main$EXEEXT || exit 1
24464 ) >>"$at_stdout" 2>>"$at_stderr"
24465 at_status=$? at_failed=false
24466 $at_check_filter
24467 echo stderr:; cat "$at_stderr"
24468 echo stdout:; cat "$at_stdout"
24469 at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:295"
24470 $at_failed && at_fn_log_failure
24471 $at_traceon; }
24472
24473
24474   set +x
24475   $at_times_p && times >"$at_times_file"
24476 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24477 read at_status <"$at_status_file"
24478 #AT_STOP_112
24479 #AT_START_113
24480 at_fn_group_banner 113 'configure-iface.at:304' \
24481   "convenience libltdl" "                            " 17
24482 at_xfail=no
24483       test "$ACLOCAL" = no && at_xfail=yes
24484       test "$AUTOCONF" = no && at_xfail=yes
24485 (
24486   $as_echo "113. $at_setup_line: testing $at_desc ..."
24487   $at_traceon
24488
24489
24490 cat >configure.ac <<'_ATEOF'
24491 AC_INIT
24492 AC_CONFIG_AUX_DIR([libltdl/config])
24493 AC_LIBLTDL_CONVENIENCE
24494 AC_LIBTOOL_DLOPEN
24495 AC_PROG_LIBTOOL
24496 AC_CONFIG_FILES(Makefile)
24497 AC_OUTPUT
24498 _ATEOF
24499
24500 cat >Makefile.in <<'_ATEOF'
24501 LIBLTDL = @LIBLTDL@
24502 print-ltdl:
24503         echo $(LIBLTDL)
24504 _ATEOF
24505
24506
24507 $LIBTOOLIZE --ltdl
24508
24509
24510 { set +x
24511 $as_echo "$at_srcdir/configure-iface.at:321: \$ACLOCAL -I libltdl/m4"
24512 at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:321"
24513 ( $at_check_trace; $ACLOCAL -I libltdl/m4
24514 ) >>"$at_stdout" 2>>"$at_stderr"
24515 at_status=$? at_failed=false
24516 $at_check_filter
24517 echo stderr:; cat "$at_stderr"
24518 echo stdout:; cat "$at_stdout"
24519 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
24520 $at_failed && at_fn_log_failure
24521 $at_traceon; }
24522
24523
24524
24525
24526
24527
24528 { set +x
24529 $as_echo "$at_srcdir/configure-iface.at:321: \$AUTOCONF "
24530 at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:321"
24531 ( $at_check_trace; $AUTOCONF
24532 ) >>"$at_stdout" 2>>"$at_stderr"
24533 at_status=$? at_failed=false
24534 $at_check_filter
24535 echo stderr:; cat "$at_stderr"
24536 echo stdout:; cat "$at_stdout"
24537 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
24538 $at_failed && at_fn_log_failure
24539 $at_traceon; }
24540
24541
24542
24543
24544 { set +x
24545 $as_echo "$at_srcdir/configure-iface.at:321: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
24546 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:321"
24547 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
24548 ) >>"$at_stdout" 2>>"$at_stderr"
24549 at_status=$? at_failed=false
24550 $at_check_filter
24551 echo stderr:; cat "$at_stderr"
24552 echo stdout:; cat "$at_stdout"
24553 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321"
24554 $at_failed && at_fn_log_failure
24555 $at_traceon; }
24556
24557
24558
24559
24560 { set +x
24561 $as_echo "$at_srcdir/configure-iface.at:322: \$MAKE print-ltdl"
24562 at_fn_check_prepare_dynamic "$MAKE print-ltdl" "configure-iface.at:322"
24563 ( $at_check_trace; $MAKE print-ltdl
24564 ) >>"$at_stdout" 2>>"$at_stderr"
24565 at_status=$? at_failed=false
24566 $at_check_filter
24567 echo stderr:; cat "$at_stderr"
24568 echo stdout:; tee stdout <"$at_stdout"
24569 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:322"
24570 $at_failed && at_fn_log_failure
24571 $at_traceon; }
24572
24573 { set +x
24574 $as_echo "$at_srcdir/configure-iface.at:323: grep libltdl/libltdlc.la stdout"
24575 at_fn_check_prepare_trace "configure-iface.at:323"
24576 ( $at_check_trace; grep libltdl/libltdlc.la stdout
24577 ) >>"$at_stdout" 2>>"$at_stderr"
24578 at_status=$? at_failed=false
24579 $at_check_filter
24580 at_fn_diff_devnull "$at_stderr" || at_failed=:
24581 echo stdout:; cat "$at_stdout"
24582 at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:323"
24583 $at_failed && at_fn_log_failure
24584 $at_traceon; }
24585
24586
24587   set +x
24588   $at_times_p && times >"$at_times_file"
24589 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24590 read at_status <"$at_status_file"
24591 #AT_STOP_113
24592 #AT_START_114
24593 at_fn_group_banner 114 'stresstest.at:31' \
24594   "Link option thorough search test" "               " 18
24595 at_xfail=no
24596 (
24597   $as_echo "114. $at_setup_line: testing $at_desc ..."
24598   $at_traceon
24599
24600
24601 eval `$LIBTOOL --config | $EGREP '^(CC|objdir|allow_undefined_flag)='`
24602
24603 mkdir sub sub2 sub3 2>/dev/null
24604
24605 cat >a.c <<'_ATEOF'
24606 /* all kinds of data items */
24607 #ifdef __cplusplus
24608 extern "C" {
24609 #endif
24610 int v1;
24611 static int v2;
24612 int v3 = 0;
24613 int v4 = 1;
24614 extern const int v5, v6;
24615 extern const char *v7;
24616 extern const char v8[];
24617 extern int (*const v12) (void);
24618 const int v5 = 0;
24619 const int v6 = 1;
24620 const char* v7 = "\01foo";
24621 const char v8[] = "\01bar";
24622 int v9(void) { return v2 + 1; }
24623 int (*v10) (void);
24624 int (*v11) (void) = v9;
24625 int (*const v12) (void) = v9;
24626
24627 typedef struct { int arr[1000]; } large;
24628 large v13;
24629 large v14 = { { 0 } };
24630 large v15 = { { 1 } };
24631 #ifdef __cplusplus
24632 }
24633 #endif
24634 _ATEOF
24635
24636
24637 cat >asyms <<'_ATEOF'
24638 v1
24639 v3
24640 v4
24641 v5
24642 v6
24643 v7
24644 v8
24645 v9
24646 v10
24647 v11
24648 v12
24649 v13
24650 v14
24651 v15
24652 _ATEOF
24653
24654
24655 cat >b.c <<'_ATEOF'
24656 int b = 42;
24657 int b3 = 1;
24658 int ab = 1;
24659 _ATEOF
24660
24661
24662 cat >main.c <<'_ATEOF'
24663
24664 #if defined(LIBA_DLL_IMPORT)
24665 #  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
24666 #    define LIBA_SCOPE extern __declspec(dllimport)
24667 #    if defined(_MSC_VER)
24668 #      define LIBA_SCOPE_VAR LIBA_SCOPE
24669 #    endif
24670 #  endif
24671 #endif
24672 #if !defined(LIBA_SCOPE)
24673 #  define LIBA_SCOPE extern
24674 #endif
24675 #if !defined(LIBA_SCOPE_VAR)
24676 #  define LIBA_SCOPE_VAR extern
24677 #endif
24678 #ifdef __cplusplus
24679 extern "C" {
24680 #endif
24681 LIBA_SCOPE_VAR int v1;
24682 LIBA_SCOPE_VAR int v3, v4;
24683 LIBA_SCOPE const int v5, v6;
24684 LIBA_SCOPE_VAR const char* v7;
24685 LIBA_SCOPE_VAR const char v8[];
24686 extern int v9(void);
24687 LIBA_SCOPE_VAR int (*v10) (void);
24688 LIBA_SCOPE_VAR int (*v11) (void);
24689 LIBA_SCOPE int (*const v12) (void);
24690 #ifdef __cplusplus
24691 }
24692 #endif
24693
24694 typedef struct { int arr[1000]; } large;
24695 LIBA_SCOPE_VAR large v13, v14, v15;
24696
24697 int main(void)
24698 {
24699   char s = v7[0] + v8[0];
24700   return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
24701            + v13.arr[0] + v14.arr[0] + v15.arr[0]
24702            - 8;
24703 }
24704 _ATEOF
24705
24706
24707 cat >dlself.c <<'_ATEOF'
24708
24709 #if defined(LIBA_DLL_IMPORT)
24710 #  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
24711 #    define LIBA_SCOPE extern __declspec(dllimport)
24712 #    if defined(_MSC_VER)
24713 #      define LIBA_SCOPE_VAR LIBA_SCOPE
24714 #    endif
24715 #  endif
24716 #endif
24717 #if !defined(LIBA_SCOPE)
24718 #  define LIBA_SCOPE extern
24719 #endif
24720 #if !defined(LIBA_SCOPE_VAR)
24721 #  define LIBA_SCOPE_VAR extern
24722 #endif
24723 #ifdef __cplusplus
24724 extern "C" {
24725 #endif
24726 LIBA_SCOPE_VAR int v1;
24727 LIBA_SCOPE_VAR int v3, v4;
24728 LIBA_SCOPE const int v5, v6;
24729 LIBA_SCOPE_VAR const char* v7;
24730 LIBA_SCOPE_VAR const char v8[];
24731 extern int v9(void);
24732 LIBA_SCOPE_VAR int (*v10) (void);
24733 LIBA_SCOPE_VAR int (*v11) (void);
24734 LIBA_SCOPE int (*const v12) (void);
24735
24736 typedef struct { int arr[1000]; } large;
24737 LIBA_SCOPE_VAR large v13, v14, v15;
24738
24739 extern int w1;
24740 extern int w3, w4;
24741 extern const int w5, w6;
24742 extern const char* w7;
24743 extern const char w8[];
24744 extern int w9(void);
24745 extern int (*w10) (void);
24746 extern int (*w11) (void);
24747 extern int (*const w12) (void);
24748 extern large w13, w14, w15;
24749 #ifdef __cplusplus
24750 }
24751 #endif
24752
24753 int main(void)
24754 {
24755   char s = v7[0] + v8[0] + w7[0] + w8[0];
24756   return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12()
24757            + v13.arr[0] + v14.arr[0] + v15.arr[0]
24758            + w1 + w3 + w4 + w5 + w6 + w9() + w11() + w12()
24759            + w13.arr[0] + w14.arr[0] + w15.arr[0]
24760            - 16;
24761 }
24762
24763
24764 #ifdef __cplusplus
24765 extern "C" {
24766 #endif
24767 int w1;
24768 static int w2;
24769 int w3 = 0;
24770 int w4 = 1;
24771 const int w5 = 0;
24772 const int w6 = 1;
24773 const char* w7 = "\01foo";
24774 const char w8[] = "\01bar";
24775 int w9(void) { return w2 + 1; }
24776 int (*w10) (void);
24777 int (*w11) (void) = w9;
24778 int (*const w12) (void) = w9;
24779 large w13;
24780 large w14 = { { 0 } };
24781 large w15 = { { 1 } };
24782 #ifdef __cplusplus
24783 }
24784 #endif
24785 _ATEOF
24786
24787
24788 cat >dlselfsyms <<'_ATEOF'
24789 w1
24790 w3
24791 w4
24792 w5
24793 w6
24794 w7
24795 w8
24796 w9
24797 w10
24798 w11
24799 w12
24800 w13
24801 w14
24802 w15
24803 _ATEOF
24804
24805
24806
24807 { set +x
24808 $as_echo "$at_srcdir/stresstest.at:233: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c -o sub/a.lo"
24809 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo" "stresstest.at:233"
24810 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo
24811 ) >>"$at_stdout" 2>>"$at_stderr"
24812 at_status=$? at_failed=false
24813 $at_check_filter
24814 echo stderr:; cat "$at_stderr"
24815 echo stdout:; cat "$at_stdout"
24816 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:233"
24817 $at_failed && at_fn_log_failure
24818 $at_traceon; }
24819
24820 { set +x
24821 $as_echo "$at_srcdir/stresstest.at:235: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c -o sub/b.lo"
24822 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo" "stresstest.at:235"
24823 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo
24824 ) >>"$at_stdout" 2>>"$at_stderr"
24825 at_status=$? at_failed=false
24826 $at_check_filter
24827 echo stderr:; cat "$at_stderr"
24828 echo stdout:; cat "$at_stdout"
24829 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:235"
24830 $at_failed && at_fn_log_failure
24831 $at_traceon; }
24832
24833 { set +x
24834 $as_echo "$at_srcdir/stresstest.at:237: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c"
24835 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "stresstest.at:237"
24836 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c
24837 ) >>"$at_stdout" 2>>"$at_stderr"
24838 at_status=$? at_failed=false
24839 $at_check_filter
24840 echo stderr:; cat "$at_stderr"
24841 echo stdout:; cat "$at_stdout"
24842 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:237"
24843 $at_failed && at_fn_log_failure
24844 $at_traceon; }
24845
24846 { set +x
24847 $as_echo "$at_srcdir/stresstest.at:239: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c -o main-static.lo"
24848 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo" "stresstest.at:239"
24849 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo
24850 ) >>"$at_stdout" 2>>"$at_stderr"
24851 at_status=$? at_failed=false
24852 $at_check_filter
24853 echo stderr:; cat "$at_stderr"
24854 echo stdout:; cat "$at_stdout"
24855 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:239"
24856 $at_failed && at_fn_log_failure
24857 $at_traceon; }
24858
24859 { set +x
24860 $as_echo "$at_srcdir/stresstest.at:241: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c dlself.c -o sub3/dlself.lo"
24861 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo" "stresstest.at:241"
24862 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo
24863 ) >>"$at_stdout" 2>>"$at_stderr"
24864 at_status=$? at_failed=false
24865 $at_check_filter
24866 echo stderr:; cat "$at_stderr"
24867 echo stdout:; cat "$at_stdout"
24868 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:241"
24869 $at_failed && at_fn_log_failure
24870 $at_traceon; }
24871
24872 { set +x
24873 $as_echo "$at_srcdir/stresstest.at:243: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c dlself.c -o sub3/dlself-static.lo"
24874 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo" "stresstest.at:243"
24875 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo
24876 ) >>"$at_stdout" 2>>"$at_stderr"
24877 at_status=$? at_failed=false
24878 $at_check_filter
24879 echo stderr:; cat "$at_stderr"
24880 echo stdout:; cat "$at_stdout"
24881 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:243"
24882 $at_failed && at_fn_log_failure
24883 $at_traceon; }
24884
24885
24886 case $allow_undefined_flag in
24887   unsupported) undef_opts=-no-undefined ;;
24888   *)           undef_opts='"" -no-undefined' ;;
24889 esac
24890
24891 # expose problems with the regex:
24892 touch vfoo v.bar
24893
24894 for l1 in $undef_opts
24895 do
24896   for l2 in '' '-export-symbols-regex "v.*"' '-export-symbols asyms'
24897   do
24898     for l3 in '' '-rpath /nonexistent'
24899     do
24900       linkargs="$l1 $l2 $l3"
24901       for rel in '' ./ `pwd`/
24902       do
24903         echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs"; { set +x
24904 $as_echo "$at_srcdir/stresstest.at:263: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o \"\$rel\"sub2/liba.la \"\$rel\"sub/a.lo' \$linkargs"
24905 at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs" "stresstest.at:263"
24906 ( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs
24907 ) >>"$at_stdout" 2>>"$at_stderr"
24908 at_status=$? at_failed=false
24909 $at_check_filter
24910 echo stderr:; cat "$at_stderr"
24911 echo stdout:; cat "$at_stdout"
24912 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:263"
24913 $at_failed && at_fn_log_failure
24914 $at_traceon; }
24915
24916         for st in '' '-static' '-no-install'
24917         do
24918           # if -static is not passed, and the library is shared, then we have
24919           # to use -DLIBA_DLL_IMPORT, thus main.lo (and not main-static.lo).
24920           case $st,$l3 in
24921           -static,*) mst=-static ;;
24922           *,-rpath*) mst= ;;
24923           *) mst=-static ;;
24924           esac
24925
24926           echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la"; { set +x
24927 $as_echo "$at_srcdir/stresstest.at:275: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"main\$EXEEXT \"\$rel\"main\$mst.lo \"\$rel\"sub2/liba.la"
24928 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la" "stresstest.at:275"
24929 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la
24930 ) >>"$at_stdout" 2>>"$at_stderr"
24931 at_status=$? at_failed=false
24932 $at_check_filter
24933 echo stderr:; cat "$at_stderr"
24934 echo stdout:; cat "$at_stdout"
24935 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:275"
24936 $at_failed && at_fn_log_failure
24937 $at_traceon; }
24938
24939           lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
24940 { set +x
24941 $as_echo "$at_srcdir/stresstest.at:277: if \"\$lt_exe\" ; then :; else lt_status=\$?;      test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
24942 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "stresstest.at:277"
24943 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
24944 ) >>"$at_stdout" 2>>"$at_stderr"
24945 at_status=$? at_failed=false
24946 $at_check_filter
24947 at_fn_diff_devnull "$at_stderr" || at_failed=:
24948 at_fn_diff_devnull "$at_stdout" || at_failed=:
24949 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:277"
24950 $at_failed && at_fn_log_failure
24951 $at_traceon; }
24952
24953
24954           for l10 in '' '-export-symbols dlselfsyms'
24955           do
24956             echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10"; { set +x
24957 $as_echo "$at_srcdir/stresstest.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"sub3/dlself\$EXEEXT \"\$rel\"sub3/dlself\$mst.lo \"\$rel\"sub2/liba.la sub/b.lo -dlopen self \$l10"
24958 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10" "stresstest.at:280"
24959 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10
24960 ) >>"$at_stdout" 2>>"$at_stderr"
24961 at_status=$? at_failed=false
24962 $at_check_filter
24963 echo stderr:; cat "$at_stderr"
24964 echo stdout:; cat "$at_stdout"
24965 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:280"
24966 $at_failed && at_fn_log_failure
24967 $at_traceon; }
24968
24969             lt_exe=./sub3/dlself; if test -f "./sub3/dlself$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
24970 { set +x
24971 $as_echo "$at_srcdir/stresstest.at:282: if \"\$lt_exe\" ; then :; else lt_status=\$?;      test \$lt_status != 0 &&        test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
24972 at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?;           test $lt_status != 0 &&         test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "stresstest.at:282"
24973 ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?;       test $lt_status != 0 &&         test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
24974 ) >>"$at_stdout" 2>>"$at_stderr"
24975 at_status=$? at_failed=false
24976 $at_check_filter
24977 at_fn_diff_devnull "$at_stderr" || at_failed=:
24978 at_fn_diff_devnull "$at_stdout" || at_failed=:
24979 at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:282"
24980 $at_failed && at_fn_log_failure
24981 $at_traceon; }
24982
24983
24984           done
24985         done
24986       done
24987     done
24988   done
24989 done
24990
24991   set +x
24992   $at_times_p && times >"$at_times_file"
24993 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24994 read at_status <"$at_status_file"
24995 #AT_STOP_114
24996 #AT_START_115
24997 at_fn_group_banner 115 'cmdline_wrap.at:28' \
24998   "Run tests with low max_cmd_len" "                 " 18
24999 at_xfail=no
25000 (
25001   $as_echo "115. $at_setup_line: testing $at_desc ..."
25002   $at_traceon
25003
25004
25005
25006
25007 sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool
25008 chmod +x libtool
25009 LIBTOOL=`pwd`/libtool
25010 export LIBTOOL
25011 # run the suite in a subdirectory, otherwise the two suites will compete
25012 # for the output file `testsuite.log'.
25013 mkdir tests
25014 cd tests
25015 INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \
25016   abs_builddir=$abs_builddir"
25017 { set +x
25018 $as_echo "$at_srcdir/cmdline_wrap.at:43: \$CONFIG_SHELL \$abs_srcdir/testsuite -k libtool\$INNER_TESTSUITEFLAGS"
25019 at_fn_check_prepare_dynamic "$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS" "cmdline_wrap.at:43"
25020 ( $at_check_trace; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS
25021 ) >>"$at_stdout" 2>>"$at_stderr"
25022 at_status=$? at_failed=false
25023 $at_check_filter
25024 echo stderr:; cat "$at_stderr"
25025 echo stdout:; cat "$at_stdout"
25026 at_fn_check_status 0 $at_status "$at_srcdir/cmdline_wrap.at:43"
25027 $at_failed && at_fn_log_failure  \
25028 "testsuite.log"
25029 $at_traceon; }
25030
25031
25032   set +x
25033   $at_times_p && times >"$at_times_file"
25034 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25035 read at_status <"$at_status_file"
25036 #AT_STOP_115
25037 #AT_START_116
25038 at_fn_group_banner 116 'pic_flag.at:24' \
25039   "override pic_flag at configure time" "            " 18
25040 at_xfail=no
25041 (
25042   $as_echo "116. $at_setup_line: testing $at_desc ..."
25043   $at_traceon
25044
25045
25046 # Just try to configure the Libtool package with -fpic if we can compile
25047 # with it, for C and C++.
25048
25049 cat >foo.c <<'_ATEOF'
25050 int data = 42;
25051 int func(void) { return data; }
25052 _ATEOF
25053
25054
25055 cp foo.c foo.cpp
25056 C_pic_flag='-fpic -DPIC'
25057 { set +x
25058 $as_echo "$at_srcdir/pic_flag.at:36: \$CC \$CPPFLAGS \$CFLAGS \$C_pic_flag -c foo.c || exit 77"
25059 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77" "pic_flag.at:36"
25060 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77
25061 ) >>"$at_stdout" 2>>"$at_stderr"
25062 at_status=$? at_failed=false
25063 $at_check_filter
25064 echo stderr:; tee stderr <"$at_stderr"
25065 echo stdout:; tee stdout <"$at_stdout"
25066 at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:36"
25067 $at_failed && at_fn_log_failure
25068 $at_traceon; }
25069
25070 # The configure test for the PIC flag also checks for warnings.
25071 { set +x
25072 $as_echo "$at_srcdir/pic_flag.at:39: grep fpic stdout stderr && exit 77"
25073 at_fn_check_prepare_trace "pic_flag.at:39"
25074 ( $at_check_trace; grep fpic stdout stderr && exit 77
25075 ) >>"$at_stdout" 2>>"$at_stderr"
25076 at_status=$? at_failed=false
25077 $at_check_filter
25078 at_fn_diff_devnull "$at_stderr" || at_failed=:
25079 at_fn_diff_devnull "$at_stdout" || at_failed=:
25080 at_fn_check_status 1 $at_status "$at_srcdir/pic_flag.at:39"
25081 $at_failed && at_fn_log_failure
25082 $at_traceon; }
25083
25084 { set +x
25085 $as_echo "$at_srcdir/pic_flag.at:40: grep '[uU]nknown.*option' stdout stderr && exit 77"
25086 at_fn_check_prepare_trace "pic_flag.at:40"
25087 ( $at_check_trace; grep '[uU]nknown.*option' stdout stderr && exit 77
25088 ) >>"$at_stdout" 2>>"$at_stderr"
25089 at_status=$? at_failed=false
25090 $at_check_filter
25091 at_fn_diff_devnull "$at_stderr" || at_failed=:
25092 at_fn_diff_devnull "$at_stdout" || at_failed=:
25093 at_fn_check_status 1 $at_status "$at_srcdir/pic_flag.at:40"
25094 $at_failed && at_fn_log_failure
25095 $at_traceon; }
25096
25097
25098 CXX_pic_flag='-fpic -DPIC'
25099 if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
25100   CXX_pic_flag=
25101 fi
25102
25103 { set +x
25104 $as_echo "$at_srcdir/pic_flag.at:47: test \"\$at_srcdir\" != . || exit 77"
25105 at_fn_check_prepare_dynamic "test \"$at_srcdir\" != . || exit 77" "pic_flag.at:47"
25106 ( $at_check_trace; test "$at_srcdir" != . || exit 77
25107 ) >>"$at_stdout" 2>>"$at_stderr"
25108 at_status=$? at_failed=false
25109 $at_check_filter
25110 at_fn_diff_devnull "$at_stderr" || at_failed=:
25111 at_fn_diff_devnull "$at_stdout" || at_failed=:
25112 at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:47"
25113 $at_failed && at_fn_log_failure
25114 $at_traceon; }
25115
25116 { set +x
25117 $as_echo "$at_srcdir/pic_flag.at:48: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL \"\$abs_top_srcdir\"/configure \$configure_options lt_cv_prog_compiler_pic=\"\$C_pic_flag\"            lt_cv_prog_compiler_pic_CXX=\"\$CXX_pic_flag\""
25118 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "pic_flag.at:48"
25119 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL "$abs_top_srcdir"/configure $configure_options lt_cv_prog_compiler_pic="$C_pic_flag"            lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"
25120 ) >>"$at_stdout" 2>>"$at_stderr"
25121 at_status=$? at_failed=false
25122 $at_check_filter
25123 echo stderr:; cat "$at_stderr"
25124 echo stdout:; cat "$at_stdout"
25125 at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:48"
25126 $at_failed && at_fn_log_failure
25127 $at_traceon; }
25128
25129
25130 : ${MAKE=make}
25131 { set +x
25132 $as_echo "$at_srcdir/pic_flag.at:52: \$MAKE"
25133 at_fn_check_prepare_dynamic "$MAKE" "pic_flag.at:52"
25134 ( $at_check_trace; $MAKE
25135 ) >>"$at_stdout" 2>>"$at_stderr"
25136 at_status=$? at_failed=false
25137 $at_check_filter
25138 echo stderr:; cat "$at_stderr"
25139 echo stdout:; tee stdout <"$at_stdout"
25140 at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:52"
25141 $at_failed && at_fn_log_failure
25142 $at_traceon; }
25143
25144 { set +x
25145 $as_echo "$at_srcdir/pic_flag.at:53: if ./libtool --features | grep 'enable shared libraries'; then        grep ' -fpic' stdout; else exit 77; fi"
25146 at_fn_check_prepare_notrace 'a shell pipeline' "pic_flag.at:53"
25147 ( $at_check_trace; if ./libtool --features | grep 'enable shared libraries'; then          grep ' -fpic' stdout; else exit 77; fi
25148 ) >>"$at_stdout" 2>>"$at_stderr"
25149 at_status=$? at_failed=false
25150 $at_check_filter
25151 echo stderr:; cat "$at_stderr"
25152 echo stdout:; cat "$at_stdout"
25153 at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:53"
25154 $at_failed && at_fn_log_failure
25155 $at_traceon; }
25156
25157
25158   set +x
25159   $at_times_p && times >"$at_times_file"
25160 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25161 read at_status <"$at_status_file"
25162 #AT_STOP_116
25163 #AT_START_117
25164 at_fn_group_banner 117 'darwin.at:26' \
25165   "darwin fat compile" "                             " 19
25166 at_xfail=no
25167 (
25168   $as_echo "117. $at_setup_line: testing $at_desc ..."
25169   $at_traceon
25170
25171 noskip=:
25172 case "$host_os" in
25173 darwin*) ;;
25174 *) noskip=false ;;
25175 esac
25176
25177 cat >simple.c  <<'_ATEOF'
25178
25179 int main() { return 0;}
25180 _ATEOF
25181
25182
25183 $noskip && {
25184 $CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false
25185 rm -f simple
25186 }
25187
25188 { set +x
25189 $as_echo "$at_srcdir/darwin.at:42: \$noskip || (exit 77)"
25190 at_fn_check_prepare_dynamic "$noskip || (exit 77)" "darwin.at:42"
25191 ( $at_check_trace; $noskip || (exit 77)
25192 ) >>"$at_stdout" 2>>"$at_stderr"
25193 at_status=$? at_failed=false
25194 $at_check_filter
25195 at_fn_diff_devnull "$at_stderr" || at_failed=:
25196 at_fn_diff_devnull "$at_stdout" || at_failed=:
25197 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:42"
25198 $at_failed && at_fn_log_failure
25199 $at_traceon; }
25200
25201
25202 cat >foo.c <<'_ATEOF'
25203
25204 int x=0;
25205 _ATEOF
25206
25207
25208 cat >baz.c <<'_ATEOF'
25209
25210 int y=0;
25211 _ATEOF
25212
25213
25214 cat >bar.c <<'_ATEOF'
25215
25216 extern int x;
25217 int bar(void);
25218 int bar() { return x;}
25219 _ATEOF
25220
25221
25222 cat >main.c <<'_ATEOF'
25223
25224 extern int x;
25225 extern int y;
25226
25227 int main() {
25228 return x+y;
25229 }
25230 _ATEOF
25231
25232
25233 mkdir bin
25234 cat >bin/basename <<'_ATEOF'
25235
25236 #! /bin/sh
25237
25238 usage="usage: $0 argument"
25239 if test $# != 1; then
25240                   echo $usage >&2
25241                   exit 1
25242 fi
25243
25244 echo $1 | sed "s,^.*/,,"
25245 _ATEOF
25246
25247
25248 chmod +x bin/basename
25249 save_PATH=$PATH
25250 PATH=`pwd`/bin:$PATH
25251 export PATH
25252
25253 { set +x
25254 $as_echo "$at_srcdir/darwin.at:85: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 foo.c"
25255 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c" "darwin.at:85"
25256 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c
25257 ) >>"$at_stdout" 2>>"$at_stderr"
25258 at_status=$? at_failed=false
25259 $at_check_filter
25260 echo stderr:; cat "$at_stderr"
25261 echo stdout:; cat "$at_stdout"
25262 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:85"
25263 $at_failed && at_fn_log_failure
25264 $at_traceon; }
25265
25266
25267 { set +x
25268 $as_echo "$at_srcdir/darwin.at:87: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 baz.c"
25269 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c" "darwin.at:87"
25270 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c
25271 ) >>"$at_stdout" 2>>"$at_stderr"
25272 at_status=$? at_failed=false
25273 $at_check_filter
25274 echo stderr:; cat "$at_stderr"
25275 echo stdout:; cat "$at_stdout"
25276 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:87"
25277 $at_failed && at_fn_log_failure
25278 $at_traceon; }
25279
25280
25281 { set +x
25282 $as_echo "$at_srcdir/darwin.at:89: \$LIBTOOL --mode=link --tag=CC \$CC -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 foo.lo baz.lo"
25283 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" "darwin.at:89"
25284 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo
25285 ) >>"$at_stdout" 2>>"$at_stderr"
25286 at_status=$? at_failed=false
25287 $at_check_filter
25288 echo stderr:; cat "$at_stderr"
25289 echo stdout:; cat "$at_stdout"
25290 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:89"
25291 $at_failed && at_fn_log_failure
25292 $at_traceon; }
25293
25294
25295 { set +x
25296 $as_echo "$at_srcdir/darwin.at:91: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 bar.c"
25297 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c" "darwin.at:91"
25298 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c
25299 ) >>"$at_stdout" 2>>"$at_stderr"
25300 at_status=$? at_failed=false
25301 $at_check_filter
25302 echo stderr:; cat "$at_stderr"
25303 echo stdout:; cat "$at_stdout"
25304 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:91"
25305 $at_failed && at_fn_log_failure
25306 $at_traceon; }
25307
25308
25309 { set +x
25310 $as_echo "$at_srcdir/darwin.at:93: \$LIBTOOL --mode=link --tag=CC \$CC  -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent"
25311 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC  -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" "darwin.at:93"
25312 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC  -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent
25313 ) >>"$at_stdout" 2>>"$at_stderr"
25314 at_status=$? at_failed=false
25315 $at_check_filter
25316 echo stderr:; cat "$at_stderr"
25317 echo stdout:; cat "$at_stdout"
25318 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:93"
25319 $at_failed && at_fn_log_failure
25320 $at_traceon; }
25321
25322
25323 { set +x
25324 $as_echo "$at_srcdir/darwin.at:95: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 main.c"
25325 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c" "darwin.at:95"
25326 ( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c
25327 ) >>"$at_stdout" 2>>"$at_stderr"
25328 at_status=$? at_failed=false
25329 $at_check_filter
25330 echo stderr:; cat "$at_stderr"
25331 echo stdout:; cat "$at_stdout"
25332 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:95"
25333 $at_failed && at_fn_log_failure
25334 $at_traceon; }
25335
25336
25337 { set +x
25338 $as_echo "$at_srcdir/darwin.at:97: \$LIBTOOL --mode=link --tag=CC \$CC  -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 main.lo libbar.la"
25339 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC  -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la" "darwin.at:97"
25340 ( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC  -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la
25341 ) >>"$at_stdout" 2>>"$at_stderr"
25342 at_status=$? at_failed=false
25343 $at_check_filter
25344 echo stderr:; cat "$at_stderr"
25345 echo stdout:; cat "$at_stdout"
25346 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:97"
25347 $at_failed && at_fn_log_failure
25348 $at_traceon; }
25349
25350
25351 PATH=$save_PATH
25352   set +x
25353   $at_times_p && times >"$at_times_file"
25354 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25355 read at_status <"$at_status_file"
25356 #AT_STOP_117
25357 #AT_START_118
25358 at_fn_group_banner 118 'darwin.at:103' \
25359   "darwin concurrent library extraction" "           " 19
25360 at_xfail=no
25361 (
25362   $as_echo "118. $at_setup_line: testing $at_desc ..."
25363   $at_traceon
25364
25365
25366 cat >foo.c <<'_ATEOF'
25367
25368 int foo (void) { return 0; }
25369 _ATEOF
25370
25371
25372 cat >bar.c <<'_ATEOF'
25373
25374 extern int foo1 (void);
25375 int bar (void) { return foo1 (); }
25376 _ATEOF
25377
25378 cp bar.c baz.c
25379
25380 objects=
25381 for obj in 1 2 3 4 5 6 7 8; do
25382   sed "s/foo/foo$obj/" < foo.c > foo$obj.c
25383   { set +x
25384 $as_echo "$at_srcdir/darwin.at:118: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo\$obj.c"
25385 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c" "darwin.at:118"
25386 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c
25387 ) >>"$at_stdout" 2>>"$at_stderr"
25388 at_status=$? at_failed=false
25389 $at_check_filter
25390 echo stderr:; cat "$at_stderr"
25391 echo stdout:; cat "$at_stdout"
25392 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:118"
25393 $at_failed && at_fn_log_failure
25394 $at_traceon; }
25395
25396   objects="$objects foo$obj.lo"
25397 done
25398 { set +x
25399 $as_echo "$at_srcdir/darwin.at:122: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c"
25400 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:122"
25401 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c
25402 ) >>"$at_stdout" 2>>"$at_stderr"
25403 at_status=$? at_failed=false
25404 $at_check_filter
25405 echo stderr:; cat "$at_stderr"
25406 echo stdout:; cat "$at_stdout"
25407 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:122"
25408 $at_failed && at_fn_log_failure
25409 $at_traceon; }
25410
25411 { set +x
25412 $as_echo "$at_srcdir/darwin.at:124: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c baz.c"
25413 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c" "darwin.at:124"
25414 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c
25415 ) >>"$at_stdout" 2>>"$at_stderr"
25416 at_status=$? at_failed=false
25417 $at_check_filter
25418 echo stderr:; cat "$at_stderr"
25419 echo stdout:; cat "$at_stdout"
25420 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:124"
25421 $at_failed && at_fn_log_failure
25422 $at_traceon; }
25423
25424 { set +x
25425 $as_echo "$at_srcdir/darwin.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la \$objects"
25426 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects" "darwin.at:126"
25427 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects
25428 ) >>"$at_stdout" 2>>"$at_stderr"
25429 at_status=$? at_failed=false
25430 $at_check_filter
25431 echo stderr:; cat "$at_stderr"
25432 echo stdout:; cat "$at_stdout"
25433 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:126"
25434 $at_failed && at_fn_log_failure
25435 $at_traceon; }
25436
25437
25438 # Hypothesis: concurrent convenience archive extraction works.
25439 for i in 1 2 3 4 5; do
25440   rm -f libbar.la libbaz.la
25441   { set +x
25442 $as_echo "$at_srcdir/darwin.at:132: (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS           -o libbar.la bar.lo -rpath /foo libfoo.la) &          (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS            -o libbaz.la baz.lo -rpath /foo libfoo.la) &          wait; test -f libbar.la && test -f libbaz.la"
25443 at_fn_check_prepare_dynamic "($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS              -o libbar.la bar.lo -rpath /foo libfoo.la) &          ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS        -o libbaz.la baz.lo -rpath /foo libfoo.la) &          wait; test -f libbar.la && test -f libbaz.la" "darwin.at:132"
25444 ( $at_check_trace; ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS        -o libbar.la bar.lo -rpath /foo libfoo.la) &          ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS        -o libbaz.la baz.lo -rpath /foo libfoo.la) &          wait; test -f libbar.la && test -f libbaz.la
25445 ) >>"$at_stdout" 2>>"$at_stderr"
25446 at_status=$? at_failed=false
25447 $at_check_filter
25448 echo stderr:; cat "$at_stderr"
25449 echo stdout:; cat "$at_stdout"
25450 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:132"
25451 $at_failed && at_fn_log_failure
25452 $at_traceon; }
25453
25454 done
25455
25456 # Hypothesis: the lock is not used in dry run mode.
25457 eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
25458 # Next line is internal detail.
25459 lockfile=$objdir/libfoo.a.lock
25460 echo stamp > $lockfile
25461 { set +x
25462 $as_echo "$at_srcdir/darwin.at:145: \$LIBTOOL --dry-run --mode=link \$CC \$CFLAGS \$LDFLAGS       -o libbar.la bar.lo -rpath /foo libfoo.la"
25463 at_fn_check_prepare_dynamic "$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS          -o libbar.la bar.lo -rpath /foo libfoo.la" "darwin.at:145"
25464 ( $at_check_trace; $LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS    -o libbar.la bar.lo -rpath /foo libfoo.la
25465 ) >>"$at_stdout" 2>>"$at_stderr"
25466 at_status=$? at_failed=false
25467 $at_check_filter
25468 echo stderr:; cat "$at_stderr"
25469 echo stdout:; cat "$at_stdout"
25470 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:145"
25471 $at_failed && at_fn_log_failure
25472 $at_traceon; }
25473
25474 { set +x
25475 $as_echo "$at_srcdir/darwin.at:148: grep stamp \$lockfile"
25476 at_fn_check_prepare_dynamic "grep stamp $lockfile" "darwin.at:148"
25477 ( $at_check_trace; grep stamp $lockfile
25478 ) >>"$at_stdout" 2>>"$at_stderr"
25479 at_status=$? at_failed=false
25480 $at_check_filter
25481 at_fn_diff_devnull "$at_stderr" || at_failed=:
25482 echo stdout:; cat "$at_stdout"
25483 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:148"
25484 $at_failed && at_fn_log_failure
25485 $at_traceon; }
25486
25487
25488   set +x
25489   $at_times_p && times >"$at_times_file"
25490 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25491 read at_status <"$at_status_file"
25492 #AT_STOP_118
25493 #AT_START_119
25494 at_fn_group_banner 119 'darwin.at:152' \
25495   "darwin gdb debug information" "                   " 19
25496 at_xfail=no
25497
25498 eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`"
25499 case $whole_archive_flag_spec:$host_os in
25500 :darwin*) : ;;
25501 *) false ;;
25502 esac  && at_xfail=yes
25503 (
25504   $as_echo "119. $at_setup_line: testing $at_desc ..."
25505   $at_traceon
25506
25507
25508 { set +x
25509 $as_echo "$at_srcdir/darwin.at:154: gdb --version || (exit 77)"
25510 at_fn_check_prepare_trace "darwin.at:154"
25511 ( $at_check_trace; gdb --version || (exit 77)
25512 ) >>"$at_stdout" 2>>"$at_stderr"
25513 at_status=$? at_failed=false
25514 $at_check_filter
25515 echo stderr:; cat "$at_stderr"
25516 echo stdout:; cat "$at_stdout"
25517 at_fn_check_skip $at_status "$at_srcdir/darwin.at:154"
25518 $at_failed && at_fn_log_failure
25519 $at_traceon; }
25520
25521
25522 cat >foo.c <<'_ATEOF'
25523
25524 int foo (void) { return 0; }
25525 _ATEOF
25526
25527
25528 cat >bar.c <<'_ATEOF'
25529
25530 extern int foo (void);
25531 int bar (void) { return foo (); }
25532 _ATEOF
25533
25534
25535 cat >main.c <<'_ATEOF'
25536
25537 extern int bar(void);
25538
25539 int main() { return bar();}
25540 _ATEOF
25541
25542
25543 { set +x
25544 $as_echo "$at_srcdir/darwin.at:171: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c"
25545 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:171"
25546 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c
25547 ) >>"$at_stdout" 2>>"$at_stderr"
25548 at_status=$? at_failed=false
25549 $at_check_filter
25550 echo stderr:; cat "$at_stderr"
25551 echo stdout:; cat "$at_stdout"
25552 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:171"
25553 $at_failed && at_fn_log_failure
25554 $at_traceon; }
25555
25556 { set +x
25557 $as_echo "$at_srcdir/darwin.at:173: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo.c"
25558 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c" "darwin.at:173"
25559 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c
25560 ) >>"$at_stdout" 2>>"$at_stderr"
25561 at_status=$? at_failed=false
25562 $at_check_filter
25563 echo stderr:; cat "$at_stderr"
25564 echo stdout:; cat "$at_stdout"
25565 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:173"
25566 $at_failed && at_fn_log_failure
25567 $at_traceon; }
25568
25569 { set +x
25570 $as_echo "$at_srcdir/darwin.at:175: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c"
25571 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c" "darwin.at:175"
25572 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c
25573 ) >>"$at_stdout" 2>>"$at_stderr"
25574 at_status=$? at_failed=false
25575 $at_check_filter
25576 echo stderr:; cat "$at_stderr"
25577 echo stdout:; cat "$at_stdout"
25578 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:175"
25579 $at_failed && at_fn_log_failure
25580 $at_traceon; }
25581
25582
25583 { set +x
25584 $as_echo "$at_srcdir/darwin.at:178: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la foo.lo"
25585 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo" "darwin.at:178"
25586 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo
25587 ) >>"$at_stdout" 2>>"$at_stderr"
25588 at_status=$? at_failed=false
25589 $at_check_filter
25590 echo stderr:; cat "$at_stderr"
25591 echo stdout:; cat "$at_stdout"
25592 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:178"
25593 $at_failed && at_fn_log_failure
25594 $at_traceon; }
25595
25596
25597 { set +x
25598 $as_echo "$at_srcdir/darwin.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS          -o libbar.la bar.lo -rpath /foo libfoo.la "
25599 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS     -o libbar.la bar.lo -rpath /foo libfoo.la " "darwin.at:181"
25600 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS       -o libbar.la bar.lo -rpath /foo libfoo.la
25601 ) >>"$at_stdout" 2>>"$at_stderr"
25602 at_status=$? at_failed=false
25603 $at_check_filter
25604 echo stderr:; cat "$at_stderr"
25605 echo stdout:; cat "$at_stdout"
25606 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:181"
25607 $at_failed && at_fn_log_failure
25608 $at_traceon; }
25609
25610
25611 { set +x
25612 $as_echo "$at_srcdir/darwin.at:185: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS          -o main main.lo libbar.la"
25613 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS     -o main main.lo libbar.la" "darwin.at:185"
25614 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS       -o main main.lo libbar.la
25615 ) >>"$at_stdout" 2>>"$at_stderr"
25616 at_status=$? at_failed=false
25617 $at_check_filter
25618 echo stderr:; cat "$at_stderr"
25619 echo stdout:; cat "$at_stdout"
25620 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:185"
25621 $at_failed && at_fn_log_failure
25622 $at_traceon; }
25623
25624 { set +x
25625 $as_echo "$at_srcdir/darwin.at:187: echo quit | \$LIBTOOL --mode=execute gdb main"
25626 at_fn_check_prepare_notrace 'a shell pipeline' "darwin.at:187"
25627 ( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main
25628 ) >>"$at_stdout" 2>>"$at_stderr"
25629 at_status=$? at_failed=false
25630 $at_check_filter
25631 echo stderr:; tee stderr <"$at_stderr"
25632 echo stdout:; cat "$at_stdout"
25633 at_fn_check_skip $at_status "$at_srcdir/darwin.at:187"
25634 $at_failed && at_fn_log_failure
25635 $at_traceon; }
25636
25637
25638 { set +x
25639 $as_echo "$at_srcdir/darwin.at:190: grep 'Could not find object file' stderr"
25640 at_fn_check_prepare_trace "darwin.at:190"
25641 ( $at_check_trace; grep 'Could not find object file' stderr
25642 ) >>"$at_stdout" 2>>"$at_stderr"
25643 at_status=$? at_failed=false
25644 $at_check_filter
25645 echo stderr:; cat "$at_stderr"
25646 echo stdout:; cat "$at_stdout"
25647 at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:190"
25648 $at_failed && at_fn_log_failure
25649 $at_traceon; }
25650
25651
25652
25653
25654 # Remove any dSYM bundle
25655 rm -rf .libs/*.dSYM
25656
25657 { set +x
25658 $as_echo "$at_srcdir/darwin.at:202: echo quit | \$LIBTOOL --mode=execute gdb main"
25659 at_fn_check_prepare_notrace 'a shell pipeline' "darwin.at:202"
25660 ( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main
25661 ) >>"$at_stdout" 2>>"$at_stderr"
25662 at_status=$? at_failed=false
25663 $at_check_filter
25664 echo stderr:; tee stderr <"$at_stderr"
25665 echo stdout:; cat "$at_stdout"
25666 at_fn_check_skip $at_status "$at_srcdir/darwin.at:202"
25667 $at_failed && at_fn_log_failure
25668 $at_traceon; }
25669
25670 { set +x
25671 $as_echo "$at_srcdir/darwin.at:204: grep 'Could not find object file' stderr"
25672 at_fn_check_prepare_trace "darwin.at:204"
25673 ( $at_check_trace; grep 'Could not find object file' stderr
25674 ) >>"$at_stdout" 2>>"$at_stderr"
25675 at_status=$? at_failed=false
25676 $at_check_filter
25677 echo stderr:; cat "$at_stderr"
25678 echo stdout:; cat "$at_stdout"
25679 at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:204"
25680 $at_failed && at_fn_log_failure
25681 $at_traceon; }
25682
25683
25684   set +x
25685   $at_times_p && times >"$at_times_file"
25686 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25687 read at_status <"$at_status_file"
25688 #AT_STOP_119
25689 #AT_START_120
25690 at_fn_group_banner 120 'darwin.at:208' \
25691   "darwin ld warnings changing configure results" "  " 19
25692 at_xfail=no
25693       case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes
25694 (
25695   $as_echo "120. $at_setup_line: testing $at_desc ..."
25696   $at_traceon
25697
25698
25699 cat >configure.ac <<'_ATEOF'
25700 AC_INIT([ld-stderr], 2.4.2, bug-libtool@gnu.org)
25701 AC_CONFIG_MACRO_DIR([m4])
25702 AM_INIT_AUTOMAKE([foreign])
25703 AC_PROG_CC
25704 LT_INIT
25705 AC_CONFIG_FILES([Makefile])
25706 AC_OUTPUT
25707 _ATEOF
25708
25709
25710 cat >Makefile.am <<'_ATEOF'
25711
25712 ACLOCAL_AMFLAGS = -I m4
25713 _ATEOF
25714
25715 $LIBTOOLIZE --copy --force
25716
25717
25718 { set +x
25719 $as_echo "$at_srcdir/darwin.at:224: \$AUTORECONF --force --install"
25720 at_fn_check_prepare_dynamic "$AUTORECONF --force --install" "darwin.at:224"
25721 ( $at_check_trace; $AUTORECONF --force --install
25722 ) >>"$at_stdout" 2>>"$at_stderr"
25723 at_status=$? at_failed=false
25724 $at_check_filter
25725 echo stderr:; tee stderr <"$at_stderr"
25726 echo stdout:; cat "$at_stdout"
25727 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:224"
25728 if $at_failed; then :
25729   { set +x
25730 $as_echo "$at_srcdir/darwin.at:224: grep 'require .*but have' stderr && (exit 77)"
25731 at_fn_check_prepare_trace "darwin.at:224"
25732 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
25733 ) >>"$at_stdout" 2>>"$at_stderr"
25734 at_status=$? at_failed=false
25735 $at_check_filter
25736 at_fn_diff_devnull "$at_stderr" || at_failed=:
25737 at_fn_diff_devnull "$at_stdout" || at_failed=:
25738 at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:224"
25739 $at_failed && at_fn_log_failure
25740 $at_traceon; }
25741
25742 fi
25743 $at_failed && at_fn_log_failure
25744 $at_traceon; }
25745
25746
25747
25748
25749 { set +x
25750 $as_echo "$at_srcdir/darwin.at:225: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;      \$CONFIG_SHELL ./configure \$configure_options "
25751 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "darwin.at:225"
25752 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
25753 ) >>"$at_stdout" 2>>"$at_stderr"
25754 at_status=$? at_failed=false
25755 $at_check_filter
25756 echo stderr:; cat "$at_stderr"
25757 echo stdout:; cat "$at_stdout"
25758 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:225"
25759 $at_failed && at_fn_log_failure
25760 $at_traceon; }
25761
25762
25763 { set +x
25764 $as_echo "$at_srcdir/darwin.at:226: ./libtool --config"
25765 at_fn_check_prepare_trace "darwin.at:226"
25766 ( $at_check_trace; ./libtool --config
25767 ) >>"$at_stdout" 2>>"$at_stderr"
25768 at_status=$? at_failed=false
25769 $at_check_filter
25770 echo stderr:; cat "$at_stderr"
25771 echo stdout:; tee stdout <"$at_stdout"
25772 at_fn_check_skip $at_status "$at_srcdir/darwin.at:226"
25773 $at_failed && at_fn_log_failure
25774 $at_traceon; }
25775
25776 mv stdout expout
25777 { set +x
25778 $as_echo "$at_srcdir/darwin.at:228: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;      \$CONFIG_SHELL ./configure \$configure_options LDFLAGS=-L/there/is/no/dir/here"
25779 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "darwin.at:228"
25780 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options LDFLAGS=-L/there/is/no/dir/here
25781 ) >>"$at_stdout" 2>>"$at_stderr"
25782 at_status=$? at_failed=false
25783 $at_check_filter
25784 echo stderr:; cat "$at_stderr"
25785 echo stdout:; cat "$at_stdout"
25786 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:228"
25787 $at_failed && at_fn_log_failure
25788 $at_traceon; }
25789
25790
25791 { set +x
25792 $as_echo "$at_srcdir/darwin.at:229: ./libtool --config"
25793 at_fn_check_prepare_trace "darwin.at:229"
25794 ( $at_check_trace; ./libtool --config
25795 ) >>"$at_stdout" 2>>"$at_stderr"
25796 at_status=$? at_failed=false
25797 $at_check_filter
25798 echo stderr:; cat "$at_stderr"
25799 $at_diff expout "$at_stdout" || at_failed=:
25800 at_fn_check_skip $at_status "$at_srcdir/darwin.at:229"
25801 $at_failed && at_fn_log_failure
25802 $at_traceon; }
25803
25804   set +x
25805   $at_times_p && times >"$at_times_file"
25806 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25807 read at_status <"$at_status_file"
25808 #AT_STOP_120
25809 #AT_START_121
25810 at_fn_group_banner 121 'darwin.at:232' \
25811   "darwin can lt_dlopen .dylib and .so files" "      " 19
25812 at_xfail=no
25813 (
25814   $as_echo "121. $at_setup_line: testing $at_desc ..."
25815   $at_traceon
25816
25817
25818
25819
25820 # This test requires shared library support.
25821 { set +x
25822 $as_echo "$at_srcdir/darwin.at:237: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77"
25823 at_fn_check_prepare_notrace 'a shell pipeline' "darwin.at:237"
25824 ( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77
25825 ) >>"$at_stdout" 2>>"$at_stderr"
25826 at_status=$? at_failed=false
25827 $at_check_filter
25828 at_fn_diff_devnull "$at_stderr" || at_failed=:
25829 echo stdout:; cat "$at_stdout"
25830 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:237"
25831 $at_failed && at_fn_log_failure
25832 $at_traceon; }
25833
25834
25835 eval `$LIBTOOL --config | $EGREP '^shrext_cmds='`
25836
25837 module=no
25838 eval shared_ext=\"$shrext_cmds\"
25839 module=yes
25840 eval module_ext=\"$shrext_cmds\"
25841
25842 # Only bother with this test if module extension is different from
25843 # shared extension
25844 { set +x
25845 $as_echo "$at_srcdir/darwin.at:249: test \"\$shared_ext\" != \"\$module_ext\" || exit 77"
25846 at_fn_check_prepare_dynamic "test \"$shared_ext\" != \"$module_ext\" || exit 77" "darwin.at:249"
25847 ( $at_check_trace; test "$shared_ext" != "$module_ext" || exit 77
25848 ) >>"$at_stdout" 2>>"$at_stderr"
25849 at_status=$? at_failed=false
25850 $at_check_filter
25851 at_fn_diff_devnull "$at_stderr" || at_failed=:
25852 at_fn_diff_devnull "$at_stdout" || at_failed=:
25853 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:249"
25854 $at_failed && at_fn_log_failure
25855 $at_traceon; }
25856
25857
25858 # Skip this test when called from:
25859 #    make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install
25860 { set +x
25861 $as_echo "$at_srcdir/darwin.at:253: case \$LIBLTDL in #(
25862  */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;;
25863 esac"
25864 at_fn_check_prepare_notrace 'an embedded newline' "darwin.at:253"
25865 ( $at_check_trace; case $LIBLTDL in #(
25866  */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;;
25867 esac
25868 ) >>"$at_stdout" 2>>"$at_stderr"
25869 at_status=$? at_failed=false
25870 $at_check_filter
25871 at_fn_diff_devnull "$at_stderr" || at_failed=:
25872 echo stdout:; cat "$at_stdout"
25873 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:253"
25874 $at_failed && at_fn_log_failure
25875 $at_traceon; }
25876
25877
25878 prefix=`pwd`/inst
25879 libdir=$prefix/lib
25880 bindir=$prefix/bin
25881 mkdir $prefix $libdir $bindir
25882
25883 # This code is copied from the Autobook:
25884 # <http://sources.redhat.com/autobook/autobook/autobook_169.html>
25885 # so if it needs changes, be sure to notify the Autobook authors
25886 # about them.
25887
25888 cat >simple-module.c <<'_ATEOF'
25889
25890 #include <stdio.h>
25891
25892 #ifdef __cplusplus
25893 extern "C"
25894 #endif
25895 int
25896 run (const char *argument)
25897 {
25898   printf ("Hello, %s!\n", argument);
25899   return 0;
25900 }
25901 _ATEOF
25902
25903
25904 cat >ltdl-loader.c <<'_ATEOF'
25905
25906 #include <stdio.h>
25907 #include <stdlib.h>
25908 #ifndef EXIT_FAILURE
25909 #  define EXIT_FAILURE        1
25910 #  define EXIT_SUCCESS        0
25911 #endif
25912
25913 #include <limits.h>
25914 #ifndef PATH_MAX
25915 #  define PATH_MAX 255
25916 #endif
25917
25918 #include <string.h>
25919 #include <ltdl.h>
25920
25921 #ifndef MODULE_PATH_ENV
25922 #  define MODULE_PATH_ENV        "MODULE_PATH"
25923 #endif
25924
25925 typedef int entrypoint (const char *argument);
25926
25927 /* Save and return a copy of the dlerror() error  message,
25928    since the next API call may overwrite the original. */
25929 static char *dlerrordup (char *errormsg);
25930
25931 int
25932 main (int argc, const char *argv[])
25933 {
25934   char *errormsg = NULL;
25935   lt_dlhandle module = NULL;
25936   entrypoint *run = NULL;
25937   int errors = 0;
25938
25939   if (argc != 3)
25940     {
25941       fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n");
25942       exit (EXIT_FAILURE);
25943     }
25944
25945   /* Initialise libltdl. */
25946   errors = lt_dlinit ();
25947
25948   /* Set the module search path. */
25949   if (!errors)
25950     {
25951       const char *path = getenv (MODULE_PATH_ENV);
25952
25953       if (path != NULL)
25954         errors = lt_dlsetsearchpath (path);
25955     }
25956
25957   /* Load the module. */
25958   if (!errors)
25959     module = lt_dlopenext (argv[1]);
25960
25961   /* Find the entry point. */
25962   if (module)
25963     {
25964       run = (entrypoint *) lt_dlsym (module, "run");
25965
25966       /* In principle, run might legitimately be NULL, so
25967          I don't use run == NULL as an error indicator
25968          in general. */
25969       errormsg = dlerrordup (errormsg);
25970       if (errormsg != NULL)
25971         {
25972           errors = lt_dlclose (module);
25973           module = NULL;
25974         }
25975     }
25976   else
25977     errors = 1;
25978
25979   /* Call the entry point function. */
25980   if (!errors)
25981     {
25982       int result = (*run) (argv[2]);
25983       if (result < 0)
25984         errormsg = strdup ("module entry point execution failed");
25985       else
25986         printf ("\t=> %d\n", result);
25987     }
25988
25989   /* Unload the module, now that we are done with it. */
25990   if (!errors)
25991     errors = lt_dlclose (module);
25992
25993   if (errors)
25994     {
25995       /* Diagnose the encountered error. */
25996       errormsg = dlerrordup (errormsg);
25997
25998       if (!errormsg)
25999         {
26000           fprintf (stderr, "%s: dlerror() failed.\n", argv[0]);
26001           return EXIT_FAILURE;
26002         }
26003     }
26004
26005   /* Finished with ltdl now. */
26006   if (!errors)
26007     if (lt_dlexit () != 0)
26008       errormsg = dlerrordup (errormsg);
26009
26010   if (errormsg)
26011     {
26012       fprintf (stderr, "%s: %s.\n", argv[0], errormsg);
26013       free (errormsg);
26014       exit (EXIT_FAILURE);
26015     }
26016
26017   return EXIT_SUCCESS;
26018 }
26019
26020 /* Be careful to save a copy of the error message,
26021    since the  next API call may overwrite the original. */
26022 static char *
26023 dlerrordup (char *errormsg)
26024 {
26025   char *error = (char *) lt_dlerror ();
26026   if (error && !errormsg)
26027     errormsg = strdup (error);
26028   return errormsg;
26029 }
26030 _ATEOF
26031
26032
26033 : ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
26034 : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
26035
26036 CPPFLAGS="$LTDLINCL $CPPFLAGS"
26037 LDFLAGS="$LDFLAGS -no-undefined"
26038
26039 { set +x
26040 $as_echo "$at_srcdir/darwin.at:416: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c simple-module.c"
26041 at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c" "darwin.at:416"
26042 ( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c
26043 ) >>"$at_stdout" 2>>"$at_stderr"
26044 at_status=$? at_failed=false
26045 $at_check_filter
26046 echo stderr:; cat "$at_stderr"
26047 echo stdout:; cat "$at_stdout"
26048 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:416"
26049 $at_failed && at_fn_log_failure
26050 $at_traceon; }
26051
26052 { set +x
26053 $as_echo "$at_srcdir/darwin.at:418: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o simple-module.la    simple-module.lo -rpath \$libdir -module -avoid-version"
26054 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la       simple-module.lo -rpath $libdir -module -avoid-version" "darwin.at:418"
26055 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la         simple-module.lo -rpath $libdir -module -avoid-version
26056 ) >>"$at_stdout" 2>>"$at_stderr"
26057 at_status=$? at_failed=false
26058 $at_check_filter
26059 echo stderr:; cat "$at_stderr"
26060 echo stdout:; cat "$at_stdout"
26061 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:418"
26062 $at_failed && at_fn_log_failure
26063 $at_traceon; }
26064
26065 { set +x
26066 $as_echo "$at_srcdir/darwin.at:421: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libsimple-dylib.la          simple-module.lo -rpath \$libdir -avoid-version"
26067 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libsimple-dylib.la     simple-module.lo -rpath $libdir -avoid-version" "darwin.at:421"
26068 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libsimple-dylib.la       simple-module.lo -rpath $libdir -avoid-version
26069 ) >>"$at_stdout" 2>>"$at_stderr"
26070 at_status=$? at_failed=false
26071 $at_check_filter
26072 echo stderr:; cat "$at_stderr"
26073 echo stdout:; cat "$at_stdout"
26074 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:421"
26075 $at_failed && at_fn_log_failure
26076 $at_traceon; }
26077
26078 { set +x
26079 $as_echo "$at_srcdir/darwin.at:424: \$CC \$CPPFLAGS \$CFLAGS -c ltdl-loader.c"
26080 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c ltdl-loader.c" "darwin.at:424"
26081 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c
26082 ) >>"$at_stdout" 2>>"$at_stderr"
26083 at_status=$? at_failed=false
26084 $at_check_filter
26085 echo stderr:; cat "$at_stderr"
26086 echo stdout:; cat "$at_stdout"
26087 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:424"
26088 $at_failed && at_fn_log_failure
26089 $at_traceon; }
26090
26091 { set +x
26092 $as_echo "$at_srcdir/darwin.at:426: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o ltdl-loader\$EXEEXT         ltdl-loader.\$OBJEXT -dlopen self \$LIBLTDL"
26093 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT     ltdl-loader.$OBJEXT -dlopen self $LIBLTDL" "darwin.at:426"
26094 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT       ltdl-loader.$OBJEXT -dlopen self $LIBLTDL
26095 ) >>"$at_stdout" 2>>"$at_stderr"
26096 at_status=$? at_failed=false
26097 $at_check_filter
26098 echo stderr:; cat "$at_stderr"
26099 echo stdout:; cat "$at_stdout"
26100 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:426"
26101 $at_failed && at_fn_log_failure
26102 $at_traceon; }
26103
26104 { set +x
26105 $as_echo "$at_srcdir/darwin.at:429: \$LIBTOOL --mode=install cp simple-module.la \$libdir/simple-module.la"
26106 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la" "darwin.at:429"
26107 ( $at_check_trace; $LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la
26108 ) >>"$at_stdout" 2>>"$at_stderr"
26109 at_status=$? at_failed=false
26110 $at_check_filter
26111 echo stderr:; cat "$at_stderr"
26112 echo stdout:; cat "$at_stdout"
26113 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:429"
26114 $at_failed && at_fn_log_failure
26115 $at_traceon; }
26116
26117 { set +x
26118 $as_echo "$at_srcdir/darwin.at:430: \$LIBTOOL --mode=install cp libsimple-dylib.la \$libdir/libsimple-dylib.la"
26119 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libsimple-dylib.la $libdir/libsimple-dylib.la" "darwin.at:430"
26120 ( $at_check_trace; $LIBTOOL --mode=install cp libsimple-dylib.la $libdir/libsimple-dylib.la
26121 ) >>"$at_stdout" 2>>"$at_stderr"
26122 at_status=$? at_failed=false
26123 $at_check_filter
26124 echo stderr:; cat "$at_stderr"
26125 echo stdout:; cat "$at_stdout"
26126 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:430"
26127 $at_failed && at_fn_log_failure
26128 $at_traceon; }
26129
26130 { set +x
26131 $as_echo "$at_srcdir/darwin.at:431: \$LIBTOOL --mode=clean rm -f simple-module.la"
26132 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f simple-module.la" "darwin.at:431"
26133 ( $at_check_trace; $LIBTOOL --mode=clean rm -f simple-module.la
26134 ) >>"$at_stdout" 2>>"$at_stderr"
26135 at_status=$? at_failed=false
26136 $at_check_filter
26137 echo stderr:; cat "$at_stderr"
26138 echo stdout:; cat "$at_stdout"
26139 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:431"
26140 $at_failed && at_fn_log_failure
26141 $at_traceon; }
26142
26143 { set +x
26144 $as_echo "$at_srcdir/darwin.at:432: \$LIBTOOL --mode=clean rm -f libsimple-dylib.la"
26145 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f libsimple-dylib.la" "darwin.at:432"
26146 ( $at_check_trace; $LIBTOOL --mode=clean rm -f libsimple-dylib.la
26147 ) >>"$at_stdout" 2>>"$at_stderr"
26148 at_status=$? at_failed=false
26149 $at_check_filter
26150 echo stderr:; cat "$at_stderr"
26151 echo stdout:; cat "$at_stdout"
26152 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:432"
26153 $at_failed && at_fn_log_failure
26154 $at_traceon; }
26155
26156
26157 rm $libdir/simple-module.la
26158 rm $libdir/libsimple-dylib.la
26159
26160 for dir in inst/lib "$libdir"; do
26161   lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
26162 { set +x
26163 $as_echo "$at_srcdir/darwin.at:438: if \"\$lt_exe\" \$dir/simple-module World; then :; else lt_status=\$?;                 test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
26164 at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/simple-module World; then :; else lt_status=$?;                   test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "darwin.at:438"
26165 ( $at_check_trace; if "$lt_exe" $dir/simple-module World; then :; else lt_status=$?;               test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
26166 ) >>"$at_stdout" 2>>"$at_stderr"
26167 at_status=$? at_failed=false
26168 $at_check_filter
26169 echo stderr:; cat "$at_stderr"
26170 echo stdout:; tee stdout <"$at_stdout"
26171 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:438"
26172 $at_failed && at_fn_log_failure
26173 $at_traceon; }
26174
26175
26176   { set +x
26177 $as_echo "$at_srcdir/darwin.at:440: grep \"Hello, World\" stdout"
26178 at_fn_check_prepare_trace "darwin.at:440"
26179 ( $at_check_trace; grep "Hello, World" stdout
26180 ) >>"$at_stdout" 2>>"$at_stderr"
26181 at_status=$? at_failed=false
26182 $at_check_filter
26183 at_fn_diff_devnull "$at_stderr" || at_failed=:
26184 echo stdout:; cat "$at_stdout"
26185 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:440"
26186 $at_failed && at_fn_log_failure
26187 $at_traceon; }
26188
26189   lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi
26190 { set +x
26191 $as_echo "$at_srcdir/darwin.at:441: if \"\$lt_exe\" \$dir/libsimple-dylib World; then :; else lt_status=\$?;               test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77;            exit \$lt_status; fi"
26192 at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/libsimple-dylib World; then :; else lt_status=$?;                 test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77;       exit $lt_status; fi" "darwin.at:441"
26193 ( $at_check_trace; if "$lt_exe" $dir/libsimple-dylib World; then :; else lt_status=$?;             test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
26194 ) >>"$at_stdout" 2>>"$at_stderr"
26195 at_status=$? at_failed=false
26196 $at_check_filter
26197 echo stderr:; cat "$at_stderr"
26198 echo stdout:; tee stdout <"$at_stdout"
26199 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:441"
26200 $at_failed && at_fn_log_failure
26201 $at_traceon; }
26202
26203
26204   { set +x
26205 $as_echo "$at_srcdir/darwin.at:443: grep \"Hello, World\" stdout"
26206 at_fn_check_prepare_trace "darwin.at:443"
26207 ( $at_check_trace; grep "Hello, World" stdout
26208 ) >>"$at_stdout" 2>>"$at_stderr"
26209 at_status=$? at_failed=false
26210 $at_check_filter
26211 at_fn_diff_devnull "$at_stderr" || at_failed=:
26212 echo stdout:; cat "$at_stdout"
26213 at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:443"
26214 $at_failed && at_fn_log_failure
26215 $at_traceon; }
26216
26217 done
26218
26219   set +x
26220   $at_times_p && times >"$at_times_file"
26221 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26222 read at_status <"$at_status_file"
26223 #AT_STOP_121
26224 #AT_START_122
26225 at_fn_group_banner 122 'dumpbin-symbols.at:25' \
26226   "dumpbin -symbols section hiding" "                " 20
26227 at_xfail=no
26228 (
26229   $as_echo "122. $at_setup_line: testing $at_desc ..."
26230   $at_traceon
26231
26232
26233 # I don't know of a stable way to create a pair of objects that
26234 # exhibits the potential problem, so this test fakes it by
26235 # testing with output from a case that do have the potential
26236 # problem.
26237
26238 # First check if the global_symbol_pipe can handle the below
26239 # test case at all, and skip if $NM is not MS dumpbin.
26240
26241 cat >variable.c <<'_ATEOF'
26242
26243 int some_variable = 0;
26244 _ATEOF
26245
26246
26247 { set +x
26248 $as_echo "$at_srcdir/dumpbin-symbols.at:40: \$CC \$CPPFLAGS \$CFLAGS -c variable.c"
26249 at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c variable.c" "dumpbin-symbols.at:40"
26250 ( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c variable.c
26251 ) >>"$at_stdout" 2>>"$at_stderr"
26252 at_status=$? at_failed=false
26253 $at_check_filter
26254 echo stderr:; cat "$at_stderr"
26255 echo stdout:; cat "$at_stdout"
26256 at_fn_check_status 0 $at_status "$at_srcdir/dumpbin-symbols.at:40"
26257 $at_failed && at_fn_log_failure
26258 $at_traceon; }
26259
26260 { set +x
26261 $as_echo "$at_srcdir/dumpbin-symbols.at:41: \$NM variable.\$OBJEXT"
26262 at_fn_check_prepare_dynamic "$NM variable.$OBJEXT" "dumpbin-symbols.at:41"
26263 ( $at_check_trace; $NM variable.$OBJEXT
26264 ) >>"$at_stdout" 2>>"$at_stderr"
26265 at_status=$? at_failed=false
26266 $at_check_filter
26267 echo stderr:; cat "$at_stderr"
26268 echo stdout:; tee stdout <"$at_stdout"
26269 at_fn_check_status 0 $at_status "$at_srcdir/dumpbin-symbols.at:41"
26270 $at_failed && at_fn_log_failure
26271 $at_traceon; }
26272
26273 { set +x
26274 $as_echo "$at_srcdir/dumpbin-symbols.at:42: grep 'External.*some_variable' stdout || exit 77"
26275 at_fn_check_prepare_trace "dumpbin-symbols.at:42"
26276 ( $at_check_trace; grep 'External.*some_variable' stdout || exit 77
26277 ) >>"$at_stdout" 2>>"$at_stderr"
26278 at_status=$? at_failed=false
26279 $at_check_filter
26280 at_fn_diff_devnull "$at_stderr" || at_failed=:
26281 echo stdout:; cat "$at_stdout"
26282 at_fn_check_status 0 $at_status "$at_srcdir/dumpbin-symbols.at:42"
26283 $at_failed && at_fn_log_failure
26284 $at_traceon; }
26285
26286
26287 eval `$LIBTOOL --config | $EGREP '^(global_symbol_pipe)='`
26288
26289 cat >dumpbin-output <<'_ATEOF'
26290
26291 Dump of file foo.obj
26292
26293 File Type: COFF OBJECT
26294
26295 COFF SYMBOL TABLE
26296 000 00AB766F ABS    notype       Static       | @comp.id
26297 001 00000001 ABS    notype       Static       | @feat.00
26298 002 00000000 SECT1  notype       Static       | .drectve
26299     Section length   8F, #relocs    0, #linenums    0, checksum        0
26300 004 00000000 SECT2  notype       Static       | .debug$S
26301     Section length 44B4, #relocs   1C, #linenums    0, checksum        0
26302 006 00000000 SECT3  notype       Static       | .rdata
26303     Section length    1, #relocs    0, #linenums    0, checksum        0, selection    2 (pick any)
26304 008 00000000 SECT3  notype       External     | ?value@?$integral_constant@_N$0A@@tr1@std@@2_NB (public: static bool const std::tr1::integral_constant<bool,0>::value)
26305 009 00000000 SECT4  notype       Static       | .rdata
26306     Section length    1, #relocs    0, #linenums    0, checksum 77073096, selection    2 (pick any)
26307 *snip lots of uninteresting crap*
26308 12A 00000000 SECT5B notype       Static       | .text
26309     Section length   4B, #relocs    2, #linenums    0, checksum 22AE8362, selection    2 (pick any)
26310 12C 00000000 SECT5C notype       Static       | .debug$S
26311     Section length  150, #relocs    B, #linenums    0, checksum        0, selection    5 (pick associative Section 0x5B)
26312 12F 00000000 SECT5D notype       Static       | .debug$T
26313     Section length   5C, #relocs    0, #linenums    0, checksum        0
26314
26315 String Table Size = 0x15EF bytes
26316
26317
26318 Dump of file conv.lib
26319
26320 File Type: LIBRARY
26321
26322 COFF SYMBOL TABLE
26323 000 00AB766F ABS    notype       Static       | @comp.id
26324 001 00000001 ABS    notype       Static       | @feat.00
26325 002 00000000 SECT1  notype       Static       | .drectve
26326     Section length   2F, #relocs    0, #linenums    0, checksum        0
26327 004 00000000 SECT2  notype       Static       | .debug$S
26328     Section length  70C, #relocs    5, #linenums    0, checksum        0
26329 006 00000000 SECT3  notype       Static       | .text
26330     Section length    A, #relocs    0, #linenums    0, checksum BAFC81C1
26331 008 00000000 SECT3  notype ()    External     | _convenience
26332 009 00000000 SECT4  notype       Static       | .debug$T
26333     Section length   5C, #relocs    0, #linenums    0, checksum        0
26334
26335 String Table Size = 0x11 bytes
26336
26337   Summary
26338
26339         5B3C .debug$S
26340           B8 .debug$T
26341           BE .drectve
26342          129 .rdata
26343            C .sxdata
26344          613 .text
26345           6C .text$x
26346           B8 .xdata$x
26347 _ATEOF
26348
26349
26350 # Check if the _convenience symbol from section SECT3 in conv.lib is
26351 # present even if section SECT3 in foo.obj is hidden.
26352 { set +x
26353 $as_echo "$at_srcdir/dumpbin-symbols.at:108: < dumpbin-output eval \"\$global_symbol_pipe\""
26354 at_fn_check_prepare_dynamic "< dumpbin-output eval \"$global_symbol_pipe\"" "dumpbin-symbols.at:108"
26355 ( $at_check_trace; < dumpbin-output eval "$global_symbol_pipe"
26356 ) >>"$at_stdout" 2>>"$at_stderr"
26357 at_status=$? at_failed=false
26358 $at_check_filter
26359 at_fn_diff_devnull "$at_stderr" || at_failed=:
26360 echo stdout:; tee stdout <"$at_stdout"
26361 at_fn_check_status 0 $at_status "$at_srcdir/dumpbin-symbols.at:108"
26362 $at_failed && at_fn_log_failure
26363 $at_traceon; }
26364
26365 { set +x
26366 $as_echo "$at_srcdir/dumpbin-symbols.at:109: grep convenience stdout"
26367 at_fn_check_prepare_trace "dumpbin-symbols.at:109"
26368 ( $at_check_trace; grep convenience stdout
26369 ) >>"$at_stdout" 2>>"$at_stderr"
26370 at_status=$? at_failed=false
26371 $at_check_filter
26372 at_fn_diff_devnull "$at_stderr" || at_failed=:
26373 echo stdout:; cat "$at_stdout"
26374 at_fn_check_status 0 $at_status "$at_srcdir/dumpbin-symbols.at:109"
26375 $at_failed && at_fn_log_failure
26376 $at_traceon; }
26377
26378
26379   set +x
26380   $at_times_p && times >"$at_times_file"
26381 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26382 read at_status <"$at_status_file"
26383 #AT_STOP_122
26384 #AT_START_123
26385 at_fn_group_banner 123 'deplibs-mingw.at:27' \
26386   "deplibs without file command" "                   " 20
26387 at_xfail=no
26388 (
26389   $as_echo "123. $at_setup_line: testing $at_desc ..."
26390   $at_traceon
26391
26392
26393
26394 cwd=`pwd`
26395 instdir=$cwd/inst
26396 libdir=$instdir/lib
26397 bindir=$instdir/bin
26398 LDFLAGS="$LDFLAGS -no-undefined"
26399
26400 mkdir inst inst/bin inst/lib
26401
26402 cat >a.c <<'_ATEOF'
26403 int a () { return 0; }
26404 _ATEOF
26405
26406 cat >b.c <<'_ATEOF'
26407 extern int a ();
26408 int b () { return a (); }
26409 _ATEOF
26410
26411
26412 for file in a.c b.c; do
26413   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
26414 done
26415 { set +x
26416 $as_echo "$at_srcdir/deplibs-mingw.at:49: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir"
26417 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir" "deplibs-mingw.at:49"
26418 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir
26419 ) >>"$at_stdout" 2>>"$at_stderr"
26420 at_status=$? at_failed=false
26421 $at_check_filter
26422 echo stderr:; cat "$at_stderr"
26423 echo stdout:; cat "$at_stdout"
26424 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:49"
26425 $at_failed && at_fn_log_failure
26426 $at_traceon; }
26427
26428 { set +x
26429 $as_echo "$at_srcdir/deplibs-mingw.at:51: library_names= && . ./liba.la && if test -z \"\$library_names\"; then exit 77; fi "
26430 at_fn_check_prepare_dynamic "library_names= && . ./liba.la && if test -z \"$library_names\"; then exit 77; fi " "deplibs-mingw.at:51"
26431 ( $at_check_trace; library_names= && . ./liba.la && if test -z "$library_names"; then exit 77; fi
26432 ) >>"$at_stdout" 2>>"$at_stderr"
26433 at_status=$? at_failed=false
26434 $at_check_filter
26435 echo stderr:; cat "$at_stderr"
26436 echo stdout:; cat "$at_stdout"
26437 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:51"
26438 $at_failed && at_fn_log_failure
26439 $at_traceon; }
26440
26441 { set +x
26442 $as_echo "$at_srcdir/deplibs-mingw.at:53: \$LIBTOOL --mode=install cp liba.la \$libdir"
26443 at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "deplibs-mingw.at:53"
26444 ( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir
26445 ) >>"$at_stdout" 2>>"$at_stderr"
26446 at_status=$? at_failed=false
26447 $at_check_filter
26448 echo stderr:; cat "$at_stderr"
26449 echo stdout:; cat "$at_stdout"
26450 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:53"
26451 $at_failed && at_fn_log_failure
26452 $at_traceon; }
26453
26454 { set +x
26455 $as_echo "$at_srcdir/deplibs-mingw.at:54: \$LIBTOOL --mode=clean rm -f liba.la"
26456 at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "deplibs-mingw.at:54"
26457 ( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la
26458 ) >>"$at_stdout" 2>>"$at_stderr"
26459 at_status=$? at_failed=false
26460 $at_check_filter
26461 echo stderr:; cat "$at_stderr"
26462 echo stdout:; cat "$at_stdout"
26463 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:54"
26464 $at_failed && at_fn_log_failure
26465 $at_traceon; }
26466
26467 rm -f $libdir/liba.la
26468
26469 # check once with `file' (if present) and once without, if on MinGW.
26470 for try in with-file without-file; do
26471   { set +x
26472 $as_echo "$at_srcdir/deplibs-mingw.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir            -L\$libdir -la"
26473 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir      -L$libdir -la" "deplibs-mingw.at:59"
26474 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir        -L$libdir -la
26475 ) >>"$at_stdout" 2>>"$at_stderr"
26476 at_status=$? at_failed=false
26477 $at_check_filter
26478 echo stderr:; cat "$at_stderr"
26479 echo stdout:; cat "$at_stdout"
26480 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:59"
26481 $at_failed && at_fn_log_failure
26482 $at_traceon; }
26483
26484   { set +x
26485 $as_echo "$at_srcdir/deplibs-mingw.at:62: library_names= && . ./libb.la && if test -z \"\$library_names\"; then exit 99; fi "
26486 at_fn_check_prepare_dynamic "library_names= && . ./libb.la && if test -z \"$library_names\"; then exit 99; fi " "deplibs-mingw.at:62"
26487 ( $at_check_trace; library_names= && . ./libb.la && if test -z "$library_names"; then exit 99; fi
26488 ) >>"$at_stdout" 2>>"$at_stderr"
26489 at_status=$? at_failed=false
26490 $at_check_filter
26491 echo stderr:; cat "$at_stderr"
26492 echo stdout:; cat "$at_stdout"
26493 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:62"
26494 $at_failed && at_fn_log_failure
26495 $at_traceon; }
26496
26497
26498   case $host_os in
26499   mingw*)
26500     if file /; then
26501       mkdir bin new-libtool
26502
26503       cat >bin/file <<\EOF
26504 #! /bin/sh
26505 exit 1
26506 EOF
26507       chmod +x bin/file
26508       PATH=`pwd`/bin${PATH_SEPARATOR-:}$PATH
26509       cd new-libtool
26510       # configure might fail due to in-tree build of toplevel, or
26511       # missing configure flags and other reasons.
26512       { set +x
26513 $as_echo "$at_srcdir/deplibs-mingw.at:79: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        \$CONFIG_SHELL \"\$abs_top_srcdir\"/configure \$configure_options || exit 77"
26514 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "deplibs-mingw.at:79"
26515 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL "$abs_top_srcdir"/configure $configure_options || exit 77
26516 ) >>"$at_stdout" 2>>"$at_stderr"
26517 at_status=$? at_failed=false
26518 $at_check_filter
26519 echo stderr:; cat "$at_stderr"
26520 echo stdout:; cat "$at_stdout"
26521 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:79"
26522 $at_failed && at_fn_log_failure
26523 $at_traceon; }
26524
26525
26526       cd ..
26527       LIBTOOL=new-libtool/libtool
26528       export LIBTOOL
26529       # Check whether the generated script is usable; otherwise, skip.
26530       { set +x
26531 $as_echo "$at_srcdir/deplibs-mingw.at:84: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libunrelated.la a.lo -rpath \$libdir                || exit 77"
26532 at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir          || exit 77" "deplibs-mingw.at:84"
26533 ( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir            || exit 77
26534 ) >>"$at_stdout" 2>>"$at_stderr"
26535 at_status=$? at_failed=false
26536 $at_check_filter
26537 echo stderr:; cat "$at_stderr"
26538 echo stdout:; cat "$at_stdout"
26539 at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:84"
26540 $at_failed && at_fn_log_failure
26541 $at_traceon; }
26542
26543     else
26544       break;
26545     fi;;
26546   *)
26547     break;;
26548   esac
26549 done
26550
26551   set +x
26552   $at_times_p && times >"$at_times_file"
26553 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26554 read at_status <"$at_status_file"
26555 #AT_STOP_123
26556 #AT_START_124
26557 at_fn_group_banner 124 'sysroot.at:203' \
26558   "-L=.../lib -l" "                                  " 21
26559 at_xfail=no
26560       test "$ACLOCAL" = no && at_xfail=yes
26561       test "$AUTOMAKE" = no && at_xfail=yes
26562       test "$AUTOCONF" = no && at_xfail=yes
26563       test "$ACLOCAL" = no && at_xfail=yes
26564       test "$AUTOMAKE" = no && at_xfail=yes
26565       test "$AUTOCONF" = no && at_xfail=yes
26566       test "$ACLOCAL" = no && at_xfail=yes
26567       test "$AUTOMAKE" = no && at_xfail=yes
26568       test "$AUTOCONF" = no && at_xfail=yes
26569 (
26570   $as_echo "124. $at_setup_line: testing $at_desc ..."
26571   $at_traceon
26572
26573
26574
26575 gcc_sysroot=`$CC --print-sysroot 2> /dev/null`
26576 if test $? != 0; then
26577   gcc_sysroot=
26578 fi
26579 { set +x
26580 $as_echo "$at_srcdir/sysroot.at:203: test -n \"\$gcc_sysroot\" || exit 77"
26581 at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:203"
26582 ( $at_check_trace; test -n "$gcc_sysroot" || exit 77
26583 ) >>"$at_stdout" 2>>"$at_stderr"
26584 at_status=$? at_failed=false
26585 $at_check_filter
26586 at_fn_diff_devnull "$at_stderr" || at_failed=:
26587 at_fn_diff_devnull "$at_stdout" || at_failed=:
26588 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26589 $at_failed && at_fn_log_failure
26590 $at_traceon; }
26591
26592
26593 # Detect installation prefix for the compiler
26594 prefix=
26595 for i in crt0.o crt1.o crt2.o crti.o; do
26596   j=`$CC --print-file-name $i 2> /dev/null`
26597   test $? = 0 || continue
26598   case "$j" in
26599     $gcc_sysroot*/lib/$i)
26600       prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"`
26601       break ;;
26602   esac
26603 done
26604 { set +x
26605 $as_echo "$at_srcdir/sysroot.at:203: test -n \"\$prefix\" || exit 77"
26606 at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:203"
26607 ( $at_check_trace; test -n "$prefix" || exit 77
26608 ) >>"$at_stdout" 2>>"$at_stderr"
26609 at_status=$? at_failed=false
26610 $at_check_filter
26611 at_fn_diff_devnull "$at_stderr" || at_failed=:
26612 at_fn_diff_devnull "$at_stdout" || at_failed=:
26613 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26614 $at_failed && at_fn_log_failure
26615 $at_traceon; }
26616
26617
26618 sysroot=`pwd`/sys-root
26619
26620 # difficult to use AS_DIRNAME inside the AT_CHECK macro, so
26621 # encapsulate as a shell function.
26622 local_dirname() {
26623   $as_dirname -- "$1" ||
26624 $as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26625          X"$1" : 'X\(//\)[^/]' \| \
26626          X"$1" : 'X\(//\)$' \| \
26627          X"$1" : 'X\(/\)' \| . 2>/dev/null ||
26628 $as_echo X"$1" |
26629     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26630             s//\1/
26631             q
26632           }
26633           /^X\(\/\/\)[^/].*/{
26634             s//\1/
26635             q
26636           }
26637           /^X\(\/\/\)$/{
26638             s//\1/
26639             q
26640           }
26641           /^X\(\/\).*/{
26642             s//\1/
26643             q
26644           }
26645           s/.*/./; q'
26646 }
26647
26648 { set +x
26649 $as_echo "$at_srcdir/sysroot.at:203:
26650 (cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\
26651 while read file; do
26652   dir=\`local_dirname \"\$sysroot/\$file\"\`
26653   test -d \"\$dir\" || mkdir -p \"\$dir\"
26654   rm -f \"\$sysroot/\$file\"
26655   ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\
26656     cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\"
26657 done"
26658 at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:203"
26659 ( $at_check_trace;
26660 (cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \
26661 while read file; do
26662   dir=`local_dirname "$sysroot/$file"`
26663   test -d "$dir" || mkdir -p "$dir"
26664   rm -f "$sysroot/$file"
26665   ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \
26666     cp "$gcc_sysroot/$file" "$sysroot/$file"
26667 done
26668 ) >>"$at_stdout" 2>>"$at_stderr"
26669 at_status=$? at_failed=false
26670 $at_check_filter
26671 at_fn_diff_devnull "$at_stderr" || at_failed=:
26672 at_fn_diff_devnull "$at_stdout" || at_failed=:
26673 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26674 $at_failed && at_fn_log_failure
26675 $at_traceon; }
26676
26677
26678 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
26679 configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
26680
26681 #???
26682 if test "$shlibpath_var" = PATH; then
26683   configure_options="$configure_options --libdir=/$prefix/bin"
26684 fi
26685
26686 { set +x
26687 $as_echo "$at_srcdir/sysroot.at:203: mkdir lib1 lib2 prog"
26688 at_fn_check_prepare_trace "sysroot.at:203"
26689 ( $at_check_trace; mkdir lib1 lib2 prog
26690 ) >>"$at_stdout" 2>>"$at_stderr"
26691 at_status=$? at_failed=false
26692 $at_check_filter
26693 at_fn_diff_devnull "$at_stderr" || at_failed=:
26694 at_fn_diff_devnull "$at_stdout" || at_failed=:
26695 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26696 $at_failed && at_fn_log_failure
26697 $at_traceon; }
26698
26699
26700 # Build and install package 1.
26701 cat >lib1/configure.ac <<'_ATEOF'
26702 AC_INIT([lib1], [1.0])
26703 AM_INIT_AUTOMAKE([foreign])
26704 AC_PROG_CC
26705 AC_CONFIG_SRCDIR([lib1.c])
26706 LT_INIT
26707 AC_OUTPUT(Makefile)
26708 _ATEOF
26709
26710
26711 cat >lib1/Makefile.am <<'_ATEOF'
26712 lib_LTLIBRARIES = lib1.la
26713 lib1_la_SOURCES = lib1.c
26714 lib1_la_LDFLAGS = -rpath $(libdir)
26715 _ATEOF
26716
26717
26718 cat >lib1/lib1.c <<'_ATEOF'
26719 #include <string.h>
26720 #include <stdlib.h>
26721 char *f(const char *s)
26722 {
26723   return strdup (s);
26724 }
26725 _ATEOF
26726
26727
26728 cd lib1
26729 $LIBTOOLIZE
26730
26731
26732 { set +x
26733 $as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
26734 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203"
26735 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
26736 ) >>"$at_stdout" 2>>"$at_stderr"
26737 at_status=$? at_failed=false
26738 $at_check_filter
26739 echo stderr:; cat "$at_stderr"
26740 echo stdout:; cat "$at_stdout"
26741 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26742 $at_failed && at_fn_log_failure
26743 $at_traceon; }
26744
26745
26746
26747
26748
26749 { set +x
26750 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing"
26751 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203"
26752 ( $at_check_trace; $AUTOMAKE --add-missing
26753 ) >>"$at_stdout" 2>>"$at_stderr"
26754 at_status=$? at_failed=false
26755 $at_check_filter
26756 echo stderr:; tee stderr <"$at_stderr"
26757 echo stdout:; cat "$at_stdout"
26758 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26759 if $at_failed; then :
26760   { set +x
26761 $as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)"
26762 at_fn_check_prepare_trace "sysroot.at:203"
26763 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
26764 ) >>"$at_stdout" 2>>"$at_stderr"
26765 at_status=$? at_failed=false
26766 $at_check_filter
26767 at_fn_diff_devnull "$at_stderr" || at_failed=:
26768 at_fn_diff_devnull "$at_stdout" || at_failed=:
26769 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
26770 $at_failed && at_fn_log_failure
26771 $at_traceon; }
26772
26773 fi
26774 $at_failed && at_fn_log_failure
26775 $at_traceon; }
26776
26777
26778
26779
26780 { set +x
26781 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF "
26782 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203"
26783 ( $at_check_trace; $AUTOCONF
26784 ) >>"$at_stdout" 2>>"$at_stderr"
26785 at_status=$? at_failed=false
26786 $at_check_filter
26787 echo stderr:; cat "$at_stderr"
26788 echo stdout:; cat "$at_stdout"
26789 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26790 $at_failed && at_fn_log_failure
26791 $at_traceon; }
26792
26793
26794
26795
26796 { set +x
26797 $as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
26798 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203"
26799 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
26800 ) >>"$at_stdout" 2>>"$at_stderr"
26801 at_status=$? at_failed=false
26802 $at_check_filter
26803 echo stderr:; cat "$at_stderr"
26804 echo stdout:; cat "$at_stdout"
26805 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26806 $at_failed && at_fn_log_failure
26807 $at_traceon; }
26808
26809
26810 for target in all
26811 do
26812   { set +x
26813 $as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
26814 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203"
26815 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
26816 ) >>"$at_stdout" 2>>"$at_stderr"
26817 at_status=$? at_failed=false
26818 $at_check_filter
26819 echo stderr:; cat "$at_stderr"
26820 echo stdout:; cat "$at_stdout"
26821 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26822 $at_failed && at_fn_log_failure
26823 $at_traceon; }
26824
26825 done
26826
26827
26828
26829 { set +x
26830 $as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot"
26831 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203"
26832 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
26833 ) >>"$at_stdout" 2>>"$at_stderr"
26834 at_status=$? at_failed=false
26835 $at_check_filter
26836 echo stderr:; cat "$at_stderr"
26837 echo stdout:; cat "$at_stdout"
26838 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26839 $at_failed && at_fn_log_failure
26840 $at_traceon; }
26841
26842 { set +x
26843 $as_echo "$at_srcdir/sysroot.at:203: test -f \"\$sysroot/\$prefix/lib/lib1.la\""
26844 at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:203"
26845 ( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la"
26846 ) >>"$at_stdout" 2>>"$at_stderr"
26847 at_status=$? at_failed=false
26848 $at_check_filter
26849 at_fn_diff_devnull "$at_stderr" || at_failed=:
26850 at_fn_diff_devnull "$at_stdout" || at_failed=:
26851 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26852 $at_failed && at_fn_log_failure
26853 $at_traceon; }
26854
26855 { set +x
26856 $as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\""
26857 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:203"
26858 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la"
26859 ) >>"$at_stdout" 2>>"$at_stderr"
26860 at_status=$? at_failed=false
26861 $at_check_filter
26862 at_fn_diff_devnull "$at_stderr" || at_failed=:
26863 at_fn_diff_devnull "$at_stdout" || at_failed=:
26864 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
26865 $at_failed && at_fn_log_failure
26866 $at_traceon; }
26867
26868 cd ..
26869
26870 # Build and install package 2.
26871 cat >lib2/configure.ac <<'_ATEOF'
26872 AC_INIT([lib2], [1.0])
26873 AM_INIT_AUTOMAKE([foreign])
26874 AC_PROG_CC
26875 AC_CONFIG_SRCDIR([lib2.c])
26876 LT_INIT
26877 sysroot=$with_sysroot
26878 AC_SUBST([sysroot])
26879 AC_OUTPUT(Makefile)
26880 _ATEOF
26881
26882
26883 cat >lib2/Makefile.am <<'_ATEOF'
26884 lib_LTLIBRARIES = lib2.la
26885 lib2_la_SOURCES = lib2.c
26886 lib2_la_LDFLAGS = -rpath $(libdir)
26887 lib2_la_LIBADD = -L=$(libdir) -l1
26888 _ATEOF
26889
26890
26891 cat >lib2/lib2.c <<'_ATEOF'
26892 #include <stdio.h>
26893 #include <string.h>
26894 #include <stdlib.h>
26895 extern char *f(const char *s);
26896 char *g(const char *s)
26897 {
26898   char *q = f(s);
26899   puts (q);
26900   return q;
26901 }
26902 _ATEOF
26903
26904
26905 cd lib2
26906 $LIBTOOLIZE
26907
26908
26909 { set +x
26910 $as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
26911 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203"
26912 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
26913 ) >>"$at_stdout" 2>>"$at_stderr"
26914 at_status=$? at_failed=false
26915 $at_check_filter
26916 echo stderr:; cat "$at_stderr"
26917 echo stdout:; cat "$at_stdout"
26918 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26919 $at_failed && at_fn_log_failure
26920 $at_traceon; }
26921
26922
26923
26924
26925
26926 { set +x
26927 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing"
26928 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203"
26929 ( $at_check_trace; $AUTOMAKE --add-missing
26930 ) >>"$at_stdout" 2>>"$at_stderr"
26931 at_status=$? at_failed=false
26932 $at_check_filter
26933 echo stderr:; tee stderr <"$at_stderr"
26934 echo stdout:; cat "$at_stdout"
26935 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26936 if $at_failed; then :
26937   { set +x
26938 $as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)"
26939 at_fn_check_prepare_trace "sysroot.at:203"
26940 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
26941 ) >>"$at_stdout" 2>>"$at_stderr"
26942 at_status=$? at_failed=false
26943 $at_check_filter
26944 at_fn_diff_devnull "$at_stderr" || at_failed=:
26945 at_fn_diff_devnull "$at_stdout" || at_failed=:
26946 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
26947 $at_failed && at_fn_log_failure
26948 $at_traceon; }
26949
26950 fi
26951 $at_failed && at_fn_log_failure
26952 $at_traceon; }
26953
26954
26955
26956
26957 { set +x
26958 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF "
26959 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203"
26960 ( $at_check_trace; $AUTOCONF
26961 ) >>"$at_stdout" 2>>"$at_stderr"
26962 at_status=$? at_failed=false
26963 $at_check_filter
26964 echo stderr:; cat "$at_stderr"
26965 echo stdout:; cat "$at_stdout"
26966 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26967 $at_failed && at_fn_log_failure
26968 $at_traceon; }
26969
26970
26971
26972
26973 { set +x
26974 $as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
26975 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203"
26976 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
26977 ) >>"$at_stdout" 2>>"$at_stderr"
26978 at_status=$? at_failed=false
26979 $at_check_filter
26980 echo stderr:; cat "$at_stderr"
26981 echo stdout:; cat "$at_stdout"
26982 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26983 $at_failed && at_fn_log_failure
26984 $at_traceon; }
26985
26986
26987 for target in all
26988 do
26989   { set +x
26990 $as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
26991 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203"
26992 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
26993 ) >>"$at_stdout" 2>>"$at_stderr"
26994 at_status=$? at_failed=false
26995 $at_check_filter
26996 echo stderr:; cat "$at_stderr"
26997 echo stdout:; cat "$at_stdout"
26998 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
26999 $at_failed && at_fn_log_failure
27000 $at_traceon; }
27001
27002 done
27003
27004
27005
27006 { set +x
27007 $as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot"
27008 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203"
27009 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
27010 ) >>"$at_stdout" 2>>"$at_stderr"
27011 at_status=$? at_failed=false
27012 $at_check_filter
27013 echo stderr:; cat "$at_stderr"
27014 echo stdout:; cat "$at_stdout"
27015 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27016 $at_failed && at_fn_log_failure
27017 $at_traceon; }
27018
27019 { set +x
27020 $as_echo "$at_srcdir/sysroot.at:203: test -f \$sysroot/\$prefix/lib/lib2.la"
27021 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:203"
27022 ( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la
27023 ) >>"$at_stdout" 2>>"$at_stderr"
27024 at_status=$? at_failed=false
27025 $at_check_filter
27026 at_fn_diff_devnull "$at_stderr" || at_failed=:
27027 at_fn_diff_devnull "$at_stdout" || at_failed=:
27028 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27029 $at_failed && at_fn_log_failure
27030 $at_traceon; }
27031
27032 { set +x
27033 $as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\""
27034 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:203"
27035 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"
27036 ) >>"$at_stdout" 2>>"$at_stderr"
27037 at_status=$? at_failed=false
27038 $at_check_filter
27039 at_fn_diff_devnull "$at_stderr" || at_failed=:
27040 at_fn_diff_devnull "$at_stdout" || at_failed=:
27041 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
27042 $at_failed && at_fn_log_failure
27043 $at_traceon; }
27044
27045 cd ..
27046
27047 # Build and install a program.
27048 cat >prog/configure.ac <<'_ATEOF'
27049 AC_INIT([prog], [1.0])
27050 AM_INIT_AUTOMAKE([foreign])
27051 AC_PROG_CC
27052 AC_CONFIG_SRCDIR([prog.c])
27053 LT_INIT
27054 sysroot=$with_sysroot
27055 AC_SUBST([sysroot])
27056 AC_OUTPUT(Makefile)
27057 _ATEOF
27058
27059
27060 cat >prog/Makefile.am <<'_ATEOF'
27061 bin_PROGRAMS = prog
27062 prog_SOURCES = prog.c
27063 prog_LDADD = -L=$(libdir) -l2
27064 _ATEOF
27065
27066
27067 cat >prog/prog.c <<'_ATEOF'
27068 #include <stdio.h>
27069 #include <string.h>
27070 #include <stdlib.h>
27071 extern char *g(const char *s);
27072 int main()
27073 {
27074   char *q = g("hello world");
27075   free (q);
27076   return 0;
27077 }
27078 _ATEOF
27079
27080
27081 cd prog
27082 $LIBTOOLIZE
27083
27084
27085 { set +x
27086 $as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
27087 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203"
27088 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
27089 ) >>"$at_stdout" 2>>"$at_stderr"
27090 at_status=$? at_failed=false
27091 $at_check_filter
27092 echo stderr:; cat "$at_stderr"
27093 echo stdout:; cat "$at_stdout"
27094 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27095 $at_failed && at_fn_log_failure
27096 $at_traceon; }
27097
27098
27099
27100
27101
27102 { set +x
27103 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing"
27104 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203"
27105 ( $at_check_trace; $AUTOMAKE --add-missing
27106 ) >>"$at_stdout" 2>>"$at_stderr"
27107 at_status=$? at_failed=false
27108 $at_check_filter
27109 echo stderr:; tee stderr <"$at_stderr"
27110 echo stdout:; cat "$at_stdout"
27111 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27112 if $at_failed; then :
27113   { set +x
27114 $as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)"
27115 at_fn_check_prepare_trace "sysroot.at:203"
27116 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
27117 ) >>"$at_stdout" 2>>"$at_stderr"
27118 at_status=$? at_failed=false
27119 $at_check_filter
27120 at_fn_diff_devnull "$at_stderr" || at_failed=:
27121 at_fn_diff_devnull "$at_stdout" || at_failed=:
27122 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
27123 $at_failed && at_fn_log_failure
27124 $at_traceon; }
27125
27126 fi
27127 $at_failed && at_fn_log_failure
27128 $at_traceon; }
27129
27130
27131
27132
27133 { set +x
27134 $as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF "
27135 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203"
27136 ( $at_check_trace; $AUTOCONF
27137 ) >>"$at_stdout" 2>>"$at_stderr"
27138 at_status=$? at_failed=false
27139 $at_check_filter
27140 echo stderr:; cat "$at_stderr"
27141 echo stdout:; cat "$at_stdout"
27142 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27143 $at_failed && at_fn_log_failure
27144 $at_traceon; }
27145
27146
27147
27148
27149 { set +x
27150 $as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
27151 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203"
27152 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
27153 ) >>"$at_stdout" 2>>"$at_stderr"
27154 at_status=$? at_failed=false
27155 $at_check_filter
27156 echo stderr:; cat "$at_stderr"
27157 echo stdout:; cat "$at_stdout"
27158 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27159 $at_failed && at_fn_log_failure
27160 $at_traceon; }
27161
27162
27163 for target in all
27164 do
27165   { set +x
27166 $as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
27167 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203"
27168 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
27169 ) >>"$at_stdout" 2>>"$at_stderr"
27170 at_status=$? at_failed=false
27171 $at_check_filter
27172 echo stderr:; cat "$at_stderr"
27173 echo stdout:; cat "$at_stdout"
27174 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27175 $at_failed && at_fn_log_failure
27176 $at_traceon; }
27177
27178 done
27179
27180
27181
27182 { set +x
27183 $as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot"
27184 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203"
27185 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
27186 ) >>"$at_stdout" 2>>"$at_stderr"
27187 at_status=$? at_failed=false
27188 $at_check_filter
27189 echo stderr:; cat "$at_stderr"
27190 echo stdout:; cat "$at_stdout"
27191 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27192 $at_failed && at_fn_log_failure
27193 $at_traceon; }
27194
27195 { set +x
27196 $as_echo "$at_srcdir/sysroot.at:203: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT"
27197 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:203"
27198 ( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT
27199 ) >>"$at_stdout" 2>>"$at_stderr"
27200 at_status=$? at_failed=false
27201 $at_check_filter
27202 at_fn_diff_devnull "$at_stderr" || at_failed=:
27203 at_fn_diff_devnull "$at_stdout" || at_failed=:
27204 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27205 $at_failed && at_fn_log_failure
27206 $at_traceon; }
27207
27208 { set +x
27209 $as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\""
27210 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:203"
27211 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"
27212 ) >>"$at_stdout" 2>>"$at_stderr"
27213 at_status=$? at_failed=false
27214 $at_check_filter
27215 at_fn_diff_devnull "$at_stderr" || at_failed=:
27216 at_fn_diff_devnull "$at_stdout" || at_failed=:
27217 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
27218 $at_failed && at_fn_log_failure
27219 $at_traceon; }
27220
27221 { set +x
27222 $as_echo "$at_srcdir/sysroot.at:203: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la"
27223 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:203"
27224 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la
27225 ) >>"$at_stdout" 2>>"$at_stderr"
27226 at_status=$? at_failed=false
27227 $at_check_filter
27228 at_fn_diff_devnull "$at_stderr" || at_failed=:
27229 echo stdout:; cat "$at_stdout"
27230 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27231 $at_failed && at_fn_log_failure
27232 $at_traceon; }
27233
27234 { set +x
27235 $as_echo "$at_srcdir/sysroot.at:203: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la"
27236 at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:203"
27237 ( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la
27238 ) >>"$at_stdout" 2>>"$at_stderr"
27239 at_status=$? at_failed=false
27240 $at_check_filter
27241 at_fn_diff_devnull "$at_stderr" || at_failed=:
27242 echo stdout:; cat "$at_stdout"
27243 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203"
27244 $at_failed && at_fn_log_failure
27245 $at_traceon; }
27246
27247 { set +x
27248 $as_echo "$at_srcdir/sysroot.at:203: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la"
27249 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:203"
27250 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la
27251 ) >>"$at_stdout" 2>>"$at_stderr"
27252 at_status=$? at_failed=false
27253 $at_check_filter
27254 at_fn_diff_devnull "$at_stderr" || at_failed=:
27255 at_fn_diff_devnull "$at_stdout" || at_failed=:
27256 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203"
27257 $at_failed && at_fn_log_failure
27258 $at_traceon; }
27259
27260
27261 # missing tests
27262 # 1) pass absolute .la files
27263 # 2) pass absolute -L
27264 # 2) pass relative .la files
27265
27266 cd ..
27267   set +x
27268   $at_times_p && times >"$at_times_file"
27269 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27270 read at_status <"$at_status_file"
27271 #AT_STOP_124
27272 #AT_START_125
27273 at_fn_group_banner 125 'sysroot.at:204' \
27274   "-L SYSROOT/.../lib -l" "                          " 21
27275 at_xfail=no
27276       test "$ACLOCAL" = no && at_xfail=yes
27277       test "$AUTOMAKE" = no && at_xfail=yes
27278       test "$AUTOCONF" = no && at_xfail=yes
27279       test "$ACLOCAL" = no && at_xfail=yes
27280       test "$AUTOMAKE" = no && at_xfail=yes
27281       test "$AUTOCONF" = no && at_xfail=yes
27282       test "$ACLOCAL" = no && at_xfail=yes
27283       test "$AUTOMAKE" = no && at_xfail=yes
27284       test "$AUTOCONF" = no && at_xfail=yes
27285 (
27286   $as_echo "125. $at_setup_line: testing $at_desc ..."
27287   $at_traceon
27288
27289
27290
27291 gcc_sysroot=`$CC --print-sysroot 2> /dev/null`
27292 if test $? != 0; then
27293   gcc_sysroot=
27294 fi
27295 { set +x
27296 $as_echo "$at_srcdir/sysroot.at:204: test -n \"\$gcc_sysroot\" || exit 77"
27297 at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:204"
27298 ( $at_check_trace; test -n "$gcc_sysroot" || exit 77
27299 ) >>"$at_stdout" 2>>"$at_stderr"
27300 at_status=$? at_failed=false
27301 $at_check_filter
27302 at_fn_diff_devnull "$at_stderr" || at_failed=:
27303 at_fn_diff_devnull "$at_stdout" || at_failed=:
27304 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27305 $at_failed && at_fn_log_failure
27306 $at_traceon; }
27307
27308
27309 # Detect installation prefix for the compiler
27310 prefix=
27311 for i in crt0.o crt1.o crt2.o crti.o; do
27312   j=`$CC --print-file-name $i 2> /dev/null`
27313   test $? = 0 || continue
27314   case "$j" in
27315     $gcc_sysroot*/lib/$i)
27316       prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"`
27317       break ;;
27318   esac
27319 done
27320 { set +x
27321 $as_echo "$at_srcdir/sysroot.at:204: test -n \"\$prefix\" || exit 77"
27322 at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:204"
27323 ( $at_check_trace; test -n "$prefix" || exit 77
27324 ) >>"$at_stdout" 2>>"$at_stderr"
27325 at_status=$? at_failed=false
27326 $at_check_filter
27327 at_fn_diff_devnull "$at_stderr" || at_failed=:
27328 at_fn_diff_devnull "$at_stdout" || at_failed=:
27329 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27330 $at_failed && at_fn_log_failure
27331 $at_traceon; }
27332
27333
27334 sysroot=`pwd`/sys-root
27335
27336 # difficult to use AS_DIRNAME inside the AT_CHECK macro, so
27337 # encapsulate as a shell function.
27338 local_dirname() {
27339   $as_dirname -- "$1" ||
27340 $as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27341          X"$1" : 'X\(//\)[^/]' \| \
27342          X"$1" : 'X\(//\)$' \| \
27343          X"$1" : 'X\(/\)' \| . 2>/dev/null ||
27344 $as_echo X"$1" |
27345     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27346             s//\1/
27347             q
27348           }
27349           /^X\(\/\/\)[^/].*/{
27350             s//\1/
27351             q
27352           }
27353           /^X\(\/\/\)$/{
27354             s//\1/
27355             q
27356           }
27357           /^X\(\/\).*/{
27358             s//\1/
27359             q
27360           }
27361           s/.*/./; q'
27362 }
27363
27364 { set +x
27365 $as_echo "$at_srcdir/sysroot.at:204:
27366 (cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\
27367 while read file; do
27368   dir=\`local_dirname \"\$sysroot/\$file\"\`
27369   test -d \"\$dir\" || mkdir -p \"\$dir\"
27370   rm -f \"\$sysroot/\$file\"
27371   ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\
27372     cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\"
27373 done"
27374 at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:204"
27375 ( $at_check_trace;
27376 (cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \
27377 while read file; do
27378   dir=`local_dirname "$sysroot/$file"`
27379   test -d "$dir" || mkdir -p "$dir"
27380   rm -f "$sysroot/$file"
27381   ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \
27382     cp "$gcc_sysroot/$file" "$sysroot/$file"
27383 done
27384 ) >>"$at_stdout" 2>>"$at_stderr"
27385 at_status=$? at_failed=false
27386 $at_check_filter
27387 at_fn_diff_devnull "$at_stderr" || at_failed=:
27388 at_fn_diff_devnull "$at_stdout" || at_failed=:
27389 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27390 $at_failed && at_fn_log_failure
27391 $at_traceon; }
27392
27393
27394 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
27395 configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
27396
27397 #???
27398 if test "$shlibpath_var" = PATH; then
27399   configure_options="$configure_options --libdir=/$prefix/bin"
27400 fi
27401
27402 { set +x
27403 $as_echo "$at_srcdir/sysroot.at:204: mkdir lib1 lib2 prog"
27404 at_fn_check_prepare_trace "sysroot.at:204"
27405 ( $at_check_trace; mkdir lib1 lib2 prog
27406 ) >>"$at_stdout" 2>>"$at_stderr"
27407 at_status=$? at_failed=false
27408 $at_check_filter
27409 at_fn_diff_devnull "$at_stderr" || at_failed=:
27410 at_fn_diff_devnull "$at_stdout" || at_failed=:
27411 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27412 $at_failed && at_fn_log_failure
27413 $at_traceon; }
27414
27415
27416 # Build and install package 1.
27417 cat >lib1/configure.ac <<'_ATEOF'
27418 AC_INIT([lib1], [1.0])
27419 AM_INIT_AUTOMAKE([foreign])
27420 AC_PROG_CC
27421 AC_CONFIG_SRCDIR([lib1.c])
27422 LT_INIT
27423 AC_OUTPUT(Makefile)
27424 _ATEOF
27425
27426
27427 cat >lib1/Makefile.am <<'_ATEOF'
27428 lib_LTLIBRARIES = lib1.la
27429 lib1_la_SOURCES = lib1.c
27430 lib1_la_LDFLAGS = -rpath $(libdir)
27431 _ATEOF
27432
27433
27434 cat >lib1/lib1.c <<'_ATEOF'
27435 #include <string.h>
27436 #include <stdlib.h>
27437 char *f(const char *s)
27438 {
27439   return strdup (s);
27440 }
27441 _ATEOF
27442
27443
27444 cd lib1
27445 $LIBTOOLIZE
27446
27447
27448 { set +x
27449 $as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
27450 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204"
27451 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
27452 ) >>"$at_stdout" 2>>"$at_stderr"
27453 at_status=$? at_failed=false
27454 $at_check_filter
27455 echo stderr:; cat "$at_stderr"
27456 echo stdout:; cat "$at_stdout"
27457 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27458 $at_failed && at_fn_log_failure
27459 $at_traceon; }
27460
27461
27462
27463
27464
27465 { set +x
27466 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing"
27467 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204"
27468 ( $at_check_trace; $AUTOMAKE --add-missing
27469 ) >>"$at_stdout" 2>>"$at_stderr"
27470 at_status=$? at_failed=false
27471 $at_check_filter
27472 echo stderr:; tee stderr <"$at_stderr"
27473 echo stdout:; cat "$at_stdout"
27474 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27475 if $at_failed; then :
27476   { set +x
27477 $as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)"
27478 at_fn_check_prepare_trace "sysroot.at:204"
27479 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
27480 ) >>"$at_stdout" 2>>"$at_stderr"
27481 at_status=$? at_failed=false
27482 $at_check_filter
27483 at_fn_diff_devnull "$at_stderr" || at_failed=:
27484 at_fn_diff_devnull "$at_stdout" || at_failed=:
27485 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27486 $at_failed && at_fn_log_failure
27487 $at_traceon; }
27488
27489 fi
27490 $at_failed && at_fn_log_failure
27491 $at_traceon; }
27492
27493
27494
27495
27496 { set +x
27497 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF "
27498 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204"
27499 ( $at_check_trace; $AUTOCONF
27500 ) >>"$at_stdout" 2>>"$at_stderr"
27501 at_status=$? at_failed=false
27502 $at_check_filter
27503 echo stderr:; cat "$at_stderr"
27504 echo stdout:; cat "$at_stdout"
27505 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27506 $at_failed && at_fn_log_failure
27507 $at_traceon; }
27508
27509
27510
27511
27512 { set +x
27513 $as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
27514 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204"
27515 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
27516 ) >>"$at_stdout" 2>>"$at_stderr"
27517 at_status=$? at_failed=false
27518 $at_check_filter
27519 echo stderr:; cat "$at_stderr"
27520 echo stdout:; cat "$at_stdout"
27521 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27522 $at_failed && at_fn_log_failure
27523 $at_traceon; }
27524
27525
27526 for target in all
27527 do
27528   { set +x
27529 $as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
27530 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204"
27531 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
27532 ) >>"$at_stdout" 2>>"$at_stderr"
27533 at_status=$? at_failed=false
27534 $at_check_filter
27535 echo stderr:; cat "$at_stderr"
27536 echo stdout:; cat "$at_stdout"
27537 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27538 $at_failed && at_fn_log_failure
27539 $at_traceon; }
27540
27541 done
27542
27543
27544
27545 { set +x
27546 $as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot"
27547 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204"
27548 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
27549 ) >>"$at_stdout" 2>>"$at_stderr"
27550 at_status=$? at_failed=false
27551 $at_check_filter
27552 echo stderr:; cat "$at_stderr"
27553 echo stdout:; cat "$at_stdout"
27554 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27555 $at_failed && at_fn_log_failure
27556 $at_traceon; }
27557
27558 { set +x
27559 $as_echo "$at_srcdir/sysroot.at:204: test -f \"\$sysroot/\$prefix/lib/lib1.la\""
27560 at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:204"
27561 ( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la"
27562 ) >>"$at_stdout" 2>>"$at_stderr"
27563 at_status=$? at_failed=false
27564 $at_check_filter
27565 at_fn_diff_devnull "$at_stderr" || at_failed=:
27566 at_fn_diff_devnull "$at_stdout" || at_failed=:
27567 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27568 $at_failed && at_fn_log_failure
27569 $at_traceon; }
27570
27571 { set +x
27572 $as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\""
27573 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:204"
27574 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la"
27575 ) >>"$at_stdout" 2>>"$at_stderr"
27576 at_status=$? at_failed=false
27577 $at_check_filter
27578 at_fn_diff_devnull "$at_stderr" || at_failed=:
27579 at_fn_diff_devnull "$at_stdout" || at_failed=:
27580 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27581 $at_failed && at_fn_log_failure
27582 $at_traceon; }
27583
27584 cd ..
27585
27586 # Build and install package 2.
27587 cat >lib2/configure.ac <<'_ATEOF'
27588 AC_INIT([lib2], [1.0])
27589 AM_INIT_AUTOMAKE([foreign])
27590 AC_PROG_CC
27591 AC_CONFIG_SRCDIR([lib2.c])
27592 LT_INIT
27593 sysroot=$with_sysroot
27594 AC_SUBST([sysroot])
27595 AC_OUTPUT(Makefile)
27596 _ATEOF
27597
27598
27599 cat >lib2/Makefile.am <<'_ATEOF'
27600 lib_LTLIBRARIES = lib2.la
27601 lib2_la_SOURCES = lib2.c
27602 lib2_la_LDFLAGS = -rpath $(libdir)
27603 lib2_la_LIBADD = -L$(sysroot)$(libdir) -l1
27604 _ATEOF
27605
27606
27607 cat >lib2/lib2.c <<'_ATEOF'
27608 #include <stdio.h>
27609 #include <string.h>
27610 #include <stdlib.h>
27611 extern char *f(const char *s);
27612 char *g(const char *s)
27613 {
27614   char *q = f(s);
27615   puts (q);
27616   return q;
27617 }
27618 _ATEOF
27619
27620
27621 cd lib2
27622 $LIBTOOLIZE
27623
27624
27625 { set +x
27626 $as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
27627 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204"
27628 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
27629 ) >>"$at_stdout" 2>>"$at_stderr"
27630 at_status=$? at_failed=false
27631 $at_check_filter
27632 echo stderr:; cat "$at_stderr"
27633 echo stdout:; cat "$at_stdout"
27634 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27635 $at_failed && at_fn_log_failure
27636 $at_traceon; }
27637
27638
27639
27640
27641
27642 { set +x
27643 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing"
27644 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204"
27645 ( $at_check_trace; $AUTOMAKE --add-missing
27646 ) >>"$at_stdout" 2>>"$at_stderr"
27647 at_status=$? at_failed=false
27648 $at_check_filter
27649 echo stderr:; tee stderr <"$at_stderr"
27650 echo stdout:; cat "$at_stdout"
27651 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27652 if $at_failed; then :
27653   { set +x
27654 $as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)"
27655 at_fn_check_prepare_trace "sysroot.at:204"
27656 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
27657 ) >>"$at_stdout" 2>>"$at_stderr"
27658 at_status=$? at_failed=false
27659 $at_check_filter
27660 at_fn_diff_devnull "$at_stderr" || at_failed=:
27661 at_fn_diff_devnull "$at_stdout" || at_failed=:
27662 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27663 $at_failed && at_fn_log_failure
27664 $at_traceon; }
27665
27666 fi
27667 $at_failed && at_fn_log_failure
27668 $at_traceon; }
27669
27670
27671
27672
27673 { set +x
27674 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF "
27675 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204"
27676 ( $at_check_trace; $AUTOCONF
27677 ) >>"$at_stdout" 2>>"$at_stderr"
27678 at_status=$? at_failed=false
27679 $at_check_filter
27680 echo stderr:; cat "$at_stderr"
27681 echo stdout:; cat "$at_stdout"
27682 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27683 $at_failed && at_fn_log_failure
27684 $at_traceon; }
27685
27686
27687
27688
27689 { set +x
27690 $as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
27691 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204"
27692 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
27693 ) >>"$at_stdout" 2>>"$at_stderr"
27694 at_status=$? at_failed=false
27695 $at_check_filter
27696 echo stderr:; cat "$at_stderr"
27697 echo stdout:; cat "$at_stdout"
27698 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27699 $at_failed && at_fn_log_failure
27700 $at_traceon; }
27701
27702
27703 for target in all
27704 do
27705   { set +x
27706 $as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
27707 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204"
27708 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
27709 ) >>"$at_stdout" 2>>"$at_stderr"
27710 at_status=$? at_failed=false
27711 $at_check_filter
27712 echo stderr:; cat "$at_stderr"
27713 echo stdout:; cat "$at_stdout"
27714 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27715 $at_failed && at_fn_log_failure
27716 $at_traceon; }
27717
27718 done
27719
27720
27721
27722 { set +x
27723 $as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot"
27724 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204"
27725 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
27726 ) >>"$at_stdout" 2>>"$at_stderr"
27727 at_status=$? at_failed=false
27728 $at_check_filter
27729 echo stderr:; cat "$at_stderr"
27730 echo stdout:; cat "$at_stdout"
27731 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27732 $at_failed && at_fn_log_failure
27733 $at_traceon; }
27734
27735 { set +x
27736 $as_echo "$at_srcdir/sysroot.at:204: test -f \$sysroot/\$prefix/lib/lib2.la"
27737 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:204"
27738 ( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la
27739 ) >>"$at_stdout" 2>>"$at_stderr"
27740 at_status=$? at_failed=false
27741 $at_check_filter
27742 at_fn_diff_devnull "$at_stderr" || at_failed=:
27743 at_fn_diff_devnull "$at_stdout" || at_failed=:
27744 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27745 $at_failed && at_fn_log_failure
27746 $at_traceon; }
27747
27748 { set +x
27749 $as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\""
27750 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:204"
27751 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"
27752 ) >>"$at_stdout" 2>>"$at_stderr"
27753 at_status=$? at_failed=false
27754 $at_check_filter
27755 at_fn_diff_devnull "$at_stderr" || at_failed=:
27756 at_fn_diff_devnull "$at_stdout" || at_failed=:
27757 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27758 $at_failed && at_fn_log_failure
27759 $at_traceon; }
27760
27761 cd ..
27762
27763 # Build and install a program.
27764 cat >prog/configure.ac <<'_ATEOF'
27765 AC_INIT([prog], [1.0])
27766 AM_INIT_AUTOMAKE([foreign])
27767 AC_PROG_CC
27768 AC_CONFIG_SRCDIR([prog.c])
27769 LT_INIT
27770 sysroot=$with_sysroot
27771 AC_SUBST([sysroot])
27772 AC_OUTPUT(Makefile)
27773 _ATEOF
27774
27775
27776 cat >prog/Makefile.am <<'_ATEOF'
27777 bin_PROGRAMS = prog
27778 prog_SOURCES = prog.c
27779 prog_LDADD = -L$(sysroot)$(libdir) -l2
27780 _ATEOF
27781
27782
27783 cat >prog/prog.c <<'_ATEOF'
27784 #include <stdio.h>
27785 #include <string.h>
27786 #include <stdlib.h>
27787 extern char *g(const char *s);
27788 int main()
27789 {
27790   char *q = g("hello world");
27791   free (q);
27792   return 0;
27793 }
27794 _ATEOF
27795
27796
27797 cd prog
27798 $LIBTOOLIZE
27799
27800
27801 { set +x
27802 $as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
27803 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204"
27804 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
27805 ) >>"$at_stdout" 2>>"$at_stderr"
27806 at_status=$? at_failed=false
27807 $at_check_filter
27808 echo stderr:; cat "$at_stderr"
27809 echo stdout:; cat "$at_stdout"
27810 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27811 $at_failed && at_fn_log_failure
27812 $at_traceon; }
27813
27814
27815
27816
27817
27818 { set +x
27819 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing"
27820 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204"
27821 ( $at_check_trace; $AUTOMAKE --add-missing
27822 ) >>"$at_stdout" 2>>"$at_stderr"
27823 at_status=$? at_failed=false
27824 $at_check_filter
27825 echo stderr:; tee stderr <"$at_stderr"
27826 echo stdout:; cat "$at_stdout"
27827 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27828 if $at_failed; then :
27829   { set +x
27830 $as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)"
27831 at_fn_check_prepare_trace "sysroot.at:204"
27832 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
27833 ) >>"$at_stdout" 2>>"$at_stderr"
27834 at_status=$? at_failed=false
27835 $at_check_filter
27836 at_fn_diff_devnull "$at_stderr" || at_failed=:
27837 at_fn_diff_devnull "$at_stdout" || at_failed=:
27838 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27839 $at_failed && at_fn_log_failure
27840 $at_traceon; }
27841
27842 fi
27843 $at_failed && at_fn_log_failure
27844 $at_traceon; }
27845
27846
27847
27848
27849 { set +x
27850 $as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF "
27851 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204"
27852 ( $at_check_trace; $AUTOCONF
27853 ) >>"$at_stdout" 2>>"$at_stderr"
27854 at_status=$? at_failed=false
27855 $at_check_filter
27856 echo stderr:; cat "$at_stderr"
27857 echo stdout:; cat "$at_stdout"
27858 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27859 $at_failed && at_fn_log_failure
27860 $at_traceon; }
27861
27862
27863
27864
27865 { set +x
27866 $as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
27867 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204"
27868 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
27869 ) >>"$at_stdout" 2>>"$at_stderr"
27870 at_status=$? at_failed=false
27871 $at_check_filter
27872 echo stderr:; cat "$at_stderr"
27873 echo stdout:; cat "$at_stdout"
27874 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27875 $at_failed && at_fn_log_failure
27876 $at_traceon; }
27877
27878
27879 for target in all
27880 do
27881   { set +x
27882 $as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
27883 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204"
27884 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
27885 ) >>"$at_stdout" 2>>"$at_stderr"
27886 at_status=$? at_failed=false
27887 $at_check_filter
27888 echo stderr:; cat "$at_stderr"
27889 echo stdout:; cat "$at_stdout"
27890 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27891 $at_failed && at_fn_log_failure
27892 $at_traceon; }
27893
27894 done
27895
27896
27897
27898 { set +x
27899 $as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot"
27900 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204"
27901 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
27902 ) >>"$at_stdout" 2>>"$at_stderr"
27903 at_status=$? at_failed=false
27904 $at_check_filter
27905 echo stderr:; cat "$at_stderr"
27906 echo stdout:; cat "$at_stdout"
27907 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27908 $at_failed && at_fn_log_failure
27909 $at_traceon; }
27910
27911 { set +x
27912 $as_echo "$at_srcdir/sysroot.at:204: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT"
27913 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:204"
27914 ( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT
27915 ) >>"$at_stdout" 2>>"$at_stderr"
27916 at_status=$? at_failed=false
27917 $at_check_filter
27918 at_fn_diff_devnull "$at_stderr" || at_failed=:
27919 at_fn_diff_devnull "$at_stdout" || at_failed=:
27920 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27921 $at_failed && at_fn_log_failure
27922 $at_traceon; }
27923
27924 { set +x
27925 $as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\""
27926 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:204"
27927 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"
27928 ) >>"$at_stdout" 2>>"$at_stderr"
27929 at_status=$? at_failed=false
27930 $at_check_filter
27931 at_fn_diff_devnull "$at_stderr" || at_failed=:
27932 at_fn_diff_devnull "$at_stdout" || at_failed=:
27933 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27934 $at_failed && at_fn_log_failure
27935 $at_traceon; }
27936
27937 { set +x
27938 $as_echo "$at_srcdir/sysroot.at:204: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la"
27939 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:204"
27940 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la
27941 ) >>"$at_stdout" 2>>"$at_stderr"
27942 at_status=$? at_failed=false
27943 $at_check_filter
27944 at_fn_diff_devnull "$at_stderr" || at_failed=:
27945 echo stdout:; cat "$at_stdout"
27946 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27947 $at_failed && at_fn_log_failure
27948 $at_traceon; }
27949
27950 { set +x
27951 $as_echo "$at_srcdir/sysroot.at:204: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la"
27952 at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:204"
27953 ( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la
27954 ) >>"$at_stdout" 2>>"$at_stderr"
27955 at_status=$? at_failed=false
27956 $at_check_filter
27957 at_fn_diff_devnull "$at_stderr" || at_failed=:
27958 echo stdout:; cat "$at_stdout"
27959 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204"
27960 $at_failed && at_fn_log_failure
27961 $at_traceon; }
27962
27963 { set +x
27964 $as_echo "$at_srcdir/sysroot.at:204: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la"
27965 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:204"
27966 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la
27967 ) >>"$at_stdout" 2>>"$at_stderr"
27968 at_status=$? at_failed=false
27969 $at_check_filter
27970 at_fn_diff_devnull "$at_stderr" || at_failed=:
27971 at_fn_diff_devnull "$at_stdout" || at_failed=:
27972 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204"
27973 $at_failed && at_fn_log_failure
27974 $at_traceon; }
27975
27976
27977 # missing tests
27978 # 1) pass absolute .la files
27979 # 2) pass absolute -L
27980 # 2) pass relative .la files
27981
27982 cd ..
27983   set +x
27984   $at_times_p && times >"$at_times_file"
27985 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27986 read at_status <"$at_status_file"
27987 #AT_STOP_125
27988 #AT_START_126
27989 at_fn_group_banner 126 'sysroot.at:205' \
27990   "SYSROOT/.../*.la" "                               " 21
27991 at_xfail=no
27992       test "$ACLOCAL" = no && at_xfail=yes
27993       test "$AUTOMAKE" = no && at_xfail=yes
27994       test "$AUTOCONF" = no && at_xfail=yes
27995       test "$ACLOCAL" = no && at_xfail=yes
27996       test "$AUTOMAKE" = no && at_xfail=yes
27997       test "$AUTOCONF" = no && at_xfail=yes
27998       test "$ACLOCAL" = no && at_xfail=yes
27999       test "$AUTOMAKE" = no && at_xfail=yes
28000       test "$AUTOCONF" = no && at_xfail=yes
28001 (
28002   $as_echo "126. $at_setup_line: testing $at_desc ..."
28003   $at_traceon
28004
28005
28006
28007 gcc_sysroot=`$CC --print-sysroot 2> /dev/null`
28008 if test $? != 0; then
28009   gcc_sysroot=
28010 fi
28011 { set +x
28012 $as_echo "$at_srcdir/sysroot.at:205: test -n \"\$gcc_sysroot\" || exit 77"
28013 at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:205"
28014 ( $at_check_trace; test -n "$gcc_sysroot" || exit 77
28015 ) >>"$at_stdout" 2>>"$at_stderr"
28016 at_status=$? at_failed=false
28017 $at_check_filter
28018 at_fn_diff_devnull "$at_stderr" || at_failed=:
28019 at_fn_diff_devnull "$at_stdout" || at_failed=:
28020 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28021 $at_failed && at_fn_log_failure
28022 $at_traceon; }
28023
28024
28025 # Detect installation prefix for the compiler
28026 prefix=
28027 for i in crt0.o crt1.o crt2.o crti.o; do
28028   j=`$CC --print-file-name $i 2> /dev/null`
28029   test $? = 0 || continue
28030   case "$j" in
28031     $gcc_sysroot*/lib/$i)
28032       prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"`
28033       break ;;
28034   esac
28035 done
28036 { set +x
28037 $as_echo "$at_srcdir/sysroot.at:205: test -n \"\$prefix\" || exit 77"
28038 at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:205"
28039 ( $at_check_trace; test -n "$prefix" || exit 77
28040 ) >>"$at_stdout" 2>>"$at_stderr"
28041 at_status=$? at_failed=false
28042 $at_check_filter
28043 at_fn_diff_devnull "$at_stderr" || at_failed=:
28044 at_fn_diff_devnull "$at_stdout" || at_failed=:
28045 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28046 $at_failed && at_fn_log_failure
28047 $at_traceon; }
28048
28049
28050 sysroot=`pwd`/sys-root
28051
28052 # difficult to use AS_DIRNAME inside the AT_CHECK macro, so
28053 # encapsulate as a shell function.
28054 local_dirname() {
28055   $as_dirname -- "$1" ||
28056 $as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28057          X"$1" : 'X\(//\)[^/]' \| \
28058          X"$1" : 'X\(//\)$' \| \
28059          X"$1" : 'X\(/\)' \| . 2>/dev/null ||
28060 $as_echo X"$1" |
28061     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28062             s//\1/
28063             q
28064           }
28065           /^X\(\/\/\)[^/].*/{
28066             s//\1/
28067             q
28068           }
28069           /^X\(\/\/\)$/{
28070             s//\1/
28071             q
28072           }
28073           /^X\(\/\).*/{
28074             s//\1/
28075             q
28076           }
28077           s/.*/./; q'
28078 }
28079
28080 { set +x
28081 $as_echo "$at_srcdir/sysroot.at:205:
28082 (cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\
28083 while read file; do
28084   dir=\`local_dirname \"\$sysroot/\$file\"\`
28085   test -d \"\$dir\" || mkdir -p \"\$dir\"
28086   rm -f \"\$sysroot/\$file\"
28087   ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\
28088     cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\"
28089 done"
28090 at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:205"
28091 ( $at_check_trace;
28092 (cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \
28093 while read file; do
28094   dir=`local_dirname "$sysroot/$file"`
28095   test -d "$dir" || mkdir -p "$dir"
28096   rm -f "$sysroot/$file"
28097   ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \
28098     cp "$gcc_sysroot/$file" "$sysroot/$file"
28099 done
28100 ) >>"$at_stdout" 2>>"$at_stderr"
28101 at_status=$? at_failed=false
28102 $at_check_filter
28103 at_fn_diff_devnull "$at_stderr" || at_failed=:
28104 at_fn_diff_devnull "$at_stdout" || at_failed=:
28105 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28106 $at_failed && at_fn_log_failure
28107 $at_traceon; }
28108
28109
28110 LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined"
28111 configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix"
28112
28113 #???
28114 if test "$shlibpath_var" = PATH; then
28115   configure_options="$configure_options --libdir=/$prefix/bin"
28116 fi
28117
28118 { set +x
28119 $as_echo "$at_srcdir/sysroot.at:205: mkdir lib1 lib2 prog"
28120 at_fn_check_prepare_trace "sysroot.at:205"
28121 ( $at_check_trace; mkdir lib1 lib2 prog
28122 ) >>"$at_stdout" 2>>"$at_stderr"
28123 at_status=$? at_failed=false
28124 $at_check_filter
28125 at_fn_diff_devnull "$at_stderr" || at_failed=:
28126 at_fn_diff_devnull "$at_stdout" || at_failed=:
28127 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28128 $at_failed && at_fn_log_failure
28129 $at_traceon; }
28130
28131
28132 # Build and install package 1.
28133 cat >lib1/configure.ac <<'_ATEOF'
28134 AC_INIT([lib1], [1.0])
28135 AM_INIT_AUTOMAKE([foreign])
28136 AC_PROG_CC
28137 AC_CONFIG_SRCDIR([lib1.c])
28138 LT_INIT
28139 AC_OUTPUT(Makefile)
28140 _ATEOF
28141
28142
28143 cat >lib1/Makefile.am <<'_ATEOF'
28144 lib_LTLIBRARIES = lib1.la
28145 lib1_la_SOURCES = lib1.c
28146 lib1_la_LDFLAGS = -rpath $(libdir)
28147 _ATEOF
28148
28149
28150 cat >lib1/lib1.c <<'_ATEOF'
28151 #include <string.h>
28152 #include <stdlib.h>
28153 char *f(const char *s)
28154 {
28155   return strdup (s);
28156 }
28157 _ATEOF
28158
28159
28160 cd lib1
28161 $LIBTOOLIZE
28162
28163
28164 { set +x
28165 $as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
28166 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205"
28167 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
28168 ) >>"$at_stdout" 2>>"$at_stderr"
28169 at_status=$? at_failed=false
28170 $at_check_filter
28171 echo stderr:; cat "$at_stderr"
28172 echo stdout:; cat "$at_stdout"
28173 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28174 $at_failed && at_fn_log_failure
28175 $at_traceon; }
28176
28177
28178
28179
28180
28181 { set +x
28182 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing"
28183 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205"
28184 ( $at_check_trace; $AUTOMAKE --add-missing
28185 ) >>"$at_stdout" 2>>"$at_stderr"
28186 at_status=$? at_failed=false
28187 $at_check_filter
28188 echo stderr:; tee stderr <"$at_stderr"
28189 echo stdout:; cat "$at_stdout"
28190 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28191 if $at_failed; then :
28192   { set +x
28193 $as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)"
28194 at_fn_check_prepare_trace "sysroot.at:205"
28195 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
28196 ) >>"$at_stdout" 2>>"$at_stderr"
28197 at_status=$? at_failed=false
28198 $at_check_filter
28199 at_fn_diff_devnull "$at_stderr" || at_failed=:
28200 at_fn_diff_devnull "$at_stdout" || at_failed=:
28201 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28202 $at_failed && at_fn_log_failure
28203 $at_traceon; }
28204
28205 fi
28206 $at_failed && at_fn_log_failure
28207 $at_traceon; }
28208
28209
28210
28211
28212 { set +x
28213 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF "
28214 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205"
28215 ( $at_check_trace; $AUTOCONF
28216 ) >>"$at_stdout" 2>>"$at_stderr"
28217 at_status=$? at_failed=false
28218 $at_check_filter
28219 echo stderr:; cat "$at_stderr"
28220 echo stdout:; cat "$at_stdout"
28221 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28222 $at_failed && at_fn_log_failure
28223 $at_traceon; }
28224
28225
28226
28227
28228 { set +x
28229 $as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
28230 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205"
28231 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
28232 ) >>"$at_stdout" 2>>"$at_stderr"
28233 at_status=$? at_failed=false
28234 $at_check_filter
28235 echo stderr:; cat "$at_stderr"
28236 echo stdout:; cat "$at_stdout"
28237 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28238 $at_failed && at_fn_log_failure
28239 $at_traceon; }
28240
28241
28242 for target in all
28243 do
28244   { set +x
28245 $as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
28246 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205"
28247 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
28248 ) >>"$at_stdout" 2>>"$at_stderr"
28249 at_status=$? at_failed=false
28250 $at_check_filter
28251 echo stderr:; cat "$at_stderr"
28252 echo stdout:; cat "$at_stdout"
28253 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28254 $at_failed && at_fn_log_failure
28255 $at_traceon; }
28256
28257 done
28258
28259
28260
28261 { set +x
28262 $as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot"
28263 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205"
28264 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
28265 ) >>"$at_stdout" 2>>"$at_stderr"
28266 at_status=$? at_failed=false
28267 $at_check_filter
28268 echo stderr:; cat "$at_stderr"
28269 echo stdout:; cat "$at_stdout"
28270 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28271 $at_failed && at_fn_log_failure
28272 $at_traceon; }
28273
28274 { set +x
28275 $as_echo "$at_srcdir/sysroot.at:205: test -f \"\$sysroot/\$prefix/lib/lib1.la\""
28276 at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:205"
28277 ( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la"
28278 ) >>"$at_stdout" 2>>"$at_stderr"
28279 at_status=$? at_failed=false
28280 $at_check_filter
28281 at_fn_diff_devnull "$at_stderr" || at_failed=:
28282 at_fn_diff_devnull "$at_stdout" || at_failed=:
28283 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28284 $at_failed && at_fn_log_failure
28285 $at_traceon; }
28286
28287 { set +x
28288 $as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\""
28289 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:205"
28290 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la"
28291 ) >>"$at_stdout" 2>>"$at_stderr"
28292 at_status=$? at_failed=false
28293 $at_check_filter
28294 at_fn_diff_devnull "$at_stderr" || at_failed=:
28295 at_fn_diff_devnull "$at_stdout" || at_failed=:
28296 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28297 $at_failed && at_fn_log_failure
28298 $at_traceon; }
28299
28300 cd ..
28301
28302 # Build and install package 2.
28303 cat >lib2/configure.ac <<'_ATEOF'
28304 AC_INIT([lib2], [1.0])
28305 AM_INIT_AUTOMAKE([foreign])
28306 AC_PROG_CC
28307 AC_CONFIG_SRCDIR([lib2.c])
28308 LT_INIT
28309 sysroot=$with_sysroot
28310 AC_SUBST([sysroot])
28311 AC_OUTPUT(Makefile)
28312 _ATEOF
28313
28314
28315 cat >lib2/Makefile.am <<'_ATEOF'
28316 lib_LTLIBRARIES = lib2.la
28317 lib2_la_SOURCES = lib2.c
28318 lib2_la_LDFLAGS = -rpath $(libdir)
28319 lib2_la_LIBADD = $(sysroot)$(libdir)/lib1.la
28320 _ATEOF
28321
28322
28323 cat >lib2/lib2.c <<'_ATEOF'
28324 #include <stdio.h>
28325 #include <string.h>
28326 #include <stdlib.h>
28327 extern char *f(const char *s);
28328 char *g(const char *s)
28329 {
28330   char *q = f(s);
28331   puts (q);
28332   return q;
28333 }
28334 _ATEOF
28335
28336
28337 cd lib2
28338 $LIBTOOLIZE
28339
28340
28341 { set +x
28342 $as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
28343 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205"
28344 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
28345 ) >>"$at_stdout" 2>>"$at_stderr"
28346 at_status=$? at_failed=false
28347 $at_check_filter
28348 echo stderr:; cat "$at_stderr"
28349 echo stdout:; cat "$at_stdout"
28350 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28351 $at_failed && at_fn_log_failure
28352 $at_traceon; }
28353
28354
28355
28356
28357
28358 { set +x
28359 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing"
28360 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205"
28361 ( $at_check_trace; $AUTOMAKE --add-missing
28362 ) >>"$at_stdout" 2>>"$at_stderr"
28363 at_status=$? at_failed=false
28364 $at_check_filter
28365 echo stderr:; tee stderr <"$at_stderr"
28366 echo stdout:; cat "$at_stdout"
28367 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28368 if $at_failed; then :
28369   { set +x
28370 $as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)"
28371 at_fn_check_prepare_trace "sysroot.at:205"
28372 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
28373 ) >>"$at_stdout" 2>>"$at_stderr"
28374 at_status=$? at_failed=false
28375 $at_check_filter
28376 at_fn_diff_devnull "$at_stderr" || at_failed=:
28377 at_fn_diff_devnull "$at_stdout" || at_failed=:
28378 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28379 $at_failed && at_fn_log_failure
28380 $at_traceon; }
28381
28382 fi
28383 $at_failed && at_fn_log_failure
28384 $at_traceon; }
28385
28386
28387
28388
28389 { set +x
28390 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF "
28391 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205"
28392 ( $at_check_trace; $AUTOCONF
28393 ) >>"$at_stdout" 2>>"$at_stderr"
28394 at_status=$? at_failed=false
28395 $at_check_filter
28396 echo stderr:; cat "$at_stderr"
28397 echo stdout:; cat "$at_stdout"
28398 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28399 $at_failed && at_fn_log_failure
28400 $at_traceon; }
28401
28402
28403
28404
28405 { set +x
28406 $as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
28407 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205"
28408 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
28409 ) >>"$at_stdout" 2>>"$at_stderr"
28410 at_status=$? at_failed=false
28411 $at_check_filter
28412 echo stderr:; cat "$at_stderr"
28413 echo stdout:; cat "$at_stdout"
28414 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28415 $at_failed && at_fn_log_failure
28416 $at_traceon; }
28417
28418
28419 for target in all
28420 do
28421   { set +x
28422 $as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
28423 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205"
28424 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
28425 ) >>"$at_stdout" 2>>"$at_stderr"
28426 at_status=$? at_failed=false
28427 $at_check_filter
28428 echo stderr:; cat "$at_stderr"
28429 echo stdout:; cat "$at_stdout"
28430 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28431 $at_failed && at_fn_log_failure
28432 $at_traceon; }
28433
28434 done
28435
28436
28437
28438 { set +x
28439 $as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot"
28440 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205"
28441 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
28442 ) >>"$at_stdout" 2>>"$at_stderr"
28443 at_status=$? at_failed=false
28444 $at_check_filter
28445 echo stderr:; cat "$at_stderr"
28446 echo stdout:; cat "$at_stdout"
28447 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28448 $at_failed && at_fn_log_failure
28449 $at_traceon; }
28450
28451 { set +x
28452 $as_echo "$at_srcdir/sysroot.at:205: test -f \$sysroot/\$prefix/lib/lib2.la"
28453 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:205"
28454 ( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la
28455 ) >>"$at_stdout" 2>>"$at_stderr"
28456 at_status=$? at_failed=false
28457 $at_check_filter
28458 at_fn_diff_devnull "$at_stderr" || at_failed=:
28459 at_fn_diff_devnull "$at_stdout" || at_failed=:
28460 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28461 $at_failed && at_fn_log_failure
28462 $at_traceon; }
28463
28464 { set +x
28465 $as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\""
28466 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:205"
28467 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"
28468 ) >>"$at_stdout" 2>>"$at_stderr"
28469 at_status=$? at_failed=false
28470 $at_check_filter
28471 at_fn_diff_devnull "$at_stderr" || at_failed=:
28472 at_fn_diff_devnull "$at_stdout" || at_failed=:
28473 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28474 $at_failed && at_fn_log_failure
28475 $at_traceon; }
28476
28477 cd ..
28478
28479 # Build and install a program.
28480 cat >prog/configure.ac <<'_ATEOF'
28481 AC_INIT([prog], [1.0])
28482 AM_INIT_AUTOMAKE([foreign])
28483 AC_PROG_CC
28484 AC_CONFIG_SRCDIR([prog.c])
28485 LT_INIT
28486 sysroot=$with_sysroot
28487 AC_SUBST([sysroot])
28488 AC_OUTPUT(Makefile)
28489 _ATEOF
28490
28491
28492 cat >prog/Makefile.am <<'_ATEOF'
28493 bin_PROGRAMS = prog
28494 prog_SOURCES = prog.c
28495 prog_LDADD = $(sysroot)$(libdir)/lib2.la
28496 _ATEOF
28497
28498
28499 cat >prog/prog.c <<'_ATEOF'
28500 #include <stdio.h>
28501 #include <string.h>
28502 #include <stdlib.h>
28503 extern char *g(const char *s);
28504 int main()
28505 {
28506   char *q = g("hello world");
28507   free (q);
28508   return 0;
28509 }
28510 _ATEOF
28511
28512
28513 cd prog
28514 $LIBTOOLIZE
28515
28516
28517 { set +x
28518 $as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4"
28519 at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205"
28520 ( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4
28521 ) >>"$at_stdout" 2>>"$at_stderr"
28522 at_status=$? at_failed=false
28523 $at_check_filter
28524 echo stderr:; cat "$at_stderr"
28525 echo stdout:; cat "$at_stdout"
28526 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28527 $at_failed && at_fn_log_failure
28528 $at_traceon; }
28529
28530
28531
28532
28533
28534 { set +x
28535 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing"
28536 at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205"
28537 ( $at_check_trace; $AUTOMAKE --add-missing
28538 ) >>"$at_stdout" 2>>"$at_stderr"
28539 at_status=$? at_failed=false
28540 $at_check_filter
28541 echo stderr:; tee stderr <"$at_stderr"
28542 echo stdout:; cat "$at_stdout"
28543 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28544 if $at_failed; then :
28545   { set +x
28546 $as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)"
28547 at_fn_check_prepare_trace "sysroot.at:205"
28548 ( $at_check_trace; grep 'require .*but have' stderr && (exit 77)
28549 ) >>"$at_stdout" 2>>"$at_stderr"
28550 at_status=$? at_failed=false
28551 $at_check_filter
28552 at_fn_diff_devnull "$at_stderr" || at_failed=:
28553 at_fn_diff_devnull "$at_stdout" || at_failed=:
28554 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28555 $at_failed && at_fn_log_failure
28556 $at_traceon; }
28557
28558 fi
28559 $at_failed && at_fn_log_failure
28560 $at_traceon; }
28561
28562
28563
28564
28565 { set +x
28566 $as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF "
28567 at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205"
28568 ( $at_check_trace; $AUTOCONF
28569 ) >>"$at_stdout" 2>>"$at_stderr"
28570 at_status=$? at_failed=false
28571 $at_check_filter
28572 echo stderr:; cat "$at_stderr"
28573 echo stdout:; cat "$at_stdout"
28574 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28575 $at_failed && at_fn_log_failure
28576 $at_traceon; }
28577
28578
28579
28580
28581 { set +x
28582 $as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;     \$CONFIG_SHELL ./configure \$configure_options "
28583 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205"
28584 ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;        $CONFIG_SHELL ./configure $configure_options
28585 ) >>"$at_stdout" 2>>"$at_stderr"
28586 at_status=$? at_failed=false
28587 $at_check_filter
28588 echo stderr:; cat "$at_stderr"
28589 echo stdout:; cat "$at_stdout"
28590 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28591 $at_failed && at_fn_log_failure
28592 $at_traceon; }
28593
28594
28595 for target in all
28596 do
28597   { set +x
28598 $as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target "
28599 at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205"
28600 ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target
28601 ) >>"$at_stdout" 2>>"$at_stderr"
28602 at_status=$? at_failed=false
28603 $at_check_filter
28604 echo stderr:; cat "$at_stderr"
28605 echo stdout:; cat "$at_stdout"
28606 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28607 $at_failed && at_fn_log_failure
28608 $at_traceon; }
28609
28610 done
28611
28612
28613
28614 { set +x
28615 $as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot"
28616 at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205"
28617 ( $at_check_trace; $MAKE install DESTDIR=$sysroot
28618 ) >>"$at_stdout" 2>>"$at_stderr"
28619 at_status=$? at_failed=false
28620 $at_check_filter
28621 echo stderr:; cat "$at_stderr"
28622 echo stdout:; cat "$at_stdout"
28623 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28624 $at_failed && at_fn_log_failure
28625 $at_traceon; }
28626
28627 { set +x
28628 $as_echo "$at_srcdir/sysroot.at:205: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT"
28629 at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:205"
28630 ( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT
28631 ) >>"$at_stdout" 2>>"$at_stderr"
28632 at_status=$? at_failed=false
28633 $at_check_filter
28634 at_fn_diff_devnull "$at_stderr" || at_failed=:
28635 at_fn_diff_devnull "$at_stdout" || at_failed=:
28636 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28637 $at_failed && at_fn_log_failure
28638 $at_traceon; }
28639
28640 { set +x
28641 $as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\""
28642 at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:205"
28643 ( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"
28644 ) >>"$at_stdout" 2>>"$at_stderr"
28645 at_status=$? at_failed=false
28646 $at_check_filter
28647 at_fn_diff_devnull "$at_stderr" || at_failed=:
28648 at_fn_diff_devnull "$at_stdout" || at_failed=:
28649 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28650 $at_failed && at_fn_log_failure
28651 $at_traceon; }
28652
28653 { set +x
28654 $as_echo "$at_srcdir/sysroot.at:205: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la"
28655 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:205"
28656 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la
28657 ) >>"$at_stdout" 2>>"$at_stderr"
28658 at_status=$? at_failed=false
28659 $at_check_filter
28660 at_fn_diff_devnull "$at_stderr" || at_failed=:
28661 echo stdout:; cat "$at_stdout"
28662 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28663 $at_failed && at_fn_log_failure
28664 $at_traceon; }
28665
28666 { set +x
28667 $as_echo "$at_srcdir/sysroot.at:205: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la"
28668 at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:205"
28669 ( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la
28670 ) >>"$at_stdout" 2>>"$at_stderr"
28671 at_status=$? at_failed=false
28672 $at_check_filter
28673 at_fn_diff_devnull "$at_stderr" || at_failed=:
28674 echo stdout:; cat "$at_stdout"
28675 at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205"
28676 $at_failed && at_fn_log_failure
28677 $at_traceon; }
28678
28679 { set +x
28680 $as_echo "$at_srcdir/sysroot.at:205: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la"
28681 at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:205"
28682 ( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la
28683 ) >>"$at_stdout" 2>>"$at_stderr"
28684 at_status=$? at_failed=false
28685 $at_check_filter
28686 at_fn_diff_devnull "$at_stderr" || at_failed=:
28687 at_fn_diff_devnull "$at_stdout" || at_failed=:
28688 at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205"
28689 $at_failed && at_fn_log_failure
28690 $at_traceon; }
28691
28692
28693 # missing tests
28694 # 1) pass absolute .la files
28695 # 2) pass absolute -L
28696 # 2) pass relative .la files
28697
28698 cd ..
28699   set +x
28700   $at_times_p && times >"$at_times_file"
28701 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28702 read at_status <"$at_status_file"
28703 #AT_STOP_126