628cd7d5ea6dabfa5ec89e0f2fef9fbf00e174d7
[fw/sdcc] / sim / ucsim / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59.
4 #
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization.  ##
10 ## --------------------- ##
11
12 # Be Bourne compatible
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14   emulate sh
15   NULLCMD=:
16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17   # is contrary to our usage.  Disable this feature.
18   alias -g '${1+"$@"}'='"$@"'
19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20   set -o posix
21 fi
22 DUALCASE=1; export DUALCASE # for MKS sh
23
24 # Support unset when possible.
25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26   as_unset=unset
27 else
28   as_unset=false
29 fi
30
31
32 # Work around bugs in pre-3.0 UWIN ksh.
33 $as_unset ENV MAIL MAILPATH
34 PS1='$ '
35 PS2='> '
36 PS4='+ '
37
38 # NLS nuisances.
39 for as_var in \
40   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42   LC_TELEPHONE LC_TIME
43 do
44   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45     eval $as_var=C; export $as_var
46   else
47     $as_unset $as_var
48   fi
49 done
50
51 # Required to use basename.
52 if expr a : '\(a\)' >/dev/null 2>&1; then
53   as_expr=expr
54 else
55   as_expr=false
56 fi
57
58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59   as_basename=basename
60 else
61   as_basename=false
62 fi
63
64
65 # Name of the executable.
66 as_me=`$as_basename "$0" ||
67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68          X"$0" : 'X\(//\)$' \| \
69          X"$0" : 'X\(/\)$' \| \
70          .     : '\(.\)' 2>/dev/null ||
71 echo X/"$0" |
72     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73           /^X\/\(\/\/\)$/{ s//\1/; q; }
74           /^X\/\(\/\).*/{ s//\1/; q; }
75           s/.*/./; q'`
76
77
78 # PATH needs CR, and LINENO needs CR and PATH.
79 # Avoid depending upon Character Ranges.
80 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83 as_cr_digits='0123456789'
84 as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86 # The user is always right.
87 if test "${PATH_SEPARATOR+set}" != set; then
88   echo "#! /bin/sh" >conf$$.sh
89   echo  "exit 0"   >>conf$$.sh
90   chmod +x conf$$.sh
91   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92     PATH_SEPARATOR=';'
93   else
94     PATH_SEPARATOR=:
95   fi
96   rm -f conf$$.sh
97 fi
98
99
100   as_lineno_1=$LINENO
101   as_lineno_2=$LINENO
102   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103   test "x$as_lineno_1" != "x$as_lineno_2" &&
104   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105   # Find who we are.  Look in the path if we contain no path at all
106   # relative or not.
107   case $0 in
108     *[\\/]* ) as_myself=$0 ;;
109     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110 for as_dir in $PATH
111 do
112   IFS=$as_save_IFS
113   test -z "$as_dir" && as_dir=.
114   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115 done
116
117        ;;
118   esac
119   # We did not find ourselves, most probably we were run as `sh COMMAND'
120   # in which case we are not to be found in the path.
121   if test "x$as_myself" = x; then
122     as_myself=$0
123   fi
124   if test ! -f "$as_myself"; then
125     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126    { (exit 1); exit 1; }; }
127   fi
128   case $CONFIG_SHELL in
129   '')
130     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132 do
133   IFS=$as_save_IFS
134   test -z "$as_dir" && as_dir=.
135   for as_base in sh bash ksh sh5; do
136          case $as_dir in
137          /*)
138            if ("$as_dir/$as_base" -c '
139   as_lineno_1=$LINENO
140   as_lineno_2=$LINENO
141   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142   test "x$as_lineno_1" != "x$as_lineno_2" &&
143   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146              CONFIG_SHELL=$as_dir/$as_base
147              export CONFIG_SHELL
148              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149            fi;;
150          esac
151        done
152 done
153 ;;
154   esac
155
156   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157   # uniformly replaced by the line number.  The first 'sed' inserts a
158   # line-number line before each line; the second 'sed' does the real
159   # work.  The second script uses 'N' to pair each line-number line
160   # with the numbered line, and appends trailing '-' during
161   # substitution so that $LINENO is not a special case at line end.
162   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164   sed '=' <$as_myself |
165     sed '
166       N
167       s,$,-,
168       : loop
169       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170       t loop
171       s,-$,,
172       s,^['$as_cr_digits']*\n,,
173     ' >$as_me.lineno &&
174   chmod +x $as_me.lineno ||
175     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176    { (exit 1); exit 1; }; }
177
178   # Don't try to exec as it changes $[0], causing all sort of problems
179   # (the dirname of $[0] is not the place where we might find the
180   # original and so on.  Autoconf is especially sensible to this).
181   . ./$as_me.lineno
182   # Exit status is that of the last command.
183   exit
184 }
185
186
187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188   *c*,-n*) ECHO_N= ECHO_C='
189 ' ECHO_T='      ' ;;
190   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192 esac
193
194 if expr a : '\(a\)' >/dev/null 2>&1; then
195   as_expr=expr
196 else
197   as_expr=false
198 fi
199
200 rm -f conf$$ conf$$.exe conf$$.file
201 echo >conf$$.file
202 if ln -s conf$$.file conf$$ 2>/dev/null; then
203   # We could just check for DJGPP; but this test a) works b) is more generic
204   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205   if test -f conf$$.exe; then
206     # Don't use ln at all; we don't have any links
207     as_ln_s='cp -p'
208   else
209     as_ln_s='ln -s'
210   fi
211 elif ln conf$$.file conf$$ 2>/dev/null; then
212   as_ln_s=ln
213 else
214   as_ln_s='cp -p'
215 fi
216 rm -f conf$$ conf$$.exe conf$$.file
217
218 if mkdir -p . 2>/dev/null; then
219   as_mkdir_p=:
220 else
221   test -d ./-p && rmdir ./-p
222   as_mkdir_p=false
223 fi
224
225 as_executable_p="test -f"
226
227 # Sed expression to map a string onto a valid CPP name.
228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230 # Sed expression to map a string onto a valid variable name.
231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234 # IFS
235 # We need space, tab and new line, in precisely that order.
236 as_nl='
237 '
238 IFS="   $as_nl"
239
240 # CDPATH.
241 $as_unset CDPATH
242
243
244 # Find the correct PATH separator.  Usually this is `:', but
245 # DJGPP uses `;' like DOS.
246 if test "X${PATH_SEPARATOR+set}" != Xset; then
247   UNAME=${UNAME-`uname 2>/dev/null`}
248   case X$UNAME in
249     *-DOS) lt_cv_sys_path_separator=';' ;;
250     *)     lt_cv_sys_path_separator=':' ;;
251   esac
252   PATH_SEPARATOR=$lt_cv_sys_path_separator
253 fi
254
255
256 # Check that we are running under the correct shell.
257 SHELL=${CONFIG_SHELL-/bin/sh}
258
259 case X$ECHO in
260 X*--fallback-echo)
261   # Remove one level of quotation (which was required for Make).
262   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
263   ;;
264 esac
265
266 echo=${ECHO-echo}
267 if test "X$1" = X--no-reexec; then
268   # Discard the --no-reexec flag, and continue.
269   shift
270 elif test "X$1" = X--fallback-echo; then
271   # Avoid inline document here, it may be left over
272   :
273 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
274   # Yippee, $echo works!
275   :
276 else
277   # Restart under the correct shell.
278   exec $SHELL "$0" --no-reexec ${1+"$@"}
279 fi
280
281 if test "X$1" = X--fallback-echo; then
282   # used as fallback echo
283   shift
284   cat <<EOF
285
286 EOF
287   exit 0
288 fi
289
290 # The HP-UX ksh and POSIX shell print the target directory to stdout
291 # if CDPATH is set.
292 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
293
294 if test -z "$ECHO"; then
295 if test "X${echo_test_string+set}" != Xset; then
296 # find a string as large as possible, as long as the shell can cope with it
297   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
298     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
299     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
300        echo_test_string="`eval $cmd`" &&
301        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
302     then
303       break
304     fi
305   done
306 fi
307
308 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
309    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
310    test "X$echo_testing_string" = "X$echo_test_string"; then
311   :
312 else
313   # The Solaris, AIX, and Digital Unix default echo programs unquote
314   # backslashes.  This makes it impossible to quote backslashes using
315   #   echo "$something" | sed 's/\\/\\\\/g'
316   #
317   # So, first we look for a working echo in the user's PATH.
318
319   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
320   for dir in $PATH /usr/ucb; do
321     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
322        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
323        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
324        test "X$echo_testing_string" = "X$echo_test_string"; then
325       echo="$dir/echo"
326       break
327     fi
328   done
329   IFS="$save_ifs"
330
331   if test "X$echo" = Xecho; then
332     # We didn't find a better echo, so look for alternatives.
333     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
334        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
335        test "X$echo_testing_string" = "X$echo_test_string"; then
336       # This shell has a builtin print -r that does the trick.
337       echo='print -r'
338     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
339          test "X$CONFIG_SHELL" != X/bin/ksh; then
340       # If we have ksh, try running configure again with it.
341       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
342       export ORIGINAL_CONFIG_SHELL
343       CONFIG_SHELL=/bin/ksh
344       export CONFIG_SHELL
345       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
346     else
347       # Try using printf.
348       echo='printf %s\n'
349       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
350          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
351          test "X$echo_testing_string" = "X$echo_test_string"; then
352         # Cool, printf works
353         :
354       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
355            test "X$echo_testing_string" = 'X\t' &&
356            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
357            test "X$echo_testing_string" = "X$echo_test_string"; then
358         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
359         export CONFIG_SHELL
360         SHELL="$CONFIG_SHELL"
361         export SHELL
362         echo="$CONFIG_SHELL $0 --fallback-echo"
363       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
364            test "X$echo_testing_string" = 'X\t' &&
365            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
366            test "X$echo_testing_string" = "X$echo_test_string"; then
367         echo="$CONFIG_SHELL $0 --fallback-echo"
368       else
369         # maybe with a smaller string...
370         prev=:
371
372         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
373           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
374           then
375             break
376           fi
377           prev="$cmd"
378         done
379
380         if test "$prev" != 'sed 50q "$0"'; then
381           echo_test_string=`eval $prev`
382           export echo_test_string
383           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
384         else
385           # Oops.  We lost completely, so just stick with echo.
386           echo=echo
387         fi
388       fi
389     fi
390   fi
391 fi
392 fi
393
394 # Copy echo and quote the copy suitably for passing to libtool from
395 # the Makefile, instead of quoting the original, which is used later.
396 ECHO=$echo
397 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
398    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
399 fi
400
401
402
403 # Name of the host.
404 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
405 # so uname gets run too.
406 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
407
408 exec 6>&1
409
410 #
411 # Initializations.
412 #
413 ac_default_prefix=/usr/local
414 ac_config_libobj_dir=.
415 cross_compiling=no
416 subdirs=
417 MFLAGS=
418 MAKEFLAGS=
419 SHELL=${CONFIG_SHELL-/bin/sh}
420
421 # Maximum number of lines to put in a shell here document.
422 # This variable seems obsolete.  It should probably be removed, and
423 # only ac_max_sed_lines should be used.
424 : ${ac_max_here_lines=38}
425
426 # Identity of this package.
427 PACKAGE_NAME=
428 PACKAGE_TARNAME=
429 PACKAGE_VERSION=
430 PACKAGE_STRING=
431 PACKAGE_BUGREPORT=
432
433 ac_unique_file=".version"
434 # Factoring default headers for most tests.
435 ac_includes_default="\
436 #include <stdio.h>
437 #if HAVE_SYS_TYPES_H
438 # include <sys/types.h>
439 #endif
440 #if HAVE_SYS_STAT_H
441 # include <sys/stat.h>
442 #endif
443 #if STDC_HEADERS
444 # include <stdlib.h>
445 # include <stddef.h>
446 #else
447 # if HAVE_STDLIB_H
448 #  include <stdlib.h>
449 # endif
450 #endif
451 #if HAVE_STRING_H
452 # if !STDC_HEADERS && HAVE_MEMORY_H
453 #  include <memory.h>
454 # endif
455 # include <string.h>
456 #endif
457 #if HAVE_STRINGS_H
458 # include <strings.h>
459 #endif
460 #if HAVE_INTTYPES_H
461 # include <inttypes.h>
462 #else
463 # if HAVE_STDINT_H
464 #  include <stdint.h>
465 # endif
466 #endif
467 #if HAVE_UNISTD_H
468 # include <unistd.h>
469 #endif"
470
471 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS AWK VERSION VERSIONHI VERSIONLO VERSIONP docdir enable_ucsim enable_dlso enable_51 enable_avr enable_z80 enable_hc08 enable_xa enable_serio CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CXXCPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB STRIP build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS ac_ct_CC LN_S ECHO ac_ct_STRIP CPP EGREP LIBTOOL LIBTOOL_DEPS LEX LEXLIB LEX_OUTPUT_ROOT YACC BISON_PLUS_PLUS WINSOCK_AVAIL dl_ok DL panel_ok curses_ok CURSES_LIBS M_OR_MM SHAREDLIB PICOPT dlso_ok LIBOBJS LTLIBOBJS'
472 ac_subst_files=''
473
474 # Initialize some variables set by options.
475 ac_init_help=
476 ac_init_version=false
477 # The variables have the same names as the options, with
478 # dashes changed to underlines.
479 cache_file=/dev/null
480 exec_prefix=NONE
481 no_create=
482 no_recursion=
483 prefix=NONE
484 program_prefix=NONE
485 program_suffix=NONE
486 program_transform_name=s,x,x,
487 silent=
488 site=
489 srcdir=
490 verbose=
491 x_includes=NONE
492 x_libraries=NONE
493
494 # Installation directory options.
495 # These are left unexpanded so users can "make install exec_prefix=/foo"
496 # and all the variables that are supposed to be based on exec_prefix
497 # by default will actually change.
498 # Use braces instead of parens because sh, perl, etc. also accept them.
499 bindir='${exec_prefix}/bin'
500 sbindir='${exec_prefix}/sbin'
501 libexecdir='${exec_prefix}/libexec'
502 datadir='${prefix}/share'
503 sysconfdir='${prefix}/etc'
504 sharedstatedir='${prefix}/com'
505 localstatedir='${prefix}/var'
506 libdir='${exec_prefix}/lib'
507 includedir='${prefix}/include'
508 oldincludedir='/usr/include'
509 infodir='${prefix}/info'
510 mandir='${prefix}/man'
511
512 ac_prev=
513 for ac_option
514 do
515   # If the previous option needs an argument, assign it.
516   if test -n "$ac_prev"; then
517     eval "$ac_prev=\$ac_option"
518     ac_prev=
519     continue
520   fi
521
522   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
523
524   # Accept the important Cygnus configure options, so we can diagnose typos.
525
526   case $ac_option in
527
528   -bindir | --bindir | --bindi | --bind | --bin | --bi)
529     ac_prev=bindir ;;
530   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
531     bindir=$ac_optarg ;;
532
533   -build | --build | --buil | --bui | --bu)
534     ac_prev=build_alias ;;
535   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
536     build_alias=$ac_optarg ;;
537
538   -cache-file | --cache-file | --cache-fil | --cache-fi \
539   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
540     ac_prev=cache_file ;;
541   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
542   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
543     cache_file=$ac_optarg ;;
544
545   --config-cache | -C)
546     cache_file=config.cache ;;
547
548   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
549     ac_prev=datadir ;;
550   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
551   | --da=*)
552     datadir=$ac_optarg ;;
553
554   -disable-* | --disable-*)
555     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
556     # Reject names that are not valid shell variable names.
557     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
558       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
559    { (exit 1); exit 1; }; }
560     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
561     eval "enable_$ac_feature=no" ;;
562
563   -enable-* | --enable-*)
564     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
565     # Reject names that are not valid shell variable names.
566     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
567       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
568    { (exit 1); exit 1; }; }
569     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
570     case $ac_option in
571       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
572       *) ac_optarg=yes ;;
573     esac
574     eval "enable_$ac_feature='$ac_optarg'" ;;
575
576   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
577   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
578   | --exec | --exe | --ex)
579     ac_prev=exec_prefix ;;
580   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
581   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
582   | --exec=* | --exe=* | --ex=*)
583     exec_prefix=$ac_optarg ;;
584
585   -gas | --gas | --ga | --g)
586     # Obsolete; use --with-gas.
587     with_gas=yes ;;
588
589   -help | --help | --hel | --he | -h)
590     ac_init_help=long ;;
591   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
592     ac_init_help=recursive ;;
593   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
594     ac_init_help=short ;;
595
596   -host | --host | --hos | --ho)
597     ac_prev=host_alias ;;
598   -host=* | --host=* | --hos=* | --ho=*)
599     host_alias=$ac_optarg ;;
600
601   -includedir | --includedir | --includedi | --included | --include \
602   | --includ | --inclu | --incl | --inc)
603     ac_prev=includedir ;;
604   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
605   | --includ=* | --inclu=* | --incl=* | --inc=*)
606     includedir=$ac_optarg ;;
607
608   -infodir | --infodir | --infodi | --infod | --info | --inf)
609     ac_prev=infodir ;;
610   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
611     infodir=$ac_optarg ;;
612
613   -libdir | --libdir | --libdi | --libd)
614     ac_prev=libdir ;;
615   -libdir=* | --libdir=* | --libdi=* | --libd=*)
616     libdir=$ac_optarg ;;
617
618   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
619   | --libexe | --libex | --libe)
620     ac_prev=libexecdir ;;
621   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
622   | --libexe=* | --libex=* | --libe=*)
623     libexecdir=$ac_optarg ;;
624
625   -localstatedir | --localstatedir | --localstatedi | --localstated \
626   | --localstate | --localstat | --localsta | --localst \
627   | --locals | --local | --loca | --loc | --lo)
628     ac_prev=localstatedir ;;
629   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
630   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
631   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
632     localstatedir=$ac_optarg ;;
633
634   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
635     ac_prev=mandir ;;
636   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
637     mandir=$ac_optarg ;;
638
639   -nfp | --nfp | --nf)
640     # Obsolete; use --without-fp.
641     with_fp=no ;;
642
643   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
644   | --no-cr | --no-c | -n)
645     no_create=yes ;;
646
647   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
648   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
649     no_recursion=yes ;;
650
651   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
652   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
653   | --oldin | --oldi | --old | --ol | --o)
654     ac_prev=oldincludedir ;;
655   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
656   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
657   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
658     oldincludedir=$ac_optarg ;;
659
660   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
661     ac_prev=prefix ;;
662   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
663     prefix=$ac_optarg ;;
664
665   -program-prefix | --program-prefix | --program-prefi | --program-pref \
666   | --program-pre | --program-pr | --program-p)
667     ac_prev=program_prefix ;;
668   -program-prefix=* | --program-prefix=* | --program-prefi=* \
669   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
670     program_prefix=$ac_optarg ;;
671
672   -program-suffix | --program-suffix | --program-suffi | --program-suff \
673   | --program-suf | --program-su | --program-s)
674     ac_prev=program_suffix ;;
675   -program-suffix=* | --program-suffix=* | --program-suffi=* \
676   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
677     program_suffix=$ac_optarg ;;
678
679   -program-transform-name | --program-transform-name \
680   | --program-transform-nam | --program-transform-na \
681   | --program-transform-n | --program-transform- \
682   | --program-transform | --program-transfor \
683   | --program-transfo | --program-transf \
684   | --program-trans | --program-tran \
685   | --progr-tra | --program-tr | --program-t)
686     ac_prev=program_transform_name ;;
687   -program-transform-name=* | --program-transform-name=* \
688   | --program-transform-nam=* | --program-transform-na=* \
689   | --program-transform-n=* | --program-transform-=* \
690   | --program-transform=* | --program-transfor=* \
691   | --program-transfo=* | --program-transf=* \
692   | --program-trans=* | --program-tran=* \
693   | --progr-tra=* | --program-tr=* | --program-t=*)
694     program_transform_name=$ac_optarg ;;
695
696   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
697   | -silent | --silent | --silen | --sile | --sil)
698     silent=yes ;;
699
700   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
701     ac_prev=sbindir ;;
702   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
703   | --sbi=* | --sb=*)
704     sbindir=$ac_optarg ;;
705
706   -sharedstatedir | --sharedstatedir | --sharedstatedi \
707   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
708   | --sharedst | --shareds | --shared | --share | --shar \
709   | --sha | --sh)
710     ac_prev=sharedstatedir ;;
711   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
712   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
713   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
714   | --sha=* | --sh=*)
715     sharedstatedir=$ac_optarg ;;
716
717   -site | --site | --sit)
718     ac_prev=site ;;
719   -site=* | --site=* | --sit=*)
720     site=$ac_optarg ;;
721
722   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
723     ac_prev=srcdir ;;
724   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
725     srcdir=$ac_optarg ;;
726
727   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
728   | --syscon | --sysco | --sysc | --sys | --sy)
729     ac_prev=sysconfdir ;;
730   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
731   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
732     sysconfdir=$ac_optarg ;;
733
734   -target | --target | --targe | --targ | --tar | --ta | --t)
735     ac_prev=target_alias ;;
736   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
737     target_alias=$ac_optarg ;;
738
739   -v | -verbose | --verbose | --verbos | --verbo | --verb)
740     verbose=yes ;;
741
742   -version | --version | --versio | --versi | --vers | -V)
743     ac_init_version=: ;;
744
745   -with-* | --with-*)
746     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
747     # Reject names that are not valid shell variable names.
748     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
749       { echo "$as_me: error: invalid package name: $ac_package" >&2
750    { (exit 1); exit 1; }; }
751     ac_package=`echo $ac_package| sed 's/-/_/g'`
752     case $ac_option in
753       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
754       *) ac_optarg=yes ;;
755     esac
756     eval "with_$ac_package='$ac_optarg'" ;;
757
758   -without-* | --without-*)
759     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
760     # Reject names that are not valid shell variable names.
761     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
762       { echo "$as_me: error: invalid package name: $ac_package" >&2
763    { (exit 1); exit 1; }; }
764     ac_package=`echo $ac_package | sed 's/-/_/g'`
765     eval "with_$ac_package=no" ;;
766
767   --x)
768     # Obsolete; use --with-x.
769     with_x=yes ;;
770
771   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
772   | --x-incl | --x-inc | --x-in | --x-i)
773     ac_prev=x_includes ;;
774   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
775   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
776     x_includes=$ac_optarg ;;
777
778   -x-libraries | --x-libraries | --x-librarie | --x-librari \
779   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
780     ac_prev=x_libraries ;;
781   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
782   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
783     x_libraries=$ac_optarg ;;
784
785   -*) { echo "$as_me: error: unrecognized option: $ac_option
786 Try \`$0 --help' for more information." >&2
787    { (exit 1); exit 1; }; }
788     ;;
789
790   *=*)
791     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
792     # Reject names that are not valid shell variable names.
793     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
794       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
795    { (exit 1); exit 1; }; }
796     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
797     eval "$ac_envvar='$ac_optarg'"
798     export $ac_envvar ;;
799
800   *)
801     # FIXME: should be removed in autoconf 3.0.
802     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
803     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
804       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
805     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
806     ;;
807
808   esac
809 done
810
811 if test -n "$ac_prev"; then
812   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
813   { echo "$as_me: error: missing argument to $ac_option" >&2
814    { (exit 1); exit 1; }; }
815 fi
816
817 # Be sure to have absolute paths.
818 for ac_var in exec_prefix prefix
819 do
820   eval ac_val=$`echo $ac_var`
821   case $ac_val in
822     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
823     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
824    { (exit 1); exit 1; }; };;
825   esac
826 done
827
828 # Be sure to have absolute paths.
829 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
830               localstatedir libdir includedir oldincludedir infodir mandir
831 do
832   eval ac_val=$`echo $ac_var`
833   case $ac_val in
834     [\\/$]* | ?:[\\/]* ) ;;
835     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
836    { (exit 1); exit 1; }; };;
837   esac
838 done
839
840 # There might be people who depend on the old broken behavior: `$host'
841 # used to hold the argument of --host etc.
842 # FIXME: To remove some day.
843 build=$build_alias
844 host=$host_alias
845 target=$target_alias
846
847 # FIXME: To remove some day.
848 if test "x$host_alias" != x; then
849   if test "x$build_alias" = x; then
850     cross_compiling=maybe
851     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
852     If a cross compiler is detected then cross compile mode will be used." >&2
853   elif test "x$build_alias" != "x$host_alias"; then
854     cross_compiling=yes
855   fi
856 fi
857
858 ac_tool_prefix=
859 test -n "$host_alias" && ac_tool_prefix=$host_alias-
860
861 test "$silent" = yes && exec 6>/dev/null
862
863
864 # Find the source files, if location was not specified.
865 if test -z "$srcdir"; then
866   ac_srcdir_defaulted=yes
867   # Try the directory containing this script, then its parent.
868   ac_confdir=`(dirname "$0") 2>/dev/null ||
869 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
870          X"$0" : 'X\(//\)[^/]' \| \
871          X"$0" : 'X\(//\)$' \| \
872          X"$0" : 'X\(/\)' \| \
873          .     : '\(.\)' 2>/dev/null ||
874 echo X"$0" |
875     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
876           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
877           /^X\(\/\/\)$/{ s//\1/; q; }
878           /^X\(\/\).*/{ s//\1/; q; }
879           s/.*/./; q'`
880   srcdir=$ac_confdir
881   if test ! -r $srcdir/$ac_unique_file; then
882     srcdir=..
883   fi
884 else
885   ac_srcdir_defaulted=no
886 fi
887 if test ! -r $srcdir/$ac_unique_file; then
888   if test "$ac_srcdir_defaulted" = yes; then
889     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
890    { (exit 1); exit 1; }; }
891   else
892     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
893    { (exit 1); exit 1; }; }
894   fi
895 fi
896 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
897   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
898    { (exit 1); exit 1; }; }
899 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
900 ac_env_build_alias_set=${build_alias+set}
901 ac_env_build_alias_value=$build_alias
902 ac_cv_env_build_alias_set=${build_alias+set}
903 ac_cv_env_build_alias_value=$build_alias
904 ac_env_host_alias_set=${host_alias+set}
905 ac_env_host_alias_value=$host_alias
906 ac_cv_env_host_alias_set=${host_alias+set}
907 ac_cv_env_host_alias_value=$host_alias
908 ac_env_target_alias_set=${target_alias+set}
909 ac_env_target_alias_value=$target_alias
910 ac_cv_env_target_alias_set=${target_alias+set}
911 ac_cv_env_target_alias_value=$target_alias
912 ac_env_docdir_set=${docdir+set}
913 ac_env_docdir_value=$docdir
914 ac_cv_env_docdir_set=${docdir+set}
915 ac_cv_env_docdir_value=$docdir
916 ac_env_CXX_set=${CXX+set}
917 ac_env_CXX_value=$CXX
918 ac_cv_env_CXX_set=${CXX+set}
919 ac_cv_env_CXX_value=$CXX
920 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
921 ac_env_CXXFLAGS_value=$CXXFLAGS
922 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
923 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
924 ac_env_LDFLAGS_set=${LDFLAGS+set}
925 ac_env_LDFLAGS_value=$LDFLAGS
926 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
927 ac_cv_env_LDFLAGS_value=$LDFLAGS
928 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
929 ac_env_CPPFLAGS_value=$CPPFLAGS
930 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
931 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
932 ac_env_CXXCPP_set=${CXXCPP+set}
933 ac_env_CXXCPP_value=$CXXCPP
934 ac_cv_env_CXXCPP_set=${CXXCPP+set}
935 ac_cv_env_CXXCPP_value=$CXXCPP
936 ac_env_CC_set=${CC+set}
937 ac_env_CC_value=$CC
938 ac_cv_env_CC_set=${CC+set}
939 ac_cv_env_CC_value=$CC
940 ac_env_CFLAGS_set=${CFLAGS+set}
941 ac_env_CFLAGS_value=$CFLAGS
942 ac_cv_env_CFLAGS_set=${CFLAGS+set}
943 ac_cv_env_CFLAGS_value=$CFLAGS
944 ac_env_CPP_set=${CPP+set}
945 ac_env_CPP_value=$CPP
946 ac_cv_env_CPP_set=${CPP+set}
947 ac_cv_env_CPP_value=$CPP
948
949 #
950 # Report the --help message.
951 #
952 if test "$ac_init_help" = "long"; then
953   # Omit some internal or obsolete options to make the list less imposing.
954   # This message is too long to be a string in the A/UX 3.1 sh.
955   cat <<_ACEOF
956 \`configure' configures this package to adapt to many kinds of systems.
957
958 Usage: $0 [OPTION]... [VAR=VALUE]...
959
960 To assign environment variables (e.g., CC, CFLAGS...), specify them as
961 VAR=VALUE.  See below for descriptions of some of the useful variables.
962
963 Defaults for the options are specified in brackets.
964
965 Configuration:
966   -h, --help              display this help and exit
967       --help=short        display options specific to this package
968       --help=recursive    display the short help of all the included packages
969   -V, --version           display version information and exit
970   -q, --quiet, --silent   do not print \`checking...' messages
971       --cache-file=FILE   cache test results in FILE [disabled]
972   -C, --config-cache      alias for \`--cache-file=config.cache'
973   -n, --no-create         do not create output files
974       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
975
976 _ACEOF
977
978   cat <<_ACEOF
979 Installation directories:
980   --prefix=PREFIX         install architecture-independent files in PREFIX
981                           [$ac_default_prefix]
982   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
983                           [PREFIX]
984
985 By default, \`make install' will install all the files in
986 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
987 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
988 for instance \`--prefix=\$HOME'.
989
990 For better control, use the options below.
991
992 Fine tuning of the installation directories:
993   --bindir=DIR           user executables [EPREFIX/bin]
994   --sbindir=DIR          system admin executables [EPREFIX/sbin]
995   --libexecdir=DIR       program executables [EPREFIX/libexec]
996   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
997   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
998   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
999   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1000   --libdir=DIR           object code libraries [EPREFIX/lib]
1001   --includedir=DIR       C header files [PREFIX/include]
1002   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1003   --infodir=DIR          info documentation [PREFIX/info]
1004   --mandir=DIR           man documentation [PREFIX/man]
1005 _ACEOF
1006
1007   cat <<\_ACEOF
1008
1009 System types:
1010   --build=BUILD     configure for building on BUILD [guessed]
1011   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1012 _ACEOF
1013 fi
1014
1015 if test -n "$ac_init_help"; then
1016
1017   cat <<\_ACEOF
1018
1019 Optional Features:
1020   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1021   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1022   --enable-ucsim          compile ucsim frontend
1023   --enable-dlso           compile dynamically loadable shared libraries
1024   --disable-51            do not compile simulator for MCS51
1025   --disable-avr           do not compile simulator for AVR
1026   --disable-z80           do not compile simulator for Z80
1027   --disable-hc08          do not compile simulator for hc08
1028   --enable-xa             compile simulator for XA
1029   --enable-serio          compile serio GUI tool (needs curses)
1030   --enable-statistic      compile statistical features (slower simulation)
1031   --enable-shared=PKGS  build shared libraries default=yes
1032   --enable-static=PKGS  build static libraries default=yes
1033   --enable-fast-install=PKGS  optimize for fast installation default=yes
1034   --disable-libtool-lock  avoid locking (might break parallel builds)
1035
1036 Optional Packages:
1037   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1038   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1039   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1040   --with-pic              try to use only PIC/non-PIC objects default=use both
1041
1042 Some influential environment variables:
1043   docdir      documentation installation directory
1044   CXX         C++ compiler command
1045   CXXFLAGS    C++ compiler flags
1046   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1047               nonstandard directory <lib dir>
1048   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1049               headers in a nonstandard directory <include dir>
1050   CXXCPP      C++ preprocessor
1051   CC          C compiler command
1052   CFLAGS      C compiler flags
1053   CPP         C preprocessor
1054
1055 Use these variables to override the choices made by `configure' or to help
1056 it to find libraries and programs with nonstandard names/locations.
1057
1058 _ACEOF
1059 fi
1060
1061 if test "$ac_init_help" = "recursive"; then
1062   # If there are subdirs, report their specific --help.
1063   ac_popdir=`pwd`
1064   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1065     test -d $ac_dir || continue
1066     ac_builddir=.
1067
1068 if test "$ac_dir" != .; then
1069   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1070   # A "../" for each directory in $ac_dir_suffix.
1071   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1072 else
1073   ac_dir_suffix= ac_top_builddir=
1074 fi
1075
1076 case $srcdir in
1077   .)  # No --srcdir option.  We are building in place.
1078     ac_srcdir=.
1079     if test -z "$ac_top_builddir"; then
1080        ac_top_srcdir=.
1081     else
1082        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1083     fi ;;
1084   [\\/]* | ?:[\\/]* )  # Absolute path.
1085     ac_srcdir=$srcdir$ac_dir_suffix;
1086     ac_top_srcdir=$srcdir ;;
1087   *) # Relative path.
1088     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1089     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1090 esac
1091
1092 # Do not use `cd foo && pwd` to compute absolute paths, because
1093 # the directories may not exist.
1094 case `pwd` in
1095 .) ac_abs_builddir="$ac_dir";;
1096 *)
1097   case "$ac_dir" in
1098   .) ac_abs_builddir=`pwd`;;
1099   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1100   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1101   esac;;
1102 esac
1103 case $ac_abs_builddir in
1104 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1105 *)
1106   case ${ac_top_builddir}. in
1107   .) ac_abs_top_builddir=$ac_abs_builddir;;
1108   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1109   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1110   esac;;
1111 esac
1112 case $ac_abs_builddir in
1113 .) ac_abs_srcdir=$ac_srcdir;;
1114 *)
1115   case $ac_srcdir in
1116   .) ac_abs_srcdir=$ac_abs_builddir;;
1117   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1118   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1119   esac;;
1120 esac
1121 case $ac_abs_builddir in
1122 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1123 *)
1124   case $ac_top_srcdir in
1125   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1126   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1127   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1128   esac;;
1129 esac
1130
1131     cd $ac_dir
1132     # Check for guested configure; otherwise get Cygnus style configure.
1133     if test -f $ac_srcdir/configure.gnu; then
1134       echo
1135       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1136     elif test -f $ac_srcdir/configure; then
1137       echo
1138       $SHELL $ac_srcdir/configure  --help=recursive
1139     elif test -f $ac_srcdir/configure.ac ||
1140            test -f $ac_srcdir/configure.in; then
1141       echo
1142       $ac_configure --help
1143     else
1144       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1145     fi
1146     cd $ac_popdir
1147   done
1148 fi
1149
1150 test -n "$ac_init_help" && exit 0
1151 if $ac_init_version; then
1152   cat <<\_ACEOF
1153
1154 Copyright (C) 2003 Free Software Foundation, Inc.
1155 This configure script is free software; the Free Software Foundation
1156 gives unlimited permission to copy, distribute and modify it.
1157 _ACEOF
1158   exit 0
1159 fi
1160 exec 5>config.log
1161 cat >&5 <<_ACEOF
1162 This file contains any messages produced by compilers while
1163 running configure, to aid debugging if configure makes a mistake.
1164
1165 It was created by $as_me, which was
1166 generated by GNU Autoconf 2.59.  Invocation command line was
1167
1168   $ $0 $@
1169
1170 _ACEOF
1171 {
1172 cat <<_ASUNAME
1173 ## --------- ##
1174 ## Platform. ##
1175 ## --------- ##
1176
1177 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1178 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1179 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1180 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1181 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1182
1183 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1184 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1185
1186 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1187 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1188 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1189 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1190 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1191 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1192 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1193
1194 _ASUNAME
1195
1196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1197 for as_dir in $PATH
1198 do
1199   IFS=$as_save_IFS
1200   test -z "$as_dir" && as_dir=.
1201   echo "PATH: $as_dir"
1202 done
1203
1204 } >&5
1205
1206 cat >&5 <<_ACEOF
1207
1208
1209 ## ----------- ##
1210 ## Core tests. ##
1211 ## ----------- ##
1212
1213 _ACEOF
1214
1215
1216 # Keep a trace of the command line.
1217 # Strip out --no-create and --no-recursion so they do not pile up.
1218 # Strip out --silent because we don't want to record it for future runs.
1219 # Also quote any args containing shell meta-characters.
1220 # Make two passes to allow for proper duplicate-argument suppression.
1221 ac_configure_args=
1222 ac_configure_args0=
1223 ac_configure_args1=
1224 ac_sep=
1225 ac_must_keep_next=false
1226 for ac_pass in 1 2
1227 do
1228   for ac_arg
1229   do
1230     case $ac_arg in
1231     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1232     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1233     | -silent | --silent | --silen | --sile | --sil)
1234       continue ;;
1235     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1236       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1237     esac
1238     case $ac_pass in
1239     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1240     2)
1241       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1242       if test $ac_must_keep_next = true; then
1243         ac_must_keep_next=false # Got value, back to normal.
1244       else
1245         case $ac_arg in
1246           *=* | --config-cache | -C | -disable-* | --disable-* \
1247           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1248           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1249           | -with-* | --with-* | -without-* | --without-* | --x)
1250             case "$ac_configure_args0 " in
1251               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1252             esac
1253             ;;
1254           -* ) ac_must_keep_next=true ;;
1255         esac
1256       fi
1257       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1258       # Get rid of the leading space.
1259       ac_sep=" "
1260       ;;
1261     esac
1262   done
1263 done
1264 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1265 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1266
1267 # When interrupted or exit'd, cleanup temporary files, and complete
1268 # config.log.  We remove comments because anyway the quotes in there
1269 # would cause problems or look ugly.
1270 # WARNING: Be sure not to use single quotes in there, as some shells,
1271 # such as our DU 5.0 friend, will then `close' the trap.
1272 trap 'exit_status=$?
1273   # Save into config.log some information that might help in debugging.
1274   {
1275     echo
1276
1277     cat <<\_ASBOX
1278 ## ---------------- ##
1279 ## Cache variables. ##
1280 ## ---------------- ##
1281 _ASBOX
1282     echo
1283     # The following way of writing the cache mishandles newlines in values,
1284 {
1285   (set) 2>&1 |
1286     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1287     *ac_space=\ *)
1288       sed -n \
1289         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1290           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1291       ;;
1292     *)
1293       sed -n \
1294         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1295       ;;
1296     esac;
1297 }
1298     echo
1299
1300     cat <<\_ASBOX
1301 ## ----------------- ##
1302 ## Output variables. ##
1303 ## ----------------- ##
1304 _ASBOX
1305     echo
1306     for ac_var in $ac_subst_vars
1307     do
1308       eval ac_val=$`echo $ac_var`
1309       echo "$ac_var='"'"'$ac_val'"'"'"
1310     done | sort
1311     echo
1312
1313     if test -n "$ac_subst_files"; then
1314       cat <<\_ASBOX
1315 ## ------------- ##
1316 ## Output files. ##
1317 ## ------------- ##
1318 _ASBOX
1319       echo
1320       for ac_var in $ac_subst_files
1321       do
1322         eval ac_val=$`echo $ac_var`
1323         echo "$ac_var='"'"'$ac_val'"'"'"
1324       done | sort
1325       echo
1326     fi
1327
1328     if test -s confdefs.h; then
1329       cat <<\_ASBOX
1330 ## ----------- ##
1331 ## confdefs.h. ##
1332 ## ----------- ##
1333 _ASBOX
1334       echo
1335       sed "/^$/d" confdefs.h | sort
1336       echo
1337     fi
1338     test "$ac_signal" != 0 &&
1339       echo "$as_me: caught signal $ac_signal"
1340     echo "$as_me: exit $exit_status"
1341   } >&5
1342   rm -f core *.core &&
1343   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1344     exit $exit_status
1345      ' 0
1346 for ac_signal in 1 2 13 15; do
1347   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1348 done
1349 ac_signal=0
1350
1351 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1352 rm -rf conftest* confdefs.h
1353 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1354 echo >confdefs.h
1355
1356 # Predefined preprocessor variables.
1357
1358 cat >>confdefs.h <<_ACEOF
1359 #define PACKAGE_NAME "$PACKAGE_NAME"
1360 _ACEOF
1361
1362
1363 cat >>confdefs.h <<_ACEOF
1364 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1365 _ACEOF
1366
1367
1368 cat >>confdefs.h <<_ACEOF
1369 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1370 _ACEOF
1371
1372
1373 cat >>confdefs.h <<_ACEOF
1374 #define PACKAGE_STRING "$PACKAGE_STRING"
1375 _ACEOF
1376
1377
1378 cat >>confdefs.h <<_ACEOF
1379 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1380 _ACEOF
1381
1382
1383 # Let the site file select an alternate cache file if it wants to.
1384 # Prefer explicitly selected file to automatically selected ones.
1385 if test -z "$CONFIG_SITE"; then
1386   if test "x$prefix" != xNONE; then
1387     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1388   else
1389     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1390   fi
1391 fi
1392 for ac_site_file in $CONFIG_SITE; do
1393   if test -r "$ac_site_file"; then
1394     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1395 echo "$as_me: loading site script $ac_site_file" >&6;}
1396     sed 's/^/| /' "$ac_site_file" >&5
1397     . "$ac_site_file"
1398   fi
1399 done
1400
1401 if test -r "$cache_file"; then
1402   # Some versions of bash will fail to source /dev/null (special
1403   # files actually), so we avoid doing that.
1404   if test -f "$cache_file"; then
1405     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1406 echo "$as_me: loading cache $cache_file" >&6;}
1407     case $cache_file in
1408       [\\/]* | ?:[\\/]* ) . $cache_file;;
1409       *)                      . ./$cache_file;;
1410     esac
1411   fi
1412 else
1413   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1414 echo "$as_me: creating cache $cache_file" >&6;}
1415   >$cache_file
1416 fi
1417
1418 # Check that the precious variables saved in the cache have kept the same
1419 # value.
1420 ac_cache_corrupted=false
1421 for ac_var in `(set) 2>&1 |
1422                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1423   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1424   eval ac_new_set=\$ac_env_${ac_var}_set
1425   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1426   eval ac_new_val="\$ac_env_${ac_var}_value"
1427   case $ac_old_set,$ac_new_set in
1428     set,)
1429       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1430 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1431       ac_cache_corrupted=: ;;
1432     ,set)
1433       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1434 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1435       ac_cache_corrupted=: ;;
1436     ,);;
1437     *)
1438       if test "x$ac_old_val" != "x$ac_new_val"; then
1439         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1440 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1441         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1442 echo "$as_me:   former value:  $ac_old_val" >&2;}
1443         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1444 echo "$as_me:   current value: $ac_new_val" >&2;}
1445         ac_cache_corrupted=:
1446       fi;;
1447   esac
1448   # Pass precious variables to config.status.
1449   if test "$ac_new_set" = set; then
1450     case $ac_new_val in
1451     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1452       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1453     *) ac_arg=$ac_var=$ac_new_val ;;
1454     esac
1455     case " $ac_configure_args " in
1456       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1457       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1458     esac
1459   fi
1460 done
1461 if $ac_cache_corrupted; then
1462   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1463 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1464   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1465 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1466    { (exit 1); exit 1; }; }
1467 fi
1468
1469 ac_ext=c
1470 ac_cpp='$CPP $CPPFLAGS'
1471 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1472 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1473 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493           ac_config_headers="$ac_config_headers ddconfig.h:ddconfig_in.h"
1494
1495
1496 for ac_prog in gawk mawk nawk awk
1497 do
1498   # Extract the first word of "$ac_prog", so it can be a program name with args.
1499 set dummy $ac_prog; ac_word=$2
1500 echo "$as_me:$LINENO: checking for $ac_word" >&5
1501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1502 if test "${ac_cv_prog_AWK+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   if test -n "$AWK"; then
1506   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1507 else
1508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509 for as_dir in $PATH
1510 do
1511   IFS=$as_save_IFS
1512   test -z "$as_dir" && as_dir=.
1513   for ac_exec_ext in '' $ac_executable_extensions; do
1514   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1515     ac_cv_prog_AWK="$ac_prog"
1516     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1517     break 2
1518   fi
1519 done
1520 done
1521
1522 fi
1523 fi
1524 AWK=$ac_cv_prog_AWK
1525 if test -n "$AWK"; then
1526   echo "$as_me:$LINENO: result: $AWK" >&5
1527 echo "${ECHO_T}$AWK" >&6
1528 else
1529   echo "$as_me:$LINENO: result: no" >&5
1530 echo "${ECHO_T}no" >&6
1531 fi
1532
1533   test -n "$AWK" && break
1534 done
1535
1536
1537 echo "$as_me:$LINENO: checking version of the package" >&5
1538 echo $ECHO_N "checking version of the package... $ECHO_C" >&6
1539 if test -f ${srcdir}/.version; then
1540   VERSION=`cat ${srcdir}/.version`
1541   echo "$as_me:$LINENO: result: $VERSION" >&5
1542 echo "${ECHO_T}$VERSION" >&6
1543 else
1544   VERSION="0.0.0"
1545   echo "$as_me:$LINENO: result: unknown using 0.0.0" >&5
1546 echo "${ECHO_T}unknown using 0.0.0" >&6
1547 fi
1548 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
1549 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
1550 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
1551
1552
1553
1554
1555 cat >>confdefs.h <<_ACEOF
1556 #define VERSIONSTR "${VERSION}"
1557 _ACEOF
1558
1559 cat >>confdefs.h <<_ACEOF
1560 #define VERSIONHI $VERSIONHI
1561 _ACEOF
1562
1563 cat >>confdefs.h <<_ACEOF
1564 #define VERSIONLO $VERSIONLO
1565 _ACEOF
1566
1567 cat >>confdefs.h <<_ACEOF
1568 #define VERSIONP $VERSIONP
1569 _ACEOF
1570
1571
1572 # Some options
1573 #==============
1574 # *nix default: "${datadir}/sdcc/doc"
1575
1576 if test "${docdir}" = ""; then
1577     docdir="\${datadir}"/sdcc/doc
1578 fi
1579
1580
1581 # Check whether --enable-ucsim or --disable-ucsim was given.
1582 if test "${enable_ucsim+set}" = set; then
1583   enableval="$enable_ucsim"
1584   if test $enable_ucsim != "no"; then
1585     enable_ucsim="yes"
1586 fi
1587 else
1588   #default
1589 enable_ucsim="no"
1590 fi;
1591 # Check whether --enable-dlso or --disable-dlso was given.
1592 if test "${enable_dlso+set}" = set; then
1593   enableval="$enable_dlso"
1594   if test $enable_dlso != "no"; then
1595     enable_dlso="yes"
1596 fi
1597 else
1598   enable_dlso="no"
1599 fi;
1600 # Check whether --enable-51 or --disable-51 was given.
1601 if test "${enable_51+set}" = set; then
1602   enableval="$enable_51"
1603   if test $enable_51 != "no"; then
1604     enable_51="yes"
1605 fi
1606 else
1607   enable_51="yes"
1608 fi;
1609 # Check whether --enable-avr or --disable-avr was given.
1610 if test "${enable_avr+set}" = set; then
1611   enableval="$enable_avr"
1612   if test $enable_avr != "no"; then
1613     enable_avr="yes"
1614 fi
1615 else
1616   enable_avr="yes"
1617 fi;
1618 # Check whether --enable-z80 or --disable-z80 was given.
1619 if test "${enable_z80+set}" = set; then
1620   enableval="$enable_z80"
1621   if test $enable_z80 != "no"; then
1622     enable_z80="yes"
1623 fi
1624 else
1625   enable_z80="yes"
1626 fi;
1627 # Check whether --enable-hc08 or --disable-hc08 was given.
1628 if test "${enable_hc08+set}" = set; then
1629   enableval="$enable_hc08"
1630   if test $enable_hc08 != "no"; then
1631     enable_hc08="yes"
1632 fi
1633 else
1634   enable_hc08="yes"
1635 fi;
1636 # Check whether --enable-xa or --disable-xa was given.
1637 if test "${enable_xa+set}" = set; then
1638   enableval="$enable_xa"
1639   if test $enable_xa != "no"; then
1640     enable_xa="yes"
1641 fi
1642 else
1643   enable_xa="no"
1644 fi;
1645 # Check whether --enable-portmon or --disable-portmon was given.
1646 if test "${enable_portmon+set}" = set; then
1647   enableval="$enable_portmon"
1648   if test $enable_serio != "no"; then
1649     enable_serio="yes"
1650 fi
1651 else
1652   enable_serio="no"
1653 fi;
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663 # Check whether --enable-statistic or --disable-statistic was given.
1664 if test "${enable_statistic+set}" = set; then
1665   enableval="$enable_statistic"
1666   if test $enable_statistic != "no"; then
1667    enable_statistic="yes"
1668 fi
1669 else
1670   enable_statistic="no"
1671 fi;
1672 cat >>confdefs.h <<_ACEOF
1673 #define STATISTIC $enable_statistic
1674 _ACEOF
1675
1676
1677
1678 # Required programs
1679 #-------------------
1680 ac_ext=cc
1681 ac_cpp='$CXXCPP $CPPFLAGS'
1682 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1683 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1684 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1685 if test -n "$ac_tool_prefix"; then
1686   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1687   do
1688     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1689 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1690 echo "$as_me:$LINENO: checking for $ac_word" >&5
1691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1692 if test "${ac_cv_prog_CXX+set}" = set; then
1693   echo $ECHO_N "(cached) $ECHO_C" >&6
1694 else
1695   if test -n "$CXX"; then
1696   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1697 else
1698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1699 for as_dir in $PATH
1700 do
1701   IFS=$as_save_IFS
1702   test -z "$as_dir" && as_dir=.
1703   for ac_exec_ext in '' $ac_executable_extensions; do
1704   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1705     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1706     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1707     break 2
1708   fi
1709 done
1710 done
1711
1712 fi
1713 fi
1714 CXX=$ac_cv_prog_CXX
1715 if test -n "$CXX"; then
1716   echo "$as_me:$LINENO: result: $CXX" >&5
1717 echo "${ECHO_T}$CXX" >&6
1718 else
1719   echo "$as_me:$LINENO: result: no" >&5
1720 echo "${ECHO_T}no" >&6
1721 fi
1722
1723     test -n "$CXX" && break
1724   done
1725 fi
1726 if test -z "$CXX"; then
1727   ac_ct_CXX=$CXX
1728   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1729 do
1730   # Extract the first word of "$ac_prog", so it can be a program name with args.
1731 set dummy $ac_prog; ac_word=$2
1732 echo "$as_me:$LINENO: checking for $ac_word" >&5
1733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1734 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1735   echo $ECHO_N "(cached) $ECHO_C" >&6
1736 else
1737   if test -n "$ac_ct_CXX"; then
1738   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1739 else
1740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1741 for as_dir in $PATH
1742 do
1743   IFS=$as_save_IFS
1744   test -z "$as_dir" && as_dir=.
1745   for ac_exec_ext in '' $ac_executable_extensions; do
1746   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1747     ac_cv_prog_ac_ct_CXX="$ac_prog"
1748     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1749     break 2
1750   fi
1751 done
1752 done
1753
1754 fi
1755 fi
1756 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1757 if test -n "$ac_ct_CXX"; then
1758   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
1759 echo "${ECHO_T}$ac_ct_CXX" >&6
1760 else
1761   echo "$as_me:$LINENO: result: no" >&5
1762 echo "${ECHO_T}no" >&6
1763 fi
1764
1765   test -n "$ac_ct_CXX" && break
1766 done
1767 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1768
1769   CXX=$ac_ct_CXX
1770 fi
1771
1772
1773 # Provide some information about the compiler.
1774 echo "$as_me:$LINENO:" \
1775      "checking for C++ compiler version" >&5
1776 ac_compiler=`set X $ac_compile; echo $2`
1777 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1778   (eval $ac_compiler --version </dev/null >&5) 2>&5
1779   ac_status=$?
1780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1781   (exit $ac_status); }
1782 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1783   (eval $ac_compiler -v </dev/null >&5) 2>&5
1784   ac_status=$?
1785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1786   (exit $ac_status); }
1787 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1788   (eval $ac_compiler -V </dev/null >&5) 2>&5
1789   ac_status=$?
1790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1791   (exit $ac_status); }
1792
1793 cat >conftest.$ac_ext <<_ACEOF
1794 /* confdefs.h.  */
1795 _ACEOF
1796 cat confdefs.h >>conftest.$ac_ext
1797 cat >>conftest.$ac_ext <<_ACEOF
1798 /* end confdefs.h.  */
1799
1800 int
1801 main ()
1802 {
1803
1804   ;
1805   return 0;
1806 }
1807 _ACEOF
1808 ac_clean_files_save=$ac_clean_files
1809 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1810 # Try to create an executable without -o first, disregard a.out.
1811 # It will help us diagnose broken compilers, and finding out an intuition
1812 # of exeext.
1813 echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1814 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
1815 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1816 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1817   (eval $ac_link_default) 2>&5
1818   ac_status=$?
1819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1820   (exit $ac_status); }; then
1821   # Find the output, starting from the most likely.  This scheme is
1822 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1823 # resort.
1824
1825 # Be careful to initialize this variable, since it used to be cached.
1826 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1827 ac_cv_exeext=
1828 # b.out is created by i960 compilers.
1829 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1830 do
1831   test -f "$ac_file" || continue
1832   case $ac_file in
1833     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1834         ;;
1835     conftest.$ac_ext )
1836         # This is the source file.
1837         ;;
1838     [ab].out )
1839         # We found the default executable, but exeext='' is most
1840         # certainly right.
1841         break;;
1842     *.* )
1843         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1844         # FIXME: I believe we export ac_cv_exeext for Libtool,
1845         # but it would be cool to find out if it's true.  Does anybody
1846         # maintain Libtool? --akim.
1847         export ac_cv_exeext
1848         break;;
1849     * )
1850         break;;
1851   esac
1852 done
1853 else
1854   echo "$as_me: failed program was:" >&5
1855 sed 's/^/| /' conftest.$ac_ext >&5
1856
1857 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1858 See \`config.log' for more details." >&5
1859 echo "$as_me: error: C++ compiler cannot create executables
1860 See \`config.log' for more details." >&2;}
1861    { (exit 77); exit 77; }; }
1862 fi
1863
1864 ac_exeext=$ac_cv_exeext
1865 echo "$as_me:$LINENO: result: $ac_file" >&5
1866 echo "${ECHO_T}$ac_file" >&6
1867
1868 # Check the compiler produces executables we can run.  If not, either
1869 # the compiler is broken, or we cross compile.
1870 echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1871 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1872 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1873 # If not cross compiling, check that we can run a simple program.
1874 if test "$cross_compiling" != yes; then
1875   if { ac_try='./$ac_file'
1876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1877   (eval $ac_try) 2>&5
1878   ac_status=$?
1879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1880   (exit $ac_status); }; }; then
1881     cross_compiling=no
1882   else
1883     if test "$cross_compiling" = maybe; then
1884         cross_compiling=yes
1885     else
1886         { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1887 If you meant to cross compile, use \`--host'.
1888 See \`config.log' for more details." >&5
1889 echo "$as_me: error: cannot run C++ compiled programs.
1890 If you meant to cross compile, use \`--host'.
1891 See \`config.log' for more details." >&2;}
1892    { (exit 1); exit 1; }; }
1893     fi
1894   fi
1895 fi
1896 echo "$as_me:$LINENO: result: yes" >&5
1897 echo "${ECHO_T}yes" >&6
1898
1899 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1900 ac_clean_files=$ac_clean_files_save
1901 # Check the compiler produces executables we can run.  If not, either
1902 # the compiler is broken, or we cross compile.
1903 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1904 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1905 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1906 echo "${ECHO_T}$cross_compiling" >&6
1907
1908 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1909 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1911   (eval $ac_link) 2>&5
1912   ac_status=$?
1913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1914   (exit $ac_status); }; then
1915   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1916 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1917 # work properly (i.e., refer to `conftest.exe'), while it won't with
1918 # `rm'.
1919 for ac_file in conftest.exe conftest conftest.*; do
1920   test -f "$ac_file" || continue
1921   case $ac_file in
1922     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1923     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1924           export ac_cv_exeext
1925           break;;
1926     * ) break;;
1927   esac
1928 done
1929 else
1930   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1931 See \`config.log' for more details." >&5
1932 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1933 See \`config.log' for more details." >&2;}
1934    { (exit 1); exit 1; }; }
1935 fi
1936
1937 rm -f conftest$ac_cv_exeext
1938 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1939 echo "${ECHO_T}$ac_cv_exeext" >&6
1940
1941 rm -f conftest.$ac_ext
1942 EXEEXT=$ac_cv_exeext
1943 ac_exeext=$EXEEXT
1944 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1945 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1946 if test "${ac_cv_objext+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   cat >conftest.$ac_ext <<_ACEOF
1950 /* confdefs.h.  */
1951 _ACEOF
1952 cat confdefs.h >>conftest.$ac_ext
1953 cat >>conftest.$ac_ext <<_ACEOF
1954 /* end confdefs.h.  */
1955
1956 int
1957 main ()
1958 {
1959
1960   ;
1961   return 0;
1962 }
1963 _ACEOF
1964 rm -f conftest.o conftest.obj
1965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1966   (eval $ac_compile) 2>&5
1967   ac_status=$?
1968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1969   (exit $ac_status); }; then
1970   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1971   case $ac_file in
1972     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1973     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1974        break;;
1975   esac
1976 done
1977 else
1978   echo "$as_me: failed program was:" >&5
1979 sed 's/^/| /' conftest.$ac_ext >&5
1980
1981 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1982 See \`config.log' for more details." >&5
1983 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1984 See \`config.log' for more details." >&2;}
1985    { (exit 1); exit 1; }; }
1986 fi
1987
1988 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1989 fi
1990 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1991 echo "${ECHO_T}$ac_cv_objext" >&6
1992 OBJEXT=$ac_cv_objext
1993 ac_objext=$OBJEXT
1994 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
1995 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1996 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1997   echo $ECHO_N "(cached) $ECHO_C" >&6
1998 else
1999   cat >conftest.$ac_ext <<_ACEOF
2000 /* confdefs.h.  */
2001 _ACEOF
2002 cat confdefs.h >>conftest.$ac_ext
2003 cat >>conftest.$ac_ext <<_ACEOF
2004 /* end confdefs.h.  */
2005
2006 int
2007 main ()
2008 {
2009 #ifndef __GNUC__
2010        choke me
2011 #endif
2012
2013   ;
2014   return 0;
2015 }
2016 _ACEOF
2017 rm -f conftest.$ac_objext
2018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2019   (eval $ac_compile) 2>conftest.er1
2020   ac_status=$?
2021   grep -v '^ *+' conftest.er1 >conftest.err
2022   rm -f conftest.er1
2023   cat conftest.err >&5
2024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2025   (exit $ac_status); } &&
2026          { ac_try='test -z "$ac_cxx_werror_flag"
2027                          || test ! -s conftest.err'
2028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2029   (eval $ac_try) 2>&5
2030   ac_status=$?
2031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032   (exit $ac_status); }; } &&
2033          { ac_try='test -s conftest.$ac_objext'
2034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2035   (eval $ac_try) 2>&5
2036   ac_status=$?
2037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2038   (exit $ac_status); }; }; then
2039   ac_compiler_gnu=yes
2040 else
2041   echo "$as_me: failed program was:" >&5
2042 sed 's/^/| /' conftest.$ac_ext >&5
2043
2044 ac_compiler_gnu=no
2045 fi
2046 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2047 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2048
2049 fi
2050 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
2051 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2052 GXX=`test $ac_compiler_gnu = yes && echo yes`
2053 ac_test_CXXFLAGS=${CXXFLAGS+set}
2054 ac_save_CXXFLAGS=$CXXFLAGS
2055 CXXFLAGS="-g"
2056 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2057 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2058 if test "${ac_cv_prog_cxx_g+set}" = set; then
2059   echo $ECHO_N "(cached) $ECHO_C" >&6
2060 else
2061   cat >conftest.$ac_ext <<_ACEOF
2062 /* confdefs.h.  */
2063 _ACEOF
2064 cat confdefs.h >>conftest.$ac_ext
2065 cat >>conftest.$ac_ext <<_ACEOF
2066 /* end confdefs.h.  */
2067
2068 int
2069 main ()
2070 {
2071
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 rm -f conftest.$ac_objext
2077 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2078   (eval $ac_compile) 2>conftest.er1
2079   ac_status=$?
2080   grep -v '^ *+' conftest.er1 >conftest.err
2081   rm -f conftest.er1
2082   cat conftest.err >&5
2083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2084   (exit $ac_status); } &&
2085          { ac_try='test -z "$ac_cxx_werror_flag"
2086                          || test ! -s conftest.err'
2087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2088   (eval $ac_try) 2>&5
2089   ac_status=$?
2090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2091   (exit $ac_status); }; } &&
2092          { ac_try='test -s conftest.$ac_objext'
2093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2094   (eval $ac_try) 2>&5
2095   ac_status=$?
2096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2097   (exit $ac_status); }; }; then
2098   ac_cv_prog_cxx_g=yes
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 sed 's/^/| /' conftest.$ac_ext >&5
2102
2103 ac_cv_prog_cxx_g=no
2104 fi
2105 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2106 fi
2107 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2108 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2109 if test "$ac_test_CXXFLAGS" = set; then
2110   CXXFLAGS=$ac_save_CXXFLAGS
2111 elif test $ac_cv_prog_cxx_g = yes; then
2112   if test "$GXX" = yes; then
2113     CXXFLAGS="-g -O2"
2114   else
2115     CXXFLAGS="-g"
2116   fi
2117 else
2118   if test "$GXX" = yes; then
2119     CXXFLAGS="-O2"
2120   else
2121     CXXFLAGS=
2122   fi
2123 fi
2124 for ac_declaration in \
2125    '' \
2126    'extern "C" void std::exit (int) throw (); using std::exit;' \
2127    'extern "C" void std::exit (int); using std::exit;' \
2128    'extern "C" void exit (int) throw ();' \
2129    'extern "C" void exit (int);' \
2130    'void exit (int);'
2131 do
2132   cat >conftest.$ac_ext <<_ACEOF
2133 /* confdefs.h.  */
2134 _ACEOF
2135 cat confdefs.h >>conftest.$ac_ext
2136 cat >>conftest.$ac_ext <<_ACEOF
2137 /* end confdefs.h.  */
2138 $ac_declaration
2139 #include <stdlib.h>
2140 int
2141 main ()
2142 {
2143 exit (42);
2144   ;
2145   return 0;
2146 }
2147 _ACEOF
2148 rm -f conftest.$ac_objext
2149 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2150   (eval $ac_compile) 2>conftest.er1
2151   ac_status=$?
2152   grep -v '^ *+' conftest.er1 >conftest.err
2153   rm -f conftest.er1
2154   cat conftest.err >&5
2155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2156   (exit $ac_status); } &&
2157          { ac_try='test -z "$ac_cxx_werror_flag"
2158                          || test ! -s conftest.err'
2159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2160   (eval $ac_try) 2>&5
2161   ac_status=$?
2162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2163   (exit $ac_status); }; } &&
2164          { ac_try='test -s conftest.$ac_objext'
2165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2166   (eval $ac_try) 2>&5
2167   ac_status=$?
2168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169   (exit $ac_status); }; }; then
2170   :
2171 else
2172   echo "$as_me: failed program was:" >&5
2173 sed 's/^/| /' conftest.$ac_ext >&5
2174
2175 continue
2176 fi
2177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2178   cat >conftest.$ac_ext <<_ACEOF
2179 /* confdefs.h.  */
2180 _ACEOF
2181 cat confdefs.h >>conftest.$ac_ext
2182 cat >>conftest.$ac_ext <<_ACEOF
2183 /* end confdefs.h.  */
2184 $ac_declaration
2185 int
2186 main ()
2187 {
2188 exit (42);
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f conftest.$ac_objext
2194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>conftest.er1
2196   ac_status=$?
2197   grep -v '^ *+' conftest.er1 >conftest.err
2198   rm -f conftest.er1
2199   cat conftest.err >&5
2200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2201   (exit $ac_status); } &&
2202          { ac_try='test -z "$ac_cxx_werror_flag"
2203                          || test ! -s conftest.err'
2204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2208   (exit $ac_status); }; } &&
2209          { ac_try='test -s conftest.$ac_objext'
2210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2211   (eval $ac_try) 2>&5
2212   ac_status=$?
2213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2214   (exit $ac_status); }; }; then
2215   break
2216 else
2217   echo "$as_me: failed program was:" >&5
2218 sed 's/^/| /' conftest.$ac_ext >&5
2219
2220 fi
2221 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2222 done
2223 rm -f conftest*
2224 if test -n "$ac_declaration"; then
2225   echo '#ifdef __cplusplus' >>confdefs.h
2226   echo $ac_declaration      >>confdefs.h
2227   echo '#endif'             >>confdefs.h
2228 fi
2229
2230 ac_ext=c
2231 ac_cpp='$CPP $CPPFLAGS'
2232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235
2236 ac_ext=cc
2237 ac_cpp='$CXXCPP $CPPFLAGS'
2238 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2239 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2240 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2241 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
2242 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
2243 if test -z "$CXXCPP"; then
2244   if test "${ac_cv_prog_CXXCPP+set}" = set; then
2245   echo $ECHO_N "(cached) $ECHO_C" >&6
2246 else
2247       # Double quotes because CXXCPP needs to be expanded
2248     for CXXCPP in "$CXX -E" "/lib/cpp"
2249     do
2250       ac_preproc_ok=false
2251 for ac_cxx_preproc_warn_flag in '' yes
2252 do
2253   # Use a header file that comes with gcc, so configuring glibc
2254   # with a fresh cross-compiler works.
2255   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2256   # <limits.h> exists even on freestanding compilers.
2257   # On the NeXT, cc -E runs the code through the compiler's parser,
2258   # not just through cpp. "Syntax error" is here to catch this case.
2259   cat >conftest.$ac_ext <<_ACEOF
2260 /* confdefs.h.  */
2261 _ACEOF
2262 cat confdefs.h >>conftest.$ac_ext
2263 cat >>conftest.$ac_ext <<_ACEOF
2264 /* end confdefs.h.  */
2265 #ifdef __STDC__
2266 # include <limits.h>
2267 #else
2268 # include <assert.h>
2269 #endif
2270                      Syntax error
2271 _ACEOF
2272 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2273   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2274   ac_status=$?
2275   grep -v '^ *+' conftest.er1 >conftest.err
2276   rm -f conftest.er1
2277   cat conftest.err >&5
2278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279   (exit $ac_status); } >/dev/null; then
2280   if test -s conftest.err; then
2281     ac_cpp_err=$ac_cxx_preproc_warn_flag
2282     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2283   else
2284     ac_cpp_err=
2285   fi
2286 else
2287   ac_cpp_err=yes
2288 fi
2289 if test -z "$ac_cpp_err"; then
2290   :
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 sed 's/^/| /' conftest.$ac_ext >&5
2294
2295   # Broken: fails on valid input.
2296 continue
2297 fi
2298 rm -f conftest.err conftest.$ac_ext
2299
2300   # OK, works on sane cases.  Now check whether non-existent headers
2301   # can be detected and how.
2302   cat >conftest.$ac_ext <<_ACEOF
2303 /* confdefs.h.  */
2304 _ACEOF
2305 cat confdefs.h >>conftest.$ac_ext
2306 cat >>conftest.$ac_ext <<_ACEOF
2307 /* end confdefs.h.  */
2308 #include <ac_nonexistent.h>
2309 _ACEOF
2310 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2311   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2312   ac_status=$?
2313   grep -v '^ *+' conftest.er1 >conftest.err
2314   rm -f conftest.er1
2315   cat conftest.err >&5
2316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2317   (exit $ac_status); } >/dev/null; then
2318   if test -s conftest.err; then
2319     ac_cpp_err=$ac_cxx_preproc_warn_flag
2320     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2321   else
2322     ac_cpp_err=
2323   fi
2324 else
2325   ac_cpp_err=yes
2326 fi
2327 if test -z "$ac_cpp_err"; then
2328   # Broken: success on invalid input.
2329 continue
2330 else
2331   echo "$as_me: failed program was:" >&5
2332 sed 's/^/| /' conftest.$ac_ext >&5
2333
2334   # Passes both tests.
2335 ac_preproc_ok=:
2336 break
2337 fi
2338 rm -f conftest.err conftest.$ac_ext
2339
2340 done
2341 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2342 rm -f conftest.err conftest.$ac_ext
2343 if $ac_preproc_ok; then
2344   break
2345 fi
2346
2347     done
2348     ac_cv_prog_CXXCPP=$CXXCPP
2349
2350 fi
2351   CXXCPP=$ac_cv_prog_CXXCPP
2352 else
2353   ac_cv_prog_CXXCPP=$CXXCPP
2354 fi
2355 echo "$as_me:$LINENO: result: $CXXCPP" >&5
2356 echo "${ECHO_T}$CXXCPP" >&6
2357 ac_preproc_ok=false
2358 for ac_cxx_preproc_warn_flag in '' yes
2359 do
2360   # Use a header file that comes with gcc, so configuring glibc
2361   # with a fresh cross-compiler works.
2362   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2363   # <limits.h> exists even on freestanding compilers.
2364   # On the NeXT, cc -E runs the code through the compiler's parser,
2365   # not just through cpp. "Syntax error" is here to catch this case.
2366   cat >conftest.$ac_ext <<_ACEOF
2367 /* confdefs.h.  */
2368 _ACEOF
2369 cat confdefs.h >>conftest.$ac_ext
2370 cat >>conftest.$ac_ext <<_ACEOF
2371 /* end confdefs.h.  */
2372 #ifdef __STDC__
2373 # include <limits.h>
2374 #else
2375 # include <assert.h>
2376 #endif
2377                      Syntax error
2378 _ACEOF
2379 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2380   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2381   ac_status=$?
2382   grep -v '^ *+' conftest.er1 >conftest.err
2383   rm -f conftest.er1
2384   cat conftest.err >&5
2385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2386   (exit $ac_status); } >/dev/null; then
2387   if test -s conftest.err; then
2388     ac_cpp_err=$ac_cxx_preproc_warn_flag
2389     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2390   else
2391     ac_cpp_err=
2392   fi
2393 else
2394   ac_cpp_err=yes
2395 fi
2396 if test -z "$ac_cpp_err"; then
2397   :
2398 else
2399   echo "$as_me: failed program was:" >&5
2400 sed 's/^/| /' conftest.$ac_ext >&5
2401
2402   # Broken: fails on valid input.
2403 continue
2404 fi
2405 rm -f conftest.err conftest.$ac_ext
2406
2407   # OK, works on sane cases.  Now check whether non-existent headers
2408   # can be detected and how.
2409   cat >conftest.$ac_ext <<_ACEOF
2410 /* confdefs.h.  */
2411 _ACEOF
2412 cat confdefs.h >>conftest.$ac_ext
2413 cat >>conftest.$ac_ext <<_ACEOF
2414 /* end confdefs.h.  */
2415 #include <ac_nonexistent.h>
2416 _ACEOF
2417 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2418   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2419   ac_status=$?
2420   grep -v '^ *+' conftest.er1 >conftest.err
2421   rm -f conftest.er1
2422   cat conftest.err >&5
2423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424   (exit $ac_status); } >/dev/null; then
2425   if test -s conftest.err; then
2426     ac_cpp_err=$ac_cxx_preproc_warn_flag
2427     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2428   else
2429     ac_cpp_err=
2430   fi
2431 else
2432   ac_cpp_err=yes
2433 fi
2434 if test -z "$ac_cpp_err"; then
2435   # Broken: success on invalid input.
2436 continue
2437 else
2438   echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2440
2441   # Passes both tests.
2442 ac_preproc_ok=:
2443 break
2444 fi
2445 rm -f conftest.err conftest.$ac_ext
2446
2447 done
2448 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2449 rm -f conftest.err conftest.$ac_ext
2450 if $ac_preproc_ok; then
2451   :
2452 else
2453   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2454 See \`config.log' for more details." >&5
2455 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2456 See \`config.log' for more details." >&2;}
2457    { (exit 1); exit 1; }; }
2458 fi
2459
2460 ac_ext=c
2461 ac_cpp='$CPP $CPPFLAGS'
2462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2465
2466 ac_aux_dir=
2467 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2468   if test -f $ac_dir/install-sh; then
2469     ac_aux_dir=$ac_dir
2470     ac_install_sh="$ac_aux_dir/install-sh -c"
2471     break
2472   elif test -f $ac_dir/install.sh; then
2473     ac_aux_dir=$ac_dir
2474     ac_install_sh="$ac_aux_dir/install.sh -c"
2475     break
2476   elif test -f $ac_dir/shtool; then
2477     ac_aux_dir=$ac_dir
2478     ac_install_sh="$ac_aux_dir/shtool install -c"
2479     break
2480   fi
2481 done
2482 if test -z "$ac_aux_dir"; then
2483   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2484 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2485    { (exit 1); exit 1; }; }
2486 fi
2487 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2488 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2489 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2490
2491 # Find a good install program.  We prefer a C program (faster),
2492 # so one script is as good as another.  But avoid the broken or
2493 # incompatible versions:
2494 # SysV /etc/install, /usr/sbin/install
2495 # SunOS /usr/etc/install
2496 # IRIX /sbin/install
2497 # AIX /bin/install
2498 # AmigaOS /C/install, which installs bootblocks on floppy discs
2499 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2500 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2501 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2502 # OS/2's system install, which has a completely different semantic
2503 # ./install, which can be erroneously created by make from ./install.sh.
2504 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2505 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2506 if test -z "$INSTALL"; then
2507 if test "${ac_cv_path_install+set}" = set; then
2508   echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2511 for as_dir in $PATH
2512 do
2513   IFS=$as_save_IFS
2514   test -z "$as_dir" && as_dir=.
2515   # Account for people who put trailing slashes in PATH elements.
2516 case $as_dir/ in
2517   ./ | .// | /cC/* | \
2518   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2519   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2520   /usr/ucb/* ) ;;
2521   *)
2522     # OSF1 and SCO ODT 3.0 have their own names for install.
2523     # Don't use installbsd from OSF since it installs stuff as root
2524     # by default.
2525     for ac_prog in ginstall scoinst install; do
2526       for ac_exec_ext in '' $ac_executable_extensions; do
2527         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2528           if test $ac_prog = install &&
2529             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2530             # AIX install.  It has an incompatible calling convention.
2531             :
2532           elif test $ac_prog = install &&
2533             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2534             # program-specific install script used by HP pwplus--don't use.
2535             :
2536           else
2537             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2538             break 3
2539           fi
2540         fi
2541       done
2542     done
2543     ;;
2544 esac
2545 done
2546
2547
2548 fi
2549   if test "${ac_cv_path_install+set}" = set; then
2550     INSTALL=$ac_cv_path_install
2551   else
2552     # As a last resort, use the slow shell script.  We don't cache a
2553     # path for INSTALL within a source directory, because that will
2554     # break other packages using the cache if that directory is
2555     # removed, or if the path is relative.
2556     INSTALL=$ac_install_sh
2557   fi
2558 fi
2559 echo "$as_me:$LINENO: result: $INSTALL" >&5
2560 echo "${ECHO_T}$INSTALL" >&6
2561
2562 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2563 # It thinks the first close brace ends the variable substitution.
2564 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2565
2566 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2567
2568 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2569
2570 if test -n "$ac_tool_prefix"; then
2571   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2572 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2573 echo "$as_me:$LINENO: checking for $ac_word" >&5
2574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2575 if test "${ac_cv_prog_RANLIB+set}" = set; then
2576   echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578   if test -n "$RANLIB"; then
2579   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2580 else
2581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582 for as_dir in $PATH
2583 do
2584   IFS=$as_save_IFS
2585   test -z "$as_dir" && as_dir=.
2586   for ac_exec_ext in '' $ac_executable_extensions; do
2587   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2588     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2589     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2590     break 2
2591   fi
2592 done
2593 done
2594
2595 fi
2596 fi
2597 RANLIB=$ac_cv_prog_RANLIB
2598 if test -n "$RANLIB"; then
2599   echo "$as_me:$LINENO: result: $RANLIB" >&5
2600 echo "${ECHO_T}$RANLIB" >&6
2601 else
2602   echo "$as_me:$LINENO: result: no" >&5
2603 echo "${ECHO_T}no" >&6
2604 fi
2605
2606 fi
2607 if test -z "$ac_cv_prog_RANLIB"; then
2608   ac_ct_RANLIB=$RANLIB
2609   # Extract the first word of "ranlib", so it can be a program name with args.
2610 set dummy ranlib; ac_word=$2
2611 echo "$as_me:$LINENO: checking for $ac_word" >&5
2612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2613 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2614   echo $ECHO_N "(cached) $ECHO_C" >&6
2615 else
2616   if test -n "$ac_ct_RANLIB"; then
2617   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2618 else
2619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2620 for as_dir in $PATH
2621 do
2622   IFS=$as_save_IFS
2623   test -z "$as_dir" && as_dir=.
2624   for ac_exec_ext in '' $ac_executable_extensions; do
2625   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2626     ac_cv_prog_ac_ct_RANLIB="ranlib"
2627     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2628     break 2
2629   fi
2630 done
2631 done
2632
2633   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2634 fi
2635 fi
2636 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2637 if test -n "$ac_ct_RANLIB"; then
2638   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2639 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2640 else
2641   echo "$as_me:$LINENO: result: no" >&5
2642 echo "${ECHO_T}no" >&6
2643 fi
2644
2645   RANLIB=$ac_ct_RANLIB
2646 else
2647   RANLIB="$ac_cv_prog_RANLIB"
2648 fi
2649
2650
2651 # Extract the first word of "strip", so it can be a program name with args.
2652 set dummy strip; ac_word=$2
2653 echo "$as_me:$LINENO: checking for $ac_word" >&5
2654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2655 if test "${ac_cv_prog_STRIP+set}" = set; then
2656   echo $ECHO_N "(cached) $ECHO_C" >&6
2657 else
2658   if test -n "$STRIP"; then
2659   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2660 else
2661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2662 for as_dir in $PATH
2663 do
2664   IFS=$as_save_IFS
2665   test -z "$as_dir" && as_dir=.
2666   for ac_exec_ext in '' $ac_executable_extensions; do
2667   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2668     ac_cv_prog_STRIP="strip"
2669     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2670     break 2
2671   fi
2672 done
2673 done
2674
2675   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2676 fi
2677 fi
2678 STRIP=$ac_cv_prog_STRIP
2679 if test -n "$STRIP"; then
2680   echo "$as_me:$LINENO: result: $STRIP" >&5
2681 echo "${ECHO_T}$STRIP" >&6
2682 else
2683   echo "$as_me:$LINENO: result: no" >&5
2684 echo "${ECHO_T}no" >&6
2685 fi
2686
2687
2688
2689 # Check whether --enable-shared or --disable-shared was given.
2690 if test "${enable_shared+set}" = set; then
2691   enableval="$enable_shared"
2692   p=${PACKAGE-default}
2693 case $enableval in
2694 yes) enable_shared=yes ;;
2695 no) enable_shared=no ;;
2696 *)
2697   enable_shared=no
2698   # Look at the argument we got.  We use all the common list separators.
2699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2700   for pkg in $enableval; do
2701     if test "X$pkg" = "X$p"; then
2702       enable_shared=yes
2703     fi
2704   done
2705   IFS="$ac_save_ifs"
2706   ;;
2707 esac
2708 else
2709   enable_shared=yes
2710 fi;
2711 # Check whether --enable-static or --disable-static was given.
2712 if test "${enable_static+set}" = set; then
2713   enableval="$enable_static"
2714   p=${PACKAGE-default}
2715 case $enableval in
2716 yes) enable_static=yes ;;
2717 no) enable_static=no ;;
2718 *)
2719   enable_static=no
2720   # Look at the argument we got.  We use all the common list separators.
2721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2722   for pkg in $enableval; do
2723     if test "X$pkg" = "X$p"; then
2724       enable_static=yes
2725     fi
2726   done
2727   IFS="$ac_save_ifs"
2728   ;;
2729 esac
2730 else
2731   enable_static=yes
2732 fi;
2733 # Check whether --enable-fast-install or --disable-fast-install was given.
2734 if test "${enable_fast_install+set}" = set; then
2735   enableval="$enable_fast_install"
2736   p=${PACKAGE-default}
2737 case $enableval in
2738 yes) enable_fast_install=yes ;;
2739 no) enable_fast_install=no ;;
2740 *)
2741   enable_fast_install=no
2742   # Look at the argument we got.  We use all the common list separators.
2743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2744   for pkg in $enableval; do
2745     if test "X$pkg" = "X$p"; then
2746       enable_fast_install=yes
2747     fi
2748   done
2749   IFS="$ac_save_ifs"
2750   ;;
2751 esac
2752 else
2753   enable_fast_install=yes
2754 fi;
2755 # Make sure we can run config.sub.
2756 $ac_config_sub sun4 >/dev/null 2>&1 ||
2757   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2758 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2759    { (exit 1); exit 1; }; }
2760
2761 echo "$as_me:$LINENO: checking build system type" >&5
2762 echo $ECHO_N "checking build system type... $ECHO_C" >&6
2763 if test "${ac_cv_build+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   ac_cv_build_alias=$build_alias
2767 test -z "$ac_cv_build_alias" &&
2768   ac_cv_build_alias=`$ac_config_guess`
2769 test -z "$ac_cv_build_alias" &&
2770   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2771 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2772    { (exit 1); exit 1; }; }
2773 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2774   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2775 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2776    { (exit 1); exit 1; }; }
2777
2778 fi
2779 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2780 echo "${ECHO_T}$ac_cv_build" >&6
2781 build=$ac_cv_build
2782 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2783 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2784 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2785
2786
2787 echo "$as_me:$LINENO: checking host system type" >&5
2788 echo $ECHO_N "checking host system type... $ECHO_C" >&6
2789 if test "${ac_cv_host+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   ac_cv_host_alias=$host_alias
2793 test -z "$ac_cv_host_alias" &&
2794   ac_cv_host_alias=$ac_cv_build_alias
2795 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2796   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2797 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2798    { (exit 1); exit 1; }; }
2799
2800 fi
2801 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2802 echo "${ECHO_T}$ac_cv_host" >&6
2803 host=$ac_cv_host
2804 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2805 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2806 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2807
2808
2809 ac_ext=c
2810 ac_cpp='$CPP $CPPFLAGS'
2811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2814 if test -n "$ac_tool_prefix"; then
2815   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2816 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2817 echo "$as_me:$LINENO: checking for $ac_word" >&5
2818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2819 if test "${ac_cv_prog_CC+set}" = set; then
2820   echo $ECHO_N "(cached) $ECHO_C" >&6
2821 else
2822   if test -n "$CC"; then
2823   ac_cv_prog_CC="$CC" # Let the user override the test.
2824 else
2825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2826 for as_dir in $PATH
2827 do
2828   IFS=$as_save_IFS
2829   test -z "$as_dir" && as_dir=.
2830   for ac_exec_ext in '' $ac_executable_extensions; do
2831   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2832     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2833     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2834     break 2
2835   fi
2836 done
2837 done
2838
2839 fi
2840 fi
2841 CC=$ac_cv_prog_CC
2842 if test -n "$CC"; then
2843   echo "$as_me:$LINENO: result: $CC" >&5
2844 echo "${ECHO_T}$CC" >&6
2845 else
2846   echo "$as_me:$LINENO: result: no" >&5
2847 echo "${ECHO_T}no" >&6
2848 fi
2849
2850 fi
2851 if test -z "$ac_cv_prog_CC"; then
2852   ac_ct_CC=$CC
2853   # Extract the first word of "gcc", so it can be a program name with args.
2854 set dummy gcc; ac_word=$2
2855 echo "$as_me:$LINENO: checking for $ac_word" >&5
2856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2857 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2858   echo $ECHO_N "(cached) $ECHO_C" >&6
2859 else
2860   if test -n "$ac_ct_CC"; then
2861   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2862 else
2863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864 for as_dir in $PATH
2865 do
2866   IFS=$as_save_IFS
2867   test -z "$as_dir" && as_dir=.
2868   for ac_exec_ext in '' $ac_executable_extensions; do
2869   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2870     ac_cv_prog_ac_ct_CC="gcc"
2871     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2872     break 2
2873   fi
2874 done
2875 done
2876
2877 fi
2878 fi
2879 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2880 if test -n "$ac_ct_CC"; then
2881   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2882 echo "${ECHO_T}$ac_ct_CC" >&6
2883 else
2884   echo "$as_me:$LINENO: result: no" >&5
2885 echo "${ECHO_T}no" >&6
2886 fi
2887
2888   CC=$ac_ct_CC
2889 else
2890   CC="$ac_cv_prog_CC"
2891 fi
2892
2893 if test -z "$CC"; then
2894   if test -n "$ac_tool_prefix"; then
2895   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2896 set dummy ${ac_tool_prefix}cc; ac_word=$2
2897 echo "$as_me:$LINENO: checking for $ac_word" >&5
2898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2899 if test "${ac_cv_prog_CC+set}" = set; then
2900   echo $ECHO_N "(cached) $ECHO_C" >&6
2901 else
2902   if test -n "$CC"; then
2903   ac_cv_prog_CC="$CC" # Let the user override the test.
2904 else
2905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2906 for as_dir in $PATH
2907 do
2908   IFS=$as_save_IFS
2909   test -z "$as_dir" && as_dir=.
2910   for ac_exec_ext in '' $ac_executable_extensions; do
2911   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2912     ac_cv_prog_CC="${ac_tool_prefix}cc"
2913     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2914     break 2
2915   fi
2916 done
2917 done
2918
2919 fi
2920 fi
2921 CC=$ac_cv_prog_CC
2922 if test -n "$CC"; then
2923   echo "$as_me:$LINENO: result: $CC" >&5
2924 echo "${ECHO_T}$CC" >&6
2925 else
2926   echo "$as_me:$LINENO: result: no" >&5
2927 echo "${ECHO_T}no" >&6
2928 fi
2929
2930 fi
2931 if test -z "$ac_cv_prog_CC"; then
2932   ac_ct_CC=$CC
2933   # Extract the first word of "cc", so it can be a program name with args.
2934 set dummy cc; ac_word=$2
2935 echo "$as_me:$LINENO: checking for $ac_word" >&5
2936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2937 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2938   echo $ECHO_N "(cached) $ECHO_C" >&6
2939 else
2940   if test -n "$ac_ct_CC"; then
2941   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2942 else
2943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2944 for as_dir in $PATH
2945 do
2946   IFS=$as_save_IFS
2947   test -z "$as_dir" && as_dir=.
2948   for ac_exec_ext in '' $ac_executable_extensions; do
2949   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2950     ac_cv_prog_ac_ct_CC="cc"
2951     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2952     break 2
2953   fi
2954 done
2955 done
2956
2957 fi
2958 fi
2959 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2960 if test -n "$ac_ct_CC"; then
2961   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2962 echo "${ECHO_T}$ac_ct_CC" >&6
2963 else
2964   echo "$as_me:$LINENO: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968   CC=$ac_ct_CC
2969 else
2970   CC="$ac_cv_prog_CC"
2971 fi
2972
2973 fi
2974 if test -z "$CC"; then
2975   # Extract the first word of "cc", so it can be a program name with args.
2976 set dummy cc; ac_word=$2
2977 echo "$as_me:$LINENO: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_prog_CC+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if test -n "$CC"; then
2983   ac_cv_prog_CC="$CC" # Let the user override the test.
2984 else
2985   ac_prog_rejected=no
2986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2987 for as_dir in $PATH
2988 do
2989   IFS=$as_save_IFS
2990   test -z "$as_dir" && as_dir=.
2991   for ac_exec_ext in '' $ac_executable_extensions; do
2992   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2993     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2994        ac_prog_rejected=yes
2995        continue
2996      fi
2997     ac_cv_prog_CC="cc"
2998     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2999     break 2
3000   fi
3001 done
3002 done
3003
3004 if test $ac_prog_rejected = yes; then
3005   # We found a bogon in the path, so make sure we never use it.
3006   set dummy $ac_cv_prog_CC
3007   shift
3008   if test $# != 0; then
3009     # We chose a different compiler from the bogus one.
3010     # However, it has the same basename, so the bogon will be chosen
3011     # first if we set CC to just the basename; use the full file name.
3012     shift
3013     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3014   fi
3015 fi
3016 fi
3017 fi
3018 CC=$ac_cv_prog_CC
3019 if test -n "$CC"; then
3020   echo "$as_me:$LINENO: result: $CC" >&5
3021 echo "${ECHO_T}$CC" >&6
3022 else
3023   echo "$as_me:$LINENO: result: no" >&5
3024 echo "${ECHO_T}no" >&6
3025 fi
3026
3027 fi
3028 if test -z "$CC"; then
3029   if test -n "$ac_tool_prefix"; then
3030   for ac_prog in cl
3031   do
3032     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3033 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3034 echo "$as_me:$LINENO: checking for $ac_word" >&5
3035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3036 if test "${ac_cv_prog_CC+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   if test -n "$CC"; then
3040   ac_cv_prog_CC="$CC" # Let the user override the test.
3041 else
3042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3043 for as_dir in $PATH
3044 do
3045   IFS=$as_save_IFS
3046   test -z "$as_dir" && as_dir=.
3047   for ac_exec_ext in '' $ac_executable_extensions; do
3048   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3049     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3051     break 2
3052   fi
3053 done
3054 done
3055
3056 fi
3057 fi
3058 CC=$ac_cv_prog_CC
3059 if test -n "$CC"; then
3060   echo "$as_me:$LINENO: result: $CC" >&5
3061 echo "${ECHO_T}$CC" >&6
3062 else
3063   echo "$as_me:$LINENO: result: no" >&5
3064 echo "${ECHO_T}no" >&6
3065 fi
3066
3067     test -n "$CC" && break
3068   done
3069 fi
3070 if test -z "$CC"; then
3071   ac_ct_CC=$CC
3072   for ac_prog in cl
3073 do
3074   # Extract the first word of "$ac_prog", so it can be a program name with args.
3075 set dummy $ac_prog; ac_word=$2
3076 echo "$as_me:$LINENO: checking for $ac_word" >&5
3077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3078 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081   if test -n "$ac_ct_CC"; then
3082   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083 else
3084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085 for as_dir in $PATH
3086 do
3087   IFS=$as_save_IFS
3088   test -z "$as_dir" && as_dir=.
3089   for ac_exec_ext in '' $ac_executable_extensions; do
3090   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3091     ac_cv_prog_ac_ct_CC="$ac_prog"
3092     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3093     break 2
3094   fi
3095 done
3096 done
3097
3098 fi
3099 fi
3100 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3101 if test -n "$ac_ct_CC"; then
3102   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3103 echo "${ECHO_T}$ac_ct_CC" >&6
3104 else
3105   echo "$as_me:$LINENO: result: no" >&5
3106 echo "${ECHO_T}no" >&6
3107 fi
3108
3109   test -n "$ac_ct_CC" && break
3110 done
3111
3112   CC=$ac_ct_CC
3113 fi
3114
3115 fi
3116
3117
3118 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3119 See \`config.log' for more details." >&5
3120 echo "$as_me: error: no acceptable C compiler found in \$PATH
3121 See \`config.log' for more details." >&2;}
3122    { (exit 1); exit 1; }; }
3123
3124 # Provide some information about the compiler.
3125 echo "$as_me:$LINENO:" \
3126      "checking for C compiler version" >&5
3127 ac_compiler=`set X $ac_compile; echo $2`
3128 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3129   (eval $ac_compiler --version </dev/null >&5) 2>&5
3130   ac_status=$?
3131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3132   (exit $ac_status); }
3133 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3134   (eval $ac_compiler -v </dev/null >&5) 2>&5
3135   ac_status=$?
3136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3137   (exit $ac_status); }
3138 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3139   (eval $ac_compiler -V </dev/null >&5) 2>&5
3140   ac_status=$?
3141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3142   (exit $ac_status); }
3143
3144 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3145 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3146 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3147   echo $ECHO_N "(cached) $ECHO_C" >&6
3148 else
3149   cat >conftest.$ac_ext <<_ACEOF
3150 /* confdefs.h.  */
3151 _ACEOF
3152 cat confdefs.h >>conftest.$ac_ext
3153 cat >>conftest.$ac_ext <<_ACEOF
3154 /* end confdefs.h.  */
3155
3156 int
3157 main ()
3158 {
3159 #ifndef __GNUC__
3160        choke me
3161 #endif
3162
3163   ;
3164   return 0;
3165 }
3166 _ACEOF
3167 rm -f conftest.$ac_objext
3168 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3169   (eval $ac_compile) 2>conftest.er1
3170   ac_status=$?
3171   grep -v '^ *+' conftest.er1 >conftest.err
3172   rm -f conftest.er1
3173   cat conftest.err >&5
3174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3175   (exit $ac_status); } &&
3176          { ac_try='test -z "$ac_c_werror_flag"
3177                          || test ! -s conftest.err'
3178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3179   (eval $ac_try) 2>&5
3180   ac_status=$?
3181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3182   (exit $ac_status); }; } &&
3183          { ac_try='test -s conftest.$ac_objext'
3184   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3185   (eval $ac_try) 2>&5
3186   ac_status=$?
3187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3188   (exit $ac_status); }; }; then
3189   ac_compiler_gnu=yes
3190 else
3191   echo "$as_me: failed program was:" >&5
3192 sed 's/^/| /' conftest.$ac_ext >&5
3193
3194 ac_compiler_gnu=no
3195 fi
3196 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3197 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3198
3199 fi
3200 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3201 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3202 GCC=`test $ac_compiler_gnu = yes && echo yes`
3203 ac_test_CFLAGS=${CFLAGS+set}
3204 ac_save_CFLAGS=$CFLAGS
3205 CFLAGS="-g"
3206 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3207 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3208 if test "${ac_cv_prog_cc_g+set}" = set; then
3209   echo $ECHO_N "(cached) $ECHO_C" >&6
3210 else
3211   cat >conftest.$ac_ext <<_ACEOF
3212 /* confdefs.h.  */
3213 _ACEOF
3214 cat confdefs.h >>conftest.$ac_ext
3215 cat >>conftest.$ac_ext <<_ACEOF
3216 /* end confdefs.h.  */
3217
3218 int
3219 main ()
3220 {
3221
3222   ;
3223   return 0;
3224 }
3225 _ACEOF
3226 rm -f conftest.$ac_objext
3227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3228   (eval $ac_compile) 2>conftest.er1
3229   ac_status=$?
3230   grep -v '^ *+' conftest.er1 >conftest.err
3231   rm -f conftest.er1
3232   cat conftest.err >&5
3233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234   (exit $ac_status); } &&
3235          { ac_try='test -z "$ac_c_werror_flag"
3236                          || test ! -s conftest.err'
3237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3238   (eval $ac_try) 2>&5
3239   ac_status=$?
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); }; } &&
3242          { ac_try='test -s conftest.$ac_objext'
3243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3244   (eval $ac_try) 2>&5
3245   ac_status=$?
3246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247   (exit $ac_status); }; }; then
3248   ac_cv_prog_cc_g=yes
3249 else
3250   echo "$as_me: failed program was:" >&5
3251 sed 's/^/| /' conftest.$ac_ext >&5
3252
3253 ac_cv_prog_cc_g=no
3254 fi
3255 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3256 fi
3257 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3258 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
3259 if test "$ac_test_CFLAGS" = set; then
3260   CFLAGS=$ac_save_CFLAGS
3261 elif test $ac_cv_prog_cc_g = yes; then
3262   if test "$GCC" = yes; then
3263     CFLAGS="-g -O2"
3264   else
3265     CFLAGS="-g"
3266   fi
3267 else
3268   if test "$GCC" = yes; then
3269     CFLAGS="-O2"
3270   else
3271     CFLAGS=
3272   fi
3273 fi
3274 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3275 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3276 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   ac_cv_prog_cc_stdc=no
3280 ac_save_CC=$CC
3281 cat >conftest.$ac_ext <<_ACEOF
3282 /* confdefs.h.  */
3283 _ACEOF
3284 cat confdefs.h >>conftest.$ac_ext
3285 cat >>conftest.$ac_ext <<_ACEOF
3286 /* end confdefs.h.  */
3287 #include <stdarg.h>
3288 #include <stdio.h>
3289 #include <sys/types.h>
3290 #include <sys/stat.h>
3291 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3292 struct buf { int x; };
3293 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3294 static char *e (p, i)
3295      char **p;
3296      int i;
3297 {
3298   return p[i];
3299 }
3300 static char *f (char * (*g) (char **, int), char **p, ...)
3301 {
3302   char *s;
3303   va_list v;
3304   va_start (v,p);
3305   s = g (p, va_arg (v,int));
3306   va_end (v);
3307   return s;
3308 }
3309
3310 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3311    function prototypes and stuff, but not '\xHH' hex character constants.
3312    These don't provoke an error unfortunately, instead are silently treated
3313    as 'x'.  The following induces an error, until -std1 is added to get
3314    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3315    array size at least.  It's necessary to write '\x00'==0 to get something
3316    that's true only with -std1.  */
3317 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3318
3319 int test (int i, double x);
3320 struct s1 {int (*f) (int a);};
3321 struct s2 {int (*f) (double a);};
3322 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3323 int argc;
3324 char **argv;
3325 int
3326 main ()
3327 {
3328 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 # Don't try gcc -ansi; that turns off useful extensions and
3334 # breaks some systems' header files.
3335 # AIX                   -qlanglvl=ansi
3336 # Ultrix and OSF/1      -std1
3337 # HP-UX 10.20 and later -Ae
3338 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3339 # SVR4                  -Xc -D__EXTENSIONS__
3340 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3341 do
3342   CC="$ac_save_CC $ac_arg"
3343   rm -f conftest.$ac_objext
3344 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3345   (eval $ac_compile) 2>conftest.er1
3346   ac_status=$?
3347   grep -v '^ *+' conftest.er1 >conftest.err
3348   rm -f conftest.er1
3349   cat conftest.err >&5
3350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3351   (exit $ac_status); } &&
3352          { ac_try='test -z "$ac_c_werror_flag"
3353                          || test ! -s conftest.err'
3354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3355   (eval $ac_try) 2>&5
3356   ac_status=$?
3357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3358   (exit $ac_status); }; } &&
3359          { ac_try='test -s conftest.$ac_objext'
3360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3361   (eval $ac_try) 2>&5
3362   ac_status=$?
3363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3364   (exit $ac_status); }; }; then
3365   ac_cv_prog_cc_stdc=$ac_arg
3366 break
3367 else
3368   echo "$as_me: failed program was:" >&5
3369 sed 's/^/| /' conftest.$ac_ext >&5
3370
3371 fi
3372 rm -f conftest.err conftest.$ac_objext
3373 done
3374 rm -f conftest.$ac_ext conftest.$ac_objext
3375 CC=$ac_save_CC
3376
3377 fi
3378
3379 case "x$ac_cv_prog_cc_stdc" in
3380   x|xno)
3381     echo "$as_me:$LINENO: result: none needed" >&5
3382 echo "${ECHO_T}none needed" >&6 ;;
3383   *)
3384     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3385 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3386     CC="$CC $ac_cv_prog_cc_stdc" ;;
3387 esac
3388
3389 # Some people use a C++ compiler to compile C.  Since we use `exit',
3390 # in C++ we need to declare it.  In case someone uses the same compiler
3391 # for both compiling C and C++ we need to have the C++ compiler decide
3392 # the declaration of exit, since it's the most demanding environment.
3393 cat >conftest.$ac_ext <<_ACEOF
3394 #ifndef __cplusplus
3395   choke me
3396 #endif
3397 _ACEOF
3398 rm -f conftest.$ac_objext
3399 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3400   (eval $ac_compile) 2>conftest.er1
3401   ac_status=$?
3402   grep -v '^ *+' conftest.er1 >conftest.err
3403   rm -f conftest.er1
3404   cat conftest.err >&5
3405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3406   (exit $ac_status); } &&
3407          { ac_try='test -z "$ac_c_werror_flag"
3408                          || test ! -s conftest.err'
3409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3410   (eval $ac_try) 2>&5
3411   ac_status=$?
3412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3413   (exit $ac_status); }; } &&
3414          { ac_try='test -s conftest.$ac_objext'
3415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3416   (eval $ac_try) 2>&5
3417   ac_status=$?
3418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3419   (exit $ac_status); }; }; then
3420   for ac_declaration in \
3421    '' \
3422    'extern "C" void std::exit (int) throw (); using std::exit;' \
3423    'extern "C" void std::exit (int); using std::exit;' \
3424    'extern "C" void exit (int) throw ();' \
3425    'extern "C" void exit (int);' \
3426    'void exit (int);'
3427 do
3428   cat >conftest.$ac_ext <<_ACEOF
3429 /* confdefs.h.  */
3430 _ACEOF
3431 cat confdefs.h >>conftest.$ac_ext
3432 cat >>conftest.$ac_ext <<_ACEOF
3433 /* end confdefs.h.  */
3434 $ac_declaration
3435 #include <stdlib.h>
3436 int
3437 main ()
3438 {
3439 exit (42);
3440   ;
3441   return 0;
3442 }
3443 _ACEOF
3444 rm -f conftest.$ac_objext
3445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3446   (eval $ac_compile) 2>conftest.er1
3447   ac_status=$?
3448   grep -v '^ *+' conftest.er1 >conftest.err
3449   rm -f conftest.er1
3450   cat conftest.err >&5
3451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452   (exit $ac_status); } &&
3453          { ac_try='test -z "$ac_c_werror_flag"
3454                          || test ! -s conftest.err'
3455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3456   (eval $ac_try) 2>&5
3457   ac_status=$?
3458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459   (exit $ac_status); }; } &&
3460          { ac_try='test -s conftest.$ac_objext'
3461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3462   (eval $ac_try) 2>&5
3463   ac_status=$?
3464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465   (exit $ac_status); }; }; then
3466   :
3467 else
3468   echo "$as_me: failed program was:" >&5
3469 sed 's/^/| /' conftest.$ac_ext >&5
3470
3471 continue
3472 fi
3473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3474   cat >conftest.$ac_ext <<_ACEOF
3475 /* confdefs.h.  */
3476 _ACEOF
3477 cat confdefs.h >>conftest.$ac_ext
3478 cat >>conftest.$ac_ext <<_ACEOF
3479 /* end confdefs.h.  */
3480 $ac_declaration
3481 int
3482 main ()
3483 {
3484 exit (42);
3485   ;
3486   return 0;
3487 }
3488 _ACEOF
3489 rm -f conftest.$ac_objext
3490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3491   (eval $ac_compile) 2>conftest.er1
3492   ac_status=$?
3493   grep -v '^ *+' conftest.er1 >conftest.err
3494   rm -f conftest.er1
3495   cat conftest.err >&5
3496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3497   (exit $ac_status); } &&
3498          { ac_try='test -z "$ac_c_werror_flag"
3499                          || test ! -s conftest.err'
3500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3501   (eval $ac_try) 2>&5
3502   ac_status=$?
3503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3504   (exit $ac_status); }; } &&
3505          { ac_try='test -s conftest.$ac_objext'
3506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3507   (eval $ac_try) 2>&5
3508   ac_status=$?
3509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3510   (exit $ac_status); }; }; then
3511   break
3512 else
3513   echo "$as_me: failed program was:" >&5
3514 sed 's/^/| /' conftest.$ac_ext >&5
3515
3516 fi
3517 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3518 done
3519 rm -f conftest*
3520 if test -n "$ac_declaration"; then
3521   echo '#ifdef __cplusplus' >>confdefs.h
3522   echo $ac_declaration      >>confdefs.h
3523   echo '#endif'             >>confdefs.h
3524 fi
3525
3526 else
3527   echo "$as_me: failed program was:" >&5
3528 sed 's/^/| /' conftest.$ac_ext >&5
3529
3530 fi
3531 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3532 ac_ext=c
3533 ac_cpp='$CPP $CPPFLAGS'
3534 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3535 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537
3538 # Find the correct PATH separator.  Usually this is `:', but
3539 # DJGPP uses `;' like DOS.
3540 if test "X${PATH_SEPARATOR+set}" != Xset; then
3541   UNAME=${UNAME-`uname 2>/dev/null`}
3542   case X$UNAME in
3543     *-DOS) lt_cv_sys_path_separator=';' ;;
3544     *)     lt_cv_sys_path_separator=':' ;;
3545   esac
3546   PATH_SEPARATOR=$lt_cv_sys_path_separator
3547 fi
3548
3549
3550 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3551 if test "${with_gnu_ld+set}" = set; then
3552   withval="$with_gnu_ld"
3553   test "$withval" = no || with_gnu_ld=yes
3554 else
3555   with_gnu_ld=no
3556 fi;
3557 ac_prog=ld
3558 if test "$GCC" = yes; then
3559   # Check if gcc -print-prog-name=ld gives a path.
3560   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3561 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3562   case $host in
3563   *-*-mingw*)
3564     # gcc leaves a trailing carriage return which upsets mingw
3565     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3566   *)
3567     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3568   esac
3569   case $ac_prog in
3570     # Accept absolute paths.
3571     [\\/]* | [A-Za-z]:[\\/]*)
3572       re_direlt='/[^/][^/]*/\.\./'
3573       # Canonicalize the path of ld
3574       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3575       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3576         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3577       done
3578       test -z "$LD" && LD="$ac_prog"
3579       ;;
3580   "")
3581     # If it fails, then pretend we aren't using GCC.
3582     ac_prog=ld
3583     ;;
3584   *)
3585     # If it is relative, then search for the first ld in PATH.
3586     with_gnu_ld=unknown
3587     ;;
3588   esac
3589 elif test "$with_gnu_ld" = yes; then
3590   echo "$as_me:$LINENO: checking for GNU ld" >&5
3591 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3592 else
3593   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3594 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3595 fi
3596 if test "${lt_cv_path_LD+set}" = set; then
3597   echo $ECHO_N "(cached) $ECHO_C" >&6
3598 else
3599   if test -z "$LD"; then
3600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3601   for ac_dir in $PATH; do
3602     test -z "$ac_dir" && ac_dir=.
3603     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3604       lt_cv_path_LD="$ac_dir/$ac_prog"
3605       # Check to see if the program is GNU ld.  I'd rather use --version,
3606       # but apparently some GNU ld's only accept -v.
3607       # Break only if it was the GNU/non-GNU ld that we prefer.
3608       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3609         test "$with_gnu_ld" != no && break
3610       else
3611         test "$with_gnu_ld" != yes && break
3612       fi
3613     fi
3614   done
3615   IFS="$ac_save_ifs"
3616 else
3617   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3618 fi
3619 fi
3620
3621 LD="$lt_cv_path_LD"
3622 if test -n "$LD"; then
3623   echo "$as_me:$LINENO: result: $LD" >&5
3624 echo "${ECHO_T}$LD" >&6
3625 else
3626   echo "$as_me:$LINENO: result: no" >&5
3627 echo "${ECHO_T}no" >&6
3628 fi
3629 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3630 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3631    { (exit 1); exit 1; }; }
3632 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3633 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3634 if test "${lt_cv_prog_gnu_ld+set}" = set; then
3635   echo $ECHO_N "(cached) $ECHO_C" >&6
3636 else
3637   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3638 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3639   lt_cv_prog_gnu_ld=yes
3640 else
3641   lt_cv_prog_gnu_ld=no
3642 fi
3643 fi
3644 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3645 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
3646 with_gnu_ld=$lt_cv_prog_gnu_ld
3647
3648
3649 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3650 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3651 if test "${lt_cv_ld_reload_flag+set}" = set; then
3652   echo $ECHO_N "(cached) $ECHO_C" >&6
3653 else
3654   lt_cv_ld_reload_flag='-r'
3655 fi
3656 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3657 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
3658 reload_flag=$lt_cv_ld_reload_flag
3659 test -n "$reload_flag" && reload_flag=" $reload_flag"
3660
3661 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3662 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3663 if test "${lt_cv_path_NM+set}" = set; then
3664   echo $ECHO_N "(cached) $ECHO_C" >&6
3665 else
3666   if test -n "$NM"; then
3667   # Let the user override the test.
3668   lt_cv_path_NM="$NM"
3669 else
3670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3671   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3672     test -z "$ac_dir" && ac_dir=.
3673     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3674     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3675       # Check to see if the nm accepts a BSD-compat flag.
3676       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3677       #   nm: unknown option "B" ignored
3678       # Tru64's nm complains that /dev/null is an invalid object file
3679       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3680         lt_cv_path_NM="$tmp_nm -B"
3681         break
3682       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3683         lt_cv_path_NM="$tmp_nm -p"
3684         break
3685       else
3686         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3687         continue # so that we can try to find one that supports BSD flags
3688       fi
3689     fi
3690   done
3691   IFS="$ac_save_ifs"
3692   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3693 fi
3694 fi
3695
3696 NM="$lt_cv_path_NM"
3697 echo "$as_me:$LINENO: result: $NM" >&5
3698 echo "${ECHO_T}$NM" >&6
3699
3700 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3701 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3702 LN_S=$as_ln_s
3703 if test "$LN_S" = "ln -s"; then
3704   echo "$as_me:$LINENO: result: yes" >&5
3705 echo "${ECHO_T}yes" >&6
3706 else
3707   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3708 echo "${ECHO_T}no, using $LN_S" >&6
3709 fi
3710
3711 echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3712 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3713 if test "${lt_cv_deplibs_check_method+set}" = set; then
3714   echo $ECHO_N "(cached) $ECHO_C" >&6
3715 else
3716   lt_cv_file_magic_cmd='$MAGIC_CMD'
3717 lt_cv_file_magic_test_file=
3718 lt_cv_deplibs_check_method='unknown'
3719 # Need to set the preceding variable on all platforms that support
3720 # interlibrary dependencies.
3721 # 'none' -- dependencies not supported.
3722 # `unknown' -- same as none, but documents that we really don't know.
3723 # 'pass_all' -- all dependencies passed with no checks.
3724 # 'test_compile' -- check by making test program.
3725 # 'file_magic [[regex]]' -- check by looking for files in library path
3726 # which responds to the $file_magic_cmd with a given egrep regex.
3727 # If you have `file' or equivalent on your system and you're not sure
3728 # whether `pass_all' will *always* work, you probably want this one.
3729
3730 case $host_os in
3731 aix4* | aix5*)
3732   lt_cv_deplibs_check_method=pass_all
3733   ;;
3734
3735 beos*)
3736   lt_cv_deplibs_check_method=pass_all
3737   ;;
3738
3739 bsdi4*)
3740   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3741   lt_cv_file_magic_cmd='/usr/bin/file -L'
3742   lt_cv_file_magic_test_file=/shlib/libc.so
3743   ;;
3744
3745 cygwin* | mingw* | pw32*)
3746   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3747   lt_cv_file_magic_cmd='$OBJDUMP -f'
3748   ;;
3749
3750 darwin* | rhapsody*)
3751   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3752   lt_cv_file_magic_cmd='/usr/bin/file -L'
3753   case "$host_os" in
3754   rhapsody* | darwin1.[012])
3755     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3756     ;;
3757   *) # Darwin 1.3 on
3758     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3759     ;;
3760   esac
3761   ;;
3762
3763 freebsd*)
3764   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3765     case $host_cpu in
3766     i*86 )
3767       # Not sure whether the presence of OpenBSD here was a mistake.
3768       # Let's accept both of them until this is cleared up.
3769       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3770       lt_cv_file_magic_cmd=/usr/bin/file
3771       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3772       ;;
3773     esac
3774   else
3775     lt_cv_deplibs_check_method=pass_all
3776   fi
3777   ;;
3778
3779 gnu*)
3780   lt_cv_deplibs_check_method=pass_all
3781   ;;
3782
3783 hpux10.20*|hpux11*)
3784   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3785   lt_cv_file_magic_cmd=/usr/bin/file
3786   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3787   ;;
3788
3789 irix5* | irix6* | nonstopux*)
3790   case $host_os in
3791   irix5* | nonstopux*)
3792     # this will be overridden with pass_all, but let us keep it just in case
3793     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3794     ;;
3795   *)
3796     case $LD in
3797     *-32|*"-32 ") libmagic=32-bit;;
3798     *-n32|*"-n32 ") libmagic=N32;;
3799     *-64|*"-64 ") libmagic=64-bit;;
3800     *) libmagic=never-match;;
3801     esac
3802     # this will be overridden with pass_all, but let us keep it just in case
3803     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3804     ;;
3805   esac
3806   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3807   lt_cv_deplibs_check_method=pass_all
3808   ;;
3809
3810 # This must be Linux ELF.
3811 linux-gnu*)
3812   case $host_cpu in
3813   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3814     lt_cv_deplibs_check_method=pass_all ;;
3815   *)
3816     # glibc up to 2.1.1 does not perform some relocations on ARM
3817     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3818   esac
3819   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3820   ;;
3821
3822 netbsd*)
3823   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3824     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3825   else
3826     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3827   fi
3828   ;;
3829
3830 newos6*)
3831   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3832   lt_cv_file_magic_cmd=/usr/bin/file
3833   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3834   ;;
3835
3836 openbsd*)
3837   lt_cv_file_magic_cmd=/usr/bin/file
3838   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3839   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3840     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3841   else
3842     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3843   fi
3844   ;;
3845
3846 osf3* | osf4* | osf5*)
3847   # this will be overridden with pass_all, but let us keep it just in case
3848   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3849   lt_cv_file_magic_test_file=/shlib/libc.so
3850   lt_cv_deplibs_check_method=pass_all
3851   ;;
3852
3853 sco3.2v5*)
3854   lt_cv_deplibs_check_method=pass_all
3855   ;;
3856
3857 solaris*)
3858   lt_cv_deplibs_check_method=pass_all
3859   lt_cv_file_magic_test_file=/lib/libc.so
3860   ;;
3861
3862 sysv5uw[78]* | sysv4*uw2*)
3863   lt_cv_deplibs_check_method=pass_all
3864   ;;
3865
3866 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3867   case $host_vendor in
3868   motorola)
3869     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3870     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3871     ;;
3872   ncr)
3873     lt_cv_deplibs_check_method=pass_all
3874     ;;
3875   sequent)
3876     lt_cv_file_magic_cmd='/bin/file'
3877     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3878     ;;
3879   sni)
3880     lt_cv_file_magic_cmd='/bin/file'
3881     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3882     lt_cv_file_magic_test_file=/lib/libc.so
3883     ;;
3884   esac
3885   ;;
3886 esac
3887
3888 fi
3889 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3890 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
3891 file_magic_cmd=$lt_cv_file_magic_cmd
3892 deplibs_check_method=$lt_cv_deplibs_check_method
3893
3894
3895
3896
3897
3898
3899
3900
3901 # Check for command to grab the raw symbol name followed by C symbol from nm.
3902 echo "$as_me:$LINENO: checking command to parse $NM output" >&5
3903 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
3904 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907
3908 # These are sane defaults that work on at least a few old systems.
3909 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3910
3911 # Character class describing NM global symbol codes.
3912 symcode='[BCDEGRST]'
3913
3914 # Regexp to match symbols that can be accessed directly from C.
3915 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3916
3917 # Transform the above into a raw symbol and a C symbol.
3918 symxfrm='\1 \2\3 \3'
3919
3920 # Transform an extracted symbol line into a proper C declaration
3921 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3922
3923 # Transform an extracted symbol line into symbol name and symbol address
3924 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3925
3926 # Define system-specific variables.
3927 case $host_os in
3928 aix*)
3929   symcode='[BCDT]'
3930   ;;
3931 cygwin* | mingw* | pw32*)
3932   symcode='[ABCDGISTW]'
3933   ;;
3934 hpux*) # Its linker distinguishes data from code symbols
3935   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3936   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3937   ;;
3938 irix* | nonstopux*)
3939   symcode='[BCDEGRST]'
3940   ;;
3941 solaris* | sysv5*)
3942   symcode='[BDT]'
3943   ;;
3944 sysv4)
3945   symcode='[DFNSTU]'
3946   ;;
3947 esac
3948
3949 # Handle CRLF in mingw tool chain
3950 opt_cr=
3951 case $host_os in
3952 mingw*)
3953   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3954   ;;
3955 esac
3956
3957 # If we're using GNU nm, then use its standard symbol codes.
3958 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3959   symcode='[ABCDGISTW]'
3960 fi
3961
3962 # Try without a prefix undercore, then with it.
3963 for ac_symprfx in "" "_"; do
3964
3965   # Write the raw and C identifiers.
3966 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3967
3968   # Check to see that the pipe works correctly.
3969   pipe_works=no
3970   rm -f conftest*
3971   cat > conftest.$ac_ext <<EOF
3972 #ifdef __cplusplus
3973 extern "C" {
3974 #endif
3975 char nm_test_var;
3976 void nm_test_func(){}
3977 #ifdef __cplusplus
3978 }
3979 #endif
3980 int main(){nm_test_var='a';nm_test_func();return(0);}
3981 EOF
3982
3983   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3984   (eval $ac_compile) 2>&5
3985   ac_status=$?
3986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987   (exit $ac_status); }; then
3988     # Now try to grab the symbols.
3989     nlist=conftest.nm
3990     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
3991   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
3992   ac_status=$?
3993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3994   (exit $ac_status); } && test -s "$nlist"; then
3995       # Try sorting and uniquifying the output.
3996       if sort "$nlist" | uniq > "$nlist"T; then
3997         mv -f "$nlist"T "$nlist"
3998       else
3999         rm -f "$nlist"T
4000       fi
4001
4002       # Make sure that we snagged all the symbols we need.
4003       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4004         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4005           cat <<EOF > conftest.$ac_ext
4006 #ifdef __cplusplus
4007 extern "C" {
4008 #endif
4009
4010 EOF
4011           # Now generate the symbol file.
4012           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4013
4014           cat <<EOF >> conftest.$ac_ext
4015 #if defined (__STDC__) && __STDC__
4016 # define lt_ptr void *
4017 #else
4018 # define lt_ptr char *
4019 # define const
4020 #endif
4021
4022 /* The mapping between symbol names and symbols. */
4023 const struct {
4024   const char *name;
4025   lt_ptr address;
4026 }
4027 lt_preloaded_symbols[] =
4028 {
4029 EOF
4030           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4031           cat <<\EOF >> conftest.$ac_ext
4032   {0, (lt_ptr) 0}
4033 };
4034
4035 #ifdef __cplusplus
4036 }
4037 #endif
4038 EOF
4039           # Now try linking the two files.
4040           mv conftest.$ac_objext conftstm.$ac_objext
4041           save_LIBS="$LIBS"
4042           save_CFLAGS="$CFLAGS"
4043           LIBS="conftstm.$ac_objext"
4044           CFLAGS="$CFLAGS$no_builtin_flag"
4045           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4046   (eval $ac_link) 2>&5
4047   ac_status=$?
4048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4049   (exit $ac_status); } && test -s conftest; then
4050             pipe_works=yes
4051           fi
4052           LIBS="$save_LIBS"
4053           CFLAGS="$save_CFLAGS"
4054         else
4055           echo "cannot find nm_test_func in $nlist" >&5
4056         fi
4057       else
4058         echo "cannot find nm_test_var in $nlist" >&5
4059       fi
4060     else
4061       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4062     fi
4063   else
4064     echo "$progname: failed program was:" >&5
4065     cat conftest.$ac_ext >&5
4066   fi
4067   rm -f conftest* conftst*
4068
4069   # Do not use the global_symbol_pipe unless it works.
4070   if test "$pipe_works" = yes; then
4071     break
4072   else
4073     lt_cv_sys_global_symbol_pipe=
4074   fi
4075 done
4076
4077 fi
4078
4079 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4080 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4081   global_symbol_to_cdecl=
4082   global_symbol_to_c_name_address=
4083 else
4084   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4085   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4086 fi
4087 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4088 then
4089   echo "$as_me:$LINENO: result: failed" >&5
4090 echo "${ECHO_T}failed" >&6
4091 else
4092   echo "$as_me:$LINENO: result: ok" >&5
4093 echo "${ECHO_T}ok" >&6
4094 fi
4095
4096 ac_ext=c
4097 ac_cpp='$CPP $CPPFLAGS'
4098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4101 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4102 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4103 # On Suns, sometimes $CPP names a directory.
4104 if test -n "$CPP" && test -d "$CPP"; then
4105   CPP=
4106 fi
4107 if test -z "$CPP"; then
4108   if test "${ac_cv_prog_CPP+set}" = set; then
4109   echo $ECHO_N "(cached) $ECHO_C" >&6
4110 else
4111       # Double quotes because CPP needs to be expanded
4112     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4113     do
4114       ac_preproc_ok=false
4115 for ac_c_preproc_warn_flag in '' yes
4116 do
4117   # Use a header file that comes with gcc, so configuring glibc
4118   # with a fresh cross-compiler works.
4119   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4120   # <limits.h> exists even on freestanding compilers.
4121   # On the NeXT, cc -E runs the code through the compiler's parser,
4122   # not just through cpp. "Syntax error" is here to catch this case.
4123   cat >conftest.$ac_ext <<_ACEOF
4124 /* confdefs.h.  */
4125 _ACEOF
4126 cat confdefs.h >>conftest.$ac_ext
4127 cat >>conftest.$ac_ext <<_ACEOF
4128 /* end confdefs.h.  */
4129 #ifdef __STDC__
4130 # include <limits.h>
4131 #else
4132 # include <assert.h>
4133 #endif
4134                      Syntax error
4135 _ACEOF
4136 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4137   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4138   ac_status=$?
4139   grep -v '^ *+' conftest.er1 >conftest.err
4140   rm -f conftest.er1
4141   cat conftest.err >&5
4142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143   (exit $ac_status); } >/dev/null; then
4144   if test -s conftest.err; then
4145     ac_cpp_err=$ac_c_preproc_warn_flag
4146     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4147   else
4148     ac_cpp_err=
4149   fi
4150 else
4151   ac_cpp_err=yes
4152 fi
4153 if test -z "$ac_cpp_err"; then
4154   :
4155 else
4156   echo "$as_me: failed program was:" >&5
4157 sed 's/^/| /' conftest.$ac_ext >&5
4158
4159   # Broken: fails on valid input.
4160 continue
4161 fi
4162 rm -f conftest.err conftest.$ac_ext
4163
4164   # OK, works on sane cases.  Now check whether non-existent headers
4165   # can be detected and how.
4166   cat >conftest.$ac_ext <<_ACEOF
4167 /* confdefs.h.  */
4168 _ACEOF
4169 cat confdefs.h >>conftest.$ac_ext
4170 cat >>conftest.$ac_ext <<_ACEOF
4171 /* end confdefs.h.  */
4172 #include <ac_nonexistent.h>
4173 _ACEOF
4174 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4176   ac_status=$?
4177   grep -v '^ *+' conftest.er1 >conftest.err
4178   rm -f conftest.er1
4179   cat conftest.err >&5
4180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4181   (exit $ac_status); } >/dev/null; then
4182   if test -s conftest.err; then
4183     ac_cpp_err=$ac_c_preproc_warn_flag
4184     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4185   else
4186     ac_cpp_err=
4187   fi
4188 else
4189   ac_cpp_err=yes
4190 fi
4191 if test -z "$ac_cpp_err"; then
4192   # Broken: success on invalid input.
4193 continue
4194 else
4195   echo "$as_me: failed program was:" >&5
4196 sed 's/^/| /' conftest.$ac_ext >&5
4197
4198   # Passes both tests.
4199 ac_preproc_ok=:
4200 break
4201 fi
4202 rm -f conftest.err conftest.$ac_ext
4203
4204 done
4205 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4206 rm -f conftest.err conftest.$ac_ext
4207 if $ac_preproc_ok; then
4208   break
4209 fi
4210
4211     done
4212     ac_cv_prog_CPP=$CPP
4213
4214 fi
4215   CPP=$ac_cv_prog_CPP
4216 else
4217   ac_cv_prog_CPP=$CPP
4218 fi
4219 echo "$as_me:$LINENO: result: $CPP" >&5
4220 echo "${ECHO_T}$CPP" >&6
4221 ac_preproc_ok=false
4222 for ac_c_preproc_warn_flag in '' yes
4223 do
4224   # Use a header file that comes with gcc, so configuring glibc
4225   # with a fresh cross-compiler works.
4226   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4227   # <limits.h> exists even on freestanding compilers.
4228   # On the NeXT, cc -E runs the code through the compiler's parser,
4229   # not just through cpp. "Syntax error" is here to catch this case.
4230   cat >conftest.$ac_ext <<_ACEOF
4231 /* confdefs.h.  */
4232 _ACEOF
4233 cat confdefs.h >>conftest.$ac_ext
4234 cat >>conftest.$ac_ext <<_ACEOF
4235 /* end confdefs.h.  */
4236 #ifdef __STDC__
4237 # include <limits.h>
4238 #else
4239 # include <assert.h>
4240 #endif
4241                      Syntax error
4242 _ACEOF
4243 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4245   ac_status=$?
4246   grep -v '^ *+' conftest.er1 >conftest.err
4247   rm -f conftest.er1
4248   cat conftest.err >&5
4249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4250   (exit $ac_status); } >/dev/null; then
4251   if test -s conftest.err; then
4252     ac_cpp_err=$ac_c_preproc_warn_flag
4253     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4254   else
4255     ac_cpp_err=
4256   fi
4257 else
4258   ac_cpp_err=yes
4259 fi
4260 if test -z "$ac_cpp_err"; then
4261   :
4262 else
4263   echo "$as_me: failed program was:" >&5
4264 sed 's/^/| /' conftest.$ac_ext >&5
4265
4266   # Broken: fails on valid input.
4267 continue
4268 fi
4269 rm -f conftest.err conftest.$ac_ext
4270
4271   # OK, works on sane cases.  Now check whether non-existent headers
4272   # can be detected and how.
4273   cat >conftest.$ac_ext <<_ACEOF
4274 /* confdefs.h.  */
4275 _ACEOF
4276 cat confdefs.h >>conftest.$ac_ext
4277 cat >>conftest.$ac_ext <<_ACEOF
4278 /* end confdefs.h.  */
4279 #include <ac_nonexistent.h>
4280 _ACEOF
4281 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4282   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4283   ac_status=$?
4284   grep -v '^ *+' conftest.er1 >conftest.err
4285   rm -f conftest.er1
4286   cat conftest.err >&5
4287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4288   (exit $ac_status); } >/dev/null; then
4289   if test -s conftest.err; then
4290     ac_cpp_err=$ac_c_preproc_warn_flag
4291     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4292   else
4293     ac_cpp_err=
4294   fi
4295 else
4296   ac_cpp_err=yes
4297 fi
4298 if test -z "$ac_cpp_err"; then
4299   # Broken: success on invalid input.
4300 continue
4301 else
4302   echo "$as_me: failed program was:" >&5
4303 sed 's/^/| /' conftest.$ac_ext >&5
4304
4305   # Passes both tests.
4306 ac_preproc_ok=:
4307 break
4308 fi
4309 rm -f conftest.err conftest.$ac_ext
4310
4311 done
4312 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4313 rm -f conftest.err conftest.$ac_ext
4314 if $ac_preproc_ok; then
4315   :
4316 else
4317   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4318 See \`config.log' for more details." >&5
4319 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4320 See \`config.log' for more details." >&2;}
4321    { (exit 1); exit 1; }; }
4322 fi
4323
4324 ac_ext=c
4325 ac_cpp='$CPP $CPPFLAGS'
4326 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4327 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4328 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4329
4330
4331 echo "$as_me:$LINENO: checking for egrep" >&5
4332 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4333 if test "${ac_cv_prog_egrep+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4337     then ac_cv_prog_egrep='grep -E'
4338     else ac_cv_prog_egrep='egrep'
4339     fi
4340 fi
4341 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4342 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4343  EGREP=$ac_cv_prog_egrep
4344
4345
4346 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4347 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4348 if test "${ac_cv_header_stdc+set}" = set; then
4349   echo $ECHO_N "(cached) $ECHO_C" >&6
4350 else
4351   cat >conftest.$ac_ext <<_ACEOF
4352 /* confdefs.h.  */
4353 _ACEOF
4354 cat confdefs.h >>conftest.$ac_ext
4355 cat >>conftest.$ac_ext <<_ACEOF
4356 /* end confdefs.h.  */
4357 #include <stdlib.h>
4358 #include <stdarg.h>
4359 #include <string.h>
4360 #include <float.h>
4361
4362 int
4363 main ()
4364 {
4365
4366   ;
4367   return 0;
4368 }
4369 _ACEOF
4370 rm -f conftest.$ac_objext
4371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4372   (eval $ac_compile) 2>conftest.er1
4373   ac_status=$?
4374   grep -v '^ *+' conftest.er1 >conftest.err
4375   rm -f conftest.er1
4376   cat conftest.err >&5
4377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4378   (exit $ac_status); } &&
4379          { ac_try='test -z "$ac_c_werror_flag"
4380                          || test ! -s conftest.err'
4381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4382   (eval $ac_try) 2>&5
4383   ac_status=$?
4384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385   (exit $ac_status); }; } &&
4386          { ac_try='test -s conftest.$ac_objext'
4387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4388   (eval $ac_try) 2>&5
4389   ac_status=$?
4390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391   (exit $ac_status); }; }; then
4392   ac_cv_header_stdc=yes
4393 else
4394   echo "$as_me: failed program was:" >&5
4395 sed 's/^/| /' conftest.$ac_ext >&5
4396
4397 ac_cv_header_stdc=no
4398 fi
4399 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4400
4401 if test $ac_cv_header_stdc = yes; then
4402   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4403   cat >conftest.$ac_ext <<_ACEOF
4404 /* confdefs.h.  */
4405 _ACEOF
4406 cat confdefs.h >>conftest.$ac_ext
4407 cat >>conftest.$ac_ext <<_ACEOF
4408 /* end confdefs.h.  */
4409 #include <string.h>
4410
4411 _ACEOF
4412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4413   $EGREP "memchr" >/dev/null 2>&1; then
4414   :
4415 else
4416   ac_cv_header_stdc=no
4417 fi
4418 rm -f conftest*
4419
4420 fi
4421
4422 if test $ac_cv_header_stdc = yes; then
4423   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4424   cat >conftest.$ac_ext <<_ACEOF
4425 /* confdefs.h.  */
4426 _ACEOF
4427 cat confdefs.h >>conftest.$ac_ext
4428 cat >>conftest.$ac_ext <<_ACEOF
4429 /* end confdefs.h.  */
4430 #include <stdlib.h>
4431
4432 _ACEOF
4433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4434   $EGREP "free" >/dev/null 2>&1; then
4435   :
4436 else
4437   ac_cv_header_stdc=no
4438 fi
4439 rm -f conftest*
4440
4441 fi
4442
4443 if test $ac_cv_header_stdc = yes; then
4444   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4445   if test "$cross_compiling" = yes; then
4446   :
4447 else
4448   cat >conftest.$ac_ext <<_ACEOF
4449 /* confdefs.h.  */
4450 _ACEOF
4451 cat confdefs.h >>conftest.$ac_ext
4452 cat >>conftest.$ac_ext <<_ACEOF
4453 /* end confdefs.h.  */
4454 #include <ctype.h>
4455 #if ((' ' & 0x0FF) == 0x020)
4456 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4457 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4458 #else
4459 # define ISLOWER(c) \
4460                    (('a' <= (c) && (c) <= 'i') \
4461                      || ('j' <= (c) && (c) <= 'r') \
4462                      || ('s' <= (c) && (c) <= 'z'))
4463 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4464 #endif
4465
4466 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4467 int
4468 main ()
4469 {
4470   int i;
4471   for (i = 0; i < 256; i++)
4472     if (XOR (islower (i), ISLOWER (i))
4473         || toupper (i) != TOUPPER (i))
4474       exit(2);
4475   exit (0);
4476 }
4477 _ACEOF
4478 rm -f conftest$ac_exeext
4479 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4480   (eval $ac_link) 2>&5
4481   ac_status=$?
4482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485   (eval $ac_try) 2>&5
4486   ac_status=$?
4487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488   (exit $ac_status); }; }; then
4489   :
4490 else
4491   echo "$as_me: program exited with status $ac_status" >&5
4492 echo "$as_me: failed program was:" >&5
4493 sed 's/^/| /' conftest.$ac_ext >&5
4494
4495 ( exit $ac_status )
4496 ac_cv_header_stdc=no
4497 fi
4498 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4499 fi
4500 fi
4501 fi
4502 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4503 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4504 if test $ac_cv_header_stdc = yes; then
4505
4506 cat >>confdefs.h <<\_ACEOF
4507 #define STDC_HEADERS 1
4508 _ACEOF
4509
4510 fi
4511
4512 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4523                   inttypes.h stdint.h unistd.h
4524 do
4525 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4526 echo "$as_me:$LINENO: checking for $ac_header" >&5
4527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   cat >conftest.$ac_ext <<_ACEOF
4532 /* confdefs.h.  */
4533 _ACEOF
4534 cat confdefs.h >>conftest.$ac_ext
4535 cat >>conftest.$ac_ext <<_ACEOF
4536 /* end confdefs.h.  */
4537 $ac_includes_default
4538
4539 #include <$ac_header>
4540 _ACEOF
4541 rm -f conftest.$ac_objext
4542 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4543   (eval $ac_compile) 2>conftest.er1
4544   ac_status=$?
4545   grep -v '^ *+' conftest.er1 >conftest.err
4546   rm -f conftest.er1
4547   cat conftest.err >&5
4548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549   (exit $ac_status); } &&
4550          { ac_try='test -z "$ac_c_werror_flag"
4551                          || test ! -s conftest.err'
4552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4553   (eval $ac_try) 2>&5
4554   ac_status=$?
4555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4556   (exit $ac_status); }; } &&
4557          { ac_try='test -s conftest.$ac_objext'
4558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4559   (eval $ac_try) 2>&5
4560   ac_status=$?
4561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4562   (exit $ac_status); }; }; then
4563   eval "$as_ac_Header=yes"
4564 else
4565   echo "$as_me: failed program was:" >&5
4566 sed 's/^/| /' conftest.$ac_ext >&5
4567
4568 eval "$as_ac_Header=no"
4569 fi
4570 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4571 fi
4572 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4573 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4574 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4575   cat >>confdefs.h <<_ACEOF
4576 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4577 _ACEOF
4578
4579 fi
4580
4581 done
4582
4583
4584
4585 for ac_header in dlfcn.h
4586 do
4587 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4589   echo "$as_me:$LINENO: checking for $ac_header" >&5
4590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4592   echo $ECHO_N "(cached) $ECHO_C" >&6
4593 fi
4594 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4595 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4596 else
4597   # Is the header compilable?
4598 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4599 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4600 cat >conftest.$ac_ext <<_ACEOF
4601 /* confdefs.h.  */
4602 _ACEOF
4603 cat confdefs.h >>conftest.$ac_ext
4604 cat >>conftest.$ac_ext <<_ACEOF
4605 /* end confdefs.h.  */
4606 $ac_includes_default
4607 #include <$ac_header>
4608 _ACEOF
4609 rm -f conftest.$ac_objext
4610 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4611   (eval $ac_compile) 2>conftest.er1
4612   ac_status=$?
4613   grep -v '^ *+' conftest.er1 >conftest.err
4614   rm -f conftest.er1
4615   cat conftest.err >&5
4616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); } &&
4618          { ac_try='test -z "$ac_c_werror_flag"
4619                          || test ! -s conftest.err'
4620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621   (eval $ac_try) 2>&5
4622   ac_status=$?
4623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624   (exit $ac_status); }; } &&
4625          { ac_try='test -s conftest.$ac_objext'
4626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4627   (eval $ac_try) 2>&5
4628   ac_status=$?
4629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630   (exit $ac_status); }; }; then
4631   ac_header_compiler=yes
4632 else
4633   echo "$as_me: failed program was:" >&5
4634 sed 's/^/| /' conftest.$ac_ext >&5
4635
4636 ac_header_compiler=no
4637 fi
4638 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4639 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4640 echo "${ECHO_T}$ac_header_compiler" >&6
4641
4642 # Is the header present?
4643 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4644 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4645 cat >conftest.$ac_ext <<_ACEOF
4646 /* confdefs.h.  */
4647 _ACEOF
4648 cat confdefs.h >>conftest.$ac_ext
4649 cat >>conftest.$ac_ext <<_ACEOF
4650 /* end confdefs.h.  */
4651 #include <$ac_header>
4652 _ACEOF
4653 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4654   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4655   ac_status=$?
4656   grep -v '^ *+' conftest.er1 >conftest.err
4657   rm -f conftest.er1
4658   cat conftest.err >&5
4659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660   (exit $ac_status); } >/dev/null; then
4661   if test -s conftest.err; then
4662     ac_cpp_err=$ac_c_preproc_warn_flag
4663     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4664   else
4665     ac_cpp_err=
4666   fi
4667 else
4668   ac_cpp_err=yes
4669 fi
4670 if test -z "$ac_cpp_err"; then
4671   ac_header_preproc=yes
4672 else
4673   echo "$as_me: failed program was:" >&5
4674 sed 's/^/| /' conftest.$ac_ext >&5
4675
4676   ac_header_preproc=no
4677 fi
4678 rm -f conftest.err conftest.$ac_ext
4679 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4680 echo "${ECHO_T}$ac_header_preproc" >&6
4681
4682 # So?  What about this header?
4683 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4684   yes:no: )
4685     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4686 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4687     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4688 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4689     ac_header_preproc=yes
4690     ;;
4691   no:yes:* )
4692     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4693 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4694     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4695 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4696     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4697 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4698     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4699 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4700     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4701 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4702     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4703 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4704     (
4705       cat <<\_ASBOX
4706 ## ------------------------------------------ ##
4707 ## Report this to the AC_PACKAGE_NAME lists.  ##
4708 ## ------------------------------------------ ##
4709 _ASBOX
4710     ) |
4711       sed "s/^/$as_me: WARNING:     /" >&2
4712     ;;
4713 esac
4714 echo "$as_me:$LINENO: checking for $ac_header" >&5
4715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719   eval "$as_ac_Header=\$ac_header_preproc"
4720 fi
4721 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4722 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4723
4724 fi
4725 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4726   cat >>confdefs.h <<_ACEOF
4727 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4728 _ACEOF
4729
4730 fi
4731
4732 done
4733
4734
4735
4736
4737
4738 # Only perform the check for file, if the check method requires it
4739 case $deplibs_check_method in
4740 file_magic*)
4741   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4742     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
4743 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
4744 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4745   echo $ECHO_N "(cached) $ECHO_C" >&6
4746 else
4747   case $MAGIC_CMD in
4748   /*)
4749   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4750   ;;
4751   ?:/*)
4752   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4753   ;;
4754   *)
4755   ac_save_MAGIC_CMD="$MAGIC_CMD"
4756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4757   ac_dummy="/usr/bin:$PATH"
4758   for ac_dir in $ac_dummy; do
4759     test -z "$ac_dir" && ac_dir=.
4760     if test -f $ac_dir/${ac_tool_prefix}file; then
4761       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4762       if test -n "$file_magic_test_file"; then
4763         case $deplibs_check_method in
4764         "file_magic "*)
4765           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4766           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4767           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4768             egrep "$file_magic_regex" > /dev/null; then
4769             :
4770           else
4771             cat <<EOF 1>&2
4772
4773 *** Warning: the command libtool uses to detect shared libraries,
4774 *** $file_magic_cmd, produces output that libtool cannot recognize.
4775 *** The result is that libtool may fail to recognize shared libraries
4776 *** as such.  This will affect the creation of libtool libraries that
4777 *** depend on shared libraries, but programs linked with such libtool
4778 *** libraries will work regardless of this problem.  Nevertheless, you
4779 *** may want to report the problem to your system manager and/or to
4780 *** bug-libtool@gnu.org
4781
4782 EOF
4783           fi ;;
4784         esac
4785       fi
4786       break
4787     fi
4788   done
4789   IFS="$ac_save_ifs"
4790   MAGIC_CMD="$ac_save_MAGIC_CMD"
4791   ;;
4792 esac
4793 fi
4794
4795 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4796 if test -n "$MAGIC_CMD"; then
4797   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4798 echo "${ECHO_T}$MAGIC_CMD" >&6
4799 else
4800   echo "$as_me:$LINENO: result: no" >&5
4801 echo "${ECHO_T}no" >&6
4802 fi
4803
4804 if test -z "$lt_cv_path_MAGIC_CMD"; then
4805   if test -n "$ac_tool_prefix"; then
4806     echo "$as_me:$LINENO: checking for file" >&5
4807 echo $ECHO_N "checking for file... $ECHO_C" >&6
4808 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   case $MAGIC_CMD in
4812   /*)
4813   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4814   ;;
4815   ?:/*)
4816   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4817   ;;
4818   *)
4819   ac_save_MAGIC_CMD="$MAGIC_CMD"
4820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4821   ac_dummy="/usr/bin:$PATH"
4822   for ac_dir in $ac_dummy; do
4823     test -z "$ac_dir" && ac_dir=.
4824     if test -f $ac_dir/file; then
4825       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4826       if test -n "$file_magic_test_file"; then
4827         case $deplibs_check_method in
4828         "file_magic "*)
4829           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4830           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4831           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4832             egrep "$file_magic_regex" > /dev/null; then
4833             :
4834           else
4835             cat <<EOF 1>&2
4836
4837 *** Warning: the command libtool uses to detect shared libraries,
4838 *** $file_magic_cmd, produces output that libtool cannot recognize.
4839 *** The result is that libtool may fail to recognize shared libraries
4840 *** as such.  This will affect the creation of libtool libraries that
4841 *** depend on shared libraries, but programs linked with such libtool
4842 *** libraries will work regardless of this problem.  Nevertheless, you
4843 *** may want to report the problem to your system manager and/or to
4844 *** bug-libtool@gnu.org
4845
4846 EOF
4847           fi ;;
4848         esac
4849       fi
4850       break
4851     fi
4852   done
4853   IFS="$ac_save_ifs"
4854   MAGIC_CMD="$ac_save_MAGIC_CMD"
4855   ;;
4856 esac
4857 fi
4858
4859 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4860 if test -n "$MAGIC_CMD"; then
4861   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4862 echo "${ECHO_T}$MAGIC_CMD" >&6
4863 else
4864   echo "$as_me:$LINENO: result: no" >&5
4865 echo "${ECHO_T}no" >&6
4866 fi
4867
4868   else
4869     MAGIC_CMD=:
4870   fi
4871 fi
4872
4873   fi
4874   ;;
4875 esac
4876
4877 if test -n "$ac_tool_prefix"; then
4878   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4879 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4880 echo "$as_me:$LINENO: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_prog_RANLIB+set}" = set; then
4883   echo $ECHO_N "(cached) $ECHO_C" >&6
4884 else
4885   if test -n "$RANLIB"; then
4886   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4887 else
4888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889 for as_dir in $PATH
4890 do
4891   IFS=$as_save_IFS
4892   test -z "$as_dir" && as_dir=.
4893   for ac_exec_ext in '' $ac_executable_extensions; do
4894   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4895     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4896     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4897     break 2
4898   fi
4899 done
4900 done
4901
4902 fi
4903 fi
4904 RANLIB=$ac_cv_prog_RANLIB
4905 if test -n "$RANLIB"; then
4906   echo "$as_me:$LINENO: result: $RANLIB" >&5
4907 echo "${ECHO_T}$RANLIB" >&6
4908 else
4909   echo "$as_me:$LINENO: result: no" >&5
4910 echo "${ECHO_T}no" >&6
4911 fi
4912
4913 fi
4914 if test -z "$ac_cv_prog_RANLIB"; then
4915   ac_ct_RANLIB=$RANLIB
4916   # Extract the first word of "ranlib", so it can be a program name with args.
4917 set dummy ranlib; ac_word=$2
4918 echo "$as_me:$LINENO: checking for $ac_word" >&5
4919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4920 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4921   echo $ECHO_N "(cached) $ECHO_C" >&6
4922 else
4923   if test -n "$ac_ct_RANLIB"; then
4924   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4925 else
4926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927 for as_dir in $PATH
4928 do
4929   IFS=$as_save_IFS
4930   test -z "$as_dir" && as_dir=.
4931   for ac_exec_ext in '' $ac_executable_extensions; do
4932   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4933     ac_cv_prog_ac_ct_RANLIB="ranlib"
4934     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4935     break 2
4936   fi
4937 done
4938 done
4939
4940   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4941 fi
4942 fi
4943 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4944 if test -n "$ac_ct_RANLIB"; then
4945   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4946 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4947 else
4948   echo "$as_me:$LINENO: result: no" >&5
4949 echo "${ECHO_T}no" >&6
4950 fi
4951
4952   RANLIB=$ac_ct_RANLIB
4953 else
4954   RANLIB="$ac_cv_prog_RANLIB"
4955 fi
4956
4957 if test -n "$ac_tool_prefix"; then
4958   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4959 set dummy ${ac_tool_prefix}strip; ac_word=$2
4960 echo "$as_me:$LINENO: checking for $ac_word" >&5
4961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4962 if test "${ac_cv_prog_STRIP+set}" = set; then
4963   echo $ECHO_N "(cached) $ECHO_C" >&6
4964 else
4965   if test -n "$STRIP"; then
4966   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4967 else
4968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969 for as_dir in $PATH
4970 do
4971   IFS=$as_save_IFS
4972   test -z "$as_dir" && as_dir=.
4973   for ac_exec_ext in '' $ac_executable_extensions; do
4974   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4976     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4977     break 2
4978   fi
4979 done
4980 done
4981
4982 fi
4983 fi
4984 STRIP=$ac_cv_prog_STRIP
4985 if test -n "$STRIP"; then
4986   echo "$as_me:$LINENO: result: $STRIP" >&5
4987 echo "${ECHO_T}$STRIP" >&6
4988 else
4989   echo "$as_me:$LINENO: result: no" >&5
4990 echo "${ECHO_T}no" >&6
4991 fi
4992
4993 fi
4994 if test -z "$ac_cv_prog_STRIP"; then
4995   ac_ct_STRIP=$STRIP
4996   # Extract the first word of "strip", so it can be a program name with args.
4997 set dummy strip; ac_word=$2
4998 echo "$as_me:$LINENO: checking for $ac_word" >&5
4999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5000 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003   if test -n "$ac_ct_STRIP"; then
5004   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5005 else
5006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007 for as_dir in $PATH
5008 do
5009   IFS=$as_save_IFS
5010   test -z "$as_dir" && as_dir=.
5011   for ac_exec_ext in '' $ac_executable_extensions; do
5012   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5013     ac_cv_prog_ac_ct_STRIP="strip"
5014     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5015     break 2
5016   fi
5017 done
5018 done
5019
5020   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
5021 fi
5022 fi
5023 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5024 if test -n "$ac_ct_STRIP"; then
5025   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
5026 echo "${ECHO_T}$ac_ct_STRIP" >&6
5027 else
5028   echo "$as_me:$LINENO: result: no" >&5
5029 echo "${ECHO_T}no" >&6
5030 fi
5031
5032   STRIP=$ac_ct_STRIP
5033 else
5034   STRIP="$ac_cv_prog_STRIP"
5035 fi
5036
5037
5038 enable_dlopen=no
5039 enable_win32_dll=no
5040
5041 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5042 if test "${enable_libtool_lock+set}" = set; then
5043   enableval="$enable_libtool_lock"
5044
5045 fi;
5046 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5047
5048 # Some flags need to be propagated to the compiler or linker for good
5049 # libtool support.
5050 case $host in
5051 *-*-irix6*)
5052   # Find out which ABI we are using.
5053   echo '#line 5053 "configure"' > conftest.$ac_ext
5054   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5055   (eval $ac_compile) 2>&5
5056   ac_status=$?
5057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058   (exit $ac_status); }; then
5059     case `/usr/bin/file conftest.$ac_objext` in
5060     *32-bit*)
5061       LD="${LD-ld} -32"
5062       ;;
5063     *N32*)
5064       LD="${LD-ld} -n32"
5065       ;;
5066     *64-bit*)
5067       LD="${LD-ld} -64"
5068       ;;
5069     esac
5070   fi
5071   rm -rf conftest*
5072   ;;
5073
5074 *-*-sco3.2v5*)
5075   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5076   SAVE_CFLAGS="$CFLAGS"
5077   CFLAGS="$CFLAGS -belf"
5078   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5079 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5080 if test "${lt_cv_cc_needs_belf+set}" = set; then
5081   echo $ECHO_N "(cached) $ECHO_C" >&6
5082 else
5083
5084
5085      ac_ext=c
5086 ac_cpp='$CPP $CPPFLAGS'
5087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5090
5091      cat >conftest.$ac_ext <<_ACEOF
5092 /* confdefs.h.  */
5093 _ACEOF
5094 cat confdefs.h >>conftest.$ac_ext
5095 cat >>conftest.$ac_ext <<_ACEOF
5096 /* end confdefs.h.  */
5097
5098 int
5099 main ()
5100 {
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>conftest.er1
5109   ac_status=$?
5110   grep -v '^ *+' conftest.er1 >conftest.err
5111   rm -f conftest.er1
5112   cat conftest.err >&5
5113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114   (exit $ac_status); } &&
5115          { ac_try='test -z "$ac_c_werror_flag"
5116                          || test ! -s conftest.err'
5117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118   (eval $ac_try) 2>&5
5119   ac_status=$?
5120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121   (exit $ac_status); }; } &&
5122          { ac_try='test -s conftest$ac_exeext'
5123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5124   (eval $ac_try) 2>&5
5125   ac_status=$?
5126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5127   (exit $ac_status); }; }; then
5128   lt_cv_cc_needs_belf=yes
5129 else
5130   echo "$as_me: failed program was:" >&5
5131 sed 's/^/| /' conftest.$ac_ext >&5
5132
5133 lt_cv_cc_needs_belf=no
5134 fi
5135 rm -f conftest.err conftest.$ac_objext \
5136       conftest$ac_exeext conftest.$ac_ext
5137      ac_ext=c
5138 ac_cpp='$CPP $CPPFLAGS'
5139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5142
5143 fi
5144 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5145 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5146   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5147     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5148     CFLAGS="$SAVE_CFLAGS"
5149   fi
5150   ;;
5151
5152
5153 esac
5154
5155 # Sed substitution that helps us do robust quoting.  It backslashifies
5156 # metacharacters that are still active within double-quoted strings.
5157 Xsed='sed -e s/^X//'
5158 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5159
5160 # Same as above, but do not quote variable references.
5161 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5162
5163 # Sed substitution to delay expansion of an escaped shell variable in a
5164 # double_quote_subst'ed string.
5165 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5166
5167 # Constants:
5168 rm="rm -f"
5169
5170 # Global variables:
5171 default_ofile=libtool
5172 can_build_shared=yes
5173
5174 # All known linkers require a `.a' archive for static linking (except M$VC,
5175 # which needs '.lib').
5176 libext=a
5177 ltmain="$ac_aux_dir/ltmain.sh"
5178 ofile="$default_ofile"
5179 with_gnu_ld="$lt_cv_prog_gnu_ld"
5180 need_locks="$enable_libtool_lock"
5181
5182 old_CC="$CC"
5183 old_CFLAGS="$CFLAGS"
5184
5185 # Set sane defaults for various variables
5186 test -z "$AR" && AR=ar
5187 test -z "$AR_FLAGS" && AR_FLAGS=cru
5188 test -z "$AS" && AS=as
5189 test -z "$CC" && CC=cc
5190 test -z "$DLLTOOL" && DLLTOOL=dlltool
5191 test -z "$LD" && LD=ld
5192 test -z "$LN_S" && LN_S="ln -s"
5193 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5194 test -z "$NM" && NM=nm
5195 test -z "$OBJDUMP" && OBJDUMP=objdump
5196 test -z "$RANLIB" && RANLIB=:
5197 test -z "$STRIP" && STRIP=:
5198 test -z "$ac_objext" && ac_objext=o
5199
5200 if test x"$host" != x"$build"; then
5201   ac_tool_prefix=${host_alias}-
5202 else
5203   ac_tool_prefix=
5204 fi
5205
5206 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5207 case $host_os in
5208 linux-gnu*) ;;
5209 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5210 esac
5211
5212 case $host_os in
5213 aix3*)
5214   # AIX sometimes has problems with the GCC collect2 program.  For some
5215   # reason, if we set the COLLECT_NAMES environment variable, the problems
5216   # vanish in a puff of smoke.
5217   if test "X${COLLECT_NAMES+set}" != Xset; then
5218     COLLECT_NAMES=
5219     export COLLECT_NAMES
5220   fi
5221   ;;
5222 esac
5223
5224 # Determine commands to create old-style static archives.
5225 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5226 old_postinstall_cmds='chmod 644 $oldlib'
5227 old_postuninstall_cmds=
5228
5229 if test -n "$RANLIB"; then
5230   case $host_os in
5231   openbsd*)
5232     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5233     ;;
5234   *)
5235     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5236     ;;
5237   esac
5238   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5239 fi
5240
5241 # Allow CC to be a program name with arguments.
5242 set dummy $CC
5243 compiler="$2"
5244
5245 ## FIXME: this should be a separate macro
5246 ##
5247 echo "$as_me:$LINENO: checking for objdir" >&5
5248 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
5249 rm -f .libs 2>/dev/null
5250 mkdir .libs 2>/dev/null
5251 if test -d .libs; then
5252   objdir=.libs
5253 else
5254   # MS-DOS does not allow filenames that begin with a dot.
5255   objdir=_libs
5256 fi
5257 rmdir .libs 2>/dev/null
5258 echo "$as_me:$LINENO: result: $objdir" >&5
5259 echo "${ECHO_T}$objdir" >&6
5260 ##
5261 ## END FIXME
5262
5263
5264 ## FIXME: this should be a separate macro
5265 ##
5266
5267 # Check whether --with-pic or --without-pic was given.
5268 if test "${with_pic+set}" = set; then
5269   withval="$with_pic"
5270   pic_mode="$withval"
5271 else
5272   pic_mode=default
5273 fi;
5274 test -z "$pic_mode" && pic_mode=default
5275
5276 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5277 # in isolation, and that seeing it set (from the cache) indicates that
5278 # the associated values are set (in the cache) correctly too.
5279 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
5280 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
5281 if test "${lt_cv_prog_cc_pic+set}" = set; then
5282   echo $ECHO_N "(cached) $ECHO_C" >&6
5283 else
5284    lt_cv_prog_cc_pic=
5285   lt_cv_prog_cc_shlib=
5286   lt_cv_prog_cc_wl=
5287   lt_cv_prog_cc_static=
5288   lt_cv_prog_cc_no_builtin=
5289   lt_cv_prog_cc_can_build_shared=$can_build_shared
5290
5291   if test "$GCC" = yes; then
5292     lt_cv_prog_cc_wl='-Wl,'
5293     lt_cv_prog_cc_static='-static'
5294
5295     case $host_os in
5296     aix*)
5297       # Below there is a dirty hack to force normal static linking with -ldl
5298       # The problem is because libdl dynamically linked with both libc and
5299       # libC (AIX C++ library), which obviously doesn't included in libraries
5300       # list by gcc. This cause undefined symbols with -static flags.
5301       # This hack allows C programs to be linked with "-static -ldl", but
5302       # not sure about C++ programs.
5303       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5304       ;;
5305     amigaos*)
5306       # FIXME: we need at least 68020 code to build shared libraries, but
5307       # adding the `-m68020' flag to GCC prevents building anything better,
5308       # like `-m68040'.
5309       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5310       ;;
5311     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5312       # PIC is the default for these OSes.
5313       ;;
5314     darwin* | rhapsody*)
5315       # PIC is the default on this platform
5316       # Common symbols not allowed in MH_DYLIB files
5317       lt_cv_prog_cc_pic='-fno-common'
5318       ;;
5319     cygwin* | mingw* | pw32* | os2*)
5320       # This hack is so that the source file can tell whether it is being
5321       # built for inclusion in a dll (and should export symbols for example).
5322       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5323       ;;
5324     sysv4*MP*)
5325       if test -d /usr/nec; then
5326          lt_cv_prog_cc_pic=-Kconform_pic
5327       fi
5328       ;;
5329     *)
5330       lt_cv_prog_cc_pic='-fPIC'
5331       ;;
5332     esac
5333   else
5334     # PORTME Check for PIC flags for the system compiler.
5335     case $host_os in
5336     aix3* | aix4* | aix5*)
5337       lt_cv_prog_cc_wl='-Wl,'
5338       # All AIX code is PIC.
5339       if test "$host_cpu" = ia64; then
5340         # AIX 5 now supports IA64 processor
5341         lt_cv_prog_cc_static='-Bstatic'
5342       else
5343         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5344       fi
5345       ;;
5346
5347     hpux9* | hpux10* | hpux11*)
5348       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5349       lt_cv_prog_cc_wl='-Wl,'
5350       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5351       lt_cv_prog_cc_pic='+Z'
5352       ;;
5353
5354     irix5* | irix6* | nonstopux*)
5355       lt_cv_prog_cc_wl='-Wl,'
5356       lt_cv_prog_cc_static='-non_shared'
5357       # PIC (with -KPIC) is the default.
5358       ;;
5359
5360     cygwin* | mingw* | pw32* | os2*)
5361       # This hack is so that the source file can tell whether it is being
5362       # built for inclusion in a dll (and should export symbols for example).
5363       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5364       ;;
5365
5366     newsos6)
5367       lt_cv_prog_cc_pic='-KPIC'
5368       lt_cv_prog_cc_static='-Bstatic'
5369       ;;
5370
5371     osf3* | osf4* | osf5*)
5372       # All OSF/1 code is PIC.
5373       lt_cv_prog_cc_wl='-Wl,'
5374       lt_cv_prog_cc_static='-non_shared'
5375       ;;
5376
5377     sco3.2v5*)
5378       lt_cv_prog_cc_pic='-Kpic'
5379       lt_cv_prog_cc_static='-dn'
5380       lt_cv_prog_cc_shlib='-belf'
5381       ;;
5382
5383     solaris*)
5384       lt_cv_prog_cc_pic='-KPIC'
5385       lt_cv_prog_cc_static='-Bstatic'
5386       lt_cv_prog_cc_wl='-Wl,'
5387       ;;
5388
5389     sunos4*)
5390       lt_cv_prog_cc_pic='-PIC'
5391       lt_cv_prog_cc_static='-Bstatic'
5392       lt_cv_prog_cc_wl='-Qoption ld '
5393       ;;
5394
5395     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5396       lt_cv_prog_cc_pic='-KPIC'
5397       lt_cv_prog_cc_static='-Bstatic'
5398       if test "x$host_vendor" = xsni; then
5399         lt_cv_prog_cc_wl='-LD'
5400       else
5401         lt_cv_prog_cc_wl='-Wl,'
5402       fi
5403       ;;
5404
5405     uts4*)
5406       lt_cv_prog_cc_pic='-pic'
5407       lt_cv_prog_cc_static='-Bstatic'
5408       ;;
5409
5410     sysv4*MP*)
5411       if test -d /usr/nec ;then
5412         lt_cv_prog_cc_pic='-Kconform_pic'
5413         lt_cv_prog_cc_static='-Bstatic'
5414       fi
5415       ;;
5416
5417     *)
5418       lt_cv_prog_cc_can_build_shared=no
5419       ;;
5420     esac
5421   fi
5422
5423 fi
5424
5425 if test -z "$lt_cv_prog_cc_pic"; then
5426   echo "$as_me:$LINENO: result: none" >&5
5427 echo "${ECHO_T}none" >&6
5428 else
5429   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
5430 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
5431
5432   # Check to make sure the pic_flag actually works.
5433   echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5434 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
5435   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
5436   echo $ECHO_N "(cached) $ECHO_C" >&6
5437 else
5438       save_CFLAGS="$CFLAGS"
5439     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5440     cat >conftest.$ac_ext <<_ACEOF
5441 /* confdefs.h.  */
5442 _ACEOF
5443 cat confdefs.h >>conftest.$ac_ext
5444 cat >>conftest.$ac_ext <<_ACEOF
5445 /* end confdefs.h.  */
5446
5447 int
5448 main ()
5449 {
5450
5451   ;
5452   return 0;
5453 }
5454 _ACEOF
5455 rm -f conftest.$ac_objext
5456 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5457   (eval $ac_compile) 2>conftest.er1
5458   ac_status=$?
5459   grep -v '^ *+' conftest.er1 >conftest.err
5460   rm -f conftest.er1
5461   cat conftest.err >&5
5462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463   (exit $ac_status); } &&
5464          { ac_try='test -z "$ac_c_werror_flag"
5465                          || test ! -s conftest.err'
5466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470   (exit $ac_status); }; } &&
5471          { ac_try='test -s conftest.$ac_objext'
5472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5473   (eval $ac_try) 2>&5
5474   ac_status=$?
5475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476   (exit $ac_status); }; }; then
5477         case $host_os in
5478       hpux9* | hpux10* | hpux11*)
5479         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5480         # they create non-PIC objects.  So, if there were any warnings, we
5481         # assume that PIC is not supported.
5482         if test -s conftest.err; then
5483           lt_cv_prog_cc_pic_works=no
5484         else
5485           lt_cv_prog_cc_pic_works=yes
5486         fi
5487         ;;
5488       *)
5489         lt_cv_prog_cc_pic_works=yes
5490         ;;
5491       esac
5492
5493 else
5494   echo "$as_me: failed program was:" >&5
5495 sed 's/^/| /' conftest.$ac_ext >&5
5496
5497       lt_cv_prog_cc_pic_works=no
5498
5499 fi
5500 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5501     CFLAGS="$save_CFLAGS"
5502
5503 fi
5504
5505
5506   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5507     lt_cv_prog_cc_pic=
5508     lt_cv_prog_cc_can_build_shared=no
5509   else
5510     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5511   fi
5512
5513   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
5514 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
5515 fi
5516 ##
5517 ## END FIXME
5518
5519 # Check for any special shared library compilation flags.
5520 if test -n "$lt_cv_prog_cc_shlib"; then
5521   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
5522 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
5523   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5524   else
5525    { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
5526 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
5527     lt_cv_prog_cc_can_build_shared=no
5528   fi
5529 fi
5530
5531 ## FIXME: this should be a separate macro
5532 ##
5533 echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5534 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
5535 if test "${lt_cv_prog_cc_static_works+set}" = set; then
5536   echo $ECHO_N "(cached) $ECHO_C" >&6
5537 else
5538     lt_cv_prog_cc_static_works=no
5539   save_LDFLAGS="$LDFLAGS"
5540   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5541   cat >conftest.$ac_ext <<_ACEOF
5542 /* confdefs.h.  */
5543 _ACEOF
5544 cat confdefs.h >>conftest.$ac_ext
5545 cat >>conftest.$ac_ext <<_ACEOF
5546 /* end confdefs.h.  */
5547
5548 int
5549 main ()
5550 {
5551
5552   ;
5553   return 0;
5554 }
5555 _ACEOF
5556 rm -f conftest.$ac_objext conftest$ac_exeext
5557 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5558   (eval $ac_link) 2>conftest.er1
5559   ac_status=$?
5560   grep -v '^ *+' conftest.er1 >conftest.err
5561   rm -f conftest.er1
5562   cat conftest.err >&5
5563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564   (exit $ac_status); } &&
5565          { ac_try='test -z "$ac_c_werror_flag"
5566                          || test ! -s conftest.err'
5567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5568   (eval $ac_try) 2>&5
5569   ac_status=$?
5570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571   (exit $ac_status); }; } &&
5572          { ac_try='test -s conftest$ac_exeext'
5573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5574   (eval $ac_try) 2>&5
5575   ac_status=$?
5576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5577   (exit $ac_status); }; }; then
5578   lt_cv_prog_cc_static_works=yes
5579 else
5580   echo "$as_me: failed program was:" >&5
5581 sed 's/^/| /' conftest.$ac_ext >&5
5582
5583 fi
5584 rm -f conftest.err conftest.$ac_objext \
5585       conftest$ac_exeext conftest.$ac_ext
5586   LDFLAGS="$save_LDFLAGS"
5587
5588 fi
5589
5590
5591 # Belt *and* braces to stop my trousers falling down:
5592 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5593 echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
5594 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
5595
5596 pic_flag="$lt_cv_prog_cc_pic"
5597 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5598 wl="$lt_cv_prog_cc_wl"
5599 link_static_flag="$lt_cv_prog_cc_static"
5600 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5601 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5602 ##
5603 ## END FIXME
5604
5605
5606 ## FIXME: this should be a separate macro
5607 ##
5608 # Check to see if options -o and -c are simultaneously supported by compiler
5609 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
5610 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
5611 if test "${lt_cv_compiler_c_o+set}" = set; then
5612   echo $ECHO_N "(cached) $ECHO_C" >&6
5613 else
5614
5615 $rm -r conftest 2>/dev/null
5616 mkdir conftest
5617 cd conftest
5618 echo "int some_variable = 0;" > conftest.$ac_ext
5619 mkdir out
5620 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5621 # that will create temporary files in the current directory regardless of
5622 # the output directory.  Thus, making CWD read-only will cause this test
5623 # to fail, enabling locking or at least warning the user not to do parallel
5624 # builds.
5625 chmod -w .
5626 save_CFLAGS="$CFLAGS"
5627 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5628 compiler_c_o=no
5629 if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5630   # The compiler can only warn and ignore the option if not recognized
5631   # So say no if there are warnings
5632   if test -s out/conftest.err; then
5633     lt_cv_compiler_c_o=no
5634   else
5635     lt_cv_compiler_c_o=yes
5636   fi
5637 else
5638   # Append any errors to the config.log.
5639   cat out/conftest.err 1>&5
5640   lt_cv_compiler_c_o=no
5641 fi
5642 CFLAGS="$save_CFLAGS"
5643 chmod u+w .
5644 $rm conftest* out/*
5645 rmdir out
5646 cd ..
5647 rmdir conftest
5648 $rm -r conftest 2>/dev/null
5649
5650 fi
5651
5652 compiler_c_o=$lt_cv_compiler_c_o
5653 echo "$as_me:$LINENO: result: $compiler_c_o" >&5
5654 echo "${ECHO_T}$compiler_c_o" >&6
5655
5656 if test x"$compiler_c_o" = x"yes"; then
5657   # Check to see if we can write to a .lo
5658   echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
5659 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
5660   if test "${lt_cv_compiler_o_lo+set}" = set; then
5661   echo $ECHO_N "(cached) $ECHO_C" >&6
5662 else
5663
5664   lt_cv_compiler_o_lo=no
5665   save_CFLAGS="$CFLAGS"
5666   CFLAGS="$CFLAGS -c -o conftest.lo"
5667   save_objext="$ac_objext"
5668   ac_objext=lo
5669   cat >conftest.$ac_ext <<_ACEOF
5670 /* confdefs.h.  */
5671 _ACEOF
5672 cat confdefs.h >>conftest.$ac_ext
5673 cat >>conftest.$ac_ext <<_ACEOF
5674 /* end confdefs.h.  */
5675
5676 int
5677 main ()
5678 {
5679 int some_variable = 0;
5680   ;
5681   return 0;
5682 }
5683 _ACEOF
5684 rm -f conftest.$ac_objext
5685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5686   (eval $ac_compile) 2>conftest.er1
5687   ac_status=$?
5688   grep -v '^ *+' conftest.er1 >conftest.err
5689   rm -f conftest.er1
5690   cat conftest.err >&5
5691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5692   (exit $ac_status); } &&
5693          { ac_try='test -z "$ac_c_werror_flag"
5694                          || test ! -s conftest.err'
5695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5696   (eval $ac_try) 2>&5
5697   ac_status=$?
5698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5699   (exit $ac_status); }; } &&
5700          { ac_try='test -s conftest.$ac_objext'
5701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5702   (eval $ac_try) 2>&5
5703   ac_status=$?
5704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705   (exit $ac_status); }; }; then
5706       # The compiler can only warn and ignore the option if not recognized
5707     # So say no if there are warnings
5708     if test -s conftest.err; then
5709       lt_cv_compiler_o_lo=no
5710     else
5711       lt_cv_compiler_o_lo=yes
5712     fi
5713
5714 else
5715   echo "$as_me: failed program was:" >&5
5716 sed 's/^/| /' conftest.$ac_ext >&5
5717
5718 fi
5719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5720   ac_objext="$save_objext"
5721   CFLAGS="$save_CFLAGS"
5722
5723 fi
5724
5725   compiler_o_lo=$lt_cv_compiler_o_lo
5726   echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
5727 echo "${ECHO_T}$compiler_o_lo" >&6
5728 else
5729   compiler_o_lo=no
5730 fi
5731 ##
5732 ## END FIXME
5733
5734 ## FIXME: this should be a separate macro
5735 ##
5736 # Check to see if we can do hard links to lock some files if needed
5737 hard_links="nottested"
5738 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5739   # do not overwrite the value of need_locks provided by the user
5740   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
5741 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
5742   hard_links=yes
5743   $rm conftest*
5744   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5745   touch conftest.a
5746   ln conftest.a conftest.b 2>&5 || hard_links=no
5747   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5748   echo "$as_me:$LINENO: result: $hard_links" >&5
5749 echo "${ECHO_T}$hard_links" >&6
5750   if test "$hard_links" = no; then
5751     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
5752 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
5753     need_locks=warn
5754   fi
5755 else
5756   need_locks=no
5757 fi
5758 ##
5759 ## END FIXME
5760
5761 ## FIXME: this should be a separate macro
5762 ##
5763 if test "$GCC" = yes; then
5764   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5765   echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5766 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
5767   echo "int some_variable = 0;" > conftest.$ac_ext
5768   save_CFLAGS="$CFLAGS"
5769   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5770   compiler_rtti_exceptions=no
5771   cat >conftest.$ac_ext <<_ACEOF
5772 /* confdefs.h.  */
5773 _ACEOF
5774 cat confdefs.h >>conftest.$ac_ext
5775 cat >>conftest.$ac_ext <<_ACEOF
5776 /* end confdefs.h.  */
5777
5778 int
5779 main ()
5780 {
5781 int some_variable = 0;
5782   ;
5783   return 0;
5784 }
5785 _ACEOF
5786 rm -f conftest.$ac_objext
5787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5788   (eval $ac_compile) 2>conftest.er1
5789   ac_status=$?
5790   grep -v '^ *+' conftest.er1 >conftest.err
5791   rm -f conftest.er1
5792   cat conftest.err >&5
5793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794   (exit $ac_status); } &&
5795          { ac_try='test -z "$ac_c_werror_flag"
5796                          || test ! -s conftest.err'
5797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5801   (exit $ac_status); }; } &&
5802          { ac_try='test -s conftest.$ac_objext'
5803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5804   (eval $ac_try) 2>&5
5805   ac_status=$?
5806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5807   (exit $ac_status); }; }; then
5808       # The compiler can only warn and ignore the option if not recognized
5809     # So say no if there are warnings
5810     if test -s conftest.err; then
5811       compiler_rtti_exceptions=no
5812     else
5813       compiler_rtti_exceptions=yes
5814     fi
5815
5816 else
5817   echo "$as_me: failed program was:" >&5
5818 sed 's/^/| /' conftest.$ac_ext >&5
5819
5820 fi
5821 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5822   CFLAGS="$save_CFLAGS"
5823   echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
5824 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
5825
5826   if test "$compiler_rtti_exceptions" = "yes"; then
5827     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5828   else
5829     no_builtin_flag=' -fno-builtin'
5830   fi
5831 fi
5832 ##
5833 ## END FIXME
5834
5835 ## FIXME: this should be a separate macro
5836 ##
5837 # See if the linker supports building shared libraries.
5838 echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
5839 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
5840
5841 allow_undefined_flag=
5842 no_undefined_flag=
5843 need_lib_prefix=unknown
5844 need_version=unknown
5845 # when you set need_version to no, make sure it does not cause -set_version
5846 # flags to be left without arguments
5847 archive_cmds=
5848 archive_expsym_cmds=
5849 old_archive_from_new_cmds=
5850 old_archive_from_expsyms_cmds=
5851 export_dynamic_flag_spec=
5852 whole_archive_flag_spec=
5853 thread_safe_flag_spec=
5854 hardcode_into_libs=no
5855 hardcode_libdir_flag_spec=
5856 hardcode_libdir_separator=
5857 hardcode_direct=no
5858 hardcode_minus_L=no
5859 hardcode_shlibpath_var=unsupported
5860 runpath_var=
5861 link_all_deplibs=unknown
5862 always_export_symbols=no
5863 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5864 # include_expsyms should be a list of space-separated symbols to be *always*
5865 # included in the symbol list
5866 include_expsyms=
5867 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5868 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5869 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5870 # as well as any symbol that contains `d'.
5871 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5872 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5873 # platforms (ab)use it in PIC code, but their linkers get confused if
5874 # the symbol is explicitly referenced.  Since portable code cannot
5875 # rely on this symbol name, it's probably fine to never include it in
5876 # preloaded symbol tables.
5877 extract_expsyms_cmds=
5878
5879 case $host_os in
5880 cygwin* | mingw* | pw32*)
5881   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5882   # When not using gcc, we currently assume that we are using
5883   # Microsoft Visual C++.
5884   if test "$GCC" != yes; then
5885     with_gnu_ld=no
5886   fi
5887   ;;
5888 openbsd*)
5889   with_gnu_ld=no
5890   ;;
5891 esac
5892
5893 ld_shlibs=yes
5894 if test "$with_gnu_ld" = yes; then
5895   # If archive_cmds runs LD, not CC, wlarc should be empty
5896   wlarc='${wl}'
5897
5898   # See if GNU ld supports shared libraries.
5899   case $host_os in
5900   aix3* | aix4* | aix5*)
5901     # On AIX, the GNU linker is very broken
5902     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5903     ld_shlibs=no
5904     cat <<EOF 1>&2
5905
5906 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5907 *** to be unable to reliably create shared libraries on AIX.
5908 *** Therefore, libtool is disabling shared libraries support.  If you
5909 *** really care for shared libraries, you may want to modify your PATH
5910 *** so that a non-GNU linker is found, and then restart.
5911
5912 EOF
5913     ;;
5914
5915   amigaos*)
5916     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5917     hardcode_libdir_flag_spec='-L$libdir'
5918     hardcode_minus_L=yes
5919
5920     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5921     # that the semantics of dynamic libraries on AmigaOS, at least up
5922     # to version 4, is to share data among multiple programs linked
5923     # with the same dynamic library.  Since this doesn't match the
5924     # behavior of shared libraries on other platforms, we can use
5925     # them.
5926     ld_shlibs=no
5927     ;;
5928
5929   beos*)
5930     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5931       allow_undefined_flag=unsupported
5932       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5933       # support --undefined.  This deserves some investigation.  FIXME
5934       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5935     else
5936       ld_shlibs=no
5937     fi
5938     ;;
5939
5940   cygwin* | mingw* | pw32*)
5941     # hardcode_libdir_flag_spec is actually meaningless, as there is
5942     # no search path for DLLs.
5943     hardcode_libdir_flag_spec='-L$libdir'
5944     allow_undefined_flag=unsupported
5945     always_export_symbols=yes
5946
5947     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5948       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5949       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5950       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5951       else $CC -o impgen impgen.c ; fi)~
5952       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5953
5954     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5955
5956     # cygwin and mingw dlls have different entry points and sets of symbols
5957     # to exclude.
5958     # FIXME: what about values for MSVC?
5959     dll_entry=__cygwin_dll_entry@12
5960     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5961     case $host_os in
5962     mingw*)
5963       # mingw values
5964       dll_entry=_DllMainCRTStartup@12
5965       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5966       ;;
5967     esac
5968
5969     # mingw and cygwin differ, and it's simplest to just exclude the union
5970     # of the two symbol sets.
5971     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5972
5973     # recent cygwin and mingw systems supply a stub DllMain which the user
5974     # can override, but on older systems we have to supply one (in ltdll.c)
5975     if test "x$lt_cv_need_dllmain" = "xyes"; then
5976       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5977       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5978         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5979     else
5980       ltdll_obj=
5981       ltdll_cmds=
5982     fi
5983
5984     # Extract the symbol export list from an `--export-all' def file,
5985     # then regenerate the def file from the symbol export list, so that
5986     # the compiled dll only exports the symbol export list.
5987     # Be careful not to strip the DATA tag left be newer dlltools.
5988     export_symbols_cmds="$ltdll_cmds"'
5989       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5990       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5991
5992     # If the export-symbols file already is a .def file (1st line
5993     # is EXPORTS), use it as is.
5994     # If DATA tags from a recent dlltool are present, honour them!
5995     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5996         cp $export_symbols $output_objdir/$soname-def;
5997       else
5998         echo EXPORTS > $output_objdir/$soname-def;
5999         _lt_hint=1;
6000         cat $export_symbols | while read symbol; do
6001          set dummy \$symbol;
6002          case \$# in
6003            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
6004            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
6005          esac;
6006          _lt_hint=`expr 1 + \$_lt_hint`;
6007         done;
6008       fi~
6009       '"$ltdll_cmds"'
6010       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
6011       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
6012       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
6013       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
6014       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
6015     ;;
6016
6017   netbsd*)
6018     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6019       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6020       wlarc=
6021     else
6022       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6024     fi
6025     ;;
6026
6027   solaris* | sysv5*)
6028     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
6029       ld_shlibs=no
6030       cat <<EOF 1>&2
6031
6032 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6033 *** create shared libraries on Solaris systems.  Therefore, libtool
6034 *** is disabling shared libraries support.  We urge you to upgrade GNU
6035 *** binutils to release 2.9.1 or newer.  Another option is to modify
6036 *** your PATH or compiler configuration so that the native linker is
6037 *** used, and then restart.
6038
6039 EOF
6040     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6041       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6042       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6043     else
6044       ld_shlibs=no
6045     fi
6046     ;;
6047
6048   sunos4*)
6049     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6050     wlarc=
6051     hardcode_direct=yes
6052     hardcode_shlibpath_var=no
6053     ;;
6054
6055   *)
6056     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6057       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6058       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6059     else
6060       ld_shlibs=no
6061     fi
6062     ;;
6063   esac
6064
6065   if test "$ld_shlibs" = yes; then
6066     runpath_var=LD_RUN_PATH
6067     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
6068     export_dynamic_flag_spec='${wl}--export-dynamic'
6069     case $host_os in
6070     cygwin* | mingw* | pw32*)
6071       # dlltool doesn't understand --whole-archive et. al.
6072       whole_archive_flag_spec=
6073       ;;
6074     *)
6075       # ancient GNU ld didn't support --whole-archive et. al.
6076       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
6077         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6078       else
6079         whole_archive_flag_spec=
6080       fi
6081       ;;
6082     esac
6083   fi
6084 else
6085   # PORTME fill in a description of your system's linker (not GNU ld)
6086   case $host_os in
6087   aix3*)
6088     allow_undefined_flag=unsupported
6089     always_export_symbols=yes
6090     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6091     # Note: this linker hardcodes the directories in LIBPATH if there
6092     # are no directories specified by -L.
6093     hardcode_minus_L=yes
6094     if test "$GCC" = yes && test -z "$link_static_flag"; then
6095       # Neither direct hardcoding nor static linking is supported with a
6096       # broken collect2.
6097       hardcode_direct=unsupported
6098     fi
6099     ;;
6100
6101   aix4* | aix5*)
6102     if test "$host_cpu" = ia64; then
6103       # On IA64, the linker does run time linking by default, so we don't
6104       # have to do anything special.
6105       aix_use_runtimelinking=no
6106       exp_sym_flag='-Bexport'
6107       no_entry_flag=""
6108     else
6109       aix_use_runtimelinking=no
6110
6111       # Test if we are trying to use run time linking or normal
6112       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6113       # need to do runtime linking.
6114       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
6115         for ld_flag in $LDFLAGS; do
6116           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6117             aix_use_runtimelinking=yes
6118             break
6119           fi
6120         done
6121       esac
6122
6123       exp_sym_flag='-bexport'
6124       no_entry_flag='-bnoentry'
6125     fi
6126
6127     # When large executables or shared objects are built, AIX ld can
6128     # have problems creating the table of contents.  If linking a library
6129     # or program results in "error TOC overflow" add -mminimal-toc to
6130     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6131     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6132
6133     hardcode_direct=yes
6134     archive_cmds=''
6135     hardcode_libdir_separator=':'
6136     if test "$GCC" = yes; then
6137       case $host_os in aix4.[012]|aix4.[012].*)
6138         collect2name=`${CC} -print-prog-name=collect2`
6139         if test -f "$collect2name" && \
6140           strings "$collect2name" | grep resolve_lib_name >/dev/null
6141         then
6142           # We have reworked collect2
6143           hardcode_direct=yes
6144         else
6145           # We have old collect2
6146           hardcode_direct=unsupported
6147           # It fails to find uninstalled libraries when the uninstalled
6148           # path is not listed in the libpath.  Setting hardcode_minus_L
6149           # to unsupported forces relinking
6150           hardcode_minus_L=yes
6151           hardcode_libdir_flag_spec='-L$libdir'
6152           hardcode_libdir_separator=
6153         fi
6154       esac
6155
6156       shared_flag='-shared'
6157     else
6158       # not using gcc
6159       if test "$host_cpu" = ia64; then
6160         shared_flag='${wl}-G'
6161       else
6162         if test "$aix_use_runtimelinking" = yes; then
6163           shared_flag='${wl}-G'
6164         else
6165           shared_flag='${wl}-bM:SRE'
6166         fi
6167       fi
6168     fi
6169
6170     # It seems that -bexpall can do strange things, so it is better to
6171     # generate a list of symbols to export.
6172     always_export_symbols=yes
6173     if test "$aix_use_runtimelinking" = yes; then
6174       # Warning - without using the other runtime loading flags (-brtl),
6175       # -berok will link without error, but may produce a broken library.
6176       allow_undefined_flag='-berok'
6177       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
6178       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6179     else
6180       if test "$host_cpu" = ia64; then
6181         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
6182         allow_undefined_flag="-z nodefs"
6183         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6184       else
6185         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
6186         # Warning - without using the other run time loading flags,
6187         # -berok will link without error, but may produce a broken library.
6188         allow_undefined_flag='${wl}-berok'
6189         # This is a bit strange, but is similar to how AIX traditionally builds
6190         # it's shared libraries.
6191         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
6192       fi
6193     fi
6194     ;;
6195
6196   amigaos*)
6197     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6198     hardcode_libdir_flag_spec='-L$libdir'
6199     hardcode_minus_L=yes
6200     # see comment about different semantics on the GNU ld section
6201     ld_shlibs=no
6202     ;;
6203
6204   cygwin* | mingw* | pw32*)
6205     # When not using gcc, we currently assume that we are using
6206     # Microsoft Visual C++.
6207     # hardcode_libdir_flag_spec is actually meaningless, as there is
6208     # no search path for DLLs.
6209     hardcode_libdir_flag_spec=' '
6210     allow_undefined_flag=unsupported
6211     # Tell ltmain to make .lib files, not .a files.
6212     libext=lib
6213     # FIXME: Setting linknames here is a bad hack.
6214     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6215     # The linker will automatically build a .lib file if we build a DLL.
6216     old_archive_from_new_cmds='true'
6217     # FIXME: Should let the user specify the lib program.
6218     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
6219     fix_srcfile_path='`cygpath -w "$srcfile"`'
6220     ;;
6221
6222   darwin* | rhapsody*)
6223     case "$host_os" in
6224     rhapsody* | darwin1.[012])
6225       allow_undefined_flag='-undefined suppress'
6226       ;;
6227     *) # Darwin 1.3 on
6228       allow_undefined_flag='-flat_namespace -undefined suppress'
6229       ;;
6230     esac
6231     # FIXME: Relying on posixy $() will cause problems for
6232     #        cross-compilation, but unfortunately the echo tests do not
6233     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6234     #        `"' quotes if we put them in here... so don't!
6235     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
6236     # We need to add '_' to the symbols in $export_symbols first
6237     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6238     hardcode_direct=yes
6239     hardcode_shlibpath_var=no
6240     whole_archive_flag_spec='-all_load $convenience'
6241     ;;
6242
6243   freebsd1*)
6244     ld_shlibs=no
6245     ;;
6246
6247   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6248   # support.  Future versions do this automatically, but an explicit c++rt0.o
6249   # does not break anything, and helps significantly (at the cost of a little
6250   # extra space).
6251   freebsd2.2*)
6252     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6253     hardcode_libdir_flag_spec='-R$libdir'
6254     hardcode_direct=yes
6255     hardcode_shlibpath_var=no
6256     ;;
6257
6258   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6259   freebsd2*)
6260     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6261     hardcode_direct=yes
6262     hardcode_minus_L=yes
6263     hardcode_shlibpath_var=no
6264     ;;
6265
6266   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6267   freebsd*)
6268     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6269     hardcode_libdir_flag_spec='-R$libdir'
6270     hardcode_direct=yes
6271     hardcode_shlibpath_var=no
6272     ;;
6273
6274   hpux9* | hpux10* | hpux11*)
6275     case $host_os in
6276     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
6277     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6278     esac
6279     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6280     hardcode_libdir_separator=:
6281     hardcode_direct=yes
6282     hardcode_minus_L=yes # Not in the search PATH, but as the default
6283                          # location of the library.
6284     export_dynamic_flag_spec='${wl}-E'
6285     ;;
6286
6287   irix5* | irix6* | nonstopux*)
6288     if test "$GCC" = yes; then
6289       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6290     else
6291       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6292     fi
6293     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6294     hardcode_libdir_separator=:
6295     link_all_deplibs=yes
6296     ;;
6297
6298   netbsd*)
6299     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6300       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6301     else
6302       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6303     fi
6304     hardcode_libdir_flag_spec='-R$libdir'
6305     hardcode_direct=yes
6306     hardcode_shlibpath_var=no
6307     ;;
6308
6309   newsos6)
6310     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6311     hardcode_direct=yes
6312     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6313     hardcode_libdir_separator=:
6314     hardcode_shlibpath_var=no
6315     ;;
6316
6317   openbsd*)
6318     hardcode_direct=yes
6319     hardcode_shlibpath_var=no
6320     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6321       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6322       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6323       export_dynamic_flag_spec='${wl}-E'
6324     else
6325       case "$host_os" in
6326       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6327         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6328         hardcode_libdir_flag_spec='-R$libdir'
6329         ;;
6330       *)
6331         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6332         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6333         ;;
6334       esac
6335     fi
6336     ;;
6337
6338   os2*)
6339     hardcode_libdir_flag_spec='-L$libdir'
6340     hardcode_minus_L=yes
6341     allow_undefined_flag=unsupported
6342     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6343     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6344     ;;
6345
6346   osf3*)
6347     if test "$GCC" = yes; then
6348       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6349       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6350     else
6351       allow_undefined_flag=' -expect_unresolved \*'
6352       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6353     fi
6354     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6355     hardcode_libdir_separator=:
6356     ;;
6357
6358   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6359     if test "$GCC" = yes; then
6360       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6361       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6362       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6363     else
6364       allow_undefined_flag=' -expect_unresolved \*'
6365       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6366       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6367       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6368
6369       #Both c and cxx compiler support -rpath directly
6370       hardcode_libdir_flag_spec='-rpath $libdir'
6371     fi
6372     hardcode_libdir_separator=:
6373     ;;
6374
6375   sco3.2v5*)
6376     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6377     hardcode_shlibpath_var=no
6378     runpath_var=LD_RUN_PATH
6379     hardcode_runpath_var=yes
6380     export_dynamic_flag_spec='${wl}-Bexport'
6381     ;;
6382
6383   solaris*)
6384     # gcc --version < 3.0 without binutils cannot create self contained
6385     # shared libraries reliably, requiring libgcc.a to resolve some of
6386     # the object symbols generated in some cases.  Libraries that use
6387     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6388     # a copy of libgcc.a into every shared library to guarantee resolving
6389     # such symbols causes other problems:  According to Tim Van Holder
6390     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6391     # (to the application) exception stack for one thing.
6392     no_undefined_flag=' -z defs'
6393     if test "$GCC" = yes; then
6394       case `$CC --version 2>/dev/null` in
6395       [12].*)
6396         cat <<EOF 1>&2
6397
6398 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6399 *** create self contained shared libraries on Solaris systems, without
6400 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6401 *** -no-undefined support, which will at least allow you to build shared
6402 *** libraries.  However, you may find that when you link such libraries
6403 *** into an application without using GCC, you have to manually add
6404 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6405 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6406 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6407
6408 EOF
6409         no_undefined_flag=
6410         ;;
6411       esac
6412     fi
6413     # $CC -shared without GNU ld will not create a library from C++
6414     # object files and a static libstdc++, better avoid it by now
6415     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6416     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6417                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6418     hardcode_libdir_flag_spec='-R$libdir'
6419     hardcode_shlibpath_var=no
6420     case $host_os in
6421     solaris2.[0-5] | solaris2.[0-5].*) ;;
6422     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6423       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6424     esac
6425     link_all_deplibs=yes
6426     ;;
6427
6428   sunos4*)
6429     if test "x$host_vendor" = xsequent; then
6430       # Use $CC to link under sequent, because it throws in some extra .o
6431       # files that make .init and .fini sections work.
6432       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6433     else
6434       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6435     fi
6436     hardcode_libdir_flag_spec='-L$libdir'
6437     hardcode_direct=yes
6438     hardcode_minus_L=yes
6439     hardcode_shlibpath_var=no
6440     ;;
6441
6442   sysv4)
6443     if test "x$host_vendor" = xsno; then
6444       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6445       hardcode_direct=yes # is this really true???
6446     else
6447       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6448       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6449     fi
6450     runpath_var='LD_RUN_PATH'
6451     hardcode_shlibpath_var=no
6452     ;;
6453
6454   sysv4.3*)
6455     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6456     hardcode_shlibpath_var=no
6457     export_dynamic_flag_spec='-Bexport'
6458     ;;
6459
6460   sysv5*)
6461     no_undefined_flag=' -z text'
6462     # $CC -shared without GNU ld will not create a library from C++
6463     # object files and a static libstdc++, better avoid it by now
6464     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6465     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6466                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6467     hardcode_libdir_flag_spec=
6468     hardcode_shlibpath_var=no
6469     runpath_var='LD_RUN_PATH'
6470     ;;
6471
6472   uts4*)
6473     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6474     hardcode_libdir_flag_spec='-L$libdir'
6475     hardcode_shlibpath_var=no
6476     ;;
6477
6478   dgux*)
6479     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6480     hardcode_libdir_flag_spec='-L$libdir'
6481     hardcode_shlibpath_var=no
6482     ;;
6483
6484   sysv4*MP*)
6485     if test -d /usr/nec; then
6486       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6487       hardcode_shlibpath_var=no
6488       runpath_var=LD_RUN_PATH
6489       hardcode_runpath_var=yes
6490       ld_shlibs=yes
6491     fi
6492     ;;
6493
6494   sysv4.2uw2*)
6495     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6496     hardcode_direct=yes
6497     hardcode_minus_L=no
6498     hardcode_shlibpath_var=no
6499     hardcode_runpath_var=yes
6500     runpath_var=LD_RUN_PATH
6501     ;;
6502
6503   sysv5uw7* | unixware7*)
6504     no_undefined_flag='${wl}-z ${wl}text'
6505     if test "$GCC" = yes; then
6506       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6507     else
6508       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6509     fi
6510     runpath_var='LD_RUN_PATH'
6511     hardcode_shlibpath_var=no
6512     ;;
6513
6514   *)
6515     ld_shlibs=no
6516     ;;
6517   esac
6518 fi
6519 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
6520 echo "${ECHO_T}$ld_shlibs" >&6
6521 test "$ld_shlibs" = no && can_build_shared=no
6522 ##
6523 ## END FIXME
6524
6525 ## FIXME: this should be a separate macro
6526 ##
6527 # Check hardcoding attributes.
6528 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
6529 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
6530 hardcode_action=
6531 if test -n "$hardcode_libdir_flag_spec" || \
6532    test -n "$runpath_var"; then
6533
6534   # We can hardcode non-existant directories.
6535   if test "$hardcode_direct" != no &&
6536      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6537      # have to relink, otherwise we might link with an installed library
6538      # when we should be linking with a yet-to-be-installed one
6539      ## test "$hardcode_shlibpath_var" != no &&
6540      test "$hardcode_minus_L" != no; then
6541     # Linking always hardcodes the temporary library directory.
6542     hardcode_action=relink
6543   else
6544     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6545     hardcode_action=immediate
6546   fi
6547 else
6548   # We cannot hardcode anything, or else we can only hardcode existing
6549   # directories.
6550   hardcode_action=unsupported
6551 fi
6552 echo "$as_me:$LINENO: result: $hardcode_action" >&5
6553 echo "${ECHO_T}$hardcode_action" >&6
6554 ##
6555 ## END FIXME
6556
6557 ## FIXME: this should be a separate macro
6558 ##
6559 striplib=
6560 old_striplib=
6561 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
6562 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
6563 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6564   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6565   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6566   echo "$as_me:$LINENO: result: yes" >&5
6567 echo "${ECHO_T}yes" >&6
6568 else
6569   echo "$as_me:$LINENO: result: no" >&5
6570 echo "${ECHO_T}no" >&6
6571 fi
6572 ##
6573 ## END FIXME
6574
6575 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6576 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6577
6578 ## FIXME: this should be a separate macro
6579 ##
6580 # PORTME Fill in your ld.so characteristics
6581 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
6582 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
6583 library_names_spec=
6584 libname_spec='lib$name'
6585 soname_spec=
6586 postinstall_cmds=
6587 postuninstall_cmds=
6588 finish_cmds=
6589 finish_eval=
6590 shlibpath_var=
6591 shlibpath_overrides_runpath=unknown
6592 version_type=none
6593 dynamic_linker="$host_os ld.so"
6594 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6595 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6596
6597 case $host_os in
6598 aix3*)
6599   version_type=linux
6600   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6601   shlibpath_var=LIBPATH
6602
6603   # AIX has no versioning support, so we append a major version to the name.
6604   soname_spec='${libname}${release}.so$major'
6605   ;;
6606
6607 aix4* | aix5*)
6608   version_type=linux
6609   if test "$host_cpu" = ia64; then
6610     # AIX 5 supports IA64
6611     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6612     shlibpath_var=LD_LIBRARY_PATH
6613   else
6614     # With GCC up to 2.95.x, collect2 would create an import file
6615     # for dependence libraries.  The import file would start with
6616     # the line `#! .'.  This would cause the generated library to
6617     # depend on `.', always an invalid library.  This was fixed in
6618     # development snapshots of GCC prior to 3.0.
6619     case $host_os in
6620       aix4 | aix4.[01] | aix4.[01].*)
6621         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6622              echo ' yes '
6623              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6624           :
6625         else
6626           can_build_shared=no
6627         fi
6628         ;;
6629     esac
6630     # AIX (on Power*) has no versioning support, so currently we can
6631     # not hardcode correct soname into executable. Probably we can
6632     # add versioning support to collect2, so additional links can
6633     # be useful in future.
6634     if test "$aix_use_runtimelinking" = yes; then
6635       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6636       # instead of lib<name>.a to let people know that these are not
6637       # typical AIX shared libraries.
6638       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6639     else
6640       # We preserve .a as extension for shared libraries through AIX4.2
6641       # and later when we are not doing run time linking.
6642       library_names_spec='${libname}${release}.a $libname.a'
6643       soname_spec='${libname}${release}.so$major'
6644     fi
6645     shlibpath_var=LIBPATH
6646   fi
6647   ;;
6648
6649 amigaos*)
6650   library_names_spec='$libname.ixlibrary $libname.a'
6651   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6652   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6653   ;;
6654
6655 beos*)
6656   library_names_spec='${libname}.so'
6657   dynamic_linker="$host_os ld.so"
6658   shlibpath_var=LIBRARY_PATH
6659   ;;
6660
6661 bsdi4*)
6662   version_type=linux
6663   need_version=no
6664   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6665   soname_spec='${libname}${release}.so$major'
6666   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6667   shlibpath_var=LD_LIBRARY_PATH
6668   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6669   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6670   export_dynamic_flag_spec=-rdynamic
6671   # the default ld.so.conf also contains /usr/contrib/lib and
6672   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6673   # libtool to hard-code these into programs
6674   ;;
6675
6676 cygwin* | mingw* | pw32*)
6677   version_type=windows
6678   need_version=no
6679   need_lib_prefix=no
6680   case $GCC,$host_os in
6681   yes,cygwin*)
6682     library_names_spec='$libname.dll.a'
6683     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6684     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6685       dldir=$destdir/`dirname \$dlpath`~
6686       test -d \$dldir || mkdir -p \$dldir~
6687       $install_prog .libs/$dlname \$dldir/$dlname'
6688     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6689       dlpath=$dir/\$dldll~
6690        $rm \$dlpath'
6691     ;;
6692   yes,mingw*)
6693     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6694     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6695     ;;
6696   yes,pw32*)
6697     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6698     ;;
6699   *)
6700     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6701     ;;
6702   esac
6703   dynamic_linker='Win32 ld.exe'
6704   # FIXME: first we should search . and the directory the executable is in
6705   shlibpath_var=PATH
6706   ;;
6707
6708 darwin* | rhapsody*)
6709   dynamic_linker="$host_os dyld"
6710   version_type=darwin
6711   need_lib_prefix=no
6712   need_version=no
6713   # FIXME: Relying on posixy $() will cause problems for
6714   #        cross-compilation, but unfortunately the echo tests do not
6715   #        yet detect zsh echo's removal of \ escapes.
6716   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6717   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6718   shlibpath_overrides_runpath=yes
6719   shlibpath_var=DYLD_LIBRARY_PATH
6720   ;;
6721
6722 freebsd1*)
6723   dynamic_linker=no
6724   ;;
6725
6726 freebsd*)
6727   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6728   version_type=freebsd-$objformat
6729   case $version_type in
6730     freebsd-elf*)
6731       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6732       need_version=no
6733       need_lib_prefix=no
6734       ;;
6735     freebsd-*)
6736       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6737       need_version=yes
6738       ;;
6739   esac
6740   shlibpath_var=LD_LIBRARY_PATH
6741   case $host_os in
6742   freebsd2*)
6743     shlibpath_overrides_runpath=yes
6744     ;;
6745   *)
6746     shlibpath_overrides_runpath=no
6747     hardcode_into_libs=yes
6748     ;;
6749   esac
6750   ;;
6751
6752 gnu*)
6753   version_type=linux
6754   need_lib_prefix=no
6755   need_version=no
6756   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6757   soname_spec='${libname}${release}.so$major'
6758   shlibpath_var=LD_LIBRARY_PATH
6759   hardcode_into_libs=yes
6760   ;;
6761
6762 hpux9* | hpux10* | hpux11*)
6763   # Give a soname corresponding to the major version so that dld.sl refuses to
6764   # link against other versions.
6765   dynamic_linker="$host_os dld.sl"
6766   version_type=sunos
6767   need_lib_prefix=no
6768   need_version=no
6769   shlibpath_var=SHLIB_PATH
6770   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6771   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6772   soname_spec='${libname}${release}.sl$major'
6773   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6774   postinstall_cmds='chmod 555 $lib'
6775   ;;
6776
6777 irix5* | irix6* | nonstopux*)
6778   case $host_os in
6779     nonstopux*) version_type=nonstopux ;;
6780     *)          version_type=irix ;;
6781   esac
6782   need_lib_prefix=no
6783   need_version=no
6784   soname_spec='${libname}${release}.so$major'
6785   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6786   case $host_os in
6787   irix5* | nonstopux*)
6788     libsuff= shlibsuff=
6789     ;;
6790   *)
6791     case $LD in # libtool.m4 will add one of these switches to LD
6792     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6793     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6794     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6795     *) libsuff= shlibsuff= libmagic=never-match;;
6796     esac
6797     ;;
6798   esac
6799   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6800   shlibpath_overrides_runpath=no
6801   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6802   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6803   ;;
6804
6805 # No shared lib support for Linux oldld, aout, or coff.
6806 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6807   dynamic_linker=no
6808   ;;
6809
6810 # This must be Linux ELF.
6811 linux-gnu*)
6812   version_type=linux
6813   need_lib_prefix=no
6814   need_version=no
6815   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6816   soname_spec='${libname}${release}.so$major'
6817   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6818   shlibpath_var=LD_LIBRARY_PATH
6819   shlibpath_overrides_runpath=no
6820   # This implies no fast_install, which is unacceptable.
6821   # Some rework will be needed to allow for fast_install
6822   # before this can be enabled.
6823   hardcode_into_libs=yes
6824
6825   # We used to test for /lib/ld.so.1 and disable shared libraries on
6826   # powerpc, because MkLinux only supported shared libraries with the
6827   # GNU dynamic linker.  Since this was broken with cross compilers,
6828   # most powerpc-linux boxes support dynamic linking these days and
6829   # people can always --disable-shared, the test was removed, and we
6830   # assume the GNU/Linux dynamic linker is in use.
6831   dynamic_linker='GNU/Linux ld.so'
6832   ;;
6833
6834 netbsd*)
6835   version_type=sunos
6836   need_lib_prefix=no
6837   need_version=no
6838   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6839     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6840     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6841     dynamic_linker='NetBSD (a.out) ld.so'
6842   else
6843     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6844     soname_spec='${libname}${release}.so$major'
6845     dynamic_linker='NetBSD ld.elf_so'
6846   fi
6847   shlibpath_var=LD_LIBRARY_PATH
6848   shlibpath_overrides_runpath=yes
6849   hardcode_into_libs=yes
6850   ;;
6851
6852 newsos6)
6853   version_type=linux
6854   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6855   shlibpath_var=LD_LIBRARY_PATH
6856   shlibpath_overrides_runpath=yes
6857   ;;
6858
6859 openbsd*)
6860   version_type=sunos
6861   need_lib_prefix=no
6862   need_version=no
6863   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6864     case "$host_os" in
6865     openbsd2.[89] | openbsd2.[89].*)
6866       shlibpath_overrides_runpath=no
6867       ;;
6868     *)
6869       shlibpath_overrides_runpath=yes
6870       ;;
6871     esac
6872   else
6873     shlibpath_overrides_runpath=yes
6874   fi
6875   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6876   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6877   shlibpath_var=LD_LIBRARY_PATH
6878   ;;
6879
6880 os2*)
6881   libname_spec='$name'
6882   need_lib_prefix=no
6883   library_names_spec='$libname.dll $libname.a'
6884   dynamic_linker='OS/2 ld.exe'
6885   shlibpath_var=LIBPATH
6886   ;;
6887
6888 osf3* | osf4* | osf5*)
6889   version_type=osf
6890   need_version=no
6891   soname_spec='${libname}${release}.so'
6892   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6893   shlibpath_var=LD_LIBRARY_PATH
6894   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6895   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6896   ;;
6897
6898 sco3.2v5*)
6899   version_type=osf
6900   soname_spec='${libname}${release}.so$major'
6901   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6902   shlibpath_var=LD_LIBRARY_PATH
6903   ;;
6904
6905 solaris*)
6906   version_type=linux
6907   need_lib_prefix=no
6908   need_version=no
6909   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6910   soname_spec='${libname}${release}.so$major'
6911   shlibpath_var=LD_LIBRARY_PATH
6912   shlibpath_overrides_runpath=yes
6913   hardcode_into_libs=yes
6914   # ldd complains unless libraries are executable
6915   postinstall_cmds='chmod +x $lib'
6916   ;;
6917
6918 sunos4*)
6919   version_type=sunos
6920   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6921   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6922   shlibpath_var=LD_LIBRARY_PATH
6923   shlibpath_overrides_runpath=yes
6924   if test "$with_gnu_ld" = yes; then
6925     need_lib_prefix=no
6926   fi
6927   need_version=yes
6928   ;;
6929
6930 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6931   version_type=linux
6932   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6933   soname_spec='${libname}${release}.so$major'
6934   shlibpath_var=LD_LIBRARY_PATH
6935   case $host_vendor in
6936     sni)
6937       shlibpath_overrides_runpath=no
6938       ;;
6939     motorola)
6940       need_lib_prefix=no
6941       need_version=no
6942       shlibpath_overrides_runpath=no
6943       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6944       ;;
6945   esac
6946   ;;
6947
6948 uts4*)
6949   version_type=linux
6950   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6951   soname_spec='${libname}${release}.so$major'
6952   shlibpath_var=LD_LIBRARY_PATH
6953   ;;
6954
6955 dgux*)
6956   version_type=linux
6957   need_lib_prefix=no
6958   need_version=no
6959   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6960   soname_spec='${libname}${release}.so$major'
6961   shlibpath_var=LD_LIBRARY_PATH
6962   ;;
6963
6964 sysv4*MP*)
6965   if test -d /usr/nec ;then
6966     version_type=linux
6967     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6968     soname_spec='$libname.so.$major'
6969     shlibpath_var=LD_LIBRARY_PATH
6970   fi
6971   ;;
6972
6973 *)
6974   dynamic_linker=no
6975   ;;
6976 esac
6977 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
6978 echo "${ECHO_T}$dynamic_linker" >&6
6979 test "$dynamic_linker" = no && can_build_shared=no
6980 ##
6981 ## END FIXME
6982
6983 ## FIXME: this should be a separate macro
6984 ##
6985 # Report the final consequences.
6986 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
6987 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
6988 echo "$as_me:$LINENO: result: $can_build_shared" >&5
6989 echo "${ECHO_T}$can_build_shared" >&6
6990 ##
6991 ## END FIXME
6992
6993 ## FIXME: this should be a separate macro
6994 ##
6995 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
6996 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
6997 test "$can_build_shared" = "no" && enable_shared=no
6998
6999 # On AIX, shared libraries and static libraries use the same namespace, and
7000 # are all built from PIC.
7001 case "$host_os" in
7002 aix3*)
7003   test "$enable_shared" = yes && enable_static=no
7004   if test -n "$RANLIB"; then
7005     archive_cmds="$archive_cmds~\$RANLIB \$lib"
7006     postinstall_cmds='$RANLIB $lib'
7007   fi
7008   ;;
7009
7010 aix4*)
7011   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7012     test "$enable_shared" = yes && enable_static=no
7013   fi
7014   ;;
7015 esac
7016 echo "$as_me:$LINENO: result: $enable_shared" >&5
7017 echo "${ECHO_T}$enable_shared" >&6
7018 ##
7019 ## END FIXME
7020
7021 ## FIXME: this should be a separate macro
7022 ##
7023 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
7024 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
7025 # Make sure either enable_shared or enable_static is yes.
7026 test "$enable_shared" = yes || enable_static=yes
7027 echo "$as_me:$LINENO: result: $enable_static" >&5
7028 echo "${ECHO_T}$enable_static" >&6
7029 ##
7030 ## END FIXME
7031
7032 if test "$hardcode_action" = relink; then
7033   # Fast installation is not supported
7034   enable_fast_install=no
7035 elif test "$shlibpath_overrides_runpath" = yes ||
7036      test "$enable_shared" = no; then
7037   # Fast installation is not necessary
7038   enable_fast_install=needless
7039 fi
7040
7041 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7042 if test "$GCC" = yes; then
7043   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7044 fi
7045
7046 if test "x$enable_dlopen" != xyes; then
7047   enable_dlopen=unknown
7048   enable_dlopen_self=unknown
7049   enable_dlopen_self_static=unknown
7050 else
7051   lt_cv_dlopen=no
7052   lt_cv_dlopen_libs=
7053
7054   case $host_os in
7055   beos*)
7056     lt_cv_dlopen="load_add_on"
7057     lt_cv_dlopen_libs=
7058     lt_cv_dlopen_self=yes
7059     ;;
7060
7061   cygwin* | mingw* | pw32*)
7062     lt_cv_dlopen="LoadLibrary"
7063     lt_cv_dlopen_libs=
7064    ;;
7065
7066   *)
7067     echo "$as_me:$LINENO: checking for shl_load" >&5
7068 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
7069 if test "${ac_cv_func_shl_load+set}" = set; then
7070   echo $ECHO_N "(cached) $ECHO_C" >&6
7071 else
7072   cat >conftest.$ac_ext <<_ACEOF
7073 /* confdefs.h.  */
7074 _ACEOF
7075 cat confdefs.h >>conftest.$ac_ext
7076 cat >>conftest.$ac_ext <<_ACEOF
7077 /* end confdefs.h.  */
7078 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
7079    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7080 #define shl_load innocuous_shl_load
7081
7082 /* System header to define __stub macros and hopefully few prototypes,
7083     which can conflict with char shl_load (); below.
7084     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7085     <limits.h> exists even on freestanding compilers.  */
7086
7087 #ifdef __STDC__
7088 # include <limits.h>
7089 #else
7090 # include <assert.h>
7091 #endif
7092
7093 #undef shl_load
7094
7095 /* Override any gcc2 internal prototype to avoid an error.  */
7096 #ifdef __cplusplus
7097 extern "C"
7098 {
7099 #endif
7100 /* We use char because int might match the return type of a gcc2
7101    builtin and then its argument prototype would still apply.  */
7102 char shl_load ();
7103 /* The GNU C library defines this for functions which it implements
7104     to always fail with ENOSYS.  Some functions are actually named
7105     something starting with __ and the normal name is an alias.  */
7106 #if defined (__stub_shl_load) || defined (__stub___shl_load)
7107 choke me
7108 #else
7109 char (*f) () = shl_load;
7110 #endif
7111 #ifdef __cplusplus
7112 }
7113 #endif
7114
7115 int
7116 main ()
7117 {
7118 return f != shl_load;
7119   ;
7120   return 0;
7121 }
7122 _ACEOF
7123 rm -f conftest.$ac_objext conftest$ac_exeext
7124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7125   (eval $ac_link) 2>conftest.er1
7126   ac_status=$?
7127   grep -v '^ *+' conftest.er1 >conftest.err
7128   rm -f conftest.er1
7129   cat conftest.err >&5
7130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7131   (exit $ac_status); } &&
7132          { ac_try='test -z "$ac_c_werror_flag"
7133                          || test ! -s conftest.err'
7134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7135   (eval $ac_try) 2>&5
7136   ac_status=$?
7137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7138   (exit $ac_status); }; } &&
7139          { ac_try='test -s conftest$ac_exeext'
7140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7141   (eval $ac_try) 2>&5
7142   ac_status=$?
7143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144   (exit $ac_status); }; }; then
7145   ac_cv_func_shl_load=yes
7146 else
7147   echo "$as_me: failed program was:" >&5
7148 sed 's/^/| /' conftest.$ac_ext >&5
7149
7150 ac_cv_func_shl_load=no
7151 fi
7152 rm -f conftest.err conftest.$ac_objext \
7153       conftest$ac_exeext conftest.$ac_ext
7154 fi
7155 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
7156 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
7157 if test $ac_cv_func_shl_load = yes; then
7158   lt_cv_dlopen="shl_load"
7159 else
7160   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7161 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7162 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   ac_check_lib_save_LIBS=$LIBS
7166 LIBS="-ldld  $LIBS"
7167 cat >conftest.$ac_ext <<_ACEOF
7168 /* confdefs.h.  */
7169 _ACEOF
7170 cat confdefs.h >>conftest.$ac_ext
7171 cat >>conftest.$ac_ext <<_ACEOF
7172 /* end confdefs.h.  */
7173
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 #ifdef __cplusplus
7176 extern "C"
7177 #endif
7178 /* We use char because int might match the return type of a gcc2
7179    builtin and then its argument prototype would still apply.  */
7180 char shl_load ();
7181 int
7182 main ()
7183 {
7184 shl_load ();
7185   ;
7186   return 0;
7187 }
7188 _ACEOF
7189 rm -f conftest.$ac_objext conftest$ac_exeext
7190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7191   (eval $ac_link) 2>conftest.er1
7192   ac_status=$?
7193   grep -v '^ *+' conftest.er1 >conftest.err
7194   rm -f conftest.er1
7195   cat conftest.err >&5
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); } &&
7198          { ac_try='test -z "$ac_c_werror_flag"
7199                          || test ! -s conftest.err'
7200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204   (exit $ac_status); }; } &&
7205          { ac_try='test -s conftest$ac_exeext'
7206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211   ac_cv_lib_dld_shl_load=yes
7212 else
7213   echo "$as_me: failed program was:" >&5
7214 sed 's/^/| /' conftest.$ac_ext >&5
7215
7216 ac_cv_lib_dld_shl_load=no
7217 fi
7218 rm -f conftest.err conftest.$ac_objext \
7219       conftest$ac_exeext conftest.$ac_ext
7220 LIBS=$ac_check_lib_save_LIBS
7221 fi
7222 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7223 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7224 if test $ac_cv_lib_dld_shl_load = yes; then
7225   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
7226 else
7227   echo "$as_me:$LINENO: checking for dlopen" >&5
7228 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
7229 if test "${ac_cv_func_dlopen+set}" = set; then
7230   echo $ECHO_N "(cached) $ECHO_C" >&6
7231 else
7232   cat >conftest.$ac_ext <<_ACEOF
7233 /* confdefs.h.  */
7234 _ACEOF
7235 cat confdefs.h >>conftest.$ac_ext
7236 cat >>conftest.$ac_ext <<_ACEOF
7237 /* end confdefs.h.  */
7238 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
7239    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7240 #define dlopen innocuous_dlopen
7241
7242 /* System header to define __stub macros and hopefully few prototypes,
7243     which can conflict with char dlopen (); below.
7244     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7245     <limits.h> exists even on freestanding compilers.  */
7246
7247 #ifdef __STDC__
7248 # include <limits.h>
7249 #else
7250 # include <assert.h>
7251 #endif
7252
7253 #undef dlopen
7254
7255 /* Override any gcc2 internal prototype to avoid an error.  */
7256 #ifdef __cplusplus
7257 extern "C"
7258 {
7259 #endif
7260 /* We use char because int might match the return type of a gcc2
7261    builtin and then its argument prototype would still apply.  */
7262 char dlopen ();
7263 /* The GNU C library defines this for functions which it implements
7264     to always fail with ENOSYS.  Some functions are actually named
7265     something starting with __ and the normal name is an alias.  */
7266 #if defined (__stub_dlopen) || defined (__stub___dlopen)
7267 choke me
7268 #else
7269 char (*f) () = dlopen;
7270 #endif
7271 #ifdef __cplusplus
7272 }
7273 #endif
7274
7275 int
7276 main ()
7277 {
7278 return f != dlopen;
7279   ;
7280   return 0;
7281 }
7282 _ACEOF
7283 rm -f conftest.$ac_objext conftest$ac_exeext
7284 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7285   (eval $ac_link) 2>conftest.er1
7286   ac_status=$?
7287   grep -v '^ *+' conftest.er1 >conftest.err
7288   rm -f conftest.er1
7289   cat conftest.err >&5
7290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -z "$ac_c_werror_flag"
7293                          || test ! -s conftest.err'
7294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7295   (eval $ac_try) 2>&5
7296   ac_status=$?
7297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298   (exit $ac_status); }; } &&
7299          { ac_try='test -s conftest$ac_exeext'
7300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301   (eval $ac_try) 2>&5
7302   ac_status=$?
7303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304   (exit $ac_status); }; }; then
7305   ac_cv_func_dlopen=yes
7306 else
7307   echo "$as_me: failed program was:" >&5
7308 sed 's/^/| /' conftest.$ac_ext >&5
7309
7310 ac_cv_func_dlopen=no
7311 fi
7312 rm -f conftest.err conftest.$ac_objext \
7313       conftest$ac_exeext conftest.$ac_ext
7314 fi
7315 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
7316 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
7317 if test $ac_cv_func_dlopen = yes; then
7318   lt_cv_dlopen="dlopen"
7319 else
7320   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
7321 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
7322 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
7323   echo $ECHO_N "(cached) $ECHO_C" >&6
7324 else
7325   ac_check_lib_save_LIBS=$LIBS
7326 LIBS="-ldl  $LIBS"
7327 cat >conftest.$ac_ext <<_ACEOF
7328 /* confdefs.h.  */
7329 _ACEOF
7330 cat confdefs.h >>conftest.$ac_ext
7331 cat >>conftest.$ac_ext <<_ACEOF
7332 /* end confdefs.h.  */
7333
7334 /* Override any gcc2 internal prototype to avoid an error.  */
7335 #ifdef __cplusplus
7336 extern "C"
7337 #endif
7338 /* We use char because int might match the return type of a gcc2
7339    builtin and then its argument prototype would still apply.  */
7340 char dlopen ();
7341 int
7342 main ()
7343 {
7344 dlopen ();
7345   ;
7346   return 0;
7347 }
7348 _ACEOF
7349 rm -f conftest.$ac_objext conftest$ac_exeext
7350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7351   (eval $ac_link) 2>conftest.er1
7352   ac_status=$?
7353   grep -v '^ *+' conftest.er1 >conftest.err
7354   rm -f conftest.er1
7355   cat conftest.err >&5
7356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357   (exit $ac_status); } &&
7358          { ac_try='test -z "$ac_c_werror_flag"
7359                          || test ! -s conftest.err'
7360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7361   (eval $ac_try) 2>&5
7362   ac_status=$?
7363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7364   (exit $ac_status); }; } &&
7365          { ac_try='test -s conftest$ac_exeext'
7366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7370   (exit $ac_status); }; }; then
7371   ac_cv_lib_dl_dlopen=yes
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 sed 's/^/| /' conftest.$ac_ext >&5
7375
7376 ac_cv_lib_dl_dlopen=no
7377 fi
7378 rm -f conftest.err conftest.$ac_objext \
7379       conftest$ac_exeext conftest.$ac_ext
7380 LIBS=$ac_check_lib_save_LIBS
7381 fi
7382 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
7383 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
7384 if test $ac_cv_lib_dl_dlopen = yes; then
7385   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7386 else
7387   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
7388 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
7389 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
7390   echo $ECHO_N "(cached) $ECHO_C" >&6
7391 else
7392   ac_check_lib_save_LIBS=$LIBS
7393 LIBS="-lsvld  $LIBS"
7394 cat >conftest.$ac_ext <<_ACEOF
7395 /* confdefs.h.  */
7396 _ACEOF
7397 cat confdefs.h >>conftest.$ac_ext
7398 cat >>conftest.$ac_ext <<_ACEOF
7399 /* end confdefs.h.  */
7400
7401 /* Override any gcc2 internal prototype to avoid an error.  */
7402 #ifdef __cplusplus
7403 extern "C"
7404 #endif
7405 /* We use char because int might match the return type of a gcc2
7406    builtin and then its argument prototype would still apply.  */
7407 char dlopen ();
7408 int
7409 main ()
7410 {
7411 dlopen ();
7412   ;
7413   return 0;
7414 }
7415 _ACEOF
7416 rm -f conftest.$ac_objext conftest$ac_exeext
7417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7418   (eval $ac_link) 2>conftest.er1
7419   ac_status=$?
7420   grep -v '^ *+' conftest.er1 >conftest.err
7421   rm -f conftest.er1
7422   cat conftest.err >&5
7423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424   (exit $ac_status); } &&
7425          { ac_try='test -z "$ac_c_werror_flag"
7426                          || test ! -s conftest.err'
7427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7428   (eval $ac_try) 2>&5
7429   ac_status=$?
7430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431   (exit $ac_status); }; } &&
7432          { ac_try='test -s conftest$ac_exeext'
7433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434   (eval $ac_try) 2>&5
7435   ac_status=$?
7436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437   (exit $ac_status); }; }; then
7438   ac_cv_lib_svld_dlopen=yes
7439 else
7440   echo "$as_me: failed program was:" >&5
7441 sed 's/^/| /' conftest.$ac_ext >&5
7442
7443 ac_cv_lib_svld_dlopen=no
7444 fi
7445 rm -f conftest.err conftest.$ac_objext \
7446       conftest$ac_exeext conftest.$ac_ext
7447 LIBS=$ac_check_lib_save_LIBS
7448 fi
7449 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
7450 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
7451 if test $ac_cv_lib_svld_dlopen = yes; then
7452   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7453 else
7454   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
7455 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
7456 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
7457   echo $ECHO_N "(cached) $ECHO_C" >&6
7458 else
7459   ac_check_lib_save_LIBS=$LIBS
7460 LIBS="-ldld  $LIBS"
7461 cat >conftest.$ac_ext <<_ACEOF
7462 /* confdefs.h.  */
7463 _ACEOF
7464 cat confdefs.h >>conftest.$ac_ext
7465 cat >>conftest.$ac_ext <<_ACEOF
7466 /* end confdefs.h.  */
7467
7468 /* Override any gcc2 internal prototype to avoid an error.  */
7469 #ifdef __cplusplus
7470 extern "C"
7471 #endif
7472 /* We use char because int might match the return type of a gcc2
7473    builtin and then its argument prototype would still apply.  */
7474 char dld_link ();
7475 int
7476 main ()
7477 {
7478 dld_link ();
7479   ;
7480   return 0;
7481 }
7482 _ACEOF
7483 rm -f conftest.$ac_objext conftest$ac_exeext
7484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7485   (eval $ac_link) 2>conftest.er1
7486   ac_status=$?
7487   grep -v '^ *+' conftest.er1 >conftest.err
7488   rm -f conftest.er1
7489   cat conftest.err >&5
7490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491   (exit $ac_status); } &&
7492          { ac_try='test -z "$ac_c_werror_flag"
7493                          || test ! -s conftest.err'
7494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7495   (eval $ac_try) 2>&5
7496   ac_status=$?
7497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7498   (exit $ac_status); }; } &&
7499          { ac_try='test -s conftest$ac_exeext'
7500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7501   (eval $ac_try) 2>&5
7502   ac_status=$?
7503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7504   (exit $ac_status); }; }; then
7505   ac_cv_lib_dld_dld_link=yes
7506 else
7507   echo "$as_me: failed program was:" >&5
7508 sed 's/^/| /' conftest.$ac_ext >&5
7509
7510 ac_cv_lib_dld_dld_link=no
7511 fi
7512 rm -f conftest.err conftest.$ac_objext \
7513       conftest$ac_exeext conftest.$ac_ext
7514 LIBS=$ac_check_lib_save_LIBS
7515 fi
7516 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
7517 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
7518 if test $ac_cv_lib_dld_dld_link = yes; then
7519   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7520 fi
7521
7522
7523 fi
7524
7525
7526 fi
7527
7528
7529 fi
7530
7531
7532 fi
7533
7534
7535 fi
7536
7537     ;;
7538   esac
7539
7540   if test "x$lt_cv_dlopen" != xno; then
7541     enable_dlopen=yes
7542   else
7543     enable_dlopen=no
7544   fi
7545
7546   case $lt_cv_dlopen in
7547   dlopen)
7548     save_CPPFLAGS="$CPPFLAGS"
7549         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7550
7551     save_LDFLAGS="$LDFLAGS"
7552     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7553
7554     save_LIBS="$LIBS"
7555     LIBS="$lt_cv_dlopen_libs $LIBS"
7556
7557     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
7558 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
7559 if test "${lt_cv_dlopen_self+set}" = set; then
7560   echo $ECHO_N "(cached) $ECHO_C" >&6
7561 else
7562           if test "$cross_compiling" = yes; then :
7563   lt_cv_dlopen_self=cross
7564 else
7565     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7566   lt_status=$lt_dlunknown
7567   cat > conftest.$ac_ext <<EOF
7568 #line 7568 "configure"
7569 #include "confdefs.h"
7570
7571 #if HAVE_DLFCN_H
7572 #include <dlfcn.h>
7573 #endif
7574
7575 #include <stdio.h>
7576
7577 #ifdef RTLD_GLOBAL
7578 #  define LT_DLGLOBAL           RTLD_GLOBAL
7579 #else
7580 #  ifdef DL_GLOBAL
7581 #    define LT_DLGLOBAL         DL_GLOBAL
7582 #  else
7583 #    define LT_DLGLOBAL         0
7584 #  endif
7585 #endif
7586
7587 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7588    find out it does not work in some platform. */
7589 #ifndef LT_DLLAZY_OR_NOW
7590 #  ifdef RTLD_LAZY
7591 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7592 #  else
7593 #    ifdef DL_LAZY
7594 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7595 #    else
7596 #      ifdef RTLD_NOW
7597 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7598 #      else
7599 #        ifdef DL_NOW
7600 #          define LT_DLLAZY_OR_NOW      DL_NOW
7601 #        else
7602 #          define LT_DLLAZY_OR_NOW      0
7603 #        endif
7604 #      endif
7605 #    endif
7606 #  endif
7607 #endif
7608
7609 #ifdef __cplusplus
7610 extern "C" void exit (int);
7611 #endif
7612
7613 void fnord() { int i=42;}
7614 int main ()
7615 {
7616   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7617   int status = $lt_dlunknown;
7618
7619   if (self)
7620     {
7621       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7622       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7623       /* dlclose (self); */
7624     }
7625
7626     exit (status);
7627 }
7628 EOF
7629   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7630   (eval $ac_link) 2>&5
7631   ac_status=$?
7632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7633   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7634     (./conftest; exit; ) 2>/dev/null
7635     lt_status=$?
7636     case x$lt_status in
7637       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7638       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7639       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7640     esac
7641   else :
7642     # compilation failed
7643     lt_cv_dlopen_self=no
7644   fi
7645 fi
7646 rm -fr conftest*
7647
7648
7649 fi
7650 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
7651 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
7652
7653     if test "x$lt_cv_dlopen_self" = xyes; then
7654       LDFLAGS="$LDFLAGS $link_static_flag"
7655       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
7656 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
7657 if test "${lt_cv_dlopen_self_static+set}" = set; then
7658   echo $ECHO_N "(cached) $ECHO_C" >&6
7659 else
7660           if test "$cross_compiling" = yes; then :
7661   lt_cv_dlopen_self_static=cross
7662 else
7663     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7664   lt_status=$lt_dlunknown
7665   cat > conftest.$ac_ext <<EOF
7666 #line 7666 "configure"
7667 #include "confdefs.h"
7668
7669 #if HAVE_DLFCN_H
7670 #include <dlfcn.h>
7671 #endif
7672
7673 #include <stdio.h>
7674
7675 #ifdef RTLD_GLOBAL
7676 #  define LT_DLGLOBAL           RTLD_GLOBAL
7677 #else
7678 #  ifdef DL_GLOBAL
7679 #    define LT_DLGLOBAL         DL_GLOBAL
7680 #  else
7681 #    define LT_DLGLOBAL         0
7682 #  endif
7683 #endif
7684
7685 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7686    find out it does not work in some platform. */
7687 #ifndef LT_DLLAZY_OR_NOW
7688 #  ifdef RTLD_LAZY
7689 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7690 #  else
7691 #    ifdef DL_LAZY
7692 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7693 #    else
7694 #      ifdef RTLD_NOW
7695 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7696 #      else
7697 #        ifdef DL_NOW
7698 #          define LT_DLLAZY_OR_NOW      DL_NOW
7699 #        else
7700 #          define LT_DLLAZY_OR_NOW      0
7701 #        endif
7702 #      endif
7703 #    endif
7704 #  endif
7705 #endif
7706
7707 #ifdef __cplusplus
7708 extern "C" void exit (int);
7709 #endif
7710
7711 void fnord() { int i=42;}
7712 int main ()
7713 {
7714   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7715   int status = $lt_dlunknown;
7716
7717   if (self)
7718     {
7719       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7720       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7721       /* dlclose (self); */
7722     }
7723
7724     exit (status);
7725 }
7726 EOF
7727   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7728   (eval $ac_link) 2>&5
7729   ac_status=$?
7730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7731   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7732     (./conftest; exit; ) 2>/dev/null
7733     lt_status=$?
7734     case x$lt_status in
7735       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7736       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7737       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7738     esac
7739   else :
7740     # compilation failed
7741     lt_cv_dlopen_self_static=no
7742   fi
7743 fi
7744 rm -fr conftest*
7745
7746
7747 fi
7748 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
7749 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
7750     fi
7751
7752     CPPFLAGS="$save_CPPFLAGS"
7753     LDFLAGS="$save_LDFLAGS"
7754     LIBS="$save_LIBS"
7755     ;;
7756   esac
7757
7758   case $lt_cv_dlopen_self in
7759   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7760   *) enable_dlopen_self=unknown ;;
7761   esac
7762
7763   case $lt_cv_dlopen_self_static in
7764   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7765   *) enable_dlopen_self_static=unknown ;;
7766   esac
7767 fi
7768
7769
7770 ## FIXME: this should be a separate macro
7771 ##
7772 if test "$enable_shared" = yes && test "$GCC" = yes; then
7773   case $archive_cmds in
7774   *'~'*)
7775     # FIXME: we may have to deal with multi-command sequences.
7776     ;;
7777   '$CC '*)
7778     # Test whether the compiler implicitly links with -lc since on some
7779     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7780     # to ld, don't add -lc before -lgcc.
7781     echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
7782 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
7783     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
7784   echo $ECHO_N "(cached) $ECHO_C" >&6
7785 else
7786   $rm conftest*
7787     echo 'static int dummy;' > conftest.$ac_ext
7788
7789     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7790   (eval $ac_compile) 2>&5
7791   ac_status=$?
7792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793   (exit $ac_status); }; then
7794       soname=conftest
7795       lib=conftest
7796       libobjs=conftest.$ac_objext
7797       deplibs=
7798       wl=$lt_cv_prog_cc_wl
7799       compiler_flags=-v
7800       linker_flags=-v
7801       verstring=
7802       output_objdir=.
7803       libname=conftest
7804       save_allow_undefined_flag=$allow_undefined_flag
7805       allow_undefined_flag=
7806       if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
7807   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
7808   ac_status=$?
7809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7810   (exit $ac_status); }
7811       then
7812         lt_cv_archive_cmds_need_lc=no
7813       else
7814         lt_cv_archive_cmds_need_lc=yes
7815       fi
7816       allow_undefined_flag=$save_allow_undefined_flag
7817     else
7818       cat conftest.err 1>&5
7819     fi
7820 fi
7821
7822     echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
7823 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
7824     ;;
7825   esac
7826 fi
7827 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7828 ##
7829 ## END FIXME
7830
7831 ## FIXME: this should be a separate macro
7832 ##
7833 # The second clause should only fire when bootstrapping the
7834 # libtool distribution, otherwise you forgot to ship ltmain.sh
7835 # with your package, and you will get complaints that there are
7836 # no rules to generate ltmain.sh.
7837 if test -f "$ltmain"; then
7838   :
7839 else
7840   # If there is no Makefile yet, we rely on a make rule to execute
7841   # `config.status --recheck' to rerun these tests and create the
7842   # libtool script then.
7843   test -f Makefile && make "$ltmain"
7844 fi
7845
7846 if test -f "$ltmain"; then
7847   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7848   $rm -f "${ofile}T"
7849
7850   echo creating $ofile
7851
7852   # Now quote all the things that may contain metacharacters while being
7853   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7854   # variables and quote the copies for generation of the libtool script.
7855   for var in echo old_CC old_CFLAGS \
7856     AR AR_FLAGS CC LD LN_S NM SHELL \
7857     reload_flag reload_cmds wl \
7858     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7859     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7860     library_names_spec soname_spec \
7861     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7862     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7863     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7864     old_striplib striplib file_magic_cmd export_symbols_cmds \
7865     deplibs_check_method allow_undefined_flag no_undefined_flag \
7866     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7867     global_symbol_to_c_name_address \
7868     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7869     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7870     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7871
7872     case $var in
7873     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7874     old_postinstall_cmds | old_postuninstall_cmds | \
7875     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7876     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7877     postinstall_cmds | postuninstall_cmds | \
7878     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7879       # Double-quote double-evaled strings.
7880       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7881       ;;
7882     *)
7883       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7884       ;;
7885     esac
7886   done
7887
7888   cat <<__EOF__ > "${ofile}T"
7889 #! $SHELL
7890
7891 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7892 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7893 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7894 #
7895 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7896 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7897 #
7898 # This program is free software; you can redistribute it and/or modify
7899 # it under the terms of the GNU General Public License as published by
7900 # the Free Software Foundation; either version 2 of the License, or
7901 # (at your option) any later version.
7902 #
7903 # This program is distributed in the hope that it will be useful, but
7904 # WITHOUT ANY WARRANTY; without even the implied warranty of
7905 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7906 # General Public License for more details.
7907 #
7908 # You should have received a copy of the GNU General Public License
7909 # along with this program; if not, write to the Free Software
7910 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7911 #
7912 # As a special exception to the GNU General Public License, if you
7913 # distribute this file as part of a program that contains a
7914 # configuration script generated by Autoconf, you may include it under
7915 # the same distribution terms that you use for the rest of that program.
7916
7917 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7918 Xsed="sed -e s/^X//"
7919
7920 # The HP-UX ksh and POSIX shell print the target directory to stdout
7921 # if CDPATH is set.
7922 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7923
7924 # ### BEGIN LIBTOOL CONFIG
7925
7926 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7927
7928 # Shell to use when invoking shell scripts.
7929 SHELL=$lt_SHELL
7930
7931 # Whether or not to build shared libraries.
7932 build_libtool_libs=$enable_shared
7933
7934 # Whether or not to build static libraries.
7935 build_old_libs=$enable_static
7936
7937 # Whether or not to add -lc for building shared libraries.
7938 build_libtool_need_lc=$need_lc
7939
7940 # Whether or not to optimize for fast installation.
7941 fast_install=$enable_fast_install
7942
7943 # The host system.
7944 host_alias=$host_alias
7945 host=$host
7946
7947 # An echo program that does not interpret backslashes.
7948 echo=$lt_echo
7949
7950 # The archiver.
7951 AR=$lt_AR
7952 AR_FLAGS=$lt_AR_FLAGS
7953
7954 # The default C compiler.
7955 CC=$lt_CC
7956
7957 # Is the compiler the GNU C compiler?
7958 with_gcc=$GCC
7959
7960 # The linker used to build libraries.
7961 LD=$lt_LD
7962
7963 # Whether we need hard or soft links.
7964 LN_S=$lt_LN_S
7965
7966 # A BSD-compatible nm program.
7967 NM=$lt_NM
7968
7969 # A symbol stripping program
7970 STRIP=$STRIP
7971
7972 # Used to examine libraries when file_magic_cmd begins "file"
7973 MAGIC_CMD=$MAGIC_CMD
7974
7975 # Used on cygwin: DLL creation program.
7976 DLLTOOL="$DLLTOOL"
7977
7978 # Used on cygwin: object dumper.
7979 OBJDUMP="$OBJDUMP"
7980
7981 # Used on cygwin: assembler.
7982 AS="$AS"
7983
7984 # The name of the directory that contains temporary libtool files.
7985 objdir=$objdir
7986
7987 # How to create reloadable object files.
7988 reload_flag=$lt_reload_flag
7989 reload_cmds=$lt_reload_cmds
7990
7991 # How to pass a linker flag through the compiler.
7992 wl=$lt_wl
7993
7994 # Object file suffix (normally "o").
7995 objext="$ac_objext"
7996
7997 # Old archive suffix (normally "a").
7998 libext="$libext"
7999
8000 # Executable file suffix (normally "").
8001 exeext="$exeext"
8002
8003 # Additional compiler flags for building library objects.
8004 pic_flag=$lt_pic_flag
8005 pic_mode=$pic_mode
8006
8007 # Does compiler simultaneously support -c and -o options?
8008 compiler_c_o=$lt_compiler_c_o
8009
8010 # Can we write directly to a .lo ?
8011 compiler_o_lo=$lt_compiler_o_lo
8012
8013 # Must we lock files when doing compilation ?
8014 need_locks=$lt_need_locks
8015
8016 # Do we need the lib prefix for modules?
8017 need_lib_prefix=$need_lib_prefix
8018
8019 # Do we need a version for libraries?
8020 need_version=$need_version
8021
8022 # Whether dlopen is supported.
8023 dlopen_support=$enable_dlopen
8024
8025 # Whether dlopen of programs is supported.
8026 dlopen_self=$enable_dlopen_self
8027
8028 # Whether dlopen of statically linked programs is supported.
8029 dlopen_self_static=$enable_dlopen_self_static
8030
8031 # Compiler flag to prevent dynamic linking.
8032 link_static_flag=$lt_link_static_flag
8033
8034 # Compiler flag to turn off builtin functions.
8035 no_builtin_flag=$lt_no_builtin_flag
8036
8037 # Compiler flag to allow reflexive dlopens.
8038 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
8039
8040 # Compiler flag to generate shared objects directly from archives.
8041 whole_archive_flag_spec=$lt_whole_archive_flag_spec
8042
8043 # Compiler flag to generate thread-safe objects.
8044 thread_safe_flag_spec=$lt_thread_safe_flag_spec
8045
8046 # Library versioning type.
8047 version_type=$version_type
8048
8049 # Format of library name prefix.
8050 libname_spec=$lt_libname_spec
8051
8052 # List of archive names.  First name is the real one, the rest are links.
8053 # The last name is the one that the linker finds with -lNAME.
8054 library_names_spec=$lt_library_names_spec
8055
8056 # The coded name of the library, if different from the real name.
8057 soname_spec=$lt_soname_spec
8058
8059 # Commands used to build and install an old-style archive.
8060 RANLIB=$lt_RANLIB
8061 old_archive_cmds=$lt_old_archive_cmds
8062 old_postinstall_cmds=$lt_old_postinstall_cmds
8063 old_postuninstall_cmds=$lt_old_postuninstall_cmds
8064
8065 # Create an old-style archive from a shared archive.
8066 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
8067
8068 # Create a temporary old-style archive to link instead of a shared archive.
8069 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
8070
8071 # Commands used to build and install a shared archive.
8072 archive_cmds=$lt_archive_cmds
8073 archive_expsym_cmds=$lt_archive_expsym_cmds
8074 postinstall_cmds=$lt_postinstall_cmds
8075 postuninstall_cmds=$lt_postuninstall_cmds
8076
8077 # Commands to strip libraries.
8078 old_striplib=$lt_old_striplib
8079 striplib=$lt_striplib
8080
8081 # Method to check whether dependent libraries are shared objects.
8082 deplibs_check_method=$lt_deplibs_check_method
8083
8084 # Command to use when deplibs_check_method == file_magic.
8085 file_magic_cmd=$lt_file_magic_cmd
8086
8087 # Flag that allows shared libraries with undefined symbols to be built.
8088 allow_undefined_flag=$lt_allow_undefined_flag
8089
8090 # Flag that forces no undefined symbols.
8091 no_undefined_flag=$lt_no_undefined_flag
8092
8093 # Commands used to finish a libtool library installation in a directory.
8094 finish_cmds=$lt_finish_cmds
8095
8096 # Same as above, but a single script fragment to be evaled but not shown.
8097 finish_eval=$lt_finish_eval
8098
8099 # Take the output of nm and produce a listing of raw symbols and C names.
8100 global_symbol_pipe=$lt_global_symbol_pipe
8101
8102 # Transform the output of nm in a proper C declaration
8103 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
8104
8105 # Transform the output of nm in a C name address pair
8106 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
8107
8108 # This is the shared library runtime path variable.
8109 runpath_var=$runpath_var
8110
8111 # This is the shared library path variable.
8112 shlibpath_var=$shlibpath_var
8113
8114 # Is shlibpath searched before the hard-coded library search path?
8115 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
8116
8117 # How to hardcode a shared library path into an executable.
8118 hardcode_action=$hardcode_action
8119
8120 # Whether we should hardcode library paths into libraries.
8121 hardcode_into_libs=$hardcode_into_libs
8122
8123 # Flag to hardcode \$libdir into a binary during linking.
8124 # This must work even if \$libdir does not exist.
8125 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
8126
8127 # Whether we need a single -rpath flag with a separated argument.
8128 hardcode_libdir_separator=$lt_hardcode_libdir_separator
8129
8130 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
8131 # resulting binary.
8132 hardcode_direct=$hardcode_direct
8133
8134 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
8135 # resulting binary.
8136 hardcode_minus_L=$hardcode_minus_L
8137
8138 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
8139 # the resulting binary.
8140 hardcode_shlibpath_var=$hardcode_shlibpath_var
8141
8142 # Variables whose values should be saved in libtool wrapper scripts and
8143 # restored at relink time.
8144 variables_saved_for_relink="$variables_saved_for_relink"
8145
8146 # Whether libtool must link a program against all its dependency libraries.
8147 link_all_deplibs=$link_all_deplibs
8148
8149 # Compile-time system search path for libraries
8150 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
8151
8152 # Run-time system search path for libraries
8153 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
8154
8155 # Fix the shell variable \$srcfile for the compiler.
8156 fix_srcfile_path="$fix_srcfile_path"
8157
8158 # Set to yes if exported symbols are required.
8159 always_export_symbols=$always_export_symbols
8160
8161 # The commands to list exported symbols.
8162 export_symbols_cmds=$lt_export_symbols_cmds
8163
8164 # The commands to extract the exported symbol list from a shared archive.
8165 extract_expsyms_cmds=$lt_extract_expsyms_cmds
8166
8167 # Symbols that should not be listed in the preloaded symbols.
8168 exclude_expsyms=$lt_exclude_expsyms
8169
8170 # Symbols that must always be exported.
8171 include_expsyms=$lt_include_expsyms
8172
8173 # ### END LIBTOOL CONFIG
8174
8175 __EOF__
8176
8177   case $host_os in
8178   aix3*)
8179     cat <<\EOF >> "${ofile}T"
8180
8181 # AIX sometimes has problems with the GCC collect2 program.  For some
8182 # reason, if we set the COLLECT_NAMES environment variable, the problems
8183 # vanish in a puff of smoke.
8184 if test "X${COLLECT_NAMES+set}" != Xset; then
8185   COLLECT_NAMES=
8186   export COLLECT_NAMES
8187 fi
8188 EOF
8189     ;;
8190   esac
8191
8192   case $host_os in
8193   cygwin* | mingw* | pw32* | os2*)
8194     cat <<'EOF' >> "${ofile}T"
8195       # This is a source program that is used to create dlls on Windows
8196       # Don't remove nor modify the starting and closing comments
8197 # /* ltdll.c starts here */
8198 # #define WIN32_LEAN_AND_MEAN
8199 # #include <windows.h>
8200 # #undef WIN32_LEAN_AND_MEAN
8201 # #include <stdio.h>
8202 #
8203 # #ifndef __CYGWIN__
8204 # #  ifdef __CYGWIN32__
8205 # #    define __CYGWIN__ __CYGWIN32__
8206 # #  endif
8207 # #endif
8208 #
8209 # #ifdef __cplusplus
8210 # extern "C" {
8211 # #endif
8212 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8213 # #ifdef __cplusplus
8214 # }
8215 # #endif
8216 #
8217 # #ifdef __CYGWIN__
8218 # #include <cygwin/cygwin_dll.h>
8219 # DECLARE_CYGWIN_DLL( DllMain );
8220 # #endif
8221 # HINSTANCE __hDllInstance_base;
8222 #
8223 # BOOL APIENTRY
8224 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8225 # {
8226 #   __hDllInstance_base = hInst;
8227 #   return TRUE;
8228 # }
8229 # /* ltdll.c ends here */
8230         # This is a source program that is used to create import libraries
8231         # on Windows for dlls which lack them. Don't remove nor modify the
8232         # starting and closing comments
8233 # /* impgen.c starts here */
8234 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
8235 #
8236 #  This file is part of GNU libtool.
8237 #
8238 #  This program is free software; you can redistribute it and/or modify
8239 #  it under the terms of the GNU General Public License as published by
8240 #  the Free Software Foundation; either version 2 of the License, or
8241 #  (at your option) any later version.
8242 #
8243 #  This program is distributed in the hope that it will be useful,
8244 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
8245 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8246 #  GNU General Public License for more details.
8247 #
8248 #  You should have received a copy of the GNU General Public License
8249 #  along with this program; if not, write to the Free Software
8250 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8251 #  */
8252 #
8253 # #include <stdio.h>            /* for printf() */
8254 # #include <unistd.h>           /* for open(), lseek(), read() */
8255 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
8256 # #include <string.h>           /* for strdup() */
8257 #
8258 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
8259 # #ifndef O_BINARY
8260 # #define O_BINARY 0
8261 # #endif
8262 #
8263 # static unsigned int
8264 # pe_get16 (fd, offset)
8265 #      int fd;
8266 #      int offset;
8267 # {
8268 #   unsigned char b[2];
8269 #   lseek (fd, offset, SEEK_SET);
8270 #   read (fd, b, 2);
8271 #   return b[0] + (b[1]<<8);
8272 # }
8273 #
8274 # static unsigned int
8275 # pe_get32 (fd, offset)
8276 #     int fd;
8277 #     int offset;
8278 # {
8279 #   unsigned char b[4];
8280 #   lseek (fd, offset, SEEK_SET);
8281 #   read (fd, b, 4);
8282 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
8283 # }
8284 #
8285 # static unsigned int
8286 # pe_as32 (ptr)
8287 #      void *ptr;
8288 # {
8289 #   unsigned char *b = ptr;
8290 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
8291 # }
8292 #
8293 # int
8294 # main (argc, argv)
8295 #     int argc;
8296 #     char *argv[];
8297 # {
8298 #     int dll;
8299 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
8300 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
8301 #     unsigned long name_rvas, nexp;
8302 #     unsigned char *expdata, *erva;
8303 #     char *filename, *dll_name;
8304 #
8305 #     filename = argv[1];
8306 #
8307 #     dll = open(filename, O_RDONLY|O_BINARY);
8308 #     if (dll < 1)
8309 #       return 1;
8310 #
8311 #     dll_name = filename;
8312 #
8313 #     for (i=0; filename[i]; i++)
8314 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
8315 #           dll_name = filename + i +1;
8316 #
8317 #     pe_header_offset = pe_get32 (dll, 0x3c);
8318 #     opthdr_ofs = pe_header_offset + 4 + 20;
8319 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
8320 #
8321 #     if (num_entries < 1) /* no exports */
8322 #       return 1;
8323 #
8324 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
8325 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
8326 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
8327 #     secptr = (pe_header_offset + 4 + 20 +
8328 #             pe_get16 (dll, pe_header_offset + 4 + 16));
8329 #
8330 #     expptr = 0;
8331 #     for (i = 0; i < nsections; i++)
8332 #     {
8333 #       char sname[8];
8334 #       unsigned long secptr1 = secptr + 40 * i;
8335 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
8336 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
8337 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
8338 #       lseek(dll, secptr1, SEEK_SET);
8339 #       read(dll, sname, 8);
8340 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
8341 #       {
8342 #           expptr = fptr + (export_rva - vaddr);
8343 #           if (export_rva + export_size > vaddr + vsize)
8344 #               export_size = vsize - (export_rva - vaddr);
8345 #           break;
8346 #       }
8347 #     }
8348 #
8349 #     expdata = (unsigned char*)malloc(export_size);
8350 #     lseek (dll, expptr, SEEK_SET);
8351 #     read (dll, expdata, export_size);
8352 #     erva = expdata - export_rva;
8353 #
8354 #     nexp = pe_as32 (expdata+24);
8355 #     name_rvas = pe_as32 (expdata+32);
8356 #
8357 #     printf ("EXPORTS\n");
8358 #     for (i = 0; i<nexp; i++)
8359 #     {
8360 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
8361 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
8362 #     }
8363 #
8364 #     return 0;
8365 # }
8366 # /* impgen.c ends here */
8367
8368 EOF
8369     ;;
8370   esac
8371
8372   # We use sed instead of cat because bash on DJGPP gets confused if
8373   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
8374   # text mode, it properly converts lines to CR/LF.  This bash problem
8375   # is reportedly fixed, but why not run on old versions too?
8376   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
8377
8378   mv -f "${ofile}T" "$ofile" || \
8379     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
8380   chmod +x "$ofile"
8381 fi
8382 ##
8383 ## END FIXME
8384
8385
8386
8387
8388
8389 # This can be used to rebuild libtool when needed
8390 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8391
8392 # Always use our own libtool.
8393 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8394
8395 # Prevent multiple expansion
8396
8397
8398
8399
8400 for ac_prog in flex lex
8401 do
8402   # Extract the first word of "$ac_prog", so it can be a program name with args.
8403 set dummy $ac_prog; ac_word=$2
8404 echo "$as_me:$LINENO: checking for $ac_word" >&5
8405 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8406 if test "${ac_cv_prog_LEX+set}" = set; then
8407   echo $ECHO_N "(cached) $ECHO_C" >&6
8408 else
8409   if test -n "$LEX"; then
8410   ac_cv_prog_LEX="$LEX" # Let the user override the test.
8411 else
8412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8413 for as_dir in $PATH
8414 do
8415   IFS=$as_save_IFS
8416   test -z "$as_dir" && as_dir=.
8417   for ac_exec_ext in '' $ac_executable_extensions; do
8418   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8419     ac_cv_prog_LEX="$ac_prog"
8420     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8421     break 2
8422   fi
8423 done
8424 done
8425
8426 fi
8427 fi
8428 LEX=$ac_cv_prog_LEX
8429 if test -n "$LEX"; then
8430   echo "$as_me:$LINENO: result: $LEX" >&5
8431 echo "${ECHO_T}$LEX" >&6
8432 else
8433   echo "$as_me:$LINENO: result: no" >&5
8434 echo "${ECHO_T}no" >&6
8435 fi
8436
8437   test -n "$LEX" && break
8438 done
8439 test -n "$LEX" || LEX=":"
8440
8441 if test -z "$LEXLIB"
8442 then
8443   echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
8444 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
8445 if test "${ac_cv_lib_fl_yywrap+set}" = set; then
8446   echo $ECHO_N "(cached) $ECHO_C" >&6
8447 else
8448   ac_check_lib_save_LIBS=$LIBS
8449 LIBS="-lfl  $LIBS"
8450 cat >conftest.$ac_ext <<_ACEOF
8451 /* confdefs.h.  */
8452 _ACEOF
8453 cat confdefs.h >>conftest.$ac_ext
8454 cat >>conftest.$ac_ext <<_ACEOF
8455 /* end confdefs.h.  */
8456
8457 /* Override any gcc2 internal prototype to avoid an error.  */
8458 #ifdef __cplusplus
8459 extern "C"
8460 #endif
8461 /* We use char because int might match the return type of a gcc2
8462    builtin and then its argument prototype would still apply.  */
8463 char yywrap ();
8464 int
8465 main ()
8466 {
8467 yywrap ();
8468   ;
8469   return 0;
8470 }
8471 _ACEOF
8472 rm -f conftest.$ac_objext conftest$ac_exeext
8473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8474   (eval $ac_link) 2>conftest.er1
8475   ac_status=$?
8476   grep -v '^ *+' conftest.er1 >conftest.err
8477   rm -f conftest.er1
8478   cat conftest.err >&5
8479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480   (exit $ac_status); } &&
8481          { ac_try='test -z "$ac_c_werror_flag"
8482                          || test ! -s conftest.err'
8483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8484   (eval $ac_try) 2>&5
8485   ac_status=$?
8486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8487   (exit $ac_status); }; } &&
8488          { ac_try='test -s conftest$ac_exeext'
8489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8490   (eval $ac_try) 2>&5
8491   ac_status=$?
8492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8493   (exit $ac_status); }; }; then
8494   ac_cv_lib_fl_yywrap=yes
8495 else
8496   echo "$as_me: failed program was:" >&5
8497 sed 's/^/| /' conftest.$ac_ext >&5
8498
8499 ac_cv_lib_fl_yywrap=no
8500 fi
8501 rm -f conftest.err conftest.$ac_objext \
8502       conftest$ac_exeext conftest.$ac_ext
8503 LIBS=$ac_check_lib_save_LIBS
8504 fi
8505 echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
8506 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
8507 if test $ac_cv_lib_fl_yywrap = yes; then
8508   LEXLIB="-lfl"
8509 else
8510   echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
8511 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
8512 if test "${ac_cv_lib_l_yywrap+set}" = set; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515   ac_check_lib_save_LIBS=$LIBS
8516 LIBS="-ll  $LIBS"
8517 cat >conftest.$ac_ext <<_ACEOF
8518 /* confdefs.h.  */
8519 _ACEOF
8520 cat confdefs.h >>conftest.$ac_ext
8521 cat >>conftest.$ac_ext <<_ACEOF
8522 /* end confdefs.h.  */
8523
8524 /* Override any gcc2 internal prototype to avoid an error.  */
8525 #ifdef __cplusplus
8526 extern "C"
8527 #endif
8528 /* We use char because int might match the return type of a gcc2
8529    builtin and then its argument prototype would still apply.  */
8530 char yywrap ();
8531 int
8532 main ()
8533 {
8534 yywrap ();
8535   ;
8536   return 0;
8537 }
8538 _ACEOF
8539 rm -f conftest.$ac_objext conftest$ac_exeext
8540 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8541   (eval $ac_link) 2>conftest.er1
8542   ac_status=$?
8543   grep -v '^ *+' conftest.er1 >conftest.err
8544   rm -f conftest.er1
8545   cat conftest.err >&5
8546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -z "$ac_c_werror_flag"
8549                          || test ! -s conftest.err'
8550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8551   (eval $ac_try) 2>&5
8552   ac_status=$?
8553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554   (exit $ac_status); }; } &&
8555          { ac_try='test -s conftest$ac_exeext'
8556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557   (eval $ac_try) 2>&5
8558   ac_status=$?
8559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560   (exit $ac_status); }; }; then
8561   ac_cv_lib_l_yywrap=yes
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 sed 's/^/| /' conftest.$ac_ext >&5
8565
8566 ac_cv_lib_l_yywrap=no
8567 fi
8568 rm -f conftest.err conftest.$ac_objext \
8569       conftest$ac_exeext conftest.$ac_ext
8570 LIBS=$ac_check_lib_save_LIBS
8571 fi
8572 echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
8573 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
8574 if test $ac_cv_lib_l_yywrap = yes; then
8575   LEXLIB="-ll"
8576 fi
8577
8578 fi
8579
8580 fi
8581
8582 if test "x$LEX" != "x:"; then
8583   echo "$as_me:$LINENO: checking lex output file root" >&5
8584 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
8585 if test "${ac_cv_prog_lex_root+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588   # The minimal lex program is just a single line: %%.  But some broken lexes
8589 # (Solaris, I think it was) want two %% lines, so accommodate them.
8590 cat >conftest.l <<_ACEOF
8591 %%
8592 %%
8593 _ACEOF
8594 { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
8595   (eval $LEX conftest.l) 2>&5
8596   ac_status=$?
8597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8598   (exit $ac_status); }
8599 if test -f lex.yy.c; then
8600   ac_cv_prog_lex_root=lex.yy
8601 elif test -f lexyy.c; then
8602   ac_cv_prog_lex_root=lexyy
8603 else
8604   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
8605 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
8606    { (exit 1); exit 1; }; }
8607 fi
8608 fi
8609 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
8610 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
8611 rm -f conftest.l
8612 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8613
8614 echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
8615 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
8616 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
8617   echo $ECHO_N "(cached) $ECHO_C" >&6
8618 else
8619   # POSIX says lex can declare yytext either as a pointer or an array; the
8620 # default is implementation-dependent. Figure out which it is, since
8621 # not all implementations provide the %pointer and %array declarations.
8622 ac_cv_prog_lex_yytext_pointer=no
8623 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
8624 ac_save_LIBS=$LIBS
8625 LIBS="$LIBS $LEXLIB"
8626 cat >conftest.$ac_ext <<_ACEOF
8627 `cat $LEX_OUTPUT_ROOT.c`
8628 _ACEOF
8629 rm -f conftest.$ac_objext conftest$ac_exeext
8630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8631   (eval $ac_link) 2>conftest.er1
8632   ac_status=$?
8633   grep -v '^ *+' conftest.er1 >conftest.err
8634   rm -f conftest.er1
8635   cat conftest.err >&5
8636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8637   (exit $ac_status); } &&
8638          { ac_try='test -z "$ac_c_werror_flag"
8639                          || test ! -s conftest.err'
8640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8641   (eval $ac_try) 2>&5
8642   ac_status=$?
8643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8644   (exit $ac_status); }; } &&
8645          { ac_try='test -s conftest$ac_exeext'
8646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8647   (eval $ac_try) 2>&5
8648   ac_status=$?
8649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650   (exit $ac_status); }; }; then
8651   ac_cv_prog_lex_yytext_pointer=yes
8652 else
8653   echo "$as_me: failed program was:" >&5
8654 sed 's/^/| /' conftest.$ac_ext >&5
8655
8656 fi
8657 rm -f conftest.err conftest.$ac_objext \
8658       conftest$ac_exeext conftest.$ac_ext
8659 LIBS=$ac_save_LIBS
8660 rm -f "${LEX_OUTPUT_ROOT}.c"
8661
8662 fi
8663 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
8664 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
8665 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8666
8667 cat >>confdefs.h <<\_ACEOF
8668 #define YYTEXT_POINTER 1
8669 _ACEOF
8670
8671 fi
8672
8673 fi
8674 if test ${LEX} = "flex"; then
8675         cat >>confdefs.h <<\_ACEOF
8676 #define HAVE_FLEX 1
8677 _ACEOF
8678
8679 fi
8680 for ac_prog in 'bison -y' byacc
8681 do
8682   # Extract the first word of "$ac_prog", so it can be a program name with args.
8683 set dummy $ac_prog; ac_word=$2
8684 echo "$as_me:$LINENO: checking for $ac_word" >&5
8685 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8686 if test "${ac_cv_prog_YACC+set}" = set; then
8687   echo $ECHO_N "(cached) $ECHO_C" >&6
8688 else
8689   if test -n "$YACC"; then
8690   ac_cv_prog_YACC="$YACC" # Let the user override the test.
8691 else
8692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8693 for as_dir in $PATH
8694 do
8695   IFS=$as_save_IFS
8696   test -z "$as_dir" && as_dir=.
8697   for ac_exec_ext in '' $ac_executable_extensions; do
8698   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8699     ac_cv_prog_YACC="$ac_prog"
8700     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8701     break 2
8702   fi
8703 done
8704 done
8705
8706 fi
8707 fi
8708 YACC=$ac_cv_prog_YACC
8709 if test -n "$YACC"; then
8710   echo "$as_me:$LINENO: result: $YACC" >&5
8711 echo "${ECHO_T}$YACC" >&6
8712 else
8713   echo "$as_me:$LINENO: result: no" >&5
8714 echo "${ECHO_T}no" >&6
8715 fi
8716
8717   test -n "$YACC" && break
8718 done
8719 test -n "$YACC" || YACC="yacc"
8720
8721 # Extract the first word of "bison++", so it can be a program name with args.
8722 set dummy bison++; ac_word=$2
8723 echo "$as_me:$LINENO: checking for $ac_word" >&5
8724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8725 if test "${ac_cv_prog_BISON_PLUS_PLUS+set}" = set; then
8726   echo $ECHO_N "(cached) $ECHO_C" >&6
8727 else
8728   if test -n "$BISON_PLUS_PLUS"; then
8729   ac_cv_prog_BISON_PLUS_PLUS="$BISON_PLUS_PLUS" # Let the user override the test.
8730 else
8731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732 for as_dir in $PATH
8733 do
8734   IFS=$as_save_IFS
8735   test -z "$as_dir" && as_dir=.
8736   for ac_exec_ext in '' $ac_executable_extensions; do
8737   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738     ac_cv_prog_BISON_PLUS_PLUS="bison++"
8739     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8740     break 2
8741   fi
8742 done
8743 done
8744
8745   test -z "$ac_cv_prog_BISON_PLUS_PLUS" && ac_cv_prog_BISON_PLUS_PLUS=":"
8746 fi
8747 fi
8748 BISON_PLUS_PLUS=$ac_cv_prog_BISON_PLUS_PLUS
8749 if test -n "$BISON_PLUS_PLUS"; then
8750   echo "$as_me:$LINENO: result: $BISON_PLUS_PLUS" >&5
8751 echo "${ECHO_T}$BISON_PLUS_PLUS" >&6
8752 else
8753   echo "$as_me:$LINENO: result: no" >&5
8754 echo "${ECHO_T}no" >&6
8755 fi
8756
8757
8758
8759 ac_ext=cc
8760 ac_cpp='$CXXCPP $CPPFLAGS'
8761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8764
8765
8766 # Checking for header files.
8767 # ===========================================================================
8768
8769 if test -d /stuff/include; then
8770   CPPFLAGS="$CPPFLAGS -I/stuff/include"
8771 fi
8772
8773
8774
8775 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8776 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8777 if test "${ac_cv_header_stdc+set}" = set; then
8778   echo $ECHO_N "(cached) $ECHO_C" >&6
8779 else
8780   cat >conftest.$ac_ext <<_ACEOF
8781 /* confdefs.h.  */
8782 _ACEOF
8783 cat confdefs.h >>conftest.$ac_ext
8784 cat >>conftest.$ac_ext <<_ACEOF
8785 /* end confdefs.h.  */
8786 #include <stdlib.h>
8787 #include <stdarg.h>
8788 #include <string.h>
8789 #include <float.h>
8790
8791 int
8792 main ()
8793 {
8794
8795   ;
8796   return 0;
8797 }
8798 _ACEOF
8799 rm -f conftest.$ac_objext
8800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8801   (eval $ac_compile) 2>conftest.er1
8802   ac_status=$?
8803   grep -v '^ *+' conftest.er1 >conftest.err
8804   rm -f conftest.er1
8805   cat conftest.err >&5
8806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -z "$ac_cxx_werror_flag"
8809                          || test ! -s conftest.err'
8810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8811   (eval $ac_try) 2>&5
8812   ac_status=$?
8813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814   (exit $ac_status); }; } &&
8815          { ac_try='test -s conftest.$ac_objext'
8816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8817   (eval $ac_try) 2>&5
8818   ac_status=$?
8819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8820   (exit $ac_status); }; }; then
8821   ac_cv_header_stdc=yes
8822 else
8823   echo "$as_me: failed program was:" >&5
8824 sed 's/^/| /' conftest.$ac_ext >&5
8825
8826 ac_cv_header_stdc=no
8827 fi
8828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8829
8830 if test $ac_cv_header_stdc = yes; then
8831   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8832   cat >conftest.$ac_ext <<_ACEOF
8833 /* confdefs.h.  */
8834 _ACEOF
8835 cat confdefs.h >>conftest.$ac_ext
8836 cat >>conftest.$ac_ext <<_ACEOF
8837 /* end confdefs.h.  */
8838 #include <string.h>
8839
8840 _ACEOF
8841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8842   $EGREP "memchr" >/dev/null 2>&1; then
8843   :
8844 else
8845   ac_cv_header_stdc=no
8846 fi
8847 rm -f conftest*
8848
8849 fi
8850
8851 if test $ac_cv_header_stdc = yes; then
8852   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8853   cat >conftest.$ac_ext <<_ACEOF
8854 /* confdefs.h.  */
8855 _ACEOF
8856 cat confdefs.h >>conftest.$ac_ext
8857 cat >>conftest.$ac_ext <<_ACEOF
8858 /* end confdefs.h.  */
8859 #include <stdlib.h>
8860
8861 _ACEOF
8862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8863   $EGREP "free" >/dev/null 2>&1; then
8864   :
8865 else
8866   ac_cv_header_stdc=no
8867 fi
8868 rm -f conftest*
8869
8870 fi
8871
8872 if test $ac_cv_header_stdc = yes; then
8873   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8874   if test "$cross_compiling" = yes; then
8875   :
8876 else
8877   cat >conftest.$ac_ext <<_ACEOF
8878 /* confdefs.h.  */
8879 _ACEOF
8880 cat confdefs.h >>conftest.$ac_ext
8881 cat >>conftest.$ac_ext <<_ACEOF
8882 /* end confdefs.h.  */
8883 #include <ctype.h>
8884 #if ((' ' & 0x0FF) == 0x020)
8885 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8886 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8887 #else
8888 # define ISLOWER(c) \
8889                    (('a' <= (c) && (c) <= 'i') \
8890                      || ('j' <= (c) && (c) <= 'r') \
8891                      || ('s' <= (c) && (c) <= 'z'))
8892 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8893 #endif
8894
8895 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8896 int
8897 main ()
8898 {
8899   int i;
8900   for (i = 0; i < 256; i++)
8901     if (XOR (islower (i), ISLOWER (i))
8902         || toupper (i) != TOUPPER (i))
8903       exit(2);
8904   exit (0);
8905 }
8906 _ACEOF
8907 rm -f conftest$ac_exeext
8908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8909   (eval $ac_link) 2>&5
8910   ac_status=$?
8911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8914   (eval $ac_try) 2>&5
8915   ac_status=$?
8916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917   (exit $ac_status); }; }; then
8918   :
8919 else
8920   echo "$as_me: program exited with status $ac_status" >&5
8921 echo "$as_me: failed program was:" >&5
8922 sed 's/^/| /' conftest.$ac_ext >&5
8923
8924 ( exit $ac_status )
8925 ac_cv_header_stdc=no
8926 fi
8927 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8928 fi
8929 fi
8930 fi
8931 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8932 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8933 if test $ac_cv_header_stdc = yes; then
8934
8935 cat >>confdefs.h <<\_ACEOF
8936 #define STDC_HEADERS 1
8937 _ACEOF
8938
8939 fi
8940
8941
8942
8943
8944 for ac_header in getopt.h unistd.h termios.h
8945 do
8946 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8947 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8948   echo "$as_me:$LINENO: checking for $ac_header" >&5
8949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8951   echo $ECHO_N "(cached) $ECHO_C" >&6
8952 fi
8953 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8954 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8955 else
8956   # Is the header compilable?
8957 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8958 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8959 cat >conftest.$ac_ext <<_ACEOF
8960 /* confdefs.h.  */
8961 _ACEOF
8962 cat confdefs.h >>conftest.$ac_ext
8963 cat >>conftest.$ac_ext <<_ACEOF
8964 /* end confdefs.h.  */
8965 $ac_includes_default
8966 #include <$ac_header>
8967 _ACEOF
8968 rm -f conftest.$ac_objext
8969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8970   (eval $ac_compile) 2>conftest.er1
8971   ac_status=$?
8972   grep -v '^ *+' conftest.er1 >conftest.err
8973   rm -f conftest.er1
8974   cat conftest.err >&5
8975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8976   (exit $ac_status); } &&
8977          { ac_try='test -z "$ac_cxx_werror_flag"
8978                          || test ! -s conftest.err'
8979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8980   (eval $ac_try) 2>&5
8981   ac_status=$?
8982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983   (exit $ac_status); }; } &&
8984          { ac_try='test -s conftest.$ac_objext'
8985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8986   (eval $ac_try) 2>&5
8987   ac_status=$?
8988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989   (exit $ac_status); }; }; then
8990   ac_header_compiler=yes
8991 else
8992   echo "$as_me: failed program was:" >&5
8993 sed 's/^/| /' conftest.$ac_ext >&5
8994
8995 ac_header_compiler=no
8996 fi
8997 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8998 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8999 echo "${ECHO_T}$ac_header_compiler" >&6
9000
9001 # Is the header present?
9002 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9003 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9004 cat >conftest.$ac_ext <<_ACEOF
9005 /* confdefs.h.  */
9006 _ACEOF
9007 cat confdefs.h >>conftest.$ac_ext
9008 cat >>conftest.$ac_ext <<_ACEOF
9009 /* end confdefs.h.  */
9010 #include <$ac_header>
9011 _ACEOF
9012 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9014   ac_status=$?
9015   grep -v '^ *+' conftest.er1 >conftest.err
9016   rm -f conftest.er1
9017   cat conftest.err >&5
9018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019   (exit $ac_status); } >/dev/null; then
9020   if test -s conftest.err; then
9021     ac_cpp_err=$ac_cxx_preproc_warn_flag
9022     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9023   else
9024     ac_cpp_err=
9025   fi
9026 else
9027   ac_cpp_err=yes
9028 fi
9029 if test -z "$ac_cpp_err"; then
9030   ac_header_preproc=yes
9031 else
9032   echo "$as_me: failed program was:" >&5
9033 sed 's/^/| /' conftest.$ac_ext >&5
9034
9035   ac_header_preproc=no
9036 fi
9037 rm -f conftest.err conftest.$ac_ext
9038 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9039 echo "${ECHO_T}$ac_header_preproc" >&6
9040
9041 # So?  What about this header?
9042 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9043   yes:no: )
9044     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9045 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9046     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9047 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9048     ac_header_preproc=yes
9049     ;;
9050   no:yes:* )
9051     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9052 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9053     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9054 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9055     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9056 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9057     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9058 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9059     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9060 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9061     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9062 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9063     (
9064       cat <<\_ASBOX
9065 ## ------------------------------------------ ##
9066 ## Report this to the AC_PACKAGE_NAME lists.  ##
9067 ## ------------------------------------------ ##
9068 _ASBOX
9069     ) |
9070       sed "s/^/$as_me: WARNING:     /" >&2
9071     ;;
9072 esac
9073 echo "$as_me:$LINENO: checking for $ac_header" >&5
9074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9076   echo $ECHO_N "(cached) $ECHO_C" >&6
9077 else
9078   eval "$as_ac_Header=\$ac_header_preproc"
9079 fi
9080 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9082
9083 fi
9084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9085   cat >>confdefs.h <<_ACEOF
9086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9087 _ACEOF
9088
9089 fi
9090
9091 done
9092
9093
9094 if test "${ac_cv_header_curses_h+set}" = set; then
9095   echo "$as_me:$LINENO: checking for curses.h" >&5
9096 echo $ECHO_N "checking for curses.h... $ECHO_C" >&6
9097 if test "${ac_cv_header_curses_h+set}" = set; then
9098   echo $ECHO_N "(cached) $ECHO_C" >&6
9099 fi
9100 echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
9101 echo "${ECHO_T}$ac_cv_header_curses_h" >&6
9102 else
9103   # Is the header compilable?
9104 echo "$as_me:$LINENO: checking curses.h usability" >&5
9105 echo $ECHO_N "checking curses.h usability... $ECHO_C" >&6
9106 cat >conftest.$ac_ext <<_ACEOF
9107 /* confdefs.h.  */
9108 _ACEOF
9109 cat confdefs.h >>conftest.$ac_ext
9110 cat >>conftest.$ac_ext <<_ACEOF
9111 /* end confdefs.h.  */
9112 $ac_includes_default
9113 #include <curses.h>
9114 _ACEOF
9115 rm -f conftest.$ac_objext
9116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9117   (eval $ac_compile) 2>conftest.er1
9118   ac_status=$?
9119   grep -v '^ *+' conftest.er1 >conftest.err
9120   rm -f conftest.er1
9121   cat conftest.err >&5
9122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9123   (exit $ac_status); } &&
9124          { ac_try='test -z "$ac_cxx_werror_flag"
9125                          || test ! -s conftest.err'
9126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9127   (eval $ac_try) 2>&5
9128   ac_status=$?
9129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130   (exit $ac_status); }; } &&
9131          { ac_try='test -s conftest.$ac_objext'
9132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133   (eval $ac_try) 2>&5
9134   ac_status=$?
9135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136   (exit $ac_status); }; }; then
9137   ac_header_compiler=yes
9138 else
9139   echo "$as_me: failed program was:" >&5
9140 sed 's/^/| /' conftest.$ac_ext >&5
9141
9142 ac_header_compiler=no
9143 fi
9144 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9145 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9146 echo "${ECHO_T}$ac_header_compiler" >&6
9147
9148 # Is the header present?
9149 echo "$as_me:$LINENO: checking curses.h presence" >&5
9150 echo $ECHO_N "checking curses.h presence... $ECHO_C" >&6
9151 cat >conftest.$ac_ext <<_ACEOF
9152 /* confdefs.h.  */
9153 _ACEOF
9154 cat confdefs.h >>conftest.$ac_ext
9155 cat >>conftest.$ac_ext <<_ACEOF
9156 /* end confdefs.h.  */
9157 #include <curses.h>
9158 _ACEOF
9159 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9161   ac_status=$?
9162   grep -v '^ *+' conftest.er1 >conftest.err
9163   rm -f conftest.er1
9164   cat conftest.err >&5
9165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166   (exit $ac_status); } >/dev/null; then
9167   if test -s conftest.err; then
9168     ac_cpp_err=$ac_cxx_preproc_warn_flag
9169     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9170   else
9171     ac_cpp_err=
9172   fi
9173 else
9174   ac_cpp_err=yes
9175 fi
9176 if test -z "$ac_cpp_err"; then
9177   ac_header_preproc=yes
9178 else
9179   echo "$as_me: failed program was:" >&5
9180 sed 's/^/| /' conftest.$ac_ext >&5
9181
9182   ac_header_preproc=no
9183 fi
9184 rm -f conftest.err conftest.$ac_ext
9185 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9186 echo "${ECHO_T}$ac_header_preproc" >&6
9187
9188 # So?  What about this header?
9189 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9190   yes:no: )
9191     { echo "$as_me:$LINENO: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&5
9192 echo "$as_me: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9193     { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the compiler's result" >&5
9194 echo "$as_me: WARNING: curses.h: proceeding with the compiler's result" >&2;}
9195     ac_header_preproc=yes
9196     ;;
9197   no:yes:* )
9198     { echo "$as_me:$LINENO: WARNING: curses.h: present but cannot be compiled" >&5
9199 echo "$as_me: WARNING: curses.h: present but cannot be compiled" >&2;}
9200     { echo "$as_me:$LINENO: WARNING: curses.h:     check for missing prerequisite headers?" >&5
9201 echo "$as_me: WARNING: curses.h:     check for missing prerequisite headers?" >&2;}
9202     { echo "$as_me:$LINENO: WARNING: curses.h: see the Autoconf documentation" >&5
9203 echo "$as_me: WARNING: curses.h: see the Autoconf documentation" >&2;}
9204     { echo "$as_me:$LINENO: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&5
9205 echo "$as_me: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9206     { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the preprocessor's result" >&5
9207 echo "$as_me: WARNING: curses.h: proceeding with the preprocessor's result" >&2;}
9208     { echo "$as_me:$LINENO: WARNING: curses.h: in the future, the compiler will take precedence" >&5
9209 echo "$as_me: WARNING: curses.h: in the future, the compiler will take precedence" >&2;}
9210     (
9211       cat <<\_ASBOX
9212 ## ------------------------------------------ ##
9213 ## Report this to the AC_PACKAGE_NAME lists.  ##
9214 ## ------------------------------------------ ##
9215 _ASBOX
9216     ) |
9217       sed "s/^/$as_me: WARNING:     /" >&2
9218     ;;
9219 esac
9220 echo "$as_me:$LINENO: checking for curses.h" >&5
9221 echo $ECHO_N "checking for curses.h... $ECHO_C" >&6
9222 if test "${ac_cv_header_curses_h+set}" = set; then
9223   echo $ECHO_N "(cached) $ECHO_C" >&6
9224 else
9225   ac_cv_header_curses_h=$ac_header_preproc
9226 fi
9227 echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
9228 echo "${ECHO_T}$ac_cv_header_curses_h" >&6
9229
9230 fi
9231 if test $ac_cv_header_curses_h = yes; then
9232   cat >>confdefs.h <<\_ACEOF
9233 #define HAVE_CURSES_H 1
9234 _ACEOF
9235
9236   curses_h_ok=yes
9237 else
9238   curses_h_ok=no
9239
9240 fi
9241
9242
9243
9244 ucsim_cv_socket="unknown"
9245 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9246   echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9247 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9248 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 fi
9251 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9252 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9253 else
9254   # Is the header compilable?
9255 echo "$as_me:$LINENO: checking sys/socket.h usability" >&5
9256 echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6
9257 cat >conftest.$ac_ext <<_ACEOF
9258 /* confdefs.h.  */
9259 _ACEOF
9260 cat confdefs.h >>conftest.$ac_ext
9261 cat >>conftest.$ac_ext <<_ACEOF
9262 /* end confdefs.h.  */
9263 $ac_includes_default
9264 #include <sys/socket.h>
9265 _ACEOF
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9268   (eval $ac_compile) 2>conftest.er1
9269   ac_status=$?
9270   grep -v '^ *+' conftest.er1 >conftest.err
9271   rm -f conftest.er1
9272   cat conftest.err >&5
9273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274   (exit $ac_status); } &&
9275          { ac_try='test -z "$ac_cxx_werror_flag"
9276                          || test ! -s conftest.err'
9277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9278   (eval $ac_try) 2>&5
9279   ac_status=$?
9280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9281   (exit $ac_status); }; } &&
9282          { ac_try='test -s conftest.$ac_objext'
9283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9284   (eval $ac_try) 2>&5
9285   ac_status=$?
9286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9287   (exit $ac_status); }; }; then
9288   ac_header_compiler=yes
9289 else
9290   echo "$as_me: failed program was:" >&5
9291 sed 's/^/| /' conftest.$ac_ext >&5
9292
9293 ac_header_compiler=no
9294 fi
9295 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9296 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9297 echo "${ECHO_T}$ac_header_compiler" >&6
9298
9299 # Is the header present?
9300 echo "$as_me:$LINENO: checking sys/socket.h presence" >&5
9301 echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6
9302 cat >conftest.$ac_ext <<_ACEOF
9303 /* confdefs.h.  */
9304 _ACEOF
9305 cat confdefs.h >>conftest.$ac_ext
9306 cat >>conftest.$ac_ext <<_ACEOF
9307 /* end confdefs.h.  */
9308 #include <sys/socket.h>
9309 _ACEOF
9310 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9311   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9312   ac_status=$?
9313   grep -v '^ *+' conftest.er1 >conftest.err
9314   rm -f conftest.er1
9315   cat conftest.err >&5
9316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9317   (exit $ac_status); } >/dev/null; then
9318   if test -s conftest.err; then
9319     ac_cpp_err=$ac_cxx_preproc_warn_flag
9320     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9321   else
9322     ac_cpp_err=
9323   fi
9324 else
9325   ac_cpp_err=yes
9326 fi
9327 if test -z "$ac_cpp_err"; then
9328   ac_header_preproc=yes
9329 else
9330   echo "$as_me: failed program was:" >&5
9331 sed 's/^/| /' conftest.$ac_ext >&5
9332
9333   ac_header_preproc=no
9334 fi
9335 rm -f conftest.err conftest.$ac_ext
9336 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9337 echo "${ECHO_T}$ac_header_preproc" >&6
9338
9339 # So?  What about this header?
9340 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9341   yes:no: )
9342     { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
9343 echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9344     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5
9345 echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;}
9346     ac_header_preproc=yes
9347     ;;
9348   no:yes:* )
9349     { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5
9350 echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;}
9351     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&5
9352 echo "$as_me: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&2;}
9353     { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5
9354 echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;}
9355     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&5
9356 echo "$as_me: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9357     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
9358 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
9359     { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5
9360 echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;}
9361     (
9362       cat <<\_ASBOX
9363 ## ------------------------------------------ ##
9364 ## Report this to the AC_PACKAGE_NAME lists.  ##
9365 ## ------------------------------------------ ##
9366 _ASBOX
9367     ) |
9368       sed "s/^/$as_me: WARNING:     /" >&2
9369     ;;
9370 esac
9371 echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9372 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9373 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9374   echo $ECHO_N "(cached) $ECHO_C" >&6
9375 else
9376   ac_cv_header_sys_socket_h=$ac_header_preproc
9377 fi
9378 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9379 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9380
9381 fi
9382 if test $ac_cv_header_sys_socket_h = yes; then
9383   cat >>confdefs.h <<\_ACEOF
9384 #define HAVE_SYS_SOCKET_H 1
9385 _ACEOF
9386
9387   cat >>confdefs.h <<\_ACEOF
9388 #define SOCKET_AVAIL 1
9389 _ACEOF
9390
9391   cat >>confdefs.h <<_ACEOF
9392 #define UCSOCKET_T int
9393 _ACEOF
9394
9395   ucsim_cv_socket="<sys/socket.h>"
9396
9397 fi
9398
9399
9400
9401 WINSOCK_AVAIL=0
9402 if test $ucsim_cv_socket = unknown; then
9403   if test "${ac_cv_header_winsock2_h+set}" = set; then
9404   echo "$as_me:$LINENO: checking for winsock2.h" >&5
9405 echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
9406 if test "${ac_cv_header_winsock2_h+set}" = set; then
9407   echo $ECHO_N "(cached) $ECHO_C" >&6
9408 fi
9409 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
9410 echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
9411 else
9412   # Is the header compilable?
9413 echo "$as_me:$LINENO: checking winsock2.h usability" >&5
9414 echo $ECHO_N "checking winsock2.h usability... $ECHO_C" >&6
9415 cat >conftest.$ac_ext <<_ACEOF
9416 /* confdefs.h.  */
9417 _ACEOF
9418 cat confdefs.h >>conftest.$ac_ext
9419 cat >>conftest.$ac_ext <<_ACEOF
9420 /* end confdefs.h.  */
9421 $ac_includes_default
9422 #include <winsock2.h>
9423 _ACEOF
9424 rm -f conftest.$ac_objext
9425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9426   (eval $ac_compile) 2>conftest.er1
9427   ac_status=$?
9428   grep -v '^ *+' conftest.er1 >conftest.err
9429   rm -f conftest.er1
9430   cat conftest.err >&5
9431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9432   (exit $ac_status); } &&
9433          { ac_try='test -z "$ac_cxx_werror_flag"
9434                          || test ! -s conftest.err'
9435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9436   (eval $ac_try) 2>&5
9437   ac_status=$?
9438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9439   (exit $ac_status); }; } &&
9440          { ac_try='test -s conftest.$ac_objext'
9441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9442   (eval $ac_try) 2>&5
9443   ac_status=$?
9444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9445   (exit $ac_status); }; }; then
9446   ac_header_compiler=yes
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 sed 's/^/| /' conftest.$ac_ext >&5
9450
9451 ac_header_compiler=no
9452 fi
9453 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9454 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9455 echo "${ECHO_T}$ac_header_compiler" >&6
9456
9457 # Is the header present?
9458 echo "$as_me:$LINENO: checking winsock2.h presence" >&5
9459 echo $ECHO_N "checking winsock2.h presence... $ECHO_C" >&6
9460 cat >conftest.$ac_ext <<_ACEOF
9461 /* confdefs.h.  */
9462 _ACEOF
9463 cat confdefs.h >>conftest.$ac_ext
9464 cat >>conftest.$ac_ext <<_ACEOF
9465 /* end confdefs.h.  */
9466 #include <winsock2.h>
9467 _ACEOF
9468 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9469   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9470   ac_status=$?
9471   grep -v '^ *+' conftest.er1 >conftest.err
9472   rm -f conftest.er1
9473   cat conftest.err >&5
9474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9475   (exit $ac_status); } >/dev/null; then
9476   if test -s conftest.err; then
9477     ac_cpp_err=$ac_cxx_preproc_warn_flag
9478     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9479   else
9480     ac_cpp_err=
9481   fi
9482 else
9483   ac_cpp_err=yes
9484 fi
9485 if test -z "$ac_cpp_err"; then
9486   ac_header_preproc=yes
9487 else
9488   echo "$as_me: failed program was:" >&5
9489 sed 's/^/| /' conftest.$ac_ext >&5
9490
9491   ac_header_preproc=no
9492 fi
9493 rm -f conftest.err conftest.$ac_ext
9494 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9495 echo "${ECHO_T}$ac_header_preproc" >&6
9496
9497 # So?  What about this header?
9498 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9499   yes:no: )
9500     { echo "$as_me:$LINENO: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&5
9501 echo "$as_me: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9502     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the compiler's result" >&5
9503 echo "$as_me: WARNING: winsock2.h: proceeding with the compiler's result" >&2;}
9504     ac_header_preproc=yes
9505     ;;
9506   no:yes:* )
9507     { echo "$as_me:$LINENO: WARNING: winsock2.h: present but cannot be compiled" >&5
9508 echo "$as_me: WARNING: winsock2.h: present but cannot be compiled" >&2;}
9509     { echo "$as_me:$LINENO: WARNING: winsock2.h:     check for missing prerequisite headers?" >&5
9510 echo "$as_me: WARNING: winsock2.h:     check for missing prerequisite headers?" >&2;}
9511     { echo "$as_me:$LINENO: WARNING: winsock2.h: see the Autoconf documentation" >&5
9512 echo "$as_me: WARNING: winsock2.h: see the Autoconf documentation" >&2;}
9513     { echo "$as_me:$LINENO: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&5
9514 echo "$as_me: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9515     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the preprocessor's result" >&5
9516 echo "$as_me: WARNING: winsock2.h: proceeding with the preprocessor's result" >&2;}
9517     { echo "$as_me:$LINENO: WARNING: winsock2.h: in the future, the compiler will take precedence" >&5
9518 echo "$as_me: WARNING: winsock2.h: in the future, the compiler will take precedence" >&2;}
9519     (
9520       cat <<\_ASBOX
9521 ## ------------------------------------------ ##
9522 ## Report this to the AC_PACKAGE_NAME lists.  ##
9523 ## ------------------------------------------ ##
9524 _ASBOX
9525     ) |
9526       sed "s/^/$as_me: WARNING:     /" >&2
9527     ;;
9528 esac
9529 echo "$as_me:$LINENO: checking for winsock2.h" >&5
9530 echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
9531 if test "${ac_cv_header_winsock2_h+set}" = set; then
9532   echo $ECHO_N "(cached) $ECHO_C" >&6
9533 else
9534   ac_cv_header_winsock2_h=$ac_header_preproc
9535 fi
9536 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
9537 echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
9538
9539 fi
9540 if test $ac_cv_header_winsock2_h = yes; then
9541   cat >>confdefs.h <<\_ACEOF
9542 #define HAVE_WINSOCK2_H 1
9543 _ACEOF
9544
9545     cat >>confdefs.h <<\_ACEOF
9546 #define SOCKET_AVAIL 1
9547 _ACEOF
9548
9549     cat >>confdefs.h <<_ACEOF
9550 #define UCSOCKET_T SOCKET
9551 _ACEOF
9552
9553     ucsim_cv_socket="<winsock2.h>"
9554     WINSOCK_AVAIL=1
9555
9556 fi
9557
9558
9559 fi
9560
9561
9562 if test $ucsim_cv_socket != unknown; then
9563   cat >conftest.$ac_ext <<_ACEOF
9564 /* confdefs.h.  */
9565 _ACEOF
9566 cat confdefs.h >>conftest.$ac_ext
9567 cat >>conftest.$ac_ext <<_ACEOF
9568 /* end confdefs.h.  */
9569 #include <$ucsim_cv_socket>
9570
9571 _ACEOF
9572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9573   $EGREP "socklen_t" >/dev/null 2>&1; then
9574   cat >>confdefs.h <<_ACEOF
9575 #define SOCKLEN_T socklen_t
9576 _ACEOF
9577
9578 else
9579   cat >>confdefs.h <<_ACEOF
9580 #define SOCKLEN_T uint
9581 _ACEOF
9582
9583 fi
9584 rm -f conftest*
9585
9586 fi
9587 cat >>confdefs.h <<_ACEOF
9588 #define HEADER_SOCKET ${ucsim_cv_socket}
9589 _ACEOF
9590
9591
9592 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9593   echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9594 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
9595 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9596   echo $ECHO_N "(cached) $ECHO_C" >&6
9597 fi
9598 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9599 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
9600 else
9601   # Is the header compilable?
9602 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
9603 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
9604 cat >conftest.$ac_ext <<_ACEOF
9605 /* confdefs.h.  */
9606 _ACEOF
9607 cat confdefs.h >>conftest.$ac_ext
9608 cat >>conftest.$ac_ext <<_ACEOF
9609 /* end confdefs.h.  */
9610 $ac_includes_default
9611 #include <dlfcn.h>
9612 _ACEOF
9613 rm -f conftest.$ac_objext
9614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9615   (eval $ac_compile) 2>conftest.er1
9616   ac_status=$?
9617   grep -v '^ *+' conftest.er1 >conftest.err
9618   rm -f conftest.er1
9619   cat conftest.err >&5
9620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621   (exit $ac_status); } &&
9622          { ac_try='test -z "$ac_cxx_werror_flag"
9623                          || test ! -s conftest.err'
9624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9625   (eval $ac_try) 2>&5
9626   ac_status=$?
9627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9628   (exit $ac_status); }; } &&
9629          { ac_try='test -s conftest.$ac_objext'
9630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9631   (eval $ac_try) 2>&5
9632   ac_status=$?
9633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9634   (exit $ac_status); }; }; then
9635   ac_header_compiler=yes
9636 else
9637   echo "$as_me: failed program was:" >&5
9638 sed 's/^/| /' conftest.$ac_ext >&5
9639
9640 ac_header_compiler=no
9641 fi
9642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9643 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9644 echo "${ECHO_T}$ac_header_compiler" >&6
9645
9646 # Is the header present?
9647 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
9648 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
9649 cat >conftest.$ac_ext <<_ACEOF
9650 /* confdefs.h.  */
9651 _ACEOF
9652 cat confdefs.h >>conftest.$ac_ext
9653 cat >>conftest.$ac_ext <<_ACEOF
9654 /* end confdefs.h.  */
9655 #include <dlfcn.h>
9656 _ACEOF
9657 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9659   ac_status=$?
9660   grep -v '^ *+' conftest.er1 >conftest.err
9661   rm -f conftest.er1
9662   cat conftest.err >&5
9663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664   (exit $ac_status); } >/dev/null; then
9665   if test -s conftest.err; then
9666     ac_cpp_err=$ac_cxx_preproc_warn_flag
9667     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9668   else
9669     ac_cpp_err=
9670   fi
9671 else
9672   ac_cpp_err=yes
9673 fi
9674 if test -z "$ac_cpp_err"; then
9675   ac_header_preproc=yes
9676 else
9677   echo "$as_me: failed program was:" >&5
9678 sed 's/^/| /' conftest.$ac_ext >&5
9679
9680   ac_header_preproc=no
9681 fi
9682 rm -f conftest.err conftest.$ac_ext
9683 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9684 echo "${ECHO_T}$ac_header_preproc" >&6
9685
9686 # So?  What about this header?
9687 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9688   yes:no: )
9689     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
9690 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9691     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
9692 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
9693     ac_header_preproc=yes
9694     ;;
9695   no:yes:* )
9696     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
9697 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
9698     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
9699 echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
9700     { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
9701 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
9702     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
9703 echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9704     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
9705 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
9706     { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
9707 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
9708     (
9709       cat <<\_ASBOX
9710 ## ------------------------------------------ ##
9711 ## Report this to the AC_PACKAGE_NAME lists.  ##
9712 ## ------------------------------------------ ##
9713 _ASBOX
9714     ) |
9715       sed "s/^/$as_me: WARNING:     /" >&2
9716     ;;
9717 esac
9718 echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9719 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
9720 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9721   echo $ECHO_N "(cached) $ECHO_C" >&6
9722 else
9723   ac_cv_header_dlfcn_h=$ac_header_preproc
9724 fi
9725 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9726 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
9727
9728 fi
9729
9730
9731
9732
9733
9734
9735
9736 ac_header_dirent=no
9737 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9738   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9739 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
9740 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9742   echo $ECHO_N "(cached) $ECHO_C" >&6
9743 else
9744   cat >conftest.$ac_ext <<_ACEOF
9745 /* confdefs.h.  */
9746 _ACEOF
9747 cat confdefs.h >>conftest.$ac_ext
9748 cat >>conftest.$ac_ext <<_ACEOF
9749 /* end confdefs.h.  */
9750 #include <sys/types.h>
9751 #include <$ac_hdr>
9752
9753 int
9754 main ()
9755 {
9756 if ((DIR *) 0)
9757 return 0;
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762 rm -f conftest.$ac_objext
9763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9764   (eval $ac_compile) 2>conftest.er1
9765   ac_status=$?
9766   grep -v '^ *+' conftest.er1 >conftest.err
9767   rm -f conftest.er1
9768   cat conftest.err >&5
9769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770   (exit $ac_status); } &&
9771          { ac_try='test -z "$ac_cxx_werror_flag"
9772                          || test ! -s conftest.err'
9773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9774   (eval $ac_try) 2>&5
9775   ac_status=$?
9776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777   (exit $ac_status); }; } &&
9778          { ac_try='test -s conftest.$ac_objext'
9779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780   (eval $ac_try) 2>&5
9781   ac_status=$?
9782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783   (exit $ac_status); }; }; then
9784   eval "$as_ac_Header=yes"
9785 else
9786   echo "$as_me: failed program was:" >&5
9787 sed 's/^/| /' conftest.$ac_ext >&5
9788
9789 eval "$as_ac_Header=no"
9790 fi
9791 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9792 fi
9793 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9796   cat >>confdefs.h <<_ACEOF
9797 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9798 _ACEOF
9799
9800 ac_header_dirent=$ac_hdr; break
9801 fi
9802
9803 done
9804 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9805 if test $ac_header_dirent = dirent.h; then
9806   echo "$as_me:$LINENO: checking for library containing opendir" >&5
9807 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
9808 if test "${ac_cv_search_opendir+set}" = set; then
9809   echo $ECHO_N "(cached) $ECHO_C" >&6
9810 else
9811   ac_func_search_save_LIBS=$LIBS
9812 ac_cv_search_opendir=no
9813 cat >conftest.$ac_ext <<_ACEOF
9814 /* confdefs.h.  */
9815 _ACEOF
9816 cat confdefs.h >>conftest.$ac_ext
9817 cat >>conftest.$ac_ext <<_ACEOF
9818 /* end confdefs.h.  */
9819
9820 /* Override any gcc2 internal prototype to avoid an error.  */
9821 #ifdef __cplusplus
9822 extern "C"
9823 #endif
9824 /* We use char because int might match the return type of a gcc2
9825    builtin and then its argument prototype would still apply.  */
9826 char opendir ();
9827 int
9828 main ()
9829 {
9830 opendir ();
9831   ;
9832   return 0;
9833 }
9834 _ACEOF
9835 rm -f conftest.$ac_objext conftest$ac_exeext
9836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9837   (eval $ac_link) 2>conftest.er1
9838   ac_status=$?
9839   grep -v '^ *+' conftest.er1 >conftest.err
9840   rm -f conftest.er1
9841   cat conftest.err >&5
9842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9843   (exit $ac_status); } &&
9844          { ac_try='test -z "$ac_cxx_werror_flag"
9845                          || test ! -s conftest.err'
9846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9847   (eval $ac_try) 2>&5
9848   ac_status=$?
9849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9850   (exit $ac_status); }; } &&
9851          { ac_try='test -s conftest$ac_exeext'
9852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9853   (eval $ac_try) 2>&5
9854   ac_status=$?
9855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9856   (exit $ac_status); }; }; then
9857   ac_cv_search_opendir="none required"
9858 else
9859   echo "$as_me: failed program was:" >&5
9860 sed 's/^/| /' conftest.$ac_ext >&5
9861
9862 fi
9863 rm -f conftest.err conftest.$ac_objext \
9864       conftest$ac_exeext conftest.$ac_ext
9865 if test "$ac_cv_search_opendir" = no; then
9866   for ac_lib in dir; do
9867     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9868     cat >conftest.$ac_ext <<_ACEOF
9869 /* confdefs.h.  */
9870 _ACEOF
9871 cat confdefs.h >>conftest.$ac_ext
9872 cat >>conftest.$ac_ext <<_ACEOF
9873 /* end confdefs.h.  */
9874
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 #ifdef __cplusplus
9877 extern "C"
9878 #endif
9879 /* We use char because int might match the return type of a gcc2
9880    builtin and then its argument prototype would still apply.  */
9881 char opendir ();
9882 int
9883 main ()
9884 {
9885 opendir ();
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext conftest$ac_exeext
9891 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9892   (eval $ac_link) 2>conftest.er1
9893   ac_status=$?
9894   grep -v '^ *+' conftest.er1 >conftest.err
9895   rm -f conftest.er1
9896   cat conftest.err >&5
9897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -z "$ac_cxx_werror_flag"
9900                          || test ! -s conftest.err'
9901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9902   (eval $ac_try) 2>&5
9903   ac_status=$?
9904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905   (exit $ac_status); }; } &&
9906          { ac_try='test -s conftest$ac_exeext'
9907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9908   (eval $ac_try) 2>&5
9909   ac_status=$?
9910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911   (exit $ac_status); }; }; then
9912   ac_cv_search_opendir="-l$ac_lib"
9913 break
9914 else
9915   echo "$as_me: failed program was:" >&5
9916 sed 's/^/| /' conftest.$ac_ext >&5
9917
9918 fi
9919 rm -f conftest.err conftest.$ac_objext \
9920       conftest$ac_exeext conftest.$ac_ext
9921   done
9922 fi
9923 LIBS=$ac_func_search_save_LIBS
9924 fi
9925 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
9926 echo "${ECHO_T}$ac_cv_search_opendir" >&6
9927 if test "$ac_cv_search_opendir" != no; then
9928   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
9929
9930 fi
9931
9932 else
9933   echo "$as_me:$LINENO: checking for library containing opendir" >&5
9934 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
9935 if test "${ac_cv_search_opendir+set}" = set; then
9936   echo $ECHO_N "(cached) $ECHO_C" >&6
9937 else
9938   ac_func_search_save_LIBS=$LIBS
9939 ac_cv_search_opendir=no
9940 cat >conftest.$ac_ext <<_ACEOF
9941 /* confdefs.h.  */
9942 _ACEOF
9943 cat confdefs.h >>conftest.$ac_ext
9944 cat >>conftest.$ac_ext <<_ACEOF
9945 /* end confdefs.h.  */
9946
9947 /* Override any gcc2 internal prototype to avoid an error.  */
9948 #ifdef __cplusplus
9949 extern "C"
9950 #endif
9951 /* We use char because int might match the return type of a gcc2
9952    builtin and then its argument prototype would still apply.  */
9953 char opendir ();
9954 int
9955 main ()
9956 {
9957 opendir ();
9958   ;
9959   return 0;
9960 }
9961 _ACEOF
9962 rm -f conftest.$ac_objext conftest$ac_exeext
9963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9964   (eval $ac_link) 2>conftest.er1
9965   ac_status=$?
9966   grep -v '^ *+' conftest.er1 >conftest.err
9967   rm -f conftest.er1
9968   cat conftest.err >&5
9969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9970   (exit $ac_status); } &&
9971          { ac_try='test -z "$ac_cxx_werror_flag"
9972                          || test ! -s conftest.err'
9973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9974   (eval $ac_try) 2>&5
9975   ac_status=$?
9976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9977   (exit $ac_status); }; } &&
9978          { ac_try='test -s conftest$ac_exeext'
9979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9980   (eval $ac_try) 2>&5
9981   ac_status=$?
9982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9983   (exit $ac_status); }; }; then
9984   ac_cv_search_opendir="none required"
9985 else
9986   echo "$as_me: failed program was:" >&5
9987 sed 's/^/| /' conftest.$ac_ext >&5
9988
9989 fi
9990 rm -f conftest.err conftest.$ac_objext \
9991       conftest$ac_exeext conftest.$ac_ext
9992 if test "$ac_cv_search_opendir" = no; then
9993   for ac_lib in x; do
9994     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9995     cat >conftest.$ac_ext <<_ACEOF
9996 /* confdefs.h.  */
9997 _ACEOF
9998 cat confdefs.h >>conftest.$ac_ext
9999 cat >>conftest.$ac_ext <<_ACEOF
10000 /* end confdefs.h.  */
10001
10002 /* Override any gcc2 internal prototype to avoid an error.  */
10003 #ifdef __cplusplus
10004 extern "C"
10005 #endif
10006 /* We use char because int might match the return type of a gcc2
10007    builtin and then its argument prototype would still apply.  */
10008 char opendir ();
10009 int
10010 main ()
10011 {
10012 opendir ();
10013   ;
10014   return 0;
10015 }
10016 _ACEOF
10017 rm -f conftest.$ac_objext conftest$ac_exeext
10018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10019   (eval $ac_link) 2>conftest.er1
10020   ac_status=$?
10021   grep -v '^ *+' conftest.er1 >conftest.err
10022   rm -f conftest.er1
10023   cat conftest.err >&5
10024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025   (exit $ac_status); } &&
10026          { ac_try='test -z "$ac_cxx_werror_flag"
10027                          || test ! -s conftest.err'
10028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10029   (eval $ac_try) 2>&5
10030   ac_status=$?
10031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10032   (exit $ac_status); }; } &&
10033          { ac_try='test -s conftest$ac_exeext'
10034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10035   (eval $ac_try) 2>&5
10036   ac_status=$?
10037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10038   (exit $ac_status); }; }; then
10039   ac_cv_search_opendir="-l$ac_lib"
10040 break
10041 else
10042   echo "$as_me: failed program was:" >&5
10043 sed 's/^/| /' conftest.$ac_ext >&5
10044
10045 fi
10046 rm -f conftest.err conftest.$ac_objext \
10047       conftest$ac_exeext conftest.$ac_ext
10048   done
10049 fi
10050 LIBS=$ac_func_search_save_LIBS
10051 fi
10052 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10053 echo "${ECHO_T}$ac_cv_search_opendir" >&6
10054 if test "$ac_cv_search_opendir" != no; then
10055   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10056
10057 fi
10058
10059 fi
10060
10061
10062 # This must be after CXXCPP
10063
10064 echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
10065 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
10066 if test "${ucsim_cv_fd+set}" = set; then
10067   echo $ECHO_N "(cached) $ECHO_C" >&6
10068 else
10069   ucsim_cv_fd="unknown"
10070 cat >conftest.$ac_ext <<_ACEOF
10071 /* confdefs.h.  */
10072 _ACEOF
10073 cat confdefs.h >>conftest.$ac_ext
10074 cat >>conftest.$ac_ext <<_ACEOF
10075 /* end confdefs.h.  */
10076
10077 #include <winsock2.h>
10078 #ifdef FD_ZERO
10079 yes
10080 #endif
10081 _ACEOF
10082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10083   $EGREP "yes" >/dev/null 2>&1; then
10084   ucsim_cv_fd="<winsock2.h>"
10085 fi
10086 rm -f conftest*
10087
10088 cat >conftest.$ac_ext <<_ACEOF
10089 /* confdefs.h.  */
10090 _ACEOF
10091 cat confdefs.h >>conftest.$ac_ext
10092 cat >>conftest.$ac_ext <<_ACEOF
10093 /* end confdefs.h.  */
10094
10095 #include <sys/time.h>
10096 #ifdef FD_ZERO
10097 yes
10098 #endif
10099 _ACEOF
10100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10101   $EGREP "yes" >/dev/null 2>&1; then
10102   ucsim_cv_fd="<sys/time.h>"
10103 fi
10104 rm -f conftest*
10105
10106 cat >conftest.$ac_ext <<_ACEOF
10107 /* confdefs.h.  */
10108 _ACEOF
10109 cat confdefs.h >>conftest.$ac_ext
10110 cat >>conftest.$ac_ext <<_ACEOF
10111 /* end confdefs.h.  */
10112
10113 #include <sys/types.h>
10114 #ifdef FD_ZERO
10115 yes
10116 #endif
10117 _ACEOF
10118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10119   $EGREP "yes" >/dev/null 2>&1; then
10120   ucsim_cv_fd="<sys/types.h>"
10121 fi
10122 rm -f conftest*
10123
10124 cat >conftest.$ac_ext <<_ACEOF
10125 /* confdefs.h.  */
10126 _ACEOF
10127 cat confdefs.h >>conftest.$ac_ext
10128 cat >>conftest.$ac_ext <<_ACEOF
10129 /* end confdefs.h.  */
10130
10131 #include <sys/select.h>
10132 #ifdef FD_ZERO
10133 yes
10134 #endif
10135 _ACEOF
10136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10137   $EGREP "yes" >/dev/null 2>&1; then
10138   ucsim_cv_fd="<sys/select.h>"
10139 fi
10140 rm -f conftest*
10141
10142 fi
10143 echo "$as_me:$LINENO: result: $ucsim_cv_fd" >&5
10144 echo "${ECHO_T}$ucsim_cv_fd" >&6
10145
10146 ucsim_cv_header_ok=0
10147 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
10148 cat >>confdefs.h <<\_ACEOF
10149 #define FD_NEED_TIME_H 1
10150 _ACEOF
10151
10152 ucsim_cv_header_ok=1
10153 else
10154 cat >>confdefs.h <<\_ACEOF
10155 #define FD_NEED_TIME_H 0
10156 _ACEOF
10157
10158 fi
10159 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
10160 cat >>confdefs.h <<\_ACEOF
10161 #define FD_NEED_TYPES_H 1
10162 _ACEOF
10163
10164 ucsim_cv_header_ok=1
10165 else
10166 cat >>confdefs.h <<\_ACEOF
10167 #define FD_NEED_TYPES_H 0
10168 _ACEOF
10169
10170 fi
10171 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
10172 cat >>confdefs.h <<\_ACEOF
10173 #define FD_NEED_SELECT_H 1
10174 _ACEOF
10175
10176 ucsim_cv_header_ok=1
10177 else
10178 cat >>confdefs.h <<\_ACEOF
10179 #define FD_NEED_SELECT_H 0
10180 _ACEOF
10181
10182 fi
10183 if echo $ucsim_cv_fd|grep winsock2 >/dev/null 2>&1; then
10184 cat >>confdefs.h <<\_ACEOF
10185 #define FD_NEED_WINSOCK2_H 1
10186 _ACEOF
10187
10188 ucsim_cv_header_ok=1
10189 else
10190 cat >>confdefs.h <<\_ACEOF
10191 #define FD_NEED_WINSOCK2_H 0
10192 _ACEOF
10193
10194 fi
10195
10196 cat >>confdefs.h <<_ACEOF
10197 #define FD_HEADER_OK ${ucsim_cv_header_ok}
10198 _ACEOF
10199
10200 cat >>confdefs.h <<_ACEOF
10201 #define HEADER_FD ${ucsim_cv_fd}
10202 _ACEOF
10203
10204
10205
10206 # Checking for functions/libs
10207 # ===========================================================================
10208 if echo $ucsim_cv_socket|grep winsock2 >/dev/null 2>&1; then
10209   LIBS="-lws2_32 $LIBS"
10210 else
10211
10212 echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10213 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10214 if test "${ac_cv_lib_socket_socket+set}" = set; then
10215   echo $ECHO_N "(cached) $ECHO_C" >&6
10216 else
10217   ac_check_lib_save_LIBS=$LIBS
10218 LIBS="-lsocket  $LIBS"
10219 cat >conftest.$ac_ext <<_ACEOF
10220 /* confdefs.h.  */
10221 _ACEOF
10222 cat confdefs.h >>conftest.$ac_ext
10223 cat >>conftest.$ac_ext <<_ACEOF
10224 /* end confdefs.h.  */
10225
10226 /* Override any gcc2 internal prototype to avoid an error.  */
10227 #ifdef __cplusplus
10228 extern "C"
10229 #endif
10230 /* We use char because int might match the return type of a gcc2
10231    builtin and then its argument prototype would still apply.  */
10232 char socket ();
10233 int
10234 main ()
10235 {
10236 socket ();
10237   ;
10238   return 0;
10239 }
10240 _ACEOF
10241 rm -f conftest.$ac_objext conftest$ac_exeext
10242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10243   (eval $ac_link) 2>conftest.er1
10244   ac_status=$?
10245   grep -v '^ *+' conftest.er1 >conftest.err
10246   rm -f conftest.er1
10247   cat conftest.err >&5
10248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10249   (exit $ac_status); } &&
10250          { ac_try='test -z "$ac_cxx_werror_flag"
10251                          || test ! -s conftest.err'
10252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10253   (eval $ac_try) 2>&5
10254   ac_status=$?
10255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10256   (exit $ac_status); }; } &&
10257          { ac_try='test -s conftest$ac_exeext'
10258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10259   (eval $ac_try) 2>&5
10260   ac_status=$?
10261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262   (exit $ac_status); }; }; then
10263   ac_cv_lib_socket_socket=yes
10264 else
10265   echo "$as_me: failed program was:" >&5
10266 sed 's/^/| /' conftest.$ac_ext >&5
10267
10268 ac_cv_lib_socket_socket=no
10269 fi
10270 rm -f conftest.err conftest.$ac_objext \
10271       conftest$ac_exeext conftest.$ac_ext
10272 LIBS=$ac_check_lib_save_LIBS
10273 fi
10274 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10275 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10276 if test $ac_cv_lib_socket_socket = yes; then
10277   cat >>confdefs.h <<_ACEOF
10278 #define HAVE_LIBSOCKET 1
10279 _ACEOF
10280
10281   LIBS="-lsocket $LIBS"
10282
10283 fi
10284
10285
10286 echo "$as_me:$LINENO: checking for xdr_short in -lnsl" >&5
10287 echo $ECHO_N "checking for xdr_short in -lnsl... $ECHO_C" >&6
10288 if test "${ac_cv_lib_nsl_xdr_short+set}" = set; then
10289   echo $ECHO_N "(cached) $ECHO_C" >&6
10290 else
10291   ac_check_lib_save_LIBS=$LIBS
10292 LIBS="-lnsl  $LIBS"
10293 cat >conftest.$ac_ext <<_ACEOF
10294 /* confdefs.h.  */
10295 _ACEOF
10296 cat confdefs.h >>conftest.$ac_ext
10297 cat >>conftest.$ac_ext <<_ACEOF
10298 /* end confdefs.h.  */
10299
10300 /* Override any gcc2 internal prototype to avoid an error.  */
10301 #ifdef __cplusplus
10302 extern "C"
10303 #endif
10304 /* We use char because int might match the return type of a gcc2
10305    builtin and then its argument prototype would still apply.  */
10306 char xdr_short ();
10307 int
10308 main ()
10309 {
10310 xdr_short ();
10311   ;
10312   return 0;
10313 }
10314 _ACEOF
10315 rm -f conftest.$ac_objext conftest$ac_exeext
10316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10317   (eval $ac_link) 2>conftest.er1
10318   ac_status=$?
10319   grep -v '^ *+' conftest.er1 >conftest.err
10320   rm -f conftest.er1
10321   cat conftest.err >&5
10322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323   (exit $ac_status); } &&
10324          { ac_try='test -z "$ac_cxx_werror_flag"
10325                          || test ! -s conftest.err'
10326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10327   (eval $ac_try) 2>&5
10328   ac_status=$?
10329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10330   (exit $ac_status); }; } &&
10331          { ac_try='test -s conftest$ac_exeext'
10332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10333   (eval $ac_try) 2>&5
10334   ac_status=$?
10335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336   (exit $ac_status); }; }; then
10337   ac_cv_lib_nsl_xdr_short=yes
10338 else
10339   echo "$as_me: failed program was:" >&5
10340 sed 's/^/| /' conftest.$ac_ext >&5
10341
10342 ac_cv_lib_nsl_xdr_short=no
10343 fi
10344 rm -f conftest.err conftest.$ac_objext \
10345       conftest$ac_exeext conftest.$ac_ext
10346 LIBS=$ac_check_lib_save_LIBS
10347 fi
10348 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_xdr_short" >&5
10349 echo "${ECHO_T}$ac_cv_lib_nsl_xdr_short" >&6
10350 if test $ac_cv_lib_nsl_xdr_short = yes; then
10351   cat >>confdefs.h <<_ACEOF
10352 #define HAVE_LIBNSL 1
10353 _ACEOF
10354
10355   LIBS="-lnsl $LIBS"
10356
10357 fi
10358
10359 fi
10360
10361 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10362 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10363 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10364   echo $ECHO_N "(cached) $ECHO_C" >&6
10365 else
10366   ac_check_lib_save_LIBS=$LIBS
10367 LIBS="-ldl  $LIBS"
10368 cat >conftest.$ac_ext <<_ACEOF
10369 /* confdefs.h.  */
10370 _ACEOF
10371 cat confdefs.h >>conftest.$ac_ext
10372 cat >>conftest.$ac_ext <<_ACEOF
10373 /* end confdefs.h.  */
10374
10375 /* Override any gcc2 internal prototype to avoid an error.  */
10376 #ifdef __cplusplus
10377 extern "C"
10378 #endif
10379 /* We use char because int might match the return type of a gcc2
10380    builtin and then its argument prototype would still apply.  */
10381 char dlopen ();
10382 int
10383 main ()
10384 {
10385 dlopen ();
10386   ;
10387   return 0;
10388 }
10389 _ACEOF
10390 rm -f conftest.$ac_objext conftest$ac_exeext
10391 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10392   (eval $ac_link) 2>conftest.er1
10393   ac_status=$?
10394   grep -v '^ *+' conftest.er1 >conftest.err
10395   rm -f conftest.er1
10396   cat conftest.err >&5
10397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -z "$ac_cxx_werror_flag"
10400                          || test ! -s conftest.err'
10401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10402   (eval $ac_try) 2>&5
10403   ac_status=$?
10404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405   (exit $ac_status); }; } &&
10406          { ac_try='test -s conftest$ac_exeext'
10407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10408   (eval $ac_try) 2>&5
10409   ac_status=$?
10410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411   (exit $ac_status); }; }; then
10412   ac_cv_lib_dl_dlopen=yes
10413 else
10414   echo "$as_me: failed program was:" >&5
10415 sed 's/^/| /' conftest.$ac_ext >&5
10416
10417 ac_cv_lib_dl_dlopen=no
10418 fi
10419 rm -f conftest.err conftest.$ac_objext \
10420       conftest$ac_exeext conftest.$ac_ext
10421 LIBS=$ac_check_lib_save_LIBS
10422 fi
10423 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10424 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10425 if test $ac_cv_lib_dl_dlopen = yes; then
10426   dl_ok="yes"
10427 DL="-ldl"
10428 else
10429   dl_ok="no"
10430 DL=""
10431 fi
10432
10433
10434
10435
10436 #AC_CHECK_LIB(panel,panel_above,
10437 #panel_ok="yes"
10438 #curses_ok="yes"
10439 #CURSES_LIBS="-lpanel -lcurses"
10440 #,
10441 #panel_ok="no"
10442 #AC_CHECK_LIB(curses,nl,
10443 #curses_ok="yes"
10444 #CURSES_LIBS="-lcurses"
10445 #,
10446 #curses_ok="no")
10447 #,
10448 #-lcurses)
10449
10450 if test $curses_h_ok != yes; then
10451   panel_ok="no"
10452   curses_ok="no"
10453 else
10454   echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5
10455 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
10456 if test "${ac_cv_lib_panel_panel_above+set}" = set; then
10457   echo $ECHO_N "(cached) $ECHO_C" >&6
10458 else
10459   ac_check_lib_save_LIBS=$LIBS
10460 LIBS="-lpanel  $LIBS"
10461 cat >conftest.$ac_ext <<_ACEOF
10462 /* confdefs.h.  */
10463 _ACEOF
10464 cat confdefs.h >>conftest.$ac_ext
10465 cat >>conftest.$ac_ext <<_ACEOF
10466 /* end confdefs.h.  */
10467
10468 /* Override any gcc2 internal prototype to avoid an error.  */
10469 #ifdef __cplusplus
10470 extern "C"
10471 #endif
10472 /* We use char because int might match the return type of a gcc2
10473    builtin and then its argument prototype would still apply.  */
10474 char panel_above ();
10475 int
10476 main ()
10477 {
10478 panel_above ();
10479   ;
10480   return 0;
10481 }
10482 _ACEOF
10483 rm -f conftest.$ac_objext conftest$ac_exeext
10484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10485   (eval $ac_link) 2>conftest.er1
10486   ac_status=$?
10487   grep -v '^ *+' conftest.er1 >conftest.err
10488   rm -f conftest.er1
10489   cat conftest.err >&5
10490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10491   (exit $ac_status); } &&
10492          { ac_try='test -z "$ac_cxx_werror_flag"
10493                          || test ! -s conftest.err'
10494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498   (exit $ac_status); }; } &&
10499          { ac_try='test -s conftest$ac_exeext'
10500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10501   (eval $ac_try) 2>&5
10502   ac_status=$?
10503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504   (exit $ac_status); }; }; then
10505   ac_cv_lib_panel_panel_above=yes
10506 else
10507   echo "$as_me: failed program was:" >&5
10508 sed 's/^/| /' conftest.$ac_ext >&5
10509
10510 ac_cv_lib_panel_panel_above=no
10511 fi
10512 rm -f conftest.err conftest.$ac_objext \
10513       conftest$ac_exeext conftest.$ac_ext
10514 LIBS=$ac_check_lib_save_LIBS
10515 fi
10516 echo "$as_me:$LINENO: result: $ac_cv_lib_panel_panel_above" >&5
10517 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6
10518 if test $ac_cv_lib_panel_panel_above = yes; then
10519   panel_ok="yes"
10520     curses_ok="yes"
10521     CURSES_LIBS="-lpanel"
10522 else
10523   panel_ok="no"
10524     curses_ok="no"
10525
10526 fi
10527
10528
10529   if test $curses_ok != yes; then
10530     echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
10531 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
10532 if test "${ac_cv_lib_curses_nl+set}" = set; then
10533   echo $ECHO_N "(cached) $ECHO_C" >&6
10534 else
10535   ac_check_lib_save_LIBS=$LIBS
10536 LIBS="-lcurses  $LIBS"
10537 cat >conftest.$ac_ext <<_ACEOF
10538 /* confdefs.h.  */
10539 _ACEOF
10540 cat confdefs.h >>conftest.$ac_ext
10541 cat >>conftest.$ac_ext <<_ACEOF
10542 /* end confdefs.h.  */
10543
10544 /* Override any gcc2 internal prototype to avoid an error.  */
10545 #ifdef __cplusplus
10546 extern "C"
10547 #endif
10548 /* We use char because int might match the return type of a gcc2
10549    builtin and then its argument prototype would still apply.  */
10550 char nl ();
10551 int
10552 main ()
10553 {
10554 nl ();
10555   ;
10556   return 0;
10557 }
10558 _ACEOF
10559 rm -f conftest.$ac_objext conftest$ac_exeext
10560 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10561   (eval $ac_link) 2>conftest.er1
10562   ac_status=$?
10563   grep -v '^ *+' conftest.er1 >conftest.err
10564   rm -f conftest.er1
10565   cat conftest.err >&5
10566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10567   (exit $ac_status); } &&
10568          { ac_try='test -z "$ac_cxx_werror_flag"
10569                          || test ! -s conftest.err'
10570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10571   (eval $ac_try) 2>&5
10572   ac_status=$?
10573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10574   (exit $ac_status); }; } &&
10575          { ac_try='test -s conftest$ac_exeext'
10576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10577   (eval $ac_try) 2>&5
10578   ac_status=$?
10579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580   (exit $ac_status); }; }; then
10581   ac_cv_lib_curses_nl=yes
10582 else
10583   echo "$as_me: failed program was:" >&5
10584 sed 's/^/| /' conftest.$ac_ext >&5
10585
10586 ac_cv_lib_curses_nl=no
10587 fi
10588 rm -f conftest.err conftest.$ac_objext \
10589       conftest$ac_exeext conftest.$ac_ext
10590 LIBS=$ac_check_lib_save_LIBS
10591 fi
10592 echo "$as_me:$LINENO: result: $ac_cv_lib_curses_nl" >&5
10593 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
10594 if test $ac_cv_lib_curses_nl = yes; then
10595   curses_ok="yes"
10596       CURSES_LIBS="-lcurses"
10597 else
10598   curses_ok="no"
10599 fi
10600
10601   fi
10602
10603   if test $curses_ok != yes; then
10604     echo "$as_me:$LINENO: checking for nl in -lncurses" >&5
10605 echo $ECHO_N "checking for nl in -lncurses... $ECHO_C" >&6
10606 if test "${ac_cv_lib_ncurses_nl+set}" = set; then
10607   echo $ECHO_N "(cached) $ECHO_C" >&6
10608 else
10609   ac_check_lib_save_LIBS=$LIBS
10610 LIBS="-lncurses  $LIBS"
10611 cat >conftest.$ac_ext <<_ACEOF
10612 /* confdefs.h.  */
10613 _ACEOF
10614 cat confdefs.h >>conftest.$ac_ext
10615 cat >>conftest.$ac_ext <<_ACEOF
10616 /* end confdefs.h.  */
10617
10618 /* Override any gcc2 internal prototype to avoid an error.  */
10619 #ifdef __cplusplus
10620 extern "C"
10621 #endif
10622 /* We use char because int might match the return type of a gcc2
10623    builtin and then its argument prototype would still apply.  */
10624 char nl ();
10625 int
10626 main ()
10627 {
10628 nl ();
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 rm -f conftest.$ac_objext conftest$ac_exeext
10634 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10635   (eval $ac_link) 2>conftest.er1
10636   ac_status=$?
10637   grep -v '^ *+' conftest.er1 >conftest.err
10638   rm -f conftest.er1
10639   cat conftest.err >&5
10640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641   (exit $ac_status); } &&
10642          { ac_try='test -z "$ac_cxx_werror_flag"
10643                          || test ! -s conftest.err'
10644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645   (eval $ac_try) 2>&5
10646   ac_status=$?
10647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648   (exit $ac_status); }; } &&
10649          { ac_try='test -s conftest$ac_exeext'
10650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10651   (eval $ac_try) 2>&5
10652   ac_status=$?
10653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10654   (exit $ac_status); }; }; then
10655   ac_cv_lib_ncurses_nl=yes
10656 else
10657   echo "$as_me: failed program was:" >&5
10658 sed 's/^/| /' conftest.$ac_ext >&5
10659
10660 ac_cv_lib_ncurses_nl=no
10661 fi
10662 rm -f conftest.err conftest.$ac_objext \
10663       conftest$ac_exeext conftest.$ac_ext
10664 LIBS=$ac_check_lib_save_LIBS
10665 fi
10666 echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_nl" >&5
10667 echo "${ECHO_T}$ac_cv_lib_ncurses_nl" >&6
10668 if test $ac_cv_lib_ncurses_nl = yes; then
10669   curses_ok="yes"
10670       CURSES_LIBS="-lncurses"
10671 else
10672   curses_ok="no"
10673 fi
10674
10675   fi
10676 fi
10677
10678
10679
10680
10681
10682
10683 for ac_func in vprintf
10684 do
10685 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10686 echo "$as_me:$LINENO: checking for $ac_func" >&5
10687 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10688 if eval "test \"\${$as_ac_var+set}\" = set"; then
10689   echo $ECHO_N "(cached) $ECHO_C" >&6
10690 else
10691   cat >conftest.$ac_ext <<_ACEOF
10692 /* confdefs.h.  */
10693 _ACEOF
10694 cat confdefs.h >>conftest.$ac_ext
10695 cat >>conftest.$ac_ext <<_ACEOF
10696 /* end confdefs.h.  */
10697 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10698    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10699 #define $ac_func innocuous_$ac_func
10700
10701 /* System header to define __stub macros and hopefully few prototypes,
10702     which can conflict with char $ac_func (); below.
10703     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10704     <limits.h> exists even on freestanding compilers.  */
10705
10706 #ifdef __STDC__
10707 # include <limits.h>
10708 #else
10709 # include <assert.h>
10710 #endif
10711
10712 #undef $ac_func
10713
10714 /* Override any gcc2 internal prototype to avoid an error.  */
10715 #ifdef __cplusplus
10716 extern "C"
10717 {
10718 #endif
10719 /* We use char because int might match the return type of a gcc2
10720    builtin and then its argument prototype would still apply.  */
10721 char $ac_func ();
10722 /* The GNU C library defines this for functions which it implements
10723     to always fail with ENOSYS.  Some functions are actually named
10724     something starting with __ and the normal name is an alias.  */
10725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10726 choke me
10727 #else
10728 char (*f) () = $ac_func;
10729 #endif
10730 #ifdef __cplusplus
10731 }
10732 #endif
10733
10734 int
10735 main ()
10736 {
10737 return f != $ac_func;
10738   ;
10739   return 0;
10740 }
10741 _ACEOF
10742 rm -f conftest.$ac_objext conftest$ac_exeext
10743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10744   (eval $ac_link) 2>conftest.er1
10745   ac_status=$?
10746   grep -v '^ *+' conftest.er1 >conftest.err
10747   rm -f conftest.er1
10748   cat conftest.err >&5
10749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750   (exit $ac_status); } &&
10751          { ac_try='test -z "$ac_cxx_werror_flag"
10752                          || test ! -s conftest.err'
10753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10754   (eval $ac_try) 2>&5
10755   ac_status=$?
10756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10757   (exit $ac_status); }; } &&
10758          { ac_try='test -s conftest$ac_exeext'
10759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10760   (eval $ac_try) 2>&5
10761   ac_status=$?
10762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10763   (exit $ac_status); }; }; then
10764   eval "$as_ac_var=yes"
10765 else
10766   echo "$as_me: failed program was:" >&5
10767 sed 's/^/| /' conftest.$ac_ext >&5
10768
10769 eval "$as_ac_var=no"
10770 fi
10771 rm -f conftest.err conftest.$ac_objext \
10772       conftest$ac_exeext conftest.$ac_ext
10773 fi
10774 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10775 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10776 if test `eval echo '${'$as_ac_var'}'` = yes; then
10777   cat >>confdefs.h <<_ACEOF
10778 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10779 _ACEOF
10780
10781 echo "$as_me:$LINENO: checking for _doprnt" >&5
10782 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
10783 if test "${ac_cv_func__doprnt+set}" = set; then
10784   echo $ECHO_N "(cached) $ECHO_C" >&6
10785 else
10786   cat >conftest.$ac_ext <<_ACEOF
10787 /* confdefs.h.  */
10788 _ACEOF
10789 cat confdefs.h >>conftest.$ac_ext
10790 cat >>conftest.$ac_ext <<_ACEOF
10791 /* end confdefs.h.  */
10792 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
10793    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10794 #define _doprnt innocuous__doprnt
10795
10796 /* System header to define __stub macros and hopefully few prototypes,
10797     which can conflict with char _doprnt (); below.
10798     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10799     <limits.h> exists even on freestanding compilers.  */
10800
10801 #ifdef __STDC__
10802 # include <limits.h>
10803 #else
10804 # include <assert.h>
10805 #endif
10806
10807 #undef _doprnt
10808
10809 /* Override any gcc2 internal prototype to avoid an error.  */
10810 #ifdef __cplusplus
10811 extern "C"
10812 {
10813 #endif
10814 /* We use char because int might match the return type of a gcc2
10815    builtin and then its argument prototype would still apply.  */
10816 char _doprnt ();
10817 /* The GNU C library defines this for functions which it implements
10818     to always fail with ENOSYS.  Some functions are actually named
10819     something starting with __ and the normal name is an alias.  */
10820 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10821 choke me
10822 #else
10823 char (*f) () = _doprnt;
10824 #endif
10825 #ifdef __cplusplus
10826 }
10827 #endif
10828
10829 int
10830 main ()
10831 {
10832 return f != _doprnt;
10833   ;
10834   return 0;
10835 }
10836 _ACEOF
10837 rm -f conftest.$ac_objext conftest$ac_exeext
10838 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10839   (eval $ac_link) 2>conftest.er1
10840   ac_status=$?
10841   grep -v '^ *+' conftest.er1 >conftest.err
10842   rm -f conftest.er1
10843   cat conftest.err >&5
10844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10845   (exit $ac_status); } &&
10846          { ac_try='test -z "$ac_cxx_werror_flag"
10847                          || test ! -s conftest.err'
10848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849   (eval $ac_try) 2>&5
10850   ac_status=$?
10851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852   (exit $ac_status); }; } &&
10853          { ac_try='test -s conftest$ac_exeext'
10854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10855   (eval $ac_try) 2>&5
10856   ac_status=$?
10857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858   (exit $ac_status); }; }; then
10859   ac_cv_func__doprnt=yes
10860 else
10861   echo "$as_me: failed program was:" >&5
10862 sed 's/^/| /' conftest.$ac_ext >&5
10863
10864 ac_cv_func__doprnt=no
10865 fi
10866 rm -f conftest.err conftest.$ac_objext \
10867       conftest$ac_exeext conftest.$ac_ext
10868 fi
10869 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
10870 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
10871 if test $ac_cv_func__doprnt = yes; then
10872
10873 cat >>confdefs.h <<\_ACEOF
10874 #define HAVE_DOPRNT 1
10875 _ACEOF
10876
10877 fi
10878
10879 fi
10880 done
10881
10882
10883
10884 for ac_func in vsnprintf
10885 do
10886 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10887 echo "$as_me:$LINENO: checking for $ac_func" >&5
10888 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10889 if eval "test \"\${$as_ac_var+set}\" = set"; then
10890   echo $ECHO_N "(cached) $ECHO_C" >&6
10891 else
10892   cat >conftest.$ac_ext <<_ACEOF
10893 /* confdefs.h.  */
10894 _ACEOF
10895 cat confdefs.h >>conftest.$ac_ext
10896 cat >>conftest.$ac_ext <<_ACEOF
10897 /* end confdefs.h.  */
10898 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10899    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10900 #define $ac_func innocuous_$ac_func
10901
10902 /* System header to define __stub macros and hopefully few prototypes,
10903     which can conflict with char $ac_func (); below.
10904     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10905     <limits.h> exists even on freestanding compilers.  */
10906
10907 #ifdef __STDC__
10908 # include <limits.h>
10909 #else
10910 # include <assert.h>
10911 #endif
10912
10913 #undef $ac_func
10914
10915 /* Override any gcc2 internal prototype to avoid an error.  */
10916 #ifdef __cplusplus
10917 extern "C"
10918 {
10919 #endif
10920 /* We use char because int might match the return type of a gcc2
10921    builtin and then its argument prototype would still apply.  */
10922 char $ac_func ();
10923 /* The GNU C library defines this for functions which it implements
10924     to always fail with ENOSYS.  Some functions are actually named
10925     something starting with __ and the normal name is an alias.  */
10926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10927 choke me
10928 #else
10929 char (*f) () = $ac_func;
10930 #endif
10931 #ifdef __cplusplus
10932 }
10933 #endif
10934
10935 int
10936 main ()
10937 {
10938 return f != $ac_func;
10939   ;
10940   return 0;
10941 }
10942 _ACEOF
10943 rm -f conftest.$ac_objext conftest$ac_exeext
10944 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10945   (eval $ac_link) 2>conftest.er1
10946   ac_status=$?
10947   grep -v '^ *+' conftest.er1 >conftest.err
10948   rm -f conftest.er1
10949   cat conftest.err >&5
10950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951   (exit $ac_status); } &&
10952          { ac_try='test -z "$ac_cxx_werror_flag"
10953                          || test ! -s conftest.err'
10954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10955   (eval $ac_try) 2>&5
10956   ac_status=$?
10957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10958   (exit $ac_status); }; } &&
10959          { ac_try='test -s conftest$ac_exeext'
10960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10961   (eval $ac_try) 2>&5
10962   ac_status=$?
10963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10964   (exit $ac_status); }; }; then
10965   eval "$as_ac_var=yes"
10966 else
10967   echo "$as_me: failed program was:" >&5
10968 sed 's/^/| /' conftest.$ac_ext >&5
10969
10970 eval "$as_ac_var=no"
10971 fi
10972 rm -f conftest.err conftest.$ac_objext \
10973       conftest$ac_exeext conftest.$ac_ext
10974 fi
10975 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10976 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10977 if test `eval echo '${'$as_ac_var'}'` = yes; then
10978   cat >>confdefs.h <<_ACEOF
10979 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10980 _ACEOF
10981
10982 fi
10983 done
10984
10985
10986 for ac_func in _vsnprintf
10987 do
10988 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10989 echo "$as_me:$LINENO: checking for $ac_func" >&5
10990 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10991 if eval "test \"\${$as_ac_var+set}\" = set"; then
10992   echo $ECHO_N "(cached) $ECHO_C" >&6
10993 else
10994   cat >conftest.$ac_ext <<_ACEOF
10995 /* confdefs.h.  */
10996 _ACEOF
10997 cat confdefs.h >>conftest.$ac_ext
10998 cat >>conftest.$ac_ext <<_ACEOF
10999 /* end confdefs.h.  */
11000 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11001    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11002 #define $ac_func innocuous_$ac_func
11003
11004 /* System header to define __stub macros and hopefully few prototypes,
11005     which can conflict with char $ac_func (); below.
11006     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11007     <limits.h> exists even on freestanding compilers.  */
11008
11009 #ifdef __STDC__
11010 # include <limits.h>
11011 #else
11012 # include <assert.h>
11013 #endif
11014
11015 #undef $ac_func
11016
11017 /* Override any gcc2 internal prototype to avoid an error.  */
11018 #ifdef __cplusplus
11019 extern "C"
11020 {
11021 #endif
11022 /* We use char because int might match the return type of a gcc2
11023    builtin and then its argument prototype would still apply.  */
11024 char $ac_func ();
11025 /* The GNU C library defines this for functions which it implements
11026     to always fail with ENOSYS.  Some functions are actually named
11027     something starting with __ and the normal name is an alias.  */
11028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11029 choke me
11030 #else
11031 char (*f) () = $ac_func;
11032 #endif
11033 #ifdef __cplusplus
11034 }
11035 #endif
11036
11037 int
11038 main ()
11039 {
11040 return f != $ac_func;
11041   ;
11042   return 0;
11043 }
11044 _ACEOF
11045 rm -f conftest.$ac_objext conftest$ac_exeext
11046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11047   (eval $ac_link) 2>conftest.er1
11048   ac_status=$?
11049   grep -v '^ *+' conftest.er1 >conftest.err
11050   rm -f conftest.er1
11051   cat conftest.err >&5
11052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11053   (exit $ac_status); } &&
11054          { ac_try='test -z "$ac_cxx_werror_flag"
11055                          || test ! -s conftest.err'
11056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11057   (eval $ac_try) 2>&5
11058   ac_status=$?
11059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060   (exit $ac_status); }; } &&
11061          { ac_try='test -s conftest$ac_exeext'
11062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11063   (eval $ac_try) 2>&5
11064   ac_status=$?
11065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11066   (exit $ac_status); }; }; then
11067   eval "$as_ac_var=yes"
11068 else
11069   echo "$as_me: failed program was:" >&5
11070 sed 's/^/| /' conftest.$ac_ext >&5
11071
11072 eval "$as_ac_var=no"
11073 fi
11074 rm -f conftest.err conftest.$ac_objext \
11075       conftest$ac_exeext conftest.$ac_ext
11076 fi
11077 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11078 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11079 if test `eval echo '${'$as_ac_var'}'` = yes; then
11080   cat >>confdefs.h <<_ACEOF
11081 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11082 _ACEOF
11083
11084 fi
11085 done
11086
11087
11088 for ac_func in vasprintf
11089 do
11090 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11091 echo "$as_me:$LINENO: checking for $ac_func" >&5
11092 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11093 if eval "test \"\${$as_ac_var+set}\" = set"; then
11094   echo $ECHO_N "(cached) $ECHO_C" >&6
11095 else
11096   cat >conftest.$ac_ext <<_ACEOF
11097 /* confdefs.h.  */
11098 _ACEOF
11099 cat confdefs.h >>conftest.$ac_ext
11100 cat >>conftest.$ac_ext <<_ACEOF
11101 /* end confdefs.h.  */
11102 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11103    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11104 #define $ac_func innocuous_$ac_func
11105
11106 /* System header to define __stub macros and hopefully few prototypes,
11107     which can conflict with char $ac_func (); below.
11108     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11109     <limits.h> exists even on freestanding compilers.  */
11110
11111 #ifdef __STDC__
11112 # include <limits.h>
11113 #else
11114 # include <assert.h>
11115 #endif
11116
11117 #undef $ac_func
11118
11119 /* Override any gcc2 internal prototype to avoid an error.  */
11120 #ifdef __cplusplus
11121 extern "C"
11122 {
11123 #endif
11124 /* We use char because int might match the return type of a gcc2
11125    builtin and then its argument prototype would still apply.  */
11126 char $ac_func ();
11127 /* The GNU C library defines this for functions which it implements
11128     to always fail with ENOSYS.  Some functions are actually named
11129     something starting with __ and the normal name is an alias.  */
11130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11131 choke me
11132 #else
11133 char (*f) () = $ac_func;
11134 #endif
11135 #ifdef __cplusplus
11136 }
11137 #endif
11138
11139 int
11140 main ()
11141 {
11142 return f != $ac_func;
11143   ;
11144   return 0;
11145 }
11146 _ACEOF
11147 rm -f conftest.$ac_objext conftest$ac_exeext
11148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11149   (eval $ac_link) 2>conftest.er1
11150   ac_status=$?
11151   grep -v '^ *+' conftest.er1 >conftest.err
11152   rm -f conftest.er1
11153   cat conftest.err >&5
11154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -z "$ac_cxx_werror_flag"
11157                          || test ! -s conftest.err'
11158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11159   (eval $ac_try) 2>&5
11160   ac_status=$?
11161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162   (exit $ac_status); }; } &&
11163          { ac_try='test -s conftest$ac_exeext'
11164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168   (exit $ac_status); }; }; then
11169   eval "$as_ac_var=yes"
11170 else
11171   echo "$as_me: failed program was:" >&5
11172 sed 's/^/| /' conftest.$ac_ext >&5
11173
11174 eval "$as_ac_var=no"
11175 fi
11176 rm -f conftest.err conftest.$ac_objext \
11177       conftest$ac_exeext conftest.$ac_ext
11178 fi
11179 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11180 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11181 if test `eval echo '${'$as_ac_var'}'` = yes; then
11182   cat >>confdefs.h <<_ACEOF
11183 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11184 _ACEOF
11185
11186 fi
11187 done
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
11198 do
11199 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11200 echo "$as_me:$LINENO: checking for $ac_func" >&5
11201 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11202 if eval "test \"\${$as_ac_var+set}\" = set"; then
11203   echo $ECHO_N "(cached) $ECHO_C" >&6
11204 else
11205   cat >conftest.$ac_ext <<_ACEOF
11206 /* confdefs.h.  */
11207 _ACEOF
11208 cat confdefs.h >>conftest.$ac_ext
11209 cat >>conftest.$ac_ext <<_ACEOF
11210 /* end confdefs.h.  */
11211 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11212    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11213 #define $ac_func innocuous_$ac_func
11214
11215 /* System header to define __stub macros and hopefully few prototypes,
11216     which can conflict with char $ac_func (); below.
11217     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11218     <limits.h> exists even on freestanding compilers.  */
11219
11220 #ifdef __STDC__
11221 # include <limits.h>
11222 #else
11223 # include <assert.h>
11224 #endif
11225
11226 #undef $ac_func
11227
11228 /* Override any gcc2 internal prototype to avoid an error.  */
11229 #ifdef __cplusplus
11230 extern "C"
11231 {
11232 #endif
11233 /* We use char because int might match the return type of a gcc2
11234    builtin and then its argument prototype would still apply.  */
11235 char $ac_func ();
11236 /* The GNU C library defines this for functions which it implements
11237     to always fail with ENOSYS.  Some functions are actually named
11238     something starting with __ and the normal name is an alias.  */
11239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11240 choke me
11241 #else
11242 char (*f) () = $ac_func;
11243 #endif
11244 #ifdef __cplusplus
11245 }
11246 #endif
11247
11248 int
11249 main ()
11250 {
11251 return f != $ac_func;
11252   ;
11253   return 0;
11254 }
11255 _ACEOF
11256 rm -f conftest.$ac_objext conftest$ac_exeext
11257 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11258   (eval $ac_link) 2>conftest.er1
11259   ac_status=$?
11260   grep -v '^ *+' conftest.er1 >conftest.err
11261   rm -f conftest.er1
11262   cat conftest.err >&5
11263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264   (exit $ac_status); } &&
11265          { ac_try='test -z "$ac_cxx_werror_flag"
11266                          || test ! -s conftest.err'
11267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11268   (eval $ac_try) 2>&5
11269   ac_status=$?
11270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11271   (exit $ac_status); }; } &&
11272          { ac_try='test -s conftest$ac_exeext'
11273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11274   (eval $ac_try) 2>&5
11275   ac_status=$?
11276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11277   (exit $ac_status); }; }; then
11278   eval "$as_ac_var=yes"
11279 else
11280   echo "$as_me: failed program was:" >&5
11281 sed 's/^/| /' conftest.$ac_ext >&5
11282
11283 eval "$as_ac_var=no"
11284 fi
11285 rm -f conftest.err conftest.$ac_objext \
11286       conftest$ac_exeext conftest.$ac_ext
11287 fi
11288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11289 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11290 if test `eval echo '${'$as_ac_var'}'` = yes; then
11291   cat >>confdefs.h <<_ACEOF
11292 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11293 _ACEOF
11294
11295 fi
11296 done
11297
11298
11299
11300 for ac_func in strchr memcpy
11301 do
11302 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11303 echo "$as_me:$LINENO: checking for $ac_func" >&5
11304 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11305 if eval "test \"\${$as_ac_var+set}\" = set"; then
11306   echo $ECHO_N "(cached) $ECHO_C" >&6
11307 else
11308   cat >conftest.$ac_ext <<_ACEOF
11309 /* confdefs.h.  */
11310 _ACEOF
11311 cat confdefs.h >>conftest.$ac_ext
11312 cat >>conftest.$ac_ext <<_ACEOF
11313 /* end confdefs.h.  */
11314 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11315    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11316 #define $ac_func innocuous_$ac_func
11317
11318 /* System header to define __stub macros and hopefully few prototypes,
11319     which can conflict with char $ac_func (); below.
11320     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11321     <limits.h> exists even on freestanding compilers.  */
11322
11323 #ifdef __STDC__
11324 # include <limits.h>
11325 #else
11326 # include <assert.h>
11327 #endif
11328
11329 #undef $ac_func
11330
11331 /* Override any gcc2 internal prototype to avoid an error.  */
11332 #ifdef __cplusplus
11333 extern "C"
11334 {
11335 #endif
11336 /* We use char because int might match the return type of a gcc2
11337    builtin and then its argument prototype would still apply.  */
11338 char $ac_func ();
11339 /* The GNU C library defines this for functions which it implements
11340     to always fail with ENOSYS.  Some functions are actually named
11341     something starting with __ and the normal name is an alias.  */
11342 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11343 choke me
11344 #else
11345 char (*f) () = $ac_func;
11346 #endif
11347 #ifdef __cplusplus
11348 }
11349 #endif
11350
11351 int
11352 main ()
11353 {
11354 return f != $ac_func;
11355   ;
11356   return 0;
11357 }
11358 _ACEOF
11359 rm -f conftest.$ac_objext conftest$ac_exeext
11360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11361   (eval $ac_link) 2>conftest.er1
11362   ac_status=$?
11363   grep -v '^ *+' conftest.er1 >conftest.err
11364   rm -f conftest.er1
11365   cat conftest.err >&5
11366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367   (exit $ac_status); } &&
11368          { ac_try='test -z "$ac_cxx_werror_flag"
11369                          || test ! -s conftest.err'
11370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11371   (eval $ac_try) 2>&5
11372   ac_status=$?
11373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11374   (exit $ac_status); }; } &&
11375          { ac_try='test -s conftest$ac_exeext'
11376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11377   (eval $ac_try) 2>&5
11378   ac_status=$?
11379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380   (exit $ac_status); }; }; then
11381   eval "$as_ac_var=yes"
11382 else
11383   echo "$as_me: failed program was:" >&5
11384 sed 's/^/| /' conftest.$ac_ext >&5
11385
11386 eval "$as_ac_var=no"
11387 fi
11388 rm -f conftest.err conftest.$ac_objext \
11389       conftest$ac_exeext conftest.$ac_ext
11390 fi
11391 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11392 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11393 if test `eval echo '${'$as_ac_var'}'` = yes; then
11394   cat >>confdefs.h <<_ACEOF
11395 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11396 _ACEOF
11397
11398 fi
11399 done
11400
11401
11402 for ac_func in fgets
11403 do
11404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11405 echo "$as_me:$LINENO: checking for $ac_func" >&5
11406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11407 if eval "test \"\${$as_ac_var+set}\" = set"; then
11408   echo $ECHO_N "(cached) $ECHO_C" >&6
11409 else
11410   cat >conftest.$ac_ext <<_ACEOF
11411 /* confdefs.h.  */
11412 _ACEOF
11413 cat confdefs.h >>conftest.$ac_ext
11414 cat >>conftest.$ac_ext <<_ACEOF
11415 /* end confdefs.h.  */
11416 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11417    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11418 #define $ac_func innocuous_$ac_func
11419
11420 /* System header to define __stub macros and hopefully few prototypes,
11421     which can conflict with char $ac_func (); below.
11422     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11423     <limits.h> exists even on freestanding compilers.  */
11424
11425 #ifdef __STDC__
11426 # include <limits.h>
11427 #else
11428 # include <assert.h>
11429 #endif
11430
11431 #undef $ac_func
11432
11433 /* Override any gcc2 internal prototype to avoid an error.  */
11434 #ifdef __cplusplus
11435 extern "C"
11436 {
11437 #endif
11438 /* We use char because int might match the return type of a gcc2
11439    builtin and then its argument prototype would still apply.  */
11440 char $ac_func ();
11441 /* The GNU C library defines this for functions which it implements
11442     to always fail with ENOSYS.  Some functions are actually named
11443     something starting with __ and the normal name is an alias.  */
11444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11445 choke me
11446 #else
11447 char (*f) () = $ac_func;
11448 #endif
11449 #ifdef __cplusplus
11450 }
11451 #endif
11452
11453 int
11454 main ()
11455 {
11456 return f != $ac_func;
11457   ;
11458   return 0;
11459 }
11460 _ACEOF
11461 rm -f conftest.$ac_objext conftest$ac_exeext
11462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11463   (eval $ac_link) 2>conftest.er1
11464   ac_status=$?
11465   grep -v '^ *+' conftest.er1 >conftest.err
11466   rm -f conftest.er1
11467   cat conftest.err >&5
11468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -z "$ac_cxx_werror_flag"
11471                          || test ! -s conftest.err'
11472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476   (exit $ac_status); }; } &&
11477          { ac_try='test -s conftest$ac_exeext'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   eval "$as_ac_var=yes"
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 sed 's/^/| /' conftest.$ac_ext >&5
11487
11488 eval "$as_ac_var=no"
11489 fi
11490 rm -f conftest.err conftest.$ac_objext \
11491       conftest$ac_exeext conftest.$ac_ext
11492 fi
11493 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11494 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11495 if test `eval echo '${'$as_ac_var'}'` = yes; then
11496   cat >>confdefs.h <<_ACEOF
11497 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11498 _ACEOF
11499
11500 fi
11501 done
11502
11503
11504 for ac_func in yylex
11505 do
11506 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11507 echo "$as_me:$LINENO: checking for $ac_func" >&5
11508 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11509 if eval "test \"\${$as_ac_var+set}\" = set"; then
11510   echo $ECHO_N "(cached) $ECHO_C" >&6
11511 else
11512   cat >conftest.$ac_ext <<_ACEOF
11513 /* confdefs.h.  */
11514 _ACEOF
11515 cat confdefs.h >>conftest.$ac_ext
11516 cat >>conftest.$ac_ext <<_ACEOF
11517 /* end confdefs.h.  */
11518 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11519    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11520 #define $ac_func innocuous_$ac_func
11521
11522 /* System header to define __stub macros and hopefully few prototypes,
11523     which can conflict with char $ac_func (); below.
11524     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11525     <limits.h> exists even on freestanding compilers.  */
11526
11527 #ifdef __STDC__
11528 # include <limits.h>
11529 #else
11530 # include <assert.h>
11531 #endif
11532
11533 #undef $ac_func
11534
11535 /* Override any gcc2 internal prototype to avoid an error.  */
11536 #ifdef __cplusplus
11537 extern "C"
11538 {
11539 #endif
11540 /* We use char because int might match the return type of a gcc2
11541    builtin and then its argument prototype would still apply.  */
11542 char $ac_func ();
11543 /* The GNU C library defines this for functions which it implements
11544     to always fail with ENOSYS.  Some functions are actually named
11545     something starting with __ and the normal name is an alias.  */
11546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11547 choke me
11548 #else
11549 char (*f) () = $ac_func;
11550 #endif
11551 #ifdef __cplusplus
11552 }
11553 #endif
11554
11555 int
11556 main ()
11557 {
11558 return f != $ac_func;
11559   ;
11560   return 0;
11561 }
11562 _ACEOF
11563 rm -f conftest.$ac_objext conftest$ac_exeext
11564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11565   (eval $ac_link) 2>conftest.er1
11566   ac_status=$?
11567   grep -v '^ *+' conftest.er1 >conftest.err
11568   rm -f conftest.er1
11569   cat conftest.err >&5
11570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571   (exit $ac_status); } &&
11572          { ac_try='test -z "$ac_cxx_werror_flag"
11573                          || test ! -s conftest.err'
11574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11575   (eval $ac_try) 2>&5
11576   ac_status=$?
11577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578   (exit $ac_status); }; } &&
11579          { ac_try='test -s conftest$ac_exeext'
11580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11581   (eval $ac_try) 2>&5
11582   ac_status=$?
11583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584   (exit $ac_status); }; }; then
11585   eval "$as_ac_var=yes"
11586 else
11587   echo "$as_me: failed program was:" >&5
11588 sed 's/^/| /' conftest.$ac_ext >&5
11589
11590 eval "$as_ac_var=no"
11591 fi
11592 rm -f conftest.err conftest.$ac_objext \
11593       conftest$ac_exeext conftest.$ac_ext
11594 fi
11595 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11596 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11597 if test `eval echo '${'$as_ac_var'}'` = yes; then
11598   cat >>confdefs.h <<_ACEOF
11599 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11600 _ACEOF
11601
11602 fi
11603 done
11604
11605
11606 echo "$as_me:$LINENO: checking whether scanf knows %a" >&5
11607 echo $ECHO_N "checking whether scanf knows %a... $ECHO_C" >&6
11608 if test "${ucsim_cv_scanf_a+set}" = set; then
11609   echo $ECHO_N "(cached) $ECHO_C" >&6
11610 else
11611   echo "a b" >conftest.data
11612 if test "$cross_compiling" = yes; then
11613   ucsim_cv_scanf_a="unknown"
11614 else
11615   cat >conftest.$ac_ext <<_ACEOF
11616 /* confdefs.h.  */
11617 _ACEOF
11618 cat confdefs.h >>conftest.$ac_ext
11619 cat >>conftest.$ac_ext <<_ACEOF
11620 /* end confdefs.h.  */
11621
11622 #include <stdio.h>
11623 void main(void)
11624 {
11625   FILE *f;
11626   char *a;
11627   int  i;
11628   if ((f= fopen("conftest.data", "r")) == NULL)
11629     exit(1);
11630   i= fscanf(f, " %a[a-z] ", &a);
11631   fclose(f);
11632   if (i == 0)
11633     exit(2);
11634   if (i == 1)
11635     exit(0);
11636   exit(3);
11637 }
11638 _ACEOF
11639 rm -f conftest$ac_exeext
11640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11641   (eval $ac_link) 2>&5
11642   ac_status=$?
11643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11644   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11646   (eval $ac_try) 2>&5
11647   ac_status=$?
11648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649   (exit $ac_status); }; }; then
11650   ucsim_cv_scanf_a="yes"
11651 else
11652   echo "$as_me: program exited with status $ac_status" >&5
11653 echo "$as_me: failed program was:" >&5
11654 sed 's/^/| /' conftest.$ac_ext >&5
11655
11656 ( exit $ac_status )
11657 ucsim_cv_scanf_a="no"
11658 fi
11659 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11660 fi
11661
11662 fi
11663 echo "$as_me:$LINENO: result: $ucsim_cv_scanf_a" >&5
11664 echo "${ECHO_T}$ucsim_cv_scanf_a" >&6
11665 if test "$ucsim_cv_scanf_a" = "yes"; then
11666   cat >>confdefs.h <<\_ACEOF
11667 #define SCANF_A 1
11668 _ACEOF
11669
11670 fi
11671
11672 echo "$as_me:$LINENO: checking whether getcwd is GNUish" >&5
11673 echo $ECHO_N "checking whether getcwd is GNUish... $ECHO_C" >&6
11674 if test "${ucsim_cv_getcwd+set}" = set; then
11675   echo $ECHO_N "(cached) $ECHO_C" >&6
11676 else
11677   if test "$cross_compiling" = yes; then
11678   ucsim_cv_getcwd="unknown"
11679 else
11680   cat >conftest.$ac_ext <<_ACEOF
11681 /* confdefs.h.  */
11682 _ACEOF
11683 cat confdefs.h >>conftest.$ac_ext
11684 cat >>conftest.$ac_ext <<_ACEOF
11685 /* end confdefs.h.  */
11686
11687 #include <unistd.h>
11688 void main(void)
11689 {
11690   if ((getcwd(NULL, 0)) == NULL)
11691     exit(1);
11692   exit(0);
11693 }
11694 _ACEOF
11695 rm -f conftest$ac_exeext
11696 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11697   (eval $ac_link) 2>&5
11698   ac_status=$?
11699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11700   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702   (eval $ac_try) 2>&5
11703   ac_status=$?
11704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705   (exit $ac_status); }; }; then
11706   ucsim_cv_getcwd="yes"
11707 else
11708   echo "$as_me: program exited with status $ac_status" >&5
11709 echo "$as_me: failed program was:" >&5
11710 sed 's/^/| /' conftest.$ac_ext >&5
11711
11712 ( exit $ac_status )
11713 ucsim_cv_getcwd="no"
11714 fi
11715 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11716 fi
11717
11718 fi
11719 echo "$as_me:$LINENO: result: $ucsim_cv_getcwd" >&5
11720 echo "${ECHO_T}$ucsim_cv_getcwd" >&6
11721 if test "$ucsim_cv_getcwd" = "yes"; then
11722   cat >>confdefs.h <<\_ACEOF
11723 #define GNU_GETCWD 1
11724 _ACEOF
11725
11726 fi
11727
11728
11729 #'
11730
11731 echo "$as_me:$LINENO: checking for type of length pointer parameter of accept" >&5
11732 echo $ECHO_N "checking for type of length pointer parameter of accept... $ECHO_C" >&6
11733 if test "${ucsim_cv_accept_length_type+set}" = set; then
11734   echo $ECHO_N "(cached) $ECHO_C" >&6
11735 else
11736   ac_save_CPPFLAGS="$CPPFLAGS"
11737     ucsim_cv_accept_length_type=no
11738     for ac_val in int size_t socklen_t; do
11739       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
11740       cat >conftest.$ac_ext <<_ACEOF
11741 /* confdefs.h.  */
11742 _ACEOF
11743 cat confdefs.h >>conftest.$ac_ext
11744 cat >>conftest.$ac_ext <<_ACEOF
11745 /* end confdefs.h.  */
11746 #include <sys/types.h>
11747 #include ${ucsim_cv_socket}
11748 int
11749 main ()
11750 {
11751 struct sockaddr a; $ac_val len; accept (0, &a, &len);
11752   ;
11753   return 0;
11754 }
11755 _ACEOF
11756 rm -f conftest.$ac_objext
11757 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11758   (eval $ac_compile) 2>conftest.er1
11759   ac_status=$?
11760   grep -v '^ *+' conftest.er1 >conftest.err
11761   rm -f conftest.er1
11762   cat conftest.err >&5
11763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764   (exit $ac_status); } &&
11765          { ac_try='test -z "$ac_cxx_werror_flag"
11766                          || test ! -s conftest.err'
11767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11768   (eval $ac_try) 2>&5
11769   ac_status=$?
11770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11771   (exit $ac_status); }; } &&
11772          { ac_try='test -s conftest.$ac_objext'
11773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   ucsim_cv_accept_length_type=$ac_val; break
11779 else
11780   echo "$as_me: failed program was:" >&5
11781 sed 's/^/| /' conftest.$ac_ext >&5
11782
11783 fi
11784 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11785     done
11786     CPPFLAGS="$ac_save_CPPFLAGS"
11787 fi
11788 echo "$as_me:$LINENO: result: $ucsim_cv_accept_length_type" >&5
11789 echo "${ECHO_T}$ucsim_cv_accept_length_type" >&6
11790   if test "$ucsim_cv_accept_length_type" != no; then
11791
11792 cat >>confdefs.h <<_ACEOF
11793 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
11794 _ACEOF
11795
11796   fi
11797
11798
11799
11800 # Macro definitions
11801 ###################
11802
11803 # DD_COPT macro checks if the compiler specified as the 1st parameter
11804 # supports option specified as the 2nd parameter
11805 # For example: DD_COPT(CXX, fPIC)
11806
11807
11808
11809
11810 # Checking characteristics of compilers and other programs
11811 # --------------------------------------------------------
11812
11813 # Cross compiling overrides
11814 # FIXME
11815 if test "$CC" = "i586-mingw32msvc-gcc"; then
11816   ac_cv_c_bigendian=no
11817   ac_cv_sizeof_char=1
11818   ac_cv_sizeof_short=2
11819   ac_cv_sizeof_int=4
11820   ac_cv_sizeof_long=4
11821   ac_cv_sizeof_long_long=4
11822 fi
11823
11824 if test "$cross_compiling" = "no"
11825 then
11826     echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
11827 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
11828 if test "${ac_cv_c_bigendian+set}" = set; then
11829   echo $ECHO_N "(cached) $ECHO_C" >&6
11830 else
11831   # See if sys/param.h defines the BYTE_ORDER macro.
11832 cat >conftest.$ac_ext <<_ACEOF
11833 /* confdefs.h.  */
11834 _ACEOF
11835 cat confdefs.h >>conftest.$ac_ext
11836 cat >>conftest.$ac_ext <<_ACEOF
11837 /* end confdefs.h.  */
11838 #include <sys/types.h>
11839 #include <sys/param.h>
11840
11841 int
11842 main ()
11843 {
11844 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11845  bogus endian macros
11846 #endif
11847
11848   ;
11849   return 0;
11850 }
11851 _ACEOF
11852 rm -f conftest.$ac_objext
11853 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11854   (eval $ac_compile) 2>conftest.er1
11855   ac_status=$?
11856   grep -v '^ *+' conftest.er1 >conftest.err
11857   rm -f conftest.er1
11858   cat conftest.err >&5
11859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11860   (exit $ac_status); } &&
11861          { ac_try='test -z "$ac_cxx_werror_flag"
11862                          || test ! -s conftest.err'
11863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867   (exit $ac_status); }; } &&
11868          { ac_try='test -s conftest.$ac_objext'
11869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11870   (eval $ac_try) 2>&5
11871   ac_status=$?
11872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873   (exit $ac_status); }; }; then
11874   # It does; now see whether it defined to BIG_ENDIAN or not.
11875 cat >conftest.$ac_ext <<_ACEOF
11876 /* confdefs.h.  */
11877 _ACEOF
11878 cat confdefs.h >>conftest.$ac_ext
11879 cat >>conftest.$ac_ext <<_ACEOF
11880 /* end confdefs.h.  */
11881 #include <sys/types.h>
11882 #include <sys/param.h>
11883
11884 int
11885 main ()
11886 {
11887 #if BYTE_ORDER != BIG_ENDIAN
11888  not big endian
11889 #endif
11890
11891   ;
11892   return 0;
11893 }
11894 _ACEOF
11895 rm -f conftest.$ac_objext
11896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11897   (eval $ac_compile) 2>conftest.er1
11898   ac_status=$?
11899   grep -v '^ *+' conftest.er1 >conftest.err
11900   rm -f conftest.er1
11901   cat conftest.err >&5
11902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903   (exit $ac_status); } &&
11904          { ac_try='test -z "$ac_cxx_werror_flag"
11905                          || test ! -s conftest.err'
11906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11907   (eval $ac_try) 2>&5
11908   ac_status=$?
11909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11910   (exit $ac_status); }; } &&
11911          { ac_try='test -s conftest.$ac_objext'
11912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11913   (eval $ac_try) 2>&5
11914   ac_status=$?
11915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11916   (exit $ac_status); }; }; then
11917   ac_cv_c_bigendian=yes
11918 else
11919   echo "$as_me: failed program was:" >&5
11920 sed 's/^/| /' conftest.$ac_ext >&5
11921
11922 ac_cv_c_bigendian=no
11923 fi
11924 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11925 else
11926   echo "$as_me: failed program was:" >&5
11927 sed 's/^/| /' conftest.$ac_ext >&5
11928
11929 # It does not; compile a test program.
11930 if test "$cross_compiling" = yes; then
11931   # try to guess the endianness by grepping values into an object file
11932   ac_cv_c_bigendian=unknown
11933   cat >conftest.$ac_ext <<_ACEOF
11934 /* confdefs.h.  */
11935 _ACEOF
11936 cat confdefs.h >>conftest.$ac_ext
11937 cat >>conftest.$ac_ext <<_ACEOF
11938 /* end confdefs.h.  */
11939 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11940 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11941 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
11942 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11943 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11944 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
11945 int
11946 main ()
11947 {
11948  _ascii (); _ebcdic ();
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f conftest.$ac_objext
11954 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11955   (eval $ac_compile) 2>conftest.er1
11956   ac_status=$?
11957   grep -v '^ *+' conftest.er1 >conftest.err
11958   rm -f conftest.er1
11959   cat conftest.err >&5
11960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961   (exit $ac_status); } &&
11962          { ac_try='test -z "$ac_cxx_werror_flag"
11963                          || test ! -s conftest.err'
11964   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11968   (exit $ac_status); }; } &&
11969          { ac_try='test -s conftest.$ac_objext'
11970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11971   (eval $ac_try) 2>&5
11972   ac_status=$?
11973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974   (exit $ac_status); }; }; then
11975   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
11976   ac_cv_c_bigendian=yes
11977 fi
11978 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11979   if test "$ac_cv_c_bigendian" = unknown; then
11980     ac_cv_c_bigendian=no
11981   else
11982     # finding both strings is unlikely to happen, but who knows?
11983     ac_cv_c_bigendian=unknown
11984   fi
11985 fi
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 sed 's/^/| /' conftest.$ac_ext >&5
11989
11990 fi
11991 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11992 else
11993   cat >conftest.$ac_ext <<_ACEOF
11994 /* confdefs.h.  */
11995 _ACEOF
11996 cat confdefs.h >>conftest.$ac_ext
11997 cat >>conftest.$ac_ext <<_ACEOF
11998 /* end confdefs.h.  */
11999 int
12000 main ()
12001 {
12002   /* Are we little or big endian?  From Harbison&Steele.  */
12003   union
12004   {
12005     long l;
12006     char c[sizeof (long)];
12007   } u;
12008   u.l = 1;
12009   exit (u.c[sizeof (long) - 1] == 1);
12010 }
12011 _ACEOF
12012 rm -f conftest$ac_exeext
12013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12014   (eval $ac_link) 2>&5
12015   ac_status=$?
12016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12019   (eval $ac_try) 2>&5
12020   ac_status=$?
12021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022   (exit $ac_status); }; }; then
12023   ac_cv_c_bigendian=no
12024 else
12025   echo "$as_me: program exited with status $ac_status" >&5
12026 echo "$as_me: failed program was:" >&5
12027 sed 's/^/| /' conftest.$ac_ext >&5
12028
12029 ( exit $ac_status )
12030 ac_cv_c_bigendian=yes
12031 fi
12032 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12033 fi
12034 fi
12035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12036 fi
12037 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
12038 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
12039 case $ac_cv_c_bigendian in
12040   yes)
12041
12042 cat >>confdefs.h <<\_ACEOF
12043 #define WORDS_BIGENDIAN 1
12044 _ACEOF
12045  ;;
12046   no)
12047      ;;
12048   *)
12049     { { echo "$as_me:$LINENO: error: unknown endianness
12050 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
12051 echo "$as_me: error: unknown endianness
12052 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
12053    { (exit 1); exit 1; }; } ;;
12054 esac
12055
12056 else
12057 #echo "CROSS ENDIAN"
12058     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
12059         ac_cv_c_bigendian=no
12060     else
12061         : # FIXME
12062     fi
12063 #echo "CROSS ENDIAN DONE"
12064 fi
12065
12066 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
12067 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
12068 if test "${ucsim_cv_MM+set}" = set; then
12069   echo $ECHO_N "(cached) $ECHO_C" >&6
12070 else
12071   echo "#include <stdio.h>" >_test_.c
12072 echo "" >>_test_.c
12073 $CXXCPP -v -MM _test_.c 1>&5 2>&5
12074 if test "$?" = "0"; then
12075   ucsim_cv_MM="-MM"
12076 else
12077   ucsim_cv_MM="-M"
12078 fi
12079 rm -f _test_.*
12080 fi
12081 echo "$as_me:$LINENO: result: $ucsim_cv_MM" >&5
12082 echo "${ECHO_T}$ucsim_cv_MM" >&6
12083 M_OR_MM=$ucsim_cv_MM
12084
12085
12086 # This is the first time when CFLAGS are set/modified!!
12087
12088
12089 echo "$as_me:$LINENO: checking whether $CXX accepts -ggdb" >&5
12090 echo $ECHO_N "checking whether $CXX accepts -ggdb... $ECHO_C" >&6
12091 if test "${ucsim_cv_CXXggdb+set}" = set; then
12092   echo $ECHO_N "(cached) $ECHO_C" >&6
12093 else
12094   cat >_test_.c <<EOF
12095 #include <stdio.h>
12096 int main(void) {return(0);}
12097 EOF
12098 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
12099 if test "$?" = "0"; then
12100   ucsim_cv_CXXggdb="yes"
12101 else
12102   ucsim_cv_CXXggdb="no"
12103 fi
12104 rm -f _test_.* a.out
12105 fi
12106 echo "$as_me:$LINENO: result: $ucsim_cv_CXXggdb" >&5
12107 echo "${ECHO_T}$ucsim_cv_CXXggdb" >&6
12108
12109
12110 echo "$as_me:$LINENO: checking whether $CXX accepts -gstabs" >&5
12111 echo $ECHO_N "checking whether $CXX accepts -gstabs... $ECHO_C" >&6
12112 if test "${ucsim_cv_CXXgstabs+set}" = set; then
12113   echo $ECHO_N "(cached) $ECHO_C" >&6
12114 else
12115   cat >_test_.c <<EOF
12116 #include <stdio.h>
12117 int main(void) {return(0);}
12118 EOF
12119 $CXX -v -gstabs -c _test_.c 1>&5 2>&5
12120 if test "$?" = "0"; then
12121   ucsim_cv_CXXgstabs="yes"
12122 else
12123   ucsim_cv_CXXgstabs="no"
12124 fi
12125 rm -f _test_.* a.out
12126 fi
12127 echo "$as_me:$LINENO: result: $ucsim_cv_CXXgstabs" >&5
12128 echo "${ECHO_T}$ucsim_cv_CXXgstabs" >&6
12129
12130 if test "$ucsim_cv_CXXgstabs" = "yes"; then
12131    gopt="-gstabs+ -g3"
12132 elif test "$ucsim_cv_CXXggdb" = "yes"; then
12133      gopt="-ggdb -g3"
12134 else
12135      gopt="-g"
12136 fi
12137 if test "$CXXFLAGS"x = x ;then
12138         CXXFLAGS="$gopt"
12139 else
12140         CXXFLAGS="$CXXFLAGS $gopt"
12141 fi
12142
12143
12144 echo "$as_me:$LINENO: checking whether $CXX accepts -pipe" >&5
12145 echo $ECHO_N "checking whether $CXX accepts -pipe... $ECHO_C" >&6
12146 if test "${ucsim_cv_CXXpipe+set}" = set; then
12147   echo $ECHO_N "(cached) $ECHO_C" >&6
12148 else
12149   cat >_test_.c <<EOF
12150 #include <stdio.h>
12151 int main(void) {return(0);}
12152 EOF
12153 $CXX -v -pipe -c _test_.c 1>&5 2>&5
12154 if test "$?" = "0"; then
12155   ucsim_cv_CXXpipe="yes"
12156 else
12157   ucsim_cv_CXXpipe="no"
12158 fi
12159 rm -f _test_.* a.out
12160 fi
12161 echo "$as_me:$LINENO: result: $ucsim_cv_CXXpipe" >&5
12162 echo "${ECHO_T}$ucsim_cv_CXXpipe" >&6
12163
12164 if test "$ucsim_cv_CXXpipe" = "yes"; then
12165   CXXFLAGS="$CXXFLAGS -pipe"
12166 fi
12167
12168 PICOPT=""
12169 SHAREDLIB="no"
12170
12171 echo "$as_me:$LINENO: checking whether $CXX accepts -fPIC" >&5
12172 echo $ECHO_N "checking whether $CXX accepts -fPIC... $ECHO_C" >&6
12173 if test "${ucsim_cv_CXXfPIC+set}" = set; then
12174   echo $ECHO_N "(cached) $ECHO_C" >&6
12175 else
12176   cat >_test_.c <<EOF
12177 #include <stdio.h>
12178 int main(void) {return(0);}
12179 EOF
12180 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
12181 if test "$?" = "0"; then
12182   ucsim_cv_CXXfPIC="yes"
12183 else
12184   ucsim_cv_CXXfPIC="no"
12185 fi
12186 rm -f _test_.* a.out
12187 fi
12188 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfPIC" >&5
12189 echo "${ECHO_T}$ucsim_cv_CXXfPIC" >&6
12190
12191 if test "$ucsim_cv_CXXfPIC" = "yes"; then
12192     PICOPT="-fPIC"
12193 else
12194
12195 echo "$as_me:$LINENO: checking whether $CXX accepts -fpic" >&5
12196 echo $ECHO_N "checking whether $CXX accepts -fpic... $ECHO_C" >&6
12197 if test "${ucsim_cv_CXXfpic+set}" = set; then
12198   echo $ECHO_N "(cached) $ECHO_C" >&6
12199 else
12200   cat >_test_.c <<EOF
12201 #include <stdio.h>
12202 int main(void) {return(0);}
12203 EOF
12204 $CXX -v -fpic -c _test_.c 1>&5 2>&5
12205 if test "$?" = "0"; then
12206   ucsim_cv_CXXfpic="yes"
12207 else
12208   ucsim_cv_CXXfpic="no"
12209 fi
12210 rm -f _test_.* a.out
12211 fi
12212 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfpic" >&5
12213 echo "${ECHO_T}$ucsim_cv_CXXfpic" >&6
12214
12215     if test "$ucsim_cv_CXXfpic" = "yes"; then
12216         PICOPT="-fpic"
12217     fi
12218 fi
12219 if test "$PICOPT"x != "x"; then
12220     SHAREDLIB="yes"
12221 fi
12222 # If this is Cygwin neither use Position Independant Code
12223 # nor build .so
12224 # Quick + dirty by Bernhard
12225 # FIXME
12226 if $CXX --version 2>&1 | grep -i cygming 1>&5 2>&5 || $CXX --version 2>&1 | grep -i cygwin 1>&5 2>&5; then
12227     PICOPT=""
12228     SHAREDLIB="no"
12229 fi
12230
12231
12232
12233 dlso_ok="no"
12234 if test $SHAREDLIB = "yes" -a $dl_ok = "yes" -a $enable_dlso = "yes"; then
12235     dlso_ok="yes"
12236 fi
12237
12238
12239 # Checks for typedefs, structures, and compiler characteristics.
12240 # ===========================================================================
12241
12242 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
12243 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12244 if test "${ac_cv_type_signal+set}" = set; then
12245   echo $ECHO_N "(cached) $ECHO_C" >&6
12246 else
12247   cat >conftest.$ac_ext <<_ACEOF
12248 /* confdefs.h.  */
12249 _ACEOF
12250 cat confdefs.h >>conftest.$ac_ext
12251 cat >>conftest.$ac_ext <<_ACEOF
12252 /* end confdefs.h.  */
12253 #include <sys/types.h>
12254 #include <signal.h>
12255 #ifdef signal
12256 # undef signal
12257 #endif
12258 #ifdef __cplusplus
12259 extern "C" void (*signal (int, void (*)(int)))(int);
12260 #else
12261 void (*signal ()) ();
12262 #endif
12263
12264 int
12265 main ()
12266 {
12267 int i;
12268   ;
12269   return 0;
12270 }
12271 _ACEOF
12272 rm -f conftest.$ac_objext
12273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12274   (eval $ac_compile) 2>conftest.er1
12275   ac_status=$?
12276   grep -v '^ *+' conftest.er1 >conftest.err
12277   rm -f conftest.er1
12278   cat conftest.err >&5
12279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280   (exit $ac_status); } &&
12281          { ac_try='test -z "$ac_cxx_werror_flag"
12282                          || test ! -s conftest.err'
12283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12284   (eval $ac_try) 2>&5
12285   ac_status=$?
12286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12287   (exit $ac_status); }; } &&
12288          { ac_try='test -s conftest.$ac_objext'
12289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12290   (eval $ac_try) 2>&5
12291   ac_status=$?
12292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12293   (exit $ac_status); }; }; then
12294   ac_cv_type_signal=void
12295 else
12296   echo "$as_me: failed program was:" >&5
12297 sed 's/^/| /' conftest.$ac_ext >&5
12298
12299 ac_cv_type_signal=int
12300 fi
12301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12302 fi
12303 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
12304 echo "${ECHO_T}$ac_cv_type_signal" >&6
12305
12306 cat >>confdefs.h <<_ACEOF
12307 #define RETSIGTYPE $ac_cv_type_signal
12308 _ACEOF
12309
12310
12311 if test "$cross_compiling" = "no"; then
12312 echo "$as_me:$LINENO: checking for char" >&5
12313 echo $ECHO_N "checking for char... $ECHO_C" >&6
12314 if test "${ac_cv_type_char+set}" = set; then
12315   echo $ECHO_N "(cached) $ECHO_C" >&6
12316 else
12317   cat >conftest.$ac_ext <<_ACEOF
12318 /* confdefs.h.  */
12319 _ACEOF
12320 cat confdefs.h >>conftest.$ac_ext
12321 cat >>conftest.$ac_ext <<_ACEOF
12322 /* end confdefs.h.  */
12323 $ac_includes_default
12324 int
12325 main ()
12326 {
12327 if ((char *) 0)
12328   return 0;
12329 if (sizeof (char))
12330   return 0;
12331   ;
12332   return 0;
12333 }
12334 _ACEOF
12335 rm -f conftest.$ac_objext
12336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12337   (eval $ac_compile) 2>conftest.er1
12338   ac_status=$?
12339   grep -v '^ *+' conftest.er1 >conftest.err
12340   rm -f conftest.er1
12341   cat conftest.err >&5
12342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343   (exit $ac_status); } &&
12344          { ac_try='test -z "$ac_cxx_werror_flag"
12345                          || test ! -s conftest.err'
12346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350   (exit $ac_status); }; } &&
12351          { ac_try='test -s conftest.$ac_objext'
12352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); }; }; then
12357   ac_cv_type_char=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362 ac_cv_type_char=no
12363 fi
12364 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
12367 echo "${ECHO_T}$ac_cv_type_char" >&6
12368
12369 echo "$as_me:$LINENO: checking size of char" >&5
12370 echo $ECHO_N "checking size of char... $ECHO_C" >&6
12371 if test "${ac_cv_sizeof_char+set}" = set; then
12372   echo $ECHO_N "(cached) $ECHO_C" >&6
12373 else
12374   if test "$ac_cv_type_char" = yes; then
12375   # The cast to unsigned long works around a bug in the HP C Compiler
12376   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12377   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12378   # This bug is HP SR number 8606223364.
12379   if test "$cross_compiling" = yes; then
12380   # Depending upon the size, compute the lo and hi bounds.
12381 cat >conftest.$ac_ext <<_ACEOF
12382 /* confdefs.h.  */
12383 _ACEOF
12384 cat confdefs.h >>conftest.$ac_ext
12385 cat >>conftest.$ac_ext <<_ACEOF
12386 /* end confdefs.h.  */
12387 $ac_includes_default
12388 int
12389 main ()
12390 {
12391 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
12392 test_array [0] = 0
12393
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext
12399 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12400   (eval $ac_compile) 2>conftest.er1
12401   ac_status=$?
12402   grep -v '^ *+' conftest.er1 >conftest.err
12403   rm -f conftest.er1
12404   cat conftest.err >&5
12405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12406   (exit $ac_status); } &&
12407          { ac_try='test -z "$ac_cxx_werror_flag"
12408                          || test ! -s conftest.err'
12409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410   (eval $ac_try) 2>&5
12411   ac_status=$?
12412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413   (exit $ac_status); }; } &&
12414          { ac_try='test -s conftest.$ac_objext'
12415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12416   (eval $ac_try) 2>&5
12417   ac_status=$?
12418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419   (exit $ac_status); }; }; then
12420   ac_lo=0 ac_mid=0
12421   while :; do
12422     cat >conftest.$ac_ext <<_ACEOF
12423 /* confdefs.h.  */
12424 _ACEOF
12425 cat confdefs.h >>conftest.$ac_ext
12426 cat >>conftest.$ac_ext <<_ACEOF
12427 /* end confdefs.h.  */
12428 $ac_includes_default
12429 int
12430 main ()
12431 {
12432 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
12433 test_array [0] = 0
12434
12435   ;
12436   return 0;
12437 }
12438 _ACEOF
12439 rm -f conftest.$ac_objext
12440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12441   (eval $ac_compile) 2>conftest.er1
12442   ac_status=$?
12443   grep -v '^ *+' conftest.er1 >conftest.err
12444   rm -f conftest.er1
12445   cat conftest.err >&5
12446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12447   (exit $ac_status); } &&
12448          { ac_try='test -z "$ac_cxx_werror_flag"
12449                          || test ! -s conftest.err'
12450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12451   (eval $ac_try) 2>&5
12452   ac_status=$?
12453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12454   (exit $ac_status); }; } &&
12455          { ac_try='test -s conftest.$ac_objext'
12456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460   (exit $ac_status); }; }; then
12461   ac_hi=$ac_mid; break
12462 else
12463   echo "$as_me: failed program was:" >&5
12464 sed 's/^/| /' conftest.$ac_ext >&5
12465
12466 ac_lo=`expr $ac_mid + 1`
12467                     if test $ac_lo -le $ac_mid; then
12468                       ac_lo= ac_hi=
12469                       break
12470                     fi
12471                     ac_mid=`expr 2 '*' $ac_mid + 1`
12472 fi
12473 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12474   done
12475 else
12476   echo "$as_me: failed program was:" >&5
12477 sed 's/^/| /' conftest.$ac_ext >&5
12478
12479 cat >conftest.$ac_ext <<_ACEOF
12480 /* confdefs.h.  */
12481 _ACEOF
12482 cat confdefs.h >>conftest.$ac_ext
12483 cat >>conftest.$ac_ext <<_ACEOF
12484 /* end confdefs.h.  */
12485 $ac_includes_default
12486 int
12487 main ()
12488 {
12489 static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
12490 test_array [0] = 0
12491
12492   ;
12493   return 0;
12494 }
12495 _ACEOF
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12498   (eval $ac_compile) 2>conftest.er1
12499   ac_status=$?
12500   grep -v '^ *+' conftest.er1 >conftest.err
12501   rm -f conftest.er1
12502   cat conftest.err >&5
12503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504   (exit $ac_status); } &&
12505          { ac_try='test -z "$ac_cxx_werror_flag"
12506                          || test ! -s conftest.err'
12507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12508   (eval $ac_try) 2>&5
12509   ac_status=$?
12510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511   (exit $ac_status); }; } &&
12512          { ac_try='test -s conftest.$ac_objext'
12513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12514   (eval $ac_try) 2>&5
12515   ac_status=$?
12516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517   (exit $ac_status); }; }; then
12518   ac_hi=-1 ac_mid=-1
12519   while :; do
12520     cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 $ac_includes_default
12527 int
12528 main ()
12529 {
12530 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
12531 test_array [0] = 0
12532
12533   ;
12534   return 0;
12535 }
12536 _ACEOF
12537 rm -f conftest.$ac_objext
12538 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12539   (eval $ac_compile) 2>conftest.er1
12540   ac_status=$?
12541   grep -v '^ *+' conftest.er1 >conftest.err
12542   rm -f conftest.er1
12543   cat conftest.err >&5
12544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -z "$ac_cxx_werror_flag"
12547                          || test ! -s conftest.err'
12548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12549   (eval $ac_try) 2>&5
12550   ac_status=$?
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); }; } &&
12553          { ac_try='test -s conftest.$ac_objext'
12554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12555   (eval $ac_try) 2>&5
12556   ac_status=$?
12557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12558   (exit $ac_status); }; }; then
12559   ac_lo=$ac_mid; break
12560 else
12561   echo "$as_me: failed program was:" >&5
12562 sed 's/^/| /' conftest.$ac_ext >&5
12563
12564 ac_hi=`expr '(' $ac_mid ')' - 1`
12565                        if test $ac_mid -le $ac_hi; then
12566                          ac_lo= ac_hi=
12567                          break
12568                        fi
12569                        ac_mid=`expr 2 '*' $ac_mid`
12570 fi
12571 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12572   done
12573 else
12574   echo "$as_me: failed program was:" >&5
12575 sed 's/^/| /' conftest.$ac_ext >&5
12576
12577 ac_lo= ac_hi=
12578 fi
12579 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12580 fi
12581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12582 # Binary search between lo and hi bounds.
12583 while test "x$ac_lo" != "x$ac_hi"; do
12584   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12585   cat >conftest.$ac_ext <<_ACEOF
12586 /* confdefs.h.  */
12587 _ACEOF
12588 cat confdefs.h >>conftest.$ac_ext
12589 cat >>conftest.$ac_ext <<_ACEOF
12590 /* end confdefs.h.  */
12591 $ac_includes_default
12592 int
12593 main ()
12594 {
12595 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
12596 test_array [0] = 0
12597
12598   ;
12599   return 0;
12600 }
12601 _ACEOF
12602 rm -f conftest.$ac_objext
12603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12604   (eval $ac_compile) 2>conftest.er1
12605   ac_status=$?
12606   grep -v '^ *+' conftest.er1 >conftest.err
12607   rm -f conftest.er1
12608   cat conftest.err >&5
12609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12610   (exit $ac_status); } &&
12611          { ac_try='test -z "$ac_cxx_werror_flag"
12612                          || test ! -s conftest.err'
12613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12617   (exit $ac_status); }; } &&
12618          { ac_try='test -s conftest.$ac_objext'
12619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12620   (eval $ac_try) 2>&5
12621   ac_status=$?
12622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623   (exit $ac_status); }; }; then
12624   ac_hi=$ac_mid
12625 else
12626   echo "$as_me: failed program was:" >&5
12627 sed 's/^/| /' conftest.$ac_ext >&5
12628
12629 ac_lo=`expr '(' $ac_mid ')' + 1`
12630 fi
12631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12632 done
12633 case $ac_lo in
12634 ?*) ac_cv_sizeof_char=$ac_lo;;
12635 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12636 See \`config.log' for more details." >&5
12637 echo "$as_me: error: cannot compute sizeof (char), 77
12638 See \`config.log' for more details." >&2;}
12639    { (exit 1); exit 1; }; } ;;
12640 esac
12641 else
12642   if test "$cross_compiling" = yes; then
12643   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12644 See \`config.log' for more details." >&5
12645 echo "$as_me: error: cannot run test program while cross compiling
12646 See \`config.log' for more details." >&2;}
12647    { (exit 1); exit 1; }; }
12648 else
12649   cat >conftest.$ac_ext <<_ACEOF
12650 /* confdefs.h.  */
12651 _ACEOF
12652 cat confdefs.h >>conftest.$ac_ext
12653 cat >>conftest.$ac_ext <<_ACEOF
12654 /* end confdefs.h.  */
12655 $ac_includes_default
12656 long longval () { return (long) (sizeof (char)); }
12657 unsigned long ulongval () { return (long) (sizeof (char)); }
12658 #include <stdio.h>
12659 #include <stdlib.h>
12660 int
12661 main ()
12662 {
12663
12664   FILE *f = fopen ("conftest.val", "w");
12665   if (! f)
12666     exit (1);
12667   if (((long) (sizeof (char))) < 0)
12668     {
12669       long i = longval ();
12670       if (i != ((long) (sizeof (char))))
12671         exit (1);
12672       fprintf (f, "%ld\n", i);
12673     }
12674   else
12675     {
12676       unsigned long i = ulongval ();
12677       if (i != ((long) (sizeof (char))))
12678         exit (1);
12679       fprintf (f, "%lu\n", i);
12680     }
12681   exit (ferror (f) || fclose (f) != 0);
12682
12683   ;
12684   return 0;
12685 }
12686 _ACEOF
12687 rm -f conftest$ac_exeext
12688 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12689   (eval $ac_link) 2>&5
12690   ac_status=$?
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694   (eval $ac_try) 2>&5
12695   ac_status=$?
12696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697   (exit $ac_status); }; }; then
12698   ac_cv_sizeof_char=`cat conftest.val`
12699 else
12700   echo "$as_me: program exited with status $ac_status" >&5
12701 echo "$as_me: failed program was:" >&5
12702 sed 's/^/| /' conftest.$ac_ext >&5
12703
12704 ( exit $ac_status )
12705 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12706 See \`config.log' for more details." >&5
12707 echo "$as_me: error: cannot compute sizeof (char), 77
12708 See \`config.log' for more details." >&2;}
12709    { (exit 1); exit 1; }; }
12710 fi
12711 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12712 fi
12713 fi
12714 rm -f conftest.val
12715 else
12716   ac_cv_sizeof_char=0
12717 fi
12718 fi
12719 echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
12720 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
12721 cat >>confdefs.h <<_ACEOF
12722 #define SIZEOF_CHAR $ac_cv_sizeof_char
12723 _ACEOF
12724
12725
12726 echo "$as_me:$LINENO: checking for short" >&5
12727 echo $ECHO_N "checking for short... $ECHO_C" >&6
12728 if test "${ac_cv_type_short+set}" = set; then
12729   echo $ECHO_N "(cached) $ECHO_C" >&6
12730 else
12731   cat >conftest.$ac_ext <<_ACEOF
12732 /* confdefs.h.  */
12733 _ACEOF
12734 cat confdefs.h >>conftest.$ac_ext
12735 cat >>conftest.$ac_ext <<_ACEOF
12736 /* end confdefs.h.  */
12737 $ac_includes_default
12738 int
12739 main ()
12740 {
12741 if ((short *) 0)
12742   return 0;
12743 if (sizeof (short))
12744   return 0;
12745   ;
12746   return 0;
12747 }
12748 _ACEOF
12749 rm -f conftest.$ac_objext
12750 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12751   (eval $ac_compile) 2>conftest.er1
12752   ac_status=$?
12753   grep -v '^ *+' conftest.er1 >conftest.err
12754   rm -f conftest.er1
12755   cat conftest.err >&5
12756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12757   (exit $ac_status); } &&
12758          { ac_try='test -z "$ac_cxx_werror_flag"
12759                          || test ! -s conftest.err'
12760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12761   (eval $ac_try) 2>&5
12762   ac_status=$?
12763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12764   (exit $ac_status); }; } &&
12765          { ac_try='test -s conftest.$ac_objext'
12766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12767   (eval $ac_try) 2>&5
12768   ac_status=$?
12769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12770   (exit $ac_status); }; }; then
12771   ac_cv_type_short=yes
12772 else
12773   echo "$as_me: failed program was:" >&5
12774 sed 's/^/| /' conftest.$ac_ext >&5
12775
12776 ac_cv_type_short=no
12777 fi
12778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12779 fi
12780 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
12781 echo "${ECHO_T}$ac_cv_type_short" >&6
12782
12783 echo "$as_me:$LINENO: checking size of short" >&5
12784 echo $ECHO_N "checking size of short... $ECHO_C" >&6
12785 if test "${ac_cv_sizeof_short+set}" = set; then
12786   echo $ECHO_N "(cached) $ECHO_C" >&6
12787 else
12788   if test "$ac_cv_type_short" = yes; then
12789   # The cast to unsigned long works around a bug in the HP C Compiler
12790   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12791   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12792   # This bug is HP SR number 8606223364.
12793   if test "$cross_compiling" = yes; then
12794   # Depending upon the size, compute the lo and hi bounds.
12795 cat >conftest.$ac_ext <<_ACEOF
12796 /* confdefs.h.  */
12797 _ACEOF
12798 cat confdefs.h >>conftest.$ac_ext
12799 cat >>conftest.$ac_ext <<_ACEOF
12800 /* end confdefs.h.  */
12801 $ac_includes_default
12802 int
12803 main ()
12804 {
12805 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
12806 test_array [0] = 0
12807
12808   ;
12809   return 0;
12810 }
12811 _ACEOF
12812 rm -f conftest.$ac_objext
12813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12814   (eval $ac_compile) 2>conftest.er1
12815   ac_status=$?
12816   grep -v '^ *+' conftest.er1 >conftest.err
12817   rm -f conftest.er1
12818   cat conftest.err >&5
12819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820   (exit $ac_status); } &&
12821          { ac_try='test -z "$ac_cxx_werror_flag"
12822                          || test ! -s conftest.err'
12823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); }; } &&
12828          { ac_try='test -s conftest.$ac_objext'
12829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12830   (eval $ac_try) 2>&5
12831   ac_status=$?
12832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12833   (exit $ac_status); }; }; then
12834   ac_lo=0 ac_mid=0
12835   while :; do
12836     cat >conftest.$ac_ext <<_ACEOF
12837 /* confdefs.h.  */
12838 _ACEOF
12839 cat confdefs.h >>conftest.$ac_ext
12840 cat >>conftest.$ac_ext <<_ACEOF
12841 /* end confdefs.h.  */
12842 $ac_includes_default
12843 int
12844 main ()
12845 {
12846 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
12847 test_array [0] = 0
12848
12849   ;
12850   return 0;
12851 }
12852 _ACEOF
12853 rm -f conftest.$ac_objext
12854 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12855   (eval $ac_compile) 2>conftest.er1
12856   ac_status=$?
12857   grep -v '^ *+' conftest.er1 >conftest.err
12858   rm -f conftest.er1
12859   cat conftest.err >&5
12860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861   (exit $ac_status); } &&
12862          { ac_try='test -z "$ac_cxx_werror_flag"
12863                          || test ! -s conftest.err'
12864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865   (eval $ac_try) 2>&5
12866   ac_status=$?
12867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868   (exit $ac_status); }; } &&
12869          { ac_try='test -s conftest.$ac_objext'
12870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   ac_hi=$ac_mid; break
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 sed 's/^/| /' conftest.$ac_ext >&5
12879
12880 ac_lo=`expr $ac_mid + 1`
12881                     if test $ac_lo -le $ac_mid; then
12882                       ac_lo= ac_hi=
12883                       break
12884                     fi
12885                     ac_mid=`expr 2 '*' $ac_mid + 1`
12886 fi
12887 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12888   done
12889 else
12890   echo "$as_me: failed program was:" >&5
12891 sed 's/^/| /' conftest.$ac_ext >&5
12892
12893 cat >conftest.$ac_ext <<_ACEOF
12894 /* confdefs.h.  */
12895 _ACEOF
12896 cat confdefs.h >>conftest.$ac_ext
12897 cat >>conftest.$ac_ext <<_ACEOF
12898 /* end confdefs.h.  */
12899 $ac_includes_default
12900 int
12901 main ()
12902 {
12903 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
12904 test_array [0] = 0
12905
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>conftest.er1
12913   ac_status=$?
12914   grep -v '^ *+' conftest.er1 >conftest.err
12915   rm -f conftest.er1
12916   cat conftest.err >&5
12917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918   (exit $ac_status); } &&
12919          { ac_try='test -z "$ac_cxx_werror_flag"
12920                          || test ! -s conftest.err'
12921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12922   (eval $ac_try) 2>&5
12923   ac_status=$?
12924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12925   (exit $ac_status); }; } &&
12926          { ac_try='test -s conftest.$ac_objext'
12927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12928   (eval $ac_try) 2>&5
12929   ac_status=$?
12930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931   (exit $ac_status); }; }; then
12932   ac_hi=-1 ac_mid=-1
12933   while :; do
12934     cat >conftest.$ac_ext <<_ACEOF
12935 /* confdefs.h.  */
12936 _ACEOF
12937 cat confdefs.h >>conftest.$ac_ext
12938 cat >>conftest.$ac_ext <<_ACEOF
12939 /* end confdefs.h.  */
12940 $ac_includes_default
12941 int
12942 main ()
12943 {
12944 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
12945 test_array [0] = 0
12946
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 rm -f conftest.$ac_objext
12952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12953   (eval $ac_compile) 2>conftest.er1
12954   ac_status=$?
12955   grep -v '^ *+' conftest.er1 >conftest.err
12956   rm -f conftest.er1
12957   cat conftest.err >&5
12958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12959   (exit $ac_status); } &&
12960          { ac_try='test -z "$ac_cxx_werror_flag"
12961                          || test ! -s conftest.err'
12962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12963   (eval $ac_try) 2>&5
12964   ac_status=$?
12965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966   (exit $ac_status); }; } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   ac_lo=$ac_mid; break
12974 else
12975   echo "$as_me: failed program was:" >&5
12976 sed 's/^/| /' conftest.$ac_ext >&5
12977
12978 ac_hi=`expr '(' $ac_mid ')' - 1`
12979                        if test $ac_mid -le $ac_hi; then
12980                          ac_lo= ac_hi=
12981                          break
12982                        fi
12983                        ac_mid=`expr 2 '*' $ac_mid`
12984 fi
12985 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12986   done
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 sed 's/^/| /' conftest.$ac_ext >&5
12990
12991 ac_lo= ac_hi=
12992 fi
12993 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12994 fi
12995 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12996 # Binary search between lo and hi bounds.
12997 while test "x$ac_lo" != "x$ac_hi"; do
12998   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12999   cat >conftest.$ac_ext <<_ACEOF
13000 /* confdefs.h.  */
13001 _ACEOF
13002 cat confdefs.h >>conftest.$ac_ext
13003 cat >>conftest.$ac_ext <<_ACEOF
13004 /* end confdefs.h.  */
13005 $ac_includes_default
13006 int
13007 main ()
13008 {
13009 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
13010 test_array [0] = 0
13011
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 rm -f conftest.$ac_objext
13017 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13018   (eval $ac_compile) 2>conftest.er1
13019   ac_status=$?
13020   grep -v '^ *+' conftest.er1 >conftest.err
13021   rm -f conftest.er1
13022   cat conftest.err >&5
13023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13024   (exit $ac_status); } &&
13025          { ac_try='test -z "$ac_cxx_werror_flag"
13026                          || test ! -s conftest.err'
13027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13031   (exit $ac_status); }; } &&
13032          { ac_try='test -s conftest.$ac_objext'
13033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13034   (eval $ac_try) 2>&5
13035   ac_status=$?
13036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13037   (exit $ac_status); }; }; then
13038   ac_hi=$ac_mid
13039 else
13040   echo "$as_me: failed program was:" >&5
13041 sed 's/^/| /' conftest.$ac_ext >&5
13042
13043 ac_lo=`expr '(' $ac_mid ')' + 1`
13044 fi
13045 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13046 done
13047 case $ac_lo in
13048 ?*) ac_cv_sizeof_short=$ac_lo;;
13049 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
13050 See \`config.log' for more details." >&5
13051 echo "$as_me: error: cannot compute sizeof (short), 77
13052 See \`config.log' for more details." >&2;}
13053    { (exit 1); exit 1; }; } ;;
13054 esac
13055 else
13056   if test "$cross_compiling" = yes; then
13057   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13058 See \`config.log' for more details." >&5
13059 echo "$as_me: error: cannot run test program while cross compiling
13060 See \`config.log' for more details." >&2;}
13061    { (exit 1); exit 1; }; }
13062 else
13063   cat >conftest.$ac_ext <<_ACEOF
13064 /* confdefs.h.  */
13065 _ACEOF
13066 cat confdefs.h >>conftest.$ac_ext
13067 cat >>conftest.$ac_ext <<_ACEOF
13068 /* end confdefs.h.  */
13069 $ac_includes_default
13070 long longval () { return (long) (sizeof (short)); }
13071 unsigned long ulongval () { return (long) (sizeof (short)); }
13072 #include <stdio.h>
13073 #include <stdlib.h>
13074 int
13075 main ()
13076 {
13077
13078   FILE *f = fopen ("conftest.val", "w");
13079   if (! f)
13080     exit (1);
13081   if (((long) (sizeof (short))) < 0)
13082     {
13083       long i = longval ();
13084       if (i != ((long) (sizeof (short))))
13085         exit (1);
13086       fprintf (f, "%ld\n", i);
13087     }
13088   else
13089     {
13090       unsigned long i = ulongval ();
13091       if (i != ((long) (sizeof (short))))
13092         exit (1);
13093       fprintf (f, "%lu\n", i);
13094     }
13095   exit (ferror (f) || fclose (f) != 0);
13096
13097   ;
13098   return 0;
13099 }
13100 _ACEOF
13101 rm -f conftest$ac_exeext
13102 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13103   (eval $ac_link) 2>&5
13104   ac_status=$?
13105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13108   (eval $ac_try) 2>&5
13109   ac_status=$?
13110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111   (exit $ac_status); }; }; then
13112   ac_cv_sizeof_short=`cat conftest.val`
13113 else
13114   echo "$as_me: program exited with status $ac_status" >&5
13115 echo "$as_me: failed program was:" >&5
13116 sed 's/^/| /' conftest.$ac_ext >&5
13117
13118 ( exit $ac_status )
13119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
13120 See \`config.log' for more details." >&5
13121 echo "$as_me: error: cannot compute sizeof (short), 77
13122 See \`config.log' for more details." >&2;}
13123    { (exit 1); exit 1; }; }
13124 fi
13125 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13126 fi
13127 fi
13128 rm -f conftest.val
13129 else
13130   ac_cv_sizeof_short=0
13131 fi
13132 fi
13133 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
13134 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
13135 cat >>confdefs.h <<_ACEOF
13136 #define SIZEOF_SHORT $ac_cv_sizeof_short
13137 _ACEOF
13138
13139
13140 echo "$as_me:$LINENO: checking for int" >&5
13141 echo $ECHO_N "checking for int... $ECHO_C" >&6
13142 if test "${ac_cv_type_int+set}" = set; then
13143   echo $ECHO_N "(cached) $ECHO_C" >&6
13144 else
13145   cat >conftest.$ac_ext <<_ACEOF
13146 /* confdefs.h.  */
13147 _ACEOF
13148 cat confdefs.h >>conftest.$ac_ext
13149 cat >>conftest.$ac_ext <<_ACEOF
13150 /* end confdefs.h.  */
13151 $ac_includes_default
13152 int
13153 main ()
13154 {
13155 if ((int *) 0)
13156   return 0;
13157 if (sizeof (int))
13158   return 0;
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 rm -f conftest.$ac_objext
13164 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13165   (eval $ac_compile) 2>conftest.er1
13166   ac_status=$?
13167   grep -v '^ *+' conftest.er1 >conftest.err
13168   rm -f conftest.er1
13169   cat conftest.err >&5
13170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171   (exit $ac_status); } &&
13172          { ac_try='test -z "$ac_cxx_werror_flag"
13173                          || test ! -s conftest.err'
13174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13175   (eval $ac_try) 2>&5
13176   ac_status=$?
13177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13178   (exit $ac_status); }; } &&
13179          { ac_try='test -s conftest.$ac_objext'
13180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13181   (eval $ac_try) 2>&5
13182   ac_status=$?
13183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184   (exit $ac_status); }; }; then
13185   ac_cv_type_int=yes
13186 else
13187   echo "$as_me: failed program was:" >&5
13188 sed 's/^/| /' conftest.$ac_ext >&5
13189
13190 ac_cv_type_int=no
13191 fi
13192 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13193 fi
13194 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
13195 echo "${ECHO_T}$ac_cv_type_int" >&6
13196
13197 echo "$as_me:$LINENO: checking size of int" >&5
13198 echo $ECHO_N "checking size of int... $ECHO_C" >&6
13199 if test "${ac_cv_sizeof_int+set}" = set; then
13200   echo $ECHO_N "(cached) $ECHO_C" >&6
13201 else
13202   if test "$ac_cv_type_int" = yes; then
13203   # The cast to unsigned long works around a bug in the HP C Compiler
13204   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13205   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13206   # This bug is HP SR number 8606223364.
13207   if test "$cross_compiling" = yes; then
13208   # Depending upon the size, compute the lo and hi bounds.
13209 cat >conftest.$ac_ext <<_ACEOF
13210 /* confdefs.h.  */
13211 _ACEOF
13212 cat confdefs.h >>conftest.$ac_ext
13213 cat >>conftest.$ac_ext <<_ACEOF
13214 /* end confdefs.h.  */
13215 $ac_includes_default
13216 int
13217 main ()
13218 {
13219 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
13220 test_array [0] = 0
13221
13222   ;
13223   return 0;
13224 }
13225 _ACEOF
13226 rm -f conftest.$ac_objext
13227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13228   (eval $ac_compile) 2>conftest.er1
13229   ac_status=$?
13230   grep -v '^ *+' conftest.er1 >conftest.err
13231   rm -f conftest.er1
13232   cat conftest.err >&5
13233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234   (exit $ac_status); } &&
13235          { ac_try='test -z "$ac_cxx_werror_flag"
13236                          || test ! -s conftest.err'
13237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13238   (eval $ac_try) 2>&5
13239   ac_status=$?
13240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241   (exit $ac_status); }; } &&
13242          { ac_try='test -s conftest.$ac_objext'
13243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13244   (eval $ac_try) 2>&5
13245   ac_status=$?
13246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13247   (exit $ac_status); }; }; then
13248   ac_lo=0 ac_mid=0
13249   while :; do
13250     cat >conftest.$ac_ext <<_ACEOF
13251 /* confdefs.h.  */
13252 _ACEOF
13253 cat confdefs.h >>conftest.$ac_ext
13254 cat >>conftest.$ac_ext <<_ACEOF
13255 /* end confdefs.h.  */
13256 $ac_includes_default
13257 int
13258 main ()
13259 {
13260 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
13261 test_array [0] = 0
13262
13263   ;
13264   return 0;
13265 }
13266 _ACEOF
13267 rm -f conftest.$ac_objext
13268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13269   (eval $ac_compile) 2>conftest.er1
13270   ac_status=$?
13271   grep -v '^ *+' conftest.er1 >conftest.err
13272   rm -f conftest.er1
13273   cat conftest.err >&5
13274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275   (exit $ac_status); } &&
13276          { ac_try='test -z "$ac_cxx_werror_flag"
13277                          || test ! -s conftest.err'
13278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13279   (eval $ac_try) 2>&5
13280   ac_status=$?
13281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282   (exit $ac_status); }; } &&
13283          { ac_try='test -s conftest.$ac_objext'
13284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13285   (eval $ac_try) 2>&5
13286   ac_status=$?
13287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288   (exit $ac_status); }; }; then
13289   ac_hi=$ac_mid; break
13290 else
13291   echo "$as_me: failed program was:" >&5
13292 sed 's/^/| /' conftest.$ac_ext >&5
13293
13294 ac_lo=`expr $ac_mid + 1`
13295                     if test $ac_lo -le $ac_mid; then
13296                       ac_lo= ac_hi=
13297                       break
13298                     fi
13299                     ac_mid=`expr 2 '*' $ac_mid + 1`
13300 fi
13301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13302   done
13303 else
13304   echo "$as_me: failed program was:" >&5
13305 sed 's/^/| /' conftest.$ac_ext >&5
13306
13307 cat >conftest.$ac_ext <<_ACEOF
13308 /* confdefs.h.  */
13309 _ACEOF
13310 cat confdefs.h >>conftest.$ac_ext
13311 cat >>conftest.$ac_ext <<_ACEOF
13312 /* end confdefs.h.  */
13313 $ac_includes_default
13314 int
13315 main ()
13316 {
13317 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
13318 test_array [0] = 0
13319
13320   ;
13321   return 0;
13322 }
13323 _ACEOF
13324 rm -f conftest.$ac_objext
13325 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13326   (eval $ac_compile) 2>conftest.er1
13327   ac_status=$?
13328   grep -v '^ *+' conftest.er1 >conftest.err
13329   rm -f conftest.er1
13330   cat conftest.err >&5
13331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332   (exit $ac_status); } &&
13333          { ac_try='test -z "$ac_cxx_werror_flag"
13334                          || test ! -s conftest.err'
13335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13336   (eval $ac_try) 2>&5
13337   ac_status=$?
13338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339   (exit $ac_status); }; } &&
13340          { ac_try='test -s conftest.$ac_objext'
13341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13342   (eval $ac_try) 2>&5
13343   ac_status=$?
13344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13345   (exit $ac_status); }; }; then
13346   ac_hi=-1 ac_mid=-1
13347   while :; do
13348     cat >conftest.$ac_ext <<_ACEOF
13349 /* confdefs.h.  */
13350 _ACEOF
13351 cat confdefs.h >>conftest.$ac_ext
13352 cat >>conftest.$ac_ext <<_ACEOF
13353 /* end confdefs.h.  */
13354 $ac_includes_default
13355 int
13356 main ()
13357 {
13358 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
13359 test_array [0] = 0
13360
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext
13366 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13367   (eval $ac_compile) 2>conftest.er1
13368   ac_status=$?
13369   grep -v '^ *+' conftest.er1 >conftest.err
13370   rm -f conftest.er1
13371   cat conftest.err >&5
13372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373   (exit $ac_status); } &&
13374          { ac_try='test -z "$ac_cxx_werror_flag"
13375                          || test ! -s conftest.err'
13376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13377   (eval $ac_try) 2>&5
13378   ac_status=$?
13379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13380   (exit $ac_status); }; } &&
13381          { ac_try='test -s conftest.$ac_objext'
13382   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13383   (eval $ac_try) 2>&5
13384   ac_status=$?
13385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386   (exit $ac_status); }; }; then
13387   ac_lo=$ac_mid; break
13388 else
13389   echo "$as_me: failed program was:" >&5
13390 sed 's/^/| /' conftest.$ac_ext >&5
13391
13392 ac_hi=`expr '(' $ac_mid ')' - 1`
13393                        if test $ac_mid -le $ac_hi; then
13394                          ac_lo= ac_hi=
13395                          break
13396                        fi
13397                        ac_mid=`expr 2 '*' $ac_mid`
13398 fi
13399 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13400   done
13401 else
13402   echo "$as_me: failed program was:" >&5
13403 sed 's/^/| /' conftest.$ac_ext >&5
13404
13405 ac_lo= ac_hi=
13406 fi
13407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13408 fi
13409 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13410 # Binary search between lo and hi bounds.
13411 while test "x$ac_lo" != "x$ac_hi"; do
13412   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13413   cat >conftest.$ac_ext <<_ACEOF
13414 /* confdefs.h.  */
13415 _ACEOF
13416 cat confdefs.h >>conftest.$ac_ext
13417 cat >>conftest.$ac_ext <<_ACEOF
13418 /* end confdefs.h.  */
13419 $ac_includes_default
13420 int
13421 main ()
13422 {
13423 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
13424 test_array [0] = 0
13425
13426   ;
13427   return 0;
13428 }
13429 _ACEOF
13430 rm -f conftest.$ac_objext
13431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13432   (eval $ac_compile) 2>conftest.er1
13433   ac_status=$?
13434   grep -v '^ *+' conftest.er1 >conftest.err
13435   rm -f conftest.er1
13436   cat conftest.err >&5
13437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13438   (exit $ac_status); } &&
13439          { ac_try='test -z "$ac_cxx_werror_flag"
13440                          || test ! -s conftest.err'
13441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13442   (eval $ac_try) 2>&5
13443   ac_status=$?
13444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13445   (exit $ac_status); }; } &&
13446          { ac_try='test -s conftest.$ac_objext'
13447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13448   (eval $ac_try) 2>&5
13449   ac_status=$?
13450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13451   (exit $ac_status); }; }; then
13452   ac_hi=$ac_mid
13453 else
13454   echo "$as_me: failed program was:" >&5
13455 sed 's/^/| /' conftest.$ac_ext >&5
13456
13457 ac_lo=`expr '(' $ac_mid ')' + 1`
13458 fi
13459 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13460 done
13461 case $ac_lo in
13462 ?*) ac_cv_sizeof_int=$ac_lo;;
13463 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
13464 See \`config.log' for more details." >&5
13465 echo "$as_me: error: cannot compute sizeof (int), 77
13466 See \`config.log' for more details." >&2;}
13467    { (exit 1); exit 1; }; } ;;
13468 esac
13469 else
13470   if test "$cross_compiling" = yes; then
13471   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13472 See \`config.log' for more details." >&5
13473 echo "$as_me: error: cannot run test program while cross compiling
13474 See \`config.log' for more details." >&2;}
13475    { (exit 1); exit 1; }; }
13476 else
13477   cat >conftest.$ac_ext <<_ACEOF
13478 /* confdefs.h.  */
13479 _ACEOF
13480 cat confdefs.h >>conftest.$ac_ext
13481 cat >>conftest.$ac_ext <<_ACEOF
13482 /* end confdefs.h.  */
13483 $ac_includes_default
13484 long longval () { return (long) (sizeof (int)); }
13485 unsigned long ulongval () { return (long) (sizeof (int)); }
13486 #include <stdio.h>
13487 #include <stdlib.h>
13488 int
13489 main ()
13490 {
13491
13492   FILE *f = fopen ("conftest.val", "w");
13493   if (! f)
13494     exit (1);
13495   if (((long) (sizeof (int))) < 0)
13496     {
13497       long i = longval ();
13498       if (i != ((long) (sizeof (int))))
13499         exit (1);
13500       fprintf (f, "%ld\n", i);
13501     }
13502   else
13503     {
13504       unsigned long i = ulongval ();
13505       if (i != ((long) (sizeof (int))))
13506         exit (1);
13507       fprintf (f, "%lu\n", i);
13508     }
13509   exit (ferror (f) || fclose (f) != 0);
13510
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f conftest$ac_exeext
13516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13517   (eval $ac_link) 2>&5
13518   ac_status=$?
13519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13522   (eval $ac_try) 2>&5
13523   ac_status=$?
13524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13525   (exit $ac_status); }; }; then
13526   ac_cv_sizeof_int=`cat conftest.val`
13527 else
13528   echo "$as_me: program exited with status $ac_status" >&5
13529 echo "$as_me: failed program was:" >&5
13530 sed 's/^/| /' conftest.$ac_ext >&5
13531
13532 ( exit $ac_status )
13533 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
13534 See \`config.log' for more details." >&5
13535 echo "$as_me: error: cannot compute sizeof (int), 77
13536 See \`config.log' for more details." >&2;}
13537    { (exit 1); exit 1; }; }
13538 fi
13539 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13540 fi
13541 fi
13542 rm -f conftest.val
13543 else
13544   ac_cv_sizeof_int=0
13545 fi
13546 fi
13547 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
13548 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
13549 cat >>confdefs.h <<_ACEOF
13550 #define SIZEOF_INT $ac_cv_sizeof_int
13551 _ACEOF
13552
13553
13554 echo "$as_me:$LINENO: checking for long" >&5
13555 echo $ECHO_N "checking for long... $ECHO_C" >&6
13556 if test "${ac_cv_type_long+set}" = set; then
13557   echo $ECHO_N "(cached) $ECHO_C" >&6
13558 else
13559   cat >conftest.$ac_ext <<_ACEOF
13560 /* confdefs.h.  */
13561 _ACEOF
13562 cat confdefs.h >>conftest.$ac_ext
13563 cat >>conftest.$ac_ext <<_ACEOF
13564 /* end confdefs.h.  */
13565 $ac_includes_default
13566 int
13567 main ()
13568 {
13569 if ((long *) 0)
13570   return 0;
13571 if (sizeof (long))
13572   return 0;
13573   ;
13574   return 0;
13575 }
13576 _ACEOF
13577 rm -f conftest.$ac_objext
13578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13579   (eval $ac_compile) 2>conftest.er1
13580   ac_status=$?
13581   grep -v '^ *+' conftest.er1 >conftest.err
13582   rm -f conftest.er1
13583   cat conftest.err >&5
13584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585   (exit $ac_status); } &&
13586          { ac_try='test -z "$ac_cxx_werror_flag"
13587                          || test ! -s conftest.err'
13588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13589   (eval $ac_try) 2>&5
13590   ac_status=$?
13591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13592   (exit $ac_status); }; } &&
13593          { ac_try='test -s conftest.$ac_objext'
13594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13595   (eval $ac_try) 2>&5
13596   ac_status=$?
13597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13598   (exit $ac_status); }; }; then
13599   ac_cv_type_long=yes
13600 else
13601   echo "$as_me: failed program was:" >&5
13602 sed 's/^/| /' conftest.$ac_ext >&5
13603
13604 ac_cv_type_long=no
13605 fi
13606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13607 fi
13608 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
13609 echo "${ECHO_T}$ac_cv_type_long" >&6
13610
13611 echo "$as_me:$LINENO: checking size of long" >&5
13612 echo $ECHO_N "checking size of long... $ECHO_C" >&6
13613 if test "${ac_cv_sizeof_long+set}" = set; then
13614   echo $ECHO_N "(cached) $ECHO_C" >&6
13615 else
13616   if test "$ac_cv_type_long" = yes; then
13617   # The cast to unsigned long works around a bug in the HP C Compiler
13618   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13619   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13620   # This bug is HP SR number 8606223364.
13621   if test "$cross_compiling" = yes; then
13622   # Depending upon the size, compute the lo and hi bounds.
13623 cat >conftest.$ac_ext <<_ACEOF
13624 /* confdefs.h.  */
13625 _ACEOF
13626 cat confdefs.h >>conftest.$ac_ext
13627 cat >>conftest.$ac_ext <<_ACEOF
13628 /* end confdefs.h.  */
13629 $ac_includes_default
13630 int
13631 main ()
13632 {
13633 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
13634 test_array [0] = 0
13635
13636   ;
13637   return 0;
13638 }
13639 _ACEOF
13640 rm -f conftest.$ac_objext
13641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13642   (eval $ac_compile) 2>conftest.er1
13643   ac_status=$?
13644   grep -v '^ *+' conftest.er1 >conftest.err
13645   rm -f conftest.er1
13646   cat conftest.err >&5
13647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13648   (exit $ac_status); } &&
13649          { ac_try='test -z "$ac_cxx_werror_flag"
13650                          || test ! -s conftest.err'
13651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13655   (exit $ac_status); }; } &&
13656          { ac_try='test -s conftest.$ac_objext'
13657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13658   (eval $ac_try) 2>&5
13659   ac_status=$?
13660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661   (exit $ac_status); }; }; then
13662   ac_lo=0 ac_mid=0
13663   while :; do
13664     cat >conftest.$ac_ext <<_ACEOF
13665 /* confdefs.h.  */
13666 _ACEOF
13667 cat confdefs.h >>conftest.$ac_ext
13668 cat >>conftest.$ac_ext <<_ACEOF
13669 /* end confdefs.h.  */
13670 $ac_includes_default
13671 int
13672 main ()
13673 {
13674 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
13675 test_array [0] = 0
13676
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 rm -f conftest.$ac_objext
13682 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13683   (eval $ac_compile) 2>conftest.er1
13684   ac_status=$?
13685   grep -v '^ *+' conftest.er1 >conftest.err
13686   rm -f conftest.er1
13687   cat conftest.err >&5
13688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); } &&
13690          { ac_try='test -z "$ac_cxx_werror_flag"
13691                          || test ! -s conftest.err'
13692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13693   (eval $ac_try) 2>&5
13694   ac_status=$?
13695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13696   (exit $ac_status); }; } &&
13697          { ac_try='test -s conftest.$ac_objext'
13698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13699   (eval $ac_try) 2>&5
13700   ac_status=$?
13701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13702   (exit $ac_status); }; }; then
13703   ac_hi=$ac_mid; break
13704 else
13705   echo "$as_me: failed program was:" >&5
13706 sed 's/^/| /' conftest.$ac_ext >&5
13707
13708 ac_lo=`expr $ac_mid + 1`
13709                     if test $ac_lo -le $ac_mid; then
13710                       ac_lo= ac_hi=
13711                       break
13712                     fi
13713                     ac_mid=`expr 2 '*' $ac_mid + 1`
13714 fi
13715 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13716   done
13717 else
13718   echo "$as_me: failed program was:" >&5
13719 sed 's/^/| /' conftest.$ac_ext >&5
13720
13721 cat >conftest.$ac_ext <<_ACEOF
13722 /* confdefs.h.  */
13723 _ACEOF
13724 cat confdefs.h >>conftest.$ac_ext
13725 cat >>conftest.$ac_ext <<_ACEOF
13726 /* end confdefs.h.  */
13727 $ac_includes_default
13728 int
13729 main ()
13730 {
13731 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
13732 test_array [0] = 0
13733
13734   ;
13735   return 0;
13736 }
13737 _ACEOF
13738 rm -f conftest.$ac_objext
13739 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13740   (eval $ac_compile) 2>conftest.er1
13741   ac_status=$?
13742   grep -v '^ *+' conftest.er1 >conftest.err
13743   rm -f conftest.er1
13744   cat conftest.err >&5
13745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13746   (exit $ac_status); } &&
13747          { ac_try='test -z "$ac_cxx_werror_flag"
13748                          || test ! -s conftest.err'
13749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753   (exit $ac_status); }; } &&
13754          { ac_try='test -s conftest.$ac_objext'
13755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756   (eval $ac_try) 2>&5
13757   ac_status=$?
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); }; }; then
13760   ac_hi=-1 ac_mid=-1
13761   while :; do
13762     cat >conftest.$ac_ext <<_ACEOF
13763 /* confdefs.h.  */
13764 _ACEOF
13765 cat confdefs.h >>conftest.$ac_ext
13766 cat >>conftest.$ac_ext <<_ACEOF
13767 /* end confdefs.h.  */
13768 $ac_includes_default
13769 int
13770 main ()
13771 {
13772 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
13773 test_array [0] = 0
13774
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext
13780 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13781   (eval $ac_compile) 2>conftest.er1
13782   ac_status=$?
13783   grep -v '^ *+' conftest.er1 >conftest.err
13784   rm -f conftest.er1
13785   cat conftest.err >&5
13786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787   (exit $ac_status); } &&
13788          { ac_try='test -z "$ac_cxx_werror_flag"
13789                          || test ! -s conftest.err'
13790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794   (exit $ac_status); }; } &&
13795          { ac_try='test -s conftest.$ac_objext'
13796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13797   (eval $ac_try) 2>&5
13798   ac_status=$?
13799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800   (exit $ac_status); }; }; then
13801   ac_lo=$ac_mid; break
13802 else
13803   echo "$as_me: failed program was:" >&5
13804 sed 's/^/| /' conftest.$ac_ext >&5
13805
13806 ac_hi=`expr '(' $ac_mid ')' - 1`
13807                        if test $ac_mid -le $ac_hi; then
13808                          ac_lo= ac_hi=
13809                          break
13810                        fi
13811                        ac_mid=`expr 2 '*' $ac_mid`
13812 fi
13813 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13814   done
13815 else
13816   echo "$as_me: failed program was:" >&5
13817 sed 's/^/| /' conftest.$ac_ext >&5
13818
13819 ac_lo= ac_hi=
13820 fi
13821 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13822 fi
13823 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13824 # Binary search between lo and hi bounds.
13825 while test "x$ac_lo" != "x$ac_hi"; do
13826   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13827   cat >conftest.$ac_ext <<_ACEOF
13828 /* confdefs.h.  */
13829 _ACEOF
13830 cat confdefs.h >>conftest.$ac_ext
13831 cat >>conftest.$ac_ext <<_ACEOF
13832 /* end confdefs.h.  */
13833 $ac_includes_default
13834 int
13835 main ()
13836 {
13837 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
13838 test_array [0] = 0
13839
13840   ;
13841   return 0;
13842 }
13843 _ACEOF
13844 rm -f conftest.$ac_objext
13845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13846   (eval $ac_compile) 2>conftest.er1
13847   ac_status=$?
13848   grep -v '^ *+' conftest.er1 >conftest.err
13849   rm -f conftest.er1
13850   cat conftest.err >&5
13851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13852   (exit $ac_status); } &&
13853          { ac_try='test -z "$ac_cxx_werror_flag"
13854                          || test ! -s conftest.err'
13855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13856   (eval $ac_try) 2>&5
13857   ac_status=$?
13858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859   (exit $ac_status); }; } &&
13860          { ac_try='test -s conftest.$ac_objext'
13861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13862   (eval $ac_try) 2>&5
13863   ac_status=$?
13864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13865   (exit $ac_status); }; }; then
13866   ac_hi=$ac_mid
13867 else
13868   echo "$as_me: failed program was:" >&5
13869 sed 's/^/| /' conftest.$ac_ext >&5
13870
13871 ac_lo=`expr '(' $ac_mid ')' + 1`
13872 fi
13873 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13874 done
13875 case $ac_lo in
13876 ?*) ac_cv_sizeof_long=$ac_lo;;
13877 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
13878 See \`config.log' for more details." >&5
13879 echo "$as_me: error: cannot compute sizeof (long), 77
13880 See \`config.log' for more details." >&2;}
13881    { (exit 1); exit 1; }; } ;;
13882 esac
13883 else
13884   if test "$cross_compiling" = yes; then
13885   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13886 See \`config.log' for more details." >&5
13887 echo "$as_me: error: cannot run test program while cross compiling
13888 See \`config.log' for more details." >&2;}
13889    { (exit 1); exit 1; }; }
13890 else
13891   cat >conftest.$ac_ext <<_ACEOF
13892 /* confdefs.h.  */
13893 _ACEOF
13894 cat confdefs.h >>conftest.$ac_ext
13895 cat >>conftest.$ac_ext <<_ACEOF
13896 /* end confdefs.h.  */
13897 $ac_includes_default
13898 long longval () { return (long) (sizeof (long)); }
13899 unsigned long ulongval () { return (long) (sizeof (long)); }
13900 #include <stdio.h>
13901 #include <stdlib.h>
13902 int
13903 main ()
13904 {
13905
13906   FILE *f = fopen ("conftest.val", "w");
13907   if (! f)
13908     exit (1);
13909   if (((long) (sizeof (long))) < 0)
13910     {
13911       long i = longval ();
13912       if (i != ((long) (sizeof (long))))
13913         exit (1);
13914       fprintf (f, "%ld\n", i);
13915     }
13916   else
13917     {
13918       unsigned long i = ulongval ();
13919       if (i != ((long) (sizeof (long))))
13920         exit (1);
13921       fprintf (f, "%lu\n", i);
13922     }
13923   exit (ferror (f) || fclose (f) != 0);
13924
13925   ;
13926   return 0;
13927 }
13928 _ACEOF
13929 rm -f conftest$ac_exeext
13930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13931   (eval $ac_link) 2>&5
13932   ac_status=$?
13933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13934   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939   (exit $ac_status); }; }; then
13940   ac_cv_sizeof_long=`cat conftest.val`
13941 else
13942   echo "$as_me: program exited with status $ac_status" >&5
13943 echo "$as_me: failed program was:" >&5
13944 sed 's/^/| /' conftest.$ac_ext >&5
13945
13946 ( exit $ac_status )
13947 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
13948 See \`config.log' for more details." >&5
13949 echo "$as_me: error: cannot compute sizeof (long), 77
13950 See \`config.log' for more details." >&2;}
13951    { (exit 1); exit 1; }; }
13952 fi
13953 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13954 fi
13955 fi
13956 rm -f conftest.val
13957 else
13958   ac_cv_sizeof_long=0
13959 fi
13960 fi
13961 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
13962 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
13963 cat >>confdefs.h <<_ACEOF
13964 #define SIZEOF_LONG $ac_cv_sizeof_long
13965 _ACEOF
13966
13967
13968 echo "$as_me:$LINENO: checking for long long" >&5
13969 echo $ECHO_N "checking for long long... $ECHO_C" >&6
13970 if test "${ac_cv_type_long_long+set}" = set; then
13971   echo $ECHO_N "(cached) $ECHO_C" >&6
13972 else
13973   cat >conftest.$ac_ext <<_ACEOF
13974 /* confdefs.h.  */
13975 _ACEOF
13976 cat confdefs.h >>conftest.$ac_ext
13977 cat >>conftest.$ac_ext <<_ACEOF
13978 /* end confdefs.h.  */
13979 $ac_includes_default
13980 int
13981 main ()
13982 {
13983 if ((long long *) 0)
13984   return 0;
13985 if (sizeof (long long))
13986   return 0;
13987   ;
13988   return 0;
13989 }
13990 _ACEOF
13991 rm -f conftest.$ac_objext
13992 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13993   (eval $ac_compile) 2>conftest.er1
13994   ac_status=$?
13995   grep -v '^ *+' conftest.er1 >conftest.err
13996   rm -f conftest.er1
13997   cat conftest.err >&5
13998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13999   (exit $ac_status); } &&
14000          { ac_try='test -z "$ac_cxx_werror_flag"
14001                          || test ! -s conftest.err'
14002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14003   (eval $ac_try) 2>&5
14004   ac_status=$?
14005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14006   (exit $ac_status); }; } &&
14007          { ac_try='test -s conftest.$ac_objext'
14008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14009   (eval $ac_try) 2>&5
14010   ac_status=$?
14011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14012   (exit $ac_status); }; }; then
14013   ac_cv_type_long_long=yes
14014 else
14015   echo "$as_me: failed program was:" >&5
14016 sed 's/^/| /' conftest.$ac_ext >&5
14017
14018 ac_cv_type_long_long=no
14019 fi
14020 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14021 fi
14022 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
14023 echo "${ECHO_T}$ac_cv_type_long_long" >&6
14024
14025 echo "$as_me:$LINENO: checking size of long long" >&5
14026 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
14027 if test "${ac_cv_sizeof_long_long+set}" = set; then
14028   echo $ECHO_N "(cached) $ECHO_C" >&6
14029 else
14030   if test "$ac_cv_type_long_long" = yes; then
14031   # The cast to unsigned long works around a bug in the HP C Compiler
14032   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14033   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14034   # This bug is HP SR number 8606223364.
14035   if test "$cross_compiling" = yes; then
14036   # Depending upon the size, compute the lo and hi bounds.
14037 cat >conftest.$ac_ext <<_ACEOF
14038 /* confdefs.h.  */
14039 _ACEOF
14040 cat confdefs.h >>conftest.$ac_ext
14041 cat >>conftest.$ac_ext <<_ACEOF
14042 /* end confdefs.h.  */
14043 $ac_includes_default
14044 int
14045 main ()
14046 {
14047 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
14048 test_array [0] = 0
14049
14050   ;
14051   return 0;
14052 }
14053 _ACEOF
14054 rm -f conftest.$ac_objext
14055 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14056   (eval $ac_compile) 2>conftest.er1
14057   ac_status=$?
14058   grep -v '^ *+' conftest.er1 >conftest.err
14059   rm -f conftest.er1
14060   cat conftest.err >&5
14061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062   (exit $ac_status); } &&
14063          { ac_try='test -z "$ac_cxx_werror_flag"
14064                          || test ! -s conftest.err'
14065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066   (eval $ac_try) 2>&5
14067   ac_status=$?
14068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069   (exit $ac_status); }; } &&
14070          { ac_try='test -s conftest.$ac_objext'
14071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14072   (eval $ac_try) 2>&5
14073   ac_status=$?
14074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14075   (exit $ac_status); }; }; then
14076   ac_lo=0 ac_mid=0
14077   while :; do
14078     cat >conftest.$ac_ext <<_ACEOF
14079 /* confdefs.h.  */
14080 _ACEOF
14081 cat confdefs.h >>conftest.$ac_ext
14082 cat >>conftest.$ac_ext <<_ACEOF
14083 /* end confdefs.h.  */
14084 $ac_includes_default
14085 int
14086 main ()
14087 {
14088 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
14089 test_array [0] = 0
14090
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 rm -f conftest.$ac_objext
14096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14097   (eval $ac_compile) 2>conftest.er1
14098   ac_status=$?
14099   grep -v '^ *+' conftest.er1 >conftest.err
14100   rm -f conftest.er1
14101   cat conftest.err >&5
14102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103   (exit $ac_status); } &&
14104          { ac_try='test -z "$ac_cxx_werror_flag"
14105                          || test ! -s conftest.err'
14106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14110   (exit $ac_status); }; } &&
14111          { ac_try='test -s conftest.$ac_objext'
14112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116   (exit $ac_status); }; }; then
14117   ac_hi=$ac_mid; break
14118 else
14119   echo "$as_me: failed program was:" >&5
14120 sed 's/^/| /' conftest.$ac_ext >&5
14121
14122 ac_lo=`expr $ac_mid + 1`
14123                     if test $ac_lo -le $ac_mid; then
14124                       ac_lo= ac_hi=
14125                       break
14126                     fi
14127                     ac_mid=`expr 2 '*' $ac_mid + 1`
14128 fi
14129 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14130   done
14131 else
14132   echo "$as_me: failed program was:" >&5
14133 sed 's/^/| /' conftest.$ac_ext >&5
14134
14135 cat >conftest.$ac_ext <<_ACEOF
14136 /* confdefs.h.  */
14137 _ACEOF
14138 cat confdefs.h >>conftest.$ac_ext
14139 cat >>conftest.$ac_ext <<_ACEOF
14140 /* end confdefs.h.  */
14141 $ac_includes_default
14142 int
14143 main ()
14144 {
14145 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
14146 test_array [0] = 0
14147
14148   ;
14149   return 0;
14150 }
14151 _ACEOF
14152 rm -f conftest.$ac_objext
14153 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14154   (eval $ac_compile) 2>conftest.er1
14155   ac_status=$?
14156   grep -v '^ *+' conftest.er1 >conftest.err
14157   rm -f conftest.er1
14158   cat conftest.err >&5
14159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14160   (exit $ac_status); } &&
14161          { ac_try='test -z "$ac_cxx_werror_flag"
14162                          || test ! -s conftest.err'
14163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14164   (eval $ac_try) 2>&5
14165   ac_status=$?
14166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167   (exit $ac_status); }; } &&
14168          { ac_try='test -s conftest.$ac_objext'
14169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14170   (eval $ac_try) 2>&5
14171   ac_status=$?
14172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14173   (exit $ac_status); }; }; then
14174   ac_hi=-1 ac_mid=-1
14175   while :; do
14176     cat >conftest.$ac_ext <<_ACEOF
14177 /* confdefs.h.  */
14178 _ACEOF
14179 cat confdefs.h >>conftest.$ac_ext
14180 cat >>conftest.$ac_ext <<_ACEOF
14181 /* end confdefs.h.  */
14182 $ac_includes_default
14183 int
14184 main ()
14185 {
14186 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
14187 test_array [0] = 0
14188
14189   ;
14190   return 0;
14191 }
14192 _ACEOF
14193 rm -f conftest.$ac_objext
14194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14195   (eval $ac_compile) 2>conftest.er1
14196   ac_status=$?
14197   grep -v '^ *+' conftest.er1 >conftest.err
14198   rm -f conftest.er1
14199   cat conftest.err >&5
14200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201   (exit $ac_status); } &&
14202          { ac_try='test -z "$ac_cxx_werror_flag"
14203                          || test ! -s conftest.err'
14204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14205   (eval $ac_try) 2>&5
14206   ac_status=$?
14207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208   (exit $ac_status); }; } &&
14209          { ac_try='test -s conftest.$ac_objext'
14210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14211   (eval $ac_try) 2>&5
14212   ac_status=$?
14213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214   (exit $ac_status); }; }; then
14215   ac_lo=$ac_mid; break
14216 else
14217   echo "$as_me: failed program was:" >&5
14218 sed 's/^/| /' conftest.$ac_ext >&5
14219
14220 ac_hi=`expr '(' $ac_mid ')' - 1`
14221                        if test $ac_mid -le $ac_hi; then
14222                          ac_lo= ac_hi=
14223                          break
14224                        fi
14225                        ac_mid=`expr 2 '*' $ac_mid`
14226 fi
14227 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14228   done
14229 else
14230   echo "$as_me: failed program was:" >&5
14231 sed 's/^/| /' conftest.$ac_ext >&5
14232
14233 ac_lo= ac_hi=
14234 fi
14235 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14236 fi
14237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14238 # Binary search between lo and hi bounds.
14239 while test "x$ac_lo" != "x$ac_hi"; do
14240   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14241   cat >conftest.$ac_ext <<_ACEOF
14242 /* confdefs.h.  */
14243 _ACEOF
14244 cat confdefs.h >>conftest.$ac_ext
14245 cat >>conftest.$ac_ext <<_ACEOF
14246 /* end confdefs.h.  */
14247 $ac_includes_default
14248 int
14249 main ()
14250 {
14251 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
14252 test_array [0] = 0
14253
14254   ;
14255   return 0;
14256 }
14257 _ACEOF
14258 rm -f conftest.$ac_objext
14259 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14260   (eval $ac_compile) 2>conftest.er1
14261   ac_status=$?
14262   grep -v '^ *+' conftest.er1 >conftest.err
14263   rm -f conftest.er1
14264   cat conftest.err >&5
14265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266   (exit $ac_status); } &&
14267          { ac_try='test -z "$ac_cxx_werror_flag"
14268                          || test ! -s conftest.err'
14269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14270   (eval $ac_try) 2>&5
14271   ac_status=$?
14272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273   (exit $ac_status); }; } &&
14274          { ac_try='test -s conftest.$ac_objext'
14275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14276   (eval $ac_try) 2>&5
14277   ac_status=$?
14278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279   (exit $ac_status); }; }; then
14280   ac_hi=$ac_mid
14281 else
14282   echo "$as_me: failed program was:" >&5
14283 sed 's/^/| /' conftest.$ac_ext >&5
14284
14285 ac_lo=`expr '(' $ac_mid ')' + 1`
14286 fi
14287 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14288 done
14289 case $ac_lo in
14290 ?*) ac_cv_sizeof_long_long=$ac_lo;;
14291 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
14292 See \`config.log' for more details." >&5
14293 echo "$as_me: error: cannot compute sizeof (long long), 77
14294 See \`config.log' for more details." >&2;}
14295    { (exit 1); exit 1; }; } ;;
14296 esac
14297 else
14298   if test "$cross_compiling" = yes; then
14299   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
14300 See \`config.log' for more details." >&5
14301 echo "$as_me: error: cannot run test program while cross compiling
14302 See \`config.log' for more details." >&2;}
14303    { (exit 1); exit 1; }; }
14304 else
14305   cat >conftest.$ac_ext <<_ACEOF
14306 /* confdefs.h.  */
14307 _ACEOF
14308 cat confdefs.h >>conftest.$ac_ext
14309 cat >>conftest.$ac_ext <<_ACEOF
14310 /* end confdefs.h.  */
14311 $ac_includes_default
14312 long longval () { return (long) (sizeof (long long)); }
14313 unsigned long ulongval () { return (long) (sizeof (long long)); }
14314 #include <stdio.h>
14315 #include <stdlib.h>
14316 int
14317 main ()
14318 {
14319
14320   FILE *f = fopen ("conftest.val", "w");
14321   if (! f)
14322     exit (1);
14323   if (((long) (sizeof (long long))) < 0)
14324     {
14325       long i = longval ();
14326       if (i != ((long) (sizeof (long long))))
14327         exit (1);
14328       fprintf (f, "%ld\n", i);
14329     }
14330   else
14331     {
14332       unsigned long i = ulongval ();
14333       if (i != ((long) (sizeof (long long))))
14334         exit (1);
14335       fprintf (f, "%lu\n", i);
14336     }
14337   exit (ferror (f) || fclose (f) != 0);
14338
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 rm -f conftest$ac_exeext
14344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14345   (eval $ac_link) 2>&5
14346   ac_status=$?
14347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14350   (eval $ac_try) 2>&5
14351   ac_status=$?
14352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14353   (exit $ac_status); }; }; then
14354   ac_cv_sizeof_long_long=`cat conftest.val`
14355 else
14356   echo "$as_me: program exited with status $ac_status" >&5
14357 echo "$as_me: failed program was:" >&5
14358 sed 's/^/| /' conftest.$ac_ext >&5
14359
14360 ( exit $ac_status )
14361 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
14362 See \`config.log' for more details." >&5
14363 echo "$as_me: error: cannot compute sizeof (long long), 77
14364 See \`config.log' for more details." >&2;}
14365    { (exit 1); exit 1; }; }
14366 fi
14367 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14368 fi
14369 fi
14370 rm -f conftest.val
14371 else
14372   ac_cv_sizeof_long_long=0
14373 fi
14374 fi
14375 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
14376 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
14377 cat >>confdefs.h <<_ACEOF
14378 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
14379 _ACEOF
14380
14381
14382 else
14383     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
14384         ac_cv_sizeof_char=1
14385         ac_cv_sizeof_short=2
14386         ac_cv_sizeof_int=4
14387         ac_cv_sizeof_long=4
14388         ac_cv_sizeof_long_long=4
14389     else
14390         : # FIXME
14391     fi
14392 #echo
14393 fi
14394
14395 type_name()
14396 {
14397     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
14398         echo "char"
14399         exit
14400     fi
14401     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
14402         echo "short"
14403         exit
14404     fi
14405     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
14406         echo "int"
14407         exit
14408     fi
14409     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
14410         echo "long"
14411         exit
14412     fi
14413     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
14414         echo "long long"
14415         exit
14416     fi
14417     echo "long long"
14418 }
14419
14420 echo "$as_me:$LINENO: checking type name for byte" >&5
14421 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
14422 TYPE_BYTE=`type_name 1`
14423 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
14424 echo "${ECHO_T}$TYPE_BYTE" >&6
14425 echo "$as_me:$LINENO: checking type name for word" >&5
14426 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
14427 TYPE_WORD=`type_name 2`
14428 echo "$as_me:$LINENO: result: $TYPE_WORD" >&5
14429 echo "${ECHO_T}$TYPE_WORD" >&6
14430 echo "$as_me:$LINENO: checking type name for dword" >&5
14431 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
14432 TYPE_DWORD=`type_name 4`
14433 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
14434 echo "${ECHO_T}$TYPE_DWORD" >&6
14435 cat >>confdefs.h <<_ACEOF
14436 #define TYPE_BYTE $TYPE_BYTE
14437 _ACEOF
14438
14439 cat >>confdefs.h <<_ACEOF
14440 #define TYPE_WORD $TYPE_WORD
14441 _ACEOF
14442
14443 cat >>confdefs.h <<_ACEOF
14444 #define TYPE_DWORD $TYPE_DWORD
14445 _ACEOF
14446
14447
14448 if echo $TYPE_DWORD|grep short >/dev/null; then
14449     A="h"
14450 elif echo $TYPE_DWORD|grep long >/dev/null; then
14451     A="l"
14452 else
14453     A=""
14454 fi
14455
14456 if echo $TYPE_WORD|grep short >/dev/null; then M="h"
14457 elif echo $TYPE_WORD|grep long >/dev/null; then M="l"
14458 else M=""
14459 fi
14460
14461 cat >>confdefs.h <<_ACEOF
14462 #define _A_ "${A}"
14463 _ACEOF
14464
14465 cat >>confdefs.h <<_ACEOF
14466 #define _M_ "${M}"
14467 _ACEOF
14468
14469
14470 # Generating output files
14471 # ===========================================================================
14472
14473                                                                                                                                   ac_config_files="$ac_config_files Makefile main.mk:main_in.mk packages.mk:packages_in.mk sim.src/Makefile cmd.src/Makefile s51.src/Makefile avr.src/Makefile z80.src/Makefile hc08.src/Makefile xa.src/Makefile gui.src/Makefile gui.src/serio.src/Makefile doc/Makefile"
14474 cat >confcache <<\_ACEOF
14475 # This file is a shell script that caches the results of configure
14476 # tests run on this system so they can be shared between configure
14477 # scripts and configure runs, see configure's option --config-cache.
14478 # It is not useful on other systems.  If it contains results you don't
14479 # want to keep, you may remove or edit it.
14480 #
14481 # config.status only pays attention to the cache file if you give it
14482 # the --recheck option to rerun configure.
14483 #
14484 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14485 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14486 # following values.
14487
14488 _ACEOF
14489
14490 # The following way of writing the cache mishandles newlines in values,
14491 # but we know of no workaround that is simple, portable, and efficient.
14492 # So, don't put newlines in cache variables' values.
14493 # Ultrix sh set writes to stderr and can't be redirected directly,
14494 # and sets the high bit in the cache file unless we assign to the vars.
14495 {
14496   (set) 2>&1 |
14497     case `(ac_space=' '; set | grep ac_space) 2>&1` in
14498     *ac_space=\ *)
14499       # `set' does not quote correctly, so add quotes (double-quote
14500       # substitution turns \\\\ into \\, and sed turns \\ into \).
14501       sed -n \
14502         "s/'/'\\\\''/g;
14503           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14504       ;;
14505     *)
14506       # `set' quotes correctly as required by POSIX, so do not add quotes.
14507       sed -n \
14508         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14509       ;;
14510     esac;
14511 } |
14512   sed '
14513      t clear
14514      : clear
14515      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14516      t end
14517      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14518      : end' >>confcache
14519 if diff $cache_file confcache >/dev/null 2>&1; then :; else
14520   if test -w $cache_file; then
14521     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14522     cat confcache >$cache_file
14523   else
14524     echo "not updating unwritable cache $cache_file"
14525   fi
14526 fi
14527 rm -f confcache
14528
14529 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14530 # Let make expand exec_prefix.
14531 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14532
14533 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14534 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14535 # trailing colons and then remove the whole line if VPATH becomes empty
14536 # (actually we leave an empty line to preserve line numbers).
14537 if test "x$srcdir" = x.; then
14538   ac_vpsub='/^[  ]*VPATH[        ]*=/{
14539 s/:*\$(srcdir):*/:/;
14540 s/:*\${srcdir}:*/:/;
14541 s/:*@srcdir@:*/:/;
14542 s/^\([^=]*=[     ]*\):*/\1/;
14543 s/:*$//;
14544 s/^[^=]*=[       ]*$//;
14545 }'
14546 fi
14547
14548 DEFS=-DHAVE_CONFIG_H
14549
14550 ac_libobjs=
14551 ac_ltlibobjs=
14552 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14553   # 1. Remove the extension, and $U if already installed.
14554   ac_i=`echo "$ac_i" |
14555          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
14556   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14557   #    will be set to the directory where LIBOBJS objects are built.
14558   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14559   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
14560 done
14561 LIBOBJS=$ac_libobjs
14562
14563 LTLIBOBJS=$ac_ltlibobjs
14564
14565
14566
14567 : ${CONFIG_STATUS=./config.status}
14568 ac_clean_files_save=$ac_clean_files
14569 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14570 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
14571 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14572 cat >$CONFIG_STATUS <<_ACEOF
14573 #! $SHELL
14574 # Generated by $as_me.
14575 # Run this file to recreate the current configuration.
14576 # Compiler output produced by configure, useful for debugging
14577 # configure, is in config.log if it exists.
14578
14579 debug=false
14580 ac_cs_recheck=false
14581 ac_cs_silent=false
14582 SHELL=\${CONFIG_SHELL-$SHELL}
14583 _ACEOF
14584
14585 cat >>$CONFIG_STATUS <<\_ACEOF
14586 ## --------------------- ##
14587 ## M4sh Initialization.  ##
14588 ## --------------------- ##
14589
14590 # Be Bourne compatible
14591 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14592   emulate sh
14593   NULLCMD=:
14594   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
14595   # is contrary to our usage.  Disable this feature.
14596   alias -g '${1+"$@"}'='"$@"'
14597 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14598   set -o posix
14599 fi
14600 DUALCASE=1; export DUALCASE # for MKS sh
14601
14602 # Support unset when possible.
14603 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14604   as_unset=unset
14605 else
14606   as_unset=false
14607 fi
14608
14609
14610 # Work around bugs in pre-3.0 UWIN ksh.
14611 $as_unset ENV MAIL MAILPATH
14612 PS1='$ '
14613 PS2='> '
14614 PS4='+ '
14615
14616 # NLS nuisances.
14617 for as_var in \
14618   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
14619   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
14620   LC_TELEPHONE LC_TIME
14621 do
14622   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
14623     eval $as_var=C; export $as_var
14624   else
14625     $as_unset $as_var
14626   fi
14627 done
14628
14629 # Required to use basename.
14630 if expr a : '\(a\)' >/dev/null 2>&1; then
14631   as_expr=expr
14632 else
14633   as_expr=false
14634 fi
14635
14636 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
14637   as_basename=basename
14638 else
14639   as_basename=false
14640 fi
14641
14642
14643 # Name of the executable.
14644 as_me=`$as_basename "$0" ||
14645 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14646          X"$0" : 'X\(//\)$' \| \
14647          X"$0" : 'X\(/\)$' \| \
14648          .     : '\(.\)' 2>/dev/null ||
14649 echo X/"$0" |
14650     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
14651           /^X\/\(\/\/\)$/{ s//\1/; q; }
14652           /^X\/\(\/\).*/{ s//\1/; q; }
14653           s/.*/./; q'`
14654
14655
14656 # PATH needs CR, and LINENO needs CR and PATH.
14657 # Avoid depending upon Character Ranges.
14658 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14659 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14660 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14661 as_cr_digits='0123456789'
14662 as_cr_alnum=$as_cr_Letters$as_cr_digits
14663
14664 # The user is always right.
14665 if test "${PATH_SEPARATOR+set}" != set; then
14666   echo "#! /bin/sh" >conf$$.sh
14667   echo  "exit 0"   >>conf$$.sh
14668   chmod +x conf$$.sh
14669   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
14670     PATH_SEPARATOR=';'
14671   else
14672     PATH_SEPARATOR=:
14673   fi
14674   rm -f conf$$.sh
14675 fi
14676
14677
14678   as_lineno_1=$LINENO
14679   as_lineno_2=$LINENO
14680   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14681   test "x$as_lineno_1" != "x$as_lineno_2" &&
14682   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
14683   # Find who we are.  Look in the path if we contain no path at all
14684   # relative or not.
14685   case $0 in
14686     *[\\/]* ) as_myself=$0 ;;
14687     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14688 for as_dir in $PATH
14689 do
14690   IFS=$as_save_IFS
14691   test -z "$as_dir" && as_dir=.
14692   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14693 done
14694
14695        ;;
14696   esac
14697   # We did not find ourselves, most probably we were run as `sh COMMAND'
14698   # in which case we are not to be found in the path.
14699   if test "x$as_myself" = x; then
14700     as_myself=$0
14701   fi
14702   if test ! -f "$as_myself"; then
14703     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
14704 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
14705    { (exit 1); exit 1; }; }
14706   fi
14707   case $CONFIG_SHELL in
14708   '')
14709     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14710 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
14711 do
14712   IFS=$as_save_IFS
14713   test -z "$as_dir" && as_dir=.
14714   for as_base in sh bash ksh sh5; do
14715          case $as_dir in
14716          /*)
14717            if ("$as_dir/$as_base" -c '
14718   as_lineno_1=$LINENO
14719   as_lineno_2=$LINENO
14720   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14721   test "x$as_lineno_1" != "x$as_lineno_2" &&
14722   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
14723              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
14724              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
14725              CONFIG_SHELL=$as_dir/$as_base
14726              export CONFIG_SHELL
14727              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
14728            fi;;
14729          esac
14730        done
14731 done
14732 ;;
14733   esac
14734
14735   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
14736   # uniformly replaced by the line number.  The first 'sed' inserts a
14737   # line-number line before each line; the second 'sed' does the real
14738   # work.  The second script uses 'N' to pair each line-number line
14739   # with the numbered line, and appends trailing '-' during
14740   # substitution so that $LINENO is not a special case at line end.
14741   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
14742   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
14743   sed '=' <$as_myself |
14744     sed '
14745       N
14746       s,$,-,
14747       : loop
14748       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
14749       t loop
14750       s,-$,,
14751       s,^['$as_cr_digits']*\n,,
14752     ' >$as_me.lineno &&
14753   chmod +x $as_me.lineno ||
14754     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
14755 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
14756    { (exit 1); exit 1; }; }
14757
14758   # Don't try to exec as it changes $[0], causing all sort of problems
14759   # (the dirname of $[0] is not the place where we might find the
14760   # original and so on.  Autoconf is especially sensible to this).
14761   . ./$as_me.lineno
14762   # Exit status is that of the last command.
14763   exit
14764 }
14765
14766
14767 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
14768   *c*,-n*) ECHO_N= ECHO_C='
14769 ' ECHO_T='      ' ;;
14770   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
14771   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
14772 esac
14773
14774 if expr a : '\(a\)' >/dev/null 2>&1; then
14775   as_expr=expr
14776 else
14777   as_expr=false
14778 fi
14779
14780 rm -f conf$$ conf$$.exe conf$$.file
14781 echo >conf$$.file
14782 if ln -s conf$$.file conf$$ 2>/dev/null; then
14783   # We could just check for DJGPP; but this test a) works b) is more generic
14784   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14785   if test -f conf$$.exe; then
14786     # Don't use ln at all; we don't have any links
14787     as_ln_s='cp -p'
14788   else
14789     as_ln_s='ln -s'
14790   fi
14791 elif ln conf$$.file conf$$ 2>/dev/null; then
14792   as_ln_s=ln
14793 else
14794   as_ln_s='cp -p'
14795 fi
14796 rm -f conf$$ conf$$.exe conf$$.file
14797
14798 if mkdir -p . 2>/dev/null; then
14799   as_mkdir_p=:
14800 else
14801   test -d ./-p && rmdir ./-p
14802   as_mkdir_p=false
14803 fi
14804
14805 as_executable_p="test -f"
14806
14807 # Sed expression to map a string onto a valid CPP name.
14808 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14809
14810 # Sed expression to map a string onto a valid variable name.
14811 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14812
14813
14814 # IFS
14815 # We need space, tab and new line, in precisely that order.
14816 as_nl='
14817 '
14818 IFS="   $as_nl"
14819
14820 # CDPATH.
14821 $as_unset CDPATH
14822
14823 exec 6>&1
14824
14825 # Open the log real soon, to keep \$[0] and so on meaningful, and to
14826 # report actual input values of CONFIG_FILES etc. instead of their
14827 # values after options handling.  Logging --version etc. is OK.
14828 exec 5>>config.log
14829 {
14830   echo
14831   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14832 ## Running $as_me. ##
14833 _ASBOX
14834 } >&5
14835 cat >&5 <<_CSEOF
14836
14837 This file was extended by $as_me, which was
14838 generated by GNU Autoconf 2.59.  Invocation command line was
14839
14840   CONFIG_FILES    = $CONFIG_FILES
14841   CONFIG_HEADERS  = $CONFIG_HEADERS
14842   CONFIG_LINKS    = $CONFIG_LINKS
14843   CONFIG_COMMANDS = $CONFIG_COMMANDS
14844   $ $0 $@
14845
14846 _CSEOF
14847 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
14848 echo >&5
14849 _ACEOF
14850
14851 # Files that config.status was made for.
14852 if test -n "$ac_config_files"; then
14853   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14854 fi
14855
14856 if test -n "$ac_config_headers"; then
14857   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14858 fi
14859
14860 if test -n "$ac_config_links"; then
14861   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14862 fi
14863
14864 if test -n "$ac_config_commands"; then
14865   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14866 fi
14867
14868 cat >>$CONFIG_STATUS <<\_ACEOF
14869
14870 ac_cs_usage="\
14871 \`$as_me' instantiates files from templates according to the
14872 current configuration.
14873
14874 Usage: $0 [OPTIONS] [FILE]...
14875
14876   -h, --help       print this help, then exit
14877   -V, --version    print version number, then exit
14878   -q, --quiet      do not print progress messages
14879   -d, --debug      don't remove temporary files
14880       --recheck    update $as_me by reconfiguring in the same conditions
14881   --file=FILE[:TEMPLATE]
14882                    instantiate the configuration file FILE
14883   --header=FILE[:TEMPLATE]
14884                    instantiate the configuration header FILE
14885
14886 Configuration files:
14887 $config_files
14888
14889 Configuration headers:
14890 $config_headers
14891
14892 Report bugs to <bug-autoconf@gnu.org>."
14893 _ACEOF
14894
14895 cat >>$CONFIG_STATUS <<_ACEOF
14896 ac_cs_version="\\
14897 config.status
14898 configured by $0, generated by GNU Autoconf 2.59,
14899   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14900
14901 Copyright (C) 2003 Free Software Foundation, Inc.
14902 This config.status script is free software; the Free Software Foundation
14903 gives unlimited permission to copy, distribute and modify it."
14904 srcdir=$srcdir
14905 INSTALL="$INSTALL"
14906 _ACEOF
14907
14908 cat >>$CONFIG_STATUS <<\_ACEOF
14909 # If no file are specified by the user, then we need to provide default
14910 # value.  By we need to know if files were specified by the user.
14911 ac_need_defaults=:
14912 while test $# != 0
14913 do
14914   case $1 in
14915   --*=*)
14916     ac_option=`expr "x$1" : 'x\([^=]*\)='`
14917     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14918     ac_shift=:
14919     ;;
14920   -*)
14921     ac_option=$1
14922     ac_optarg=$2
14923     ac_shift=shift
14924     ;;
14925   *) # This is not an option, so the user has probably given explicit
14926      # arguments.
14927      ac_option=$1
14928      ac_need_defaults=false;;
14929   esac
14930
14931   case $ac_option in
14932   # Handling of the options.
14933 _ACEOF
14934 cat >>$CONFIG_STATUS <<\_ACEOF
14935   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14936     ac_cs_recheck=: ;;
14937   --version | --vers* | -V )
14938     echo "$ac_cs_version"; exit 0 ;;
14939   --he | --h)
14940     # Conflict between --help and --header
14941     { { echo "$as_me:$LINENO: error: ambiguous option: $1
14942 Try \`$0 --help' for more information." >&5
14943 echo "$as_me: error: ambiguous option: $1
14944 Try \`$0 --help' for more information." >&2;}
14945    { (exit 1); exit 1; }; };;
14946   --help | --hel | -h )
14947     echo "$ac_cs_usage"; exit 0 ;;
14948   --debug | --d* | -d )
14949     debug=: ;;
14950   --file | --fil | --fi | --f )
14951     $ac_shift
14952     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
14953     ac_need_defaults=false;;
14954   --header | --heade | --head | --hea )
14955     $ac_shift
14956     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
14957     ac_need_defaults=false;;
14958   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14959   | -silent | --silent | --silen | --sile | --sil | --si | --s)
14960     ac_cs_silent=: ;;
14961
14962   # This is an error.
14963   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
14964 Try \`$0 --help' for more information." >&5
14965 echo "$as_me: error: unrecognized option: $1
14966 Try \`$0 --help' for more information." >&2;}
14967    { (exit 1); exit 1; }; } ;;
14968
14969   *) ac_config_targets="$ac_config_targets $1" ;;
14970
14971   esac
14972   shift
14973 done
14974
14975 ac_configure_extra_args=
14976
14977 if $ac_cs_silent; then
14978   exec 6>/dev/null
14979   ac_configure_extra_args="$ac_configure_extra_args --silent"
14980 fi
14981
14982 _ACEOF
14983 cat >>$CONFIG_STATUS <<_ACEOF
14984 if \$ac_cs_recheck; then
14985   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
14986   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14987 fi
14988
14989 _ACEOF
14990
14991
14992
14993
14994
14995 cat >>$CONFIG_STATUS <<\_ACEOF
14996 for ac_config_target in $ac_config_targets
14997 do
14998   case "$ac_config_target" in
14999   # Handling of arguments.
15000   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15001   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
15002   "packages.mk" ) CONFIG_FILES="$CONFIG_FILES packages.mk:packages_in.mk" ;;
15003   "sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
15004   "cmd.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd.src/Makefile" ;;
15005   "s51.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES s51.src/Makefile" ;;
15006   "avr.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES avr.src/Makefile" ;;
15007   "z80.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES z80.src/Makefile" ;;
15008   "hc08.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hc08.src/Makefile" ;;
15009   "xa.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES xa.src/Makefile" ;;
15010   "gui.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/Makefile" ;;
15011   "gui.src/serio.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/serio.src/Makefile" ;;
15012   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15013   "ddconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ddconfig.h:ddconfig_in.h" ;;
15014   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15015 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15016    { (exit 1); exit 1; }; };;
15017   esac
15018 done
15019
15020 # If the user did not use the arguments to specify the items to instantiate,
15021 # then the envvar interface is used.  Set only those that are not.
15022 # We use the long form for the default assignment because of an extremely
15023 # bizarre bug on SunOS 4.1.3.
15024 if $ac_need_defaults; then
15025   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15026   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15027 fi
15028
15029 # Have a temporary directory for convenience.  Make it in the build tree
15030 # simply because there is no reason to put it here, and in addition,
15031 # creating and moving files from /tmp can sometimes cause problems.
15032 # Create a temporary directory, and hook for its removal unless debugging.
15033 $debug ||
15034 {
15035   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15036   trap '{ (exit 1); exit 1; }' 1 2 13 15
15037 }
15038
15039 # Create a (secure) tmp directory for tmp files.
15040
15041 {
15042   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
15043   test -n "$tmp" && test -d "$tmp"
15044 }  ||
15045 {
15046   tmp=./confstat$$-$RANDOM
15047   (umask 077 && mkdir $tmp)
15048 } ||
15049 {
15050    echo "$me: cannot create a temporary directory in ." >&2
15051    { (exit 1); exit 1; }
15052 }
15053
15054 _ACEOF
15055
15056 cat >>$CONFIG_STATUS <<_ACEOF
15057
15058 #
15059 # CONFIG_FILES section.
15060 #
15061
15062 # No need to generate the scripts if there are no CONFIG_FILES.
15063 # This happens for instance when ./config.status config.h
15064 if test -n "\$CONFIG_FILES"; then
15065   # Protect against being on the right side of a sed subst in config.status.
15066   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15067    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15068 s,@SHELL@,$SHELL,;t t
15069 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15070 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15071 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15072 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15073 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15074 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15075 s,@exec_prefix@,$exec_prefix,;t t
15076 s,@prefix@,$prefix,;t t
15077 s,@program_transform_name@,$program_transform_name,;t t
15078 s,@bindir@,$bindir,;t t
15079 s,@sbindir@,$sbindir,;t t
15080 s,@libexecdir@,$libexecdir,;t t
15081 s,@datadir@,$datadir,;t t
15082 s,@sysconfdir@,$sysconfdir,;t t
15083 s,@sharedstatedir@,$sharedstatedir,;t t
15084 s,@localstatedir@,$localstatedir,;t t
15085 s,@libdir@,$libdir,;t t
15086 s,@includedir@,$includedir,;t t
15087 s,@oldincludedir@,$oldincludedir,;t t
15088 s,@infodir@,$infodir,;t t
15089 s,@mandir@,$mandir,;t t
15090 s,@build_alias@,$build_alias,;t t
15091 s,@host_alias@,$host_alias,;t t
15092 s,@target_alias@,$target_alias,;t t
15093 s,@DEFS@,$DEFS,;t t
15094 s,@ECHO_C@,$ECHO_C,;t t
15095 s,@ECHO_N@,$ECHO_N,;t t
15096 s,@ECHO_T@,$ECHO_T,;t t
15097 s,@LIBS@,$LIBS,;t t
15098 s,@AWK@,$AWK,;t t
15099 s,@VERSION@,$VERSION,;t t
15100 s,@VERSIONHI@,$VERSIONHI,;t t
15101 s,@VERSIONLO@,$VERSIONLO,;t t
15102 s,@VERSIONP@,$VERSIONP,;t t
15103 s,@docdir@,$docdir,;t t
15104 s,@enable_ucsim@,$enable_ucsim,;t t
15105 s,@enable_dlso@,$enable_dlso,;t t
15106 s,@enable_51@,$enable_51,;t t
15107 s,@enable_avr@,$enable_avr,;t t
15108 s,@enable_z80@,$enable_z80,;t t
15109 s,@enable_hc08@,$enable_hc08,;t t
15110 s,@enable_xa@,$enable_xa,;t t
15111 s,@enable_serio@,$enable_serio,;t t
15112 s,@CXX@,$CXX,;t t
15113 s,@CXXFLAGS@,$CXXFLAGS,;t t
15114 s,@LDFLAGS@,$LDFLAGS,;t t
15115 s,@CPPFLAGS@,$CPPFLAGS,;t t
15116 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15117 s,@EXEEXT@,$EXEEXT,;t t
15118 s,@OBJEXT@,$OBJEXT,;t t
15119 s,@CXXCPP@,$CXXCPP,;t t
15120 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15121 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15122 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15123 s,@RANLIB@,$RANLIB,;t t
15124 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15125 s,@STRIP@,$STRIP,;t t
15126 s,@build@,$build,;t t
15127 s,@build_cpu@,$build_cpu,;t t
15128 s,@build_vendor@,$build_vendor,;t t
15129 s,@build_os@,$build_os,;t t
15130 s,@host@,$host,;t t
15131 s,@host_cpu@,$host_cpu,;t t
15132 s,@host_vendor@,$host_vendor,;t t
15133 s,@host_os@,$host_os,;t t
15134 s,@CC@,$CC,;t t
15135 s,@CFLAGS@,$CFLAGS,;t t
15136 s,@ac_ct_CC@,$ac_ct_CC,;t t
15137 s,@LN_S@,$LN_S,;t t
15138 s,@ECHO@,$ECHO,;t t
15139 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
15140 s,@CPP@,$CPP,;t t
15141 s,@EGREP@,$EGREP,;t t
15142 s,@LIBTOOL@,$LIBTOOL,;t t
15143 s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
15144 s,@LEX@,$LEX,;t t
15145 s,@LEXLIB@,$LEXLIB,;t t
15146 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
15147 s,@YACC@,$YACC,;t t
15148 s,@BISON_PLUS_PLUS@,$BISON_PLUS_PLUS,;t t
15149 s,@WINSOCK_AVAIL@,$WINSOCK_AVAIL,;t t
15150 s,@dl_ok@,$dl_ok,;t t
15151 s,@DL@,$DL,;t t
15152 s,@panel_ok@,$panel_ok,;t t
15153 s,@curses_ok@,$curses_ok,;t t
15154 s,@CURSES_LIBS@,$CURSES_LIBS,;t t
15155 s,@M_OR_MM@,$M_OR_MM,;t t
15156 s,@SHAREDLIB@,$SHAREDLIB,;t t
15157 s,@PICOPT@,$PICOPT,;t t
15158 s,@dlso_ok@,$dlso_ok,;t t
15159 s,@LIBOBJS@,$LIBOBJS,;t t
15160 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
15161 CEOF
15162
15163 _ACEOF
15164
15165   cat >>$CONFIG_STATUS <<\_ACEOF
15166   # Split the substitutions into bite-sized pieces for seds with
15167   # small command number limits, like on Digital OSF/1 and HP-UX.
15168   ac_max_sed_lines=48
15169   ac_sed_frag=1 # Number of current file.
15170   ac_beg=1 # First line for current file.
15171   ac_end=$ac_max_sed_lines # Line after last line for current file.
15172   ac_more_lines=:
15173   ac_sed_cmds=
15174   while $ac_more_lines; do
15175     if test $ac_beg -gt 1; then
15176       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15177     else
15178       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15179     fi
15180     if test ! -s $tmp/subs.frag; then
15181       ac_more_lines=false
15182     else
15183       # The purpose of the label and of the branching condition is to
15184       # speed up the sed processing (if there are no `@' at all, there
15185       # is no need to browse any of the substitutions).
15186       # These are the two extra sed commands mentioned above.
15187       (echo ':t
15188   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15189       if test -z "$ac_sed_cmds"; then
15190         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15191       else
15192         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15193       fi
15194       ac_sed_frag=`expr $ac_sed_frag + 1`
15195       ac_beg=$ac_end
15196       ac_end=`expr $ac_end + $ac_max_sed_lines`
15197     fi
15198   done
15199   if test -z "$ac_sed_cmds"; then
15200     ac_sed_cmds=cat
15201   fi
15202 fi # test -n "$CONFIG_FILES"
15203
15204 _ACEOF
15205 cat >>$CONFIG_STATUS <<\_ACEOF
15206 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15207   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15208   case $ac_file in
15209   - | *:- | *:-:* ) # input from stdin
15210         cat >$tmp/stdin
15211         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15212         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15213   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15214         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15215   * )   ac_file_in=$ac_file.in ;;
15216   esac
15217
15218   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15219   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15220 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15221          X"$ac_file" : 'X\(//\)[^/]' \| \
15222          X"$ac_file" : 'X\(//\)$' \| \
15223          X"$ac_file" : 'X\(/\)' \| \
15224          .     : '\(.\)' 2>/dev/null ||
15225 echo X"$ac_file" |
15226     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15227           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15228           /^X\(\/\/\)$/{ s//\1/; q; }
15229           /^X\(\/\).*/{ s//\1/; q; }
15230           s/.*/./; q'`
15231   { if $as_mkdir_p; then
15232     mkdir -p "$ac_dir"
15233   else
15234     as_dir="$ac_dir"
15235     as_dirs=
15236     while test ! -d "$as_dir"; do
15237       as_dirs="$as_dir $as_dirs"
15238       as_dir=`(dirname "$as_dir") 2>/dev/null ||
15239 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15240          X"$as_dir" : 'X\(//\)[^/]' \| \
15241          X"$as_dir" : 'X\(//\)$' \| \
15242          X"$as_dir" : 'X\(/\)' \| \
15243          .     : '\(.\)' 2>/dev/null ||
15244 echo X"$as_dir" |
15245     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15246           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15247           /^X\(\/\/\)$/{ s//\1/; q; }
15248           /^X\(\/\).*/{ s//\1/; q; }
15249           s/.*/./; q'`
15250     done
15251     test ! -n "$as_dirs" || mkdir $as_dirs
15252   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15253 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15254    { (exit 1); exit 1; }; }; }
15255
15256   ac_builddir=.
15257
15258 if test "$ac_dir" != .; then
15259   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
15260   # A "../" for each directory in $ac_dir_suffix.
15261   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
15262 else
15263   ac_dir_suffix= ac_top_builddir=
15264 fi
15265
15266 case $srcdir in
15267   .)  # No --srcdir option.  We are building in place.
15268     ac_srcdir=.
15269     if test -z "$ac_top_builddir"; then
15270        ac_top_srcdir=.
15271     else
15272        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
15273     fi ;;
15274   [\\/]* | ?:[\\/]* )  # Absolute path.
15275     ac_srcdir=$srcdir$ac_dir_suffix;
15276     ac_top_srcdir=$srcdir ;;
15277   *) # Relative path.
15278     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
15279     ac_top_srcdir=$ac_top_builddir$srcdir ;;
15280 esac
15281
15282 # Do not use `cd foo && pwd` to compute absolute paths, because
15283 # the directories may not exist.
15284 case `pwd` in
15285 .) ac_abs_builddir="$ac_dir";;
15286 *)
15287   case "$ac_dir" in
15288   .) ac_abs_builddir=`pwd`;;
15289   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
15290   *) ac_abs_builddir=`pwd`/"$ac_dir";;
15291   esac;;
15292 esac
15293 case $ac_abs_builddir in
15294 .) ac_abs_top_builddir=${ac_top_builddir}.;;
15295 *)
15296   case ${ac_top_builddir}. in
15297   .) ac_abs_top_builddir=$ac_abs_builddir;;
15298   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
15299   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
15300   esac;;
15301 esac
15302 case $ac_abs_builddir in
15303 .) ac_abs_srcdir=$ac_srcdir;;
15304 *)
15305   case $ac_srcdir in
15306   .) ac_abs_srcdir=$ac_abs_builddir;;
15307   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
15308   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
15309   esac;;
15310 esac
15311 case $ac_abs_builddir in
15312 .) ac_abs_top_srcdir=$ac_top_srcdir;;
15313 *)
15314   case $ac_top_srcdir in
15315   .) ac_abs_top_srcdir=$ac_abs_builddir;;
15316   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
15317   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
15318   esac;;
15319 esac
15320
15321
15322   case $INSTALL in
15323   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15324   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
15325   esac
15326
15327   if test x"$ac_file" != x-; then
15328     { echo "$as_me:$LINENO: creating $ac_file" >&5
15329 echo "$as_me: creating $ac_file" >&6;}
15330     rm -f "$ac_file"
15331   fi
15332   # Let's still pretend it is `configure' which instantiates (i.e., don't
15333   # use $as_me), people would be surprised to read:
15334   #    /* config.h.  Generated by config.status.  */
15335   if test x"$ac_file" = x-; then
15336     configure_input=
15337   else
15338     configure_input="$ac_file.  "
15339   fi
15340   configure_input=$configure_input"Generated from `echo $ac_file_in |
15341                                      sed 's,.*/,,'` by configure."
15342
15343   # First look for the input files in the build tree, otherwise in the
15344   # src tree.
15345   ac_file_inputs=`IFS=:
15346     for f in $ac_file_in; do
15347       case $f in
15348       -) echo $tmp/stdin ;;
15349       [\\/$]*)
15350          # Absolute (can't be DOS-style, as IFS=:)
15351          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15352 echo "$as_me: error: cannot find input file: $f" >&2;}
15353    { (exit 1); exit 1; }; }
15354          echo "$f";;
15355       *) # Relative
15356          if test -f "$f"; then
15357            # Build tree
15358            echo "$f"
15359          elif test -f "$srcdir/$f"; then
15360            # Source tree
15361            echo "$srcdir/$f"
15362          else
15363            # /dev/null tree
15364            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15365 echo "$as_me: error: cannot find input file: $f" >&2;}
15366    { (exit 1); exit 1; }; }
15367          fi;;
15368       esac
15369     done` || { (exit 1); exit 1; }
15370 _ACEOF
15371 cat >>$CONFIG_STATUS <<_ACEOF
15372   sed "$ac_vpsub
15373 $extrasub
15374 _ACEOF
15375 cat >>$CONFIG_STATUS <<\_ACEOF
15376 :t
15377 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15378 s,@configure_input@,$configure_input,;t t
15379 s,@srcdir@,$ac_srcdir,;t t
15380 s,@abs_srcdir@,$ac_abs_srcdir,;t t
15381 s,@top_srcdir@,$ac_top_srcdir,;t t
15382 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
15383 s,@builddir@,$ac_builddir,;t t
15384 s,@abs_builddir@,$ac_abs_builddir,;t t
15385 s,@top_builddir@,$ac_top_builddir,;t t
15386 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
15387 s,@INSTALL@,$ac_INSTALL,;t t
15388 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15389   rm -f $tmp/stdin
15390   if test x"$ac_file" != x-; then
15391     mv $tmp/out $ac_file
15392   else
15393     cat $tmp/out
15394     rm -f $tmp/out
15395   fi
15396
15397 done
15398 _ACEOF
15399 cat >>$CONFIG_STATUS <<\_ACEOF
15400
15401 #
15402 # CONFIG_HEADER section.
15403 #
15404
15405 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15406 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15407 #
15408 # ac_d sets the value in "#define NAME VALUE" lines.
15409 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
15410 ac_dB='[         ].*$,\1#\2'
15411 ac_dC=' '
15412 ac_dD=',;t'
15413 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15414 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15415 ac_uB='$,\1#\2define\3'
15416 ac_uC=' '
15417 ac_uD=',;t'
15418
15419 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15420   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15421   case $ac_file in
15422   - | *:- | *:-:* ) # input from stdin
15423         cat >$tmp/stdin
15424         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15425         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15426   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15427         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15428   * )   ac_file_in=$ac_file.in ;;
15429   esac
15430
15431   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
15432 echo "$as_me: creating $ac_file" >&6;}
15433
15434   # First look for the input files in the build tree, otherwise in the
15435   # src tree.
15436   ac_file_inputs=`IFS=:
15437     for f in $ac_file_in; do
15438       case $f in
15439       -) echo $tmp/stdin ;;
15440       [\\/$]*)
15441          # Absolute (can't be DOS-style, as IFS=:)
15442          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15443 echo "$as_me: error: cannot find input file: $f" >&2;}
15444    { (exit 1); exit 1; }; }
15445          # Do quote $f, to prevent DOS paths from being IFS'd.
15446          echo "$f";;
15447       *) # Relative
15448          if test -f "$f"; then
15449            # Build tree
15450            echo "$f"
15451          elif test -f "$srcdir/$f"; then
15452            # Source tree
15453            echo "$srcdir/$f"
15454          else
15455            # /dev/null tree
15456            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15457 echo "$as_me: error: cannot find input file: $f" >&2;}
15458    { (exit 1); exit 1; }; }
15459          fi;;
15460       esac
15461     done` || { (exit 1); exit 1; }
15462   # Remove the trailing spaces.
15463   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
15464
15465 _ACEOF
15466
15467 # Transform confdefs.h into two sed scripts, `conftest.defines' and
15468 # `conftest.undefs', that substitutes the proper values into
15469 # config.h.in to produce config.h.  The first handles `#define'
15470 # templates, and the second `#undef' templates.
15471 # And first: Protect against being on the right side of a sed subst in
15472 # config.status.  Protect against being in an unquoted here document
15473 # in config.status.
15474 rm -f conftest.defines conftest.undefs
15475 # Using a here document instead of a string reduces the quoting nightmare.
15476 # Putting comments in sed scripts is not portable.
15477 #
15478 # `end' is used to avoid that the second main sed command (meant for
15479 # 0-ary CPP macros) applies to n-ary macro definitions.
15480 # See the Autoconf documentation for `clear'.
15481 cat >confdef2sed.sed <<\_ACEOF
15482 s/[\\&,]/\\&/g
15483 s,[\\$`],\\&,g
15484 t clear
15485 : clear
15486 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
15487 t end
15488 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
15489 : end
15490 _ACEOF
15491 # If some macros were called several times there might be several times
15492 # the same #defines, which is useless.  Nevertheless, we may not want to
15493 # sort them, since we want the *last* AC-DEFINE to be honored.
15494 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
15495 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
15496 rm -f confdef2sed.sed
15497
15498 # This sed command replaces #undef with comments.  This is necessary, for
15499 # example, in the case of _POSIX_SOURCE, which is predefined and required
15500 # on some systems where configure will not decide to define it.
15501 cat >>conftest.undefs <<\_ACEOF
15502 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
15503 _ACEOF
15504
15505 # Break up conftest.defines because some shells have a limit on the size
15506 # of here documents, and old seds have small limits too (100 cmds).
15507 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
15508 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
15509 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
15510 echo '  :' >>$CONFIG_STATUS
15511 rm -f conftest.tail
15512 while grep . conftest.defines >/dev/null
15513 do
15514   # Write a limited-size here document to $tmp/defines.sed.
15515   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
15516   # Speed up: don't consider the non `#define' lines.
15517   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
15518   # Work around the forget-to-reset-the-flag bug.
15519   echo 't clr' >>$CONFIG_STATUS
15520   echo ': clr' >>$CONFIG_STATUS
15521   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
15522   echo 'CEOF
15523   sed -f $tmp/defines.sed $tmp/in >$tmp/out
15524   rm -f $tmp/in
15525   mv $tmp/out $tmp/in
15526 ' >>$CONFIG_STATUS
15527   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
15528   rm -f conftest.defines
15529   mv conftest.tail conftest.defines
15530 done
15531 rm -f conftest.defines
15532 echo '  fi # grep' >>$CONFIG_STATUS
15533 echo >>$CONFIG_STATUS
15534
15535 # Break up conftest.undefs because some shells have a limit on the size
15536 # of here documents, and old seds have small limits too (100 cmds).
15537 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
15538 rm -f conftest.tail
15539 while grep . conftest.undefs >/dev/null
15540 do
15541   # Write a limited-size here document to $tmp/undefs.sed.
15542   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
15543   # Speed up: don't consider the non `#undef'
15544   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
15545   # Work around the forget-to-reset-the-flag bug.
15546   echo 't clr' >>$CONFIG_STATUS
15547   echo ': clr' >>$CONFIG_STATUS
15548   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
15549   echo 'CEOF
15550   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
15551   rm -f $tmp/in
15552   mv $tmp/out $tmp/in
15553 ' >>$CONFIG_STATUS
15554   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
15555   rm -f conftest.undefs
15556   mv conftest.tail conftest.undefs
15557 done
15558 rm -f conftest.undefs
15559
15560 cat >>$CONFIG_STATUS <<\_ACEOF
15561   # Let's still pretend it is `configure' which instantiates (i.e., don't
15562   # use $as_me), people would be surprised to read:
15563   #    /* config.h.  Generated by config.status.  */
15564   if test x"$ac_file" = x-; then
15565     echo "/* Generated by configure.  */" >$tmp/config.h
15566   else
15567     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
15568   fi
15569   cat $tmp/in >>$tmp/config.h
15570   rm -f $tmp/in
15571   if test x"$ac_file" != x-; then
15572     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
15573       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
15574 echo "$as_me: $ac_file is unchanged" >&6;}
15575     else
15576       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15577 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15578          X"$ac_file" : 'X\(//\)[^/]' \| \
15579          X"$ac_file" : 'X\(//\)$' \| \
15580          X"$ac_file" : 'X\(/\)' \| \
15581          .     : '\(.\)' 2>/dev/null ||
15582 echo X"$ac_file" |
15583     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15584           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15585           /^X\(\/\/\)$/{ s//\1/; q; }
15586           /^X\(\/\).*/{ s//\1/; q; }
15587           s/.*/./; q'`
15588       { if $as_mkdir_p; then
15589     mkdir -p "$ac_dir"
15590   else
15591     as_dir="$ac_dir"
15592     as_dirs=
15593     while test ! -d "$as_dir"; do
15594       as_dirs="$as_dir $as_dirs"
15595       as_dir=`(dirname "$as_dir") 2>/dev/null ||
15596 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15597          X"$as_dir" : 'X\(//\)[^/]' \| \
15598          X"$as_dir" : 'X\(//\)$' \| \
15599          X"$as_dir" : 'X\(/\)' \| \
15600          .     : '\(.\)' 2>/dev/null ||
15601 echo X"$as_dir" |
15602     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15603           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15604           /^X\(\/\/\)$/{ s//\1/; q; }
15605           /^X\(\/\).*/{ s//\1/; q; }
15606           s/.*/./; q'`
15607     done
15608     test ! -n "$as_dirs" || mkdir $as_dirs
15609   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15610 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15611    { (exit 1); exit 1; }; }; }
15612
15613       rm -f $ac_file
15614       mv $tmp/config.h $ac_file
15615     fi
15616   else
15617     cat $tmp/config.h
15618     rm -f $tmp/config.h
15619   fi
15620 done
15621 _ACEOF
15622
15623 cat >>$CONFIG_STATUS <<\_ACEOF
15624
15625 { (exit 0); exit 0; }
15626 _ACEOF
15627 chmod +x $CONFIG_STATUS
15628 ac_clean_files=$ac_clean_files_save
15629
15630
15631 # configure is writing to config.log, and then calls config.status.
15632 # config.status does its own redirection, appending to config.log.
15633 # Unfortunately, on DOS this fails, as config.log is still kept open
15634 # by configure, so config.status won't be able to write to it; its
15635 # output is simply discarded.  So we exec the FD to /dev/null,
15636 # effectively closing config.log, so it can be properly (re)opened and
15637 # appended to by config.status.  When coming back to configure, we
15638 # need to make the FD available again.
15639 if test "$no_create" != yes; then
15640   ac_cs_success=:
15641   ac_config_status_args=
15642   test "$silent" = yes &&
15643     ac_config_status_args="$ac_config_status_args --quiet"
15644   exec 5>/dev/null
15645   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15646   exec 5>>config.log
15647   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15648   # would make configure fail if this is the last instruction.
15649   $ac_cs_success || { (exit 1); exit 1; }
15650 fi
15651
15652
15653 #gui.src/portmon.src/Makefile
15654
15655
15656 # End of configure/configure.in