8c0ecfcfe2c2f64bb3643d437ed39c4806bcc1e2
[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 SERIAL_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 for ac_header in getopt.h
8943 do
8944 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8946   echo "$as_me:$LINENO: checking for $ac_header" >&5
8947 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8949   echo $ECHO_N "(cached) $ECHO_C" >&6
8950 fi
8951 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8952 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8953 else
8954   # Is the header compilable?
8955 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8956 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8957 cat >conftest.$ac_ext <<_ACEOF
8958 /* confdefs.h.  */
8959 _ACEOF
8960 cat confdefs.h >>conftest.$ac_ext
8961 cat >>conftest.$ac_ext <<_ACEOF
8962 /* end confdefs.h.  */
8963 $ac_includes_default
8964 #include <$ac_header>
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>conftest.er1
8969   ac_status=$?
8970   grep -v '^ *+' conftest.er1 >conftest.err
8971   rm -f conftest.er1
8972   cat conftest.err >&5
8973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974   (exit $ac_status); } &&
8975          { ac_try='test -z "$ac_cxx_werror_flag"
8976                          || test ! -s conftest.err'
8977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978   (eval $ac_try) 2>&5
8979   ac_status=$?
8980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981   (exit $ac_status); }; } &&
8982          { ac_try='test -s conftest.$ac_objext'
8983   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8984   (eval $ac_try) 2>&5
8985   ac_status=$?
8986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987   (exit $ac_status); }; }; then
8988   ac_header_compiler=yes
8989 else
8990   echo "$as_me: failed program was:" >&5
8991 sed 's/^/| /' conftest.$ac_ext >&5
8992
8993 ac_header_compiler=no
8994 fi
8995 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8996 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8997 echo "${ECHO_T}$ac_header_compiler" >&6
8998
8999 # Is the header present?
9000 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9001 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9002 cat >conftest.$ac_ext <<_ACEOF
9003 /* confdefs.h.  */
9004 _ACEOF
9005 cat confdefs.h >>conftest.$ac_ext
9006 cat >>conftest.$ac_ext <<_ACEOF
9007 /* end confdefs.h.  */
9008 #include <$ac_header>
9009 _ACEOF
9010 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9011   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9012   ac_status=$?
9013   grep -v '^ *+' conftest.er1 >conftest.err
9014   rm -f conftest.er1
9015   cat conftest.err >&5
9016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017   (exit $ac_status); } >/dev/null; then
9018   if test -s conftest.err; then
9019     ac_cpp_err=$ac_cxx_preproc_warn_flag
9020     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9021   else
9022     ac_cpp_err=
9023   fi
9024 else
9025   ac_cpp_err=yes
9026 fi
9027 if test -z "$ac_cpp_err"; then
9028   ac_header_preproc=yes
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 sed 's/^/| /' conftest.$ac_ext >&5
9032
9033   ac_header_preproc=no
9034 fi
9035 rm -f conftest.err conftest.$ac_ext
9036 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9037 echo "${ECHO_T}$ac_header_preproc" >&6
9038
9039 # So?  What about this header?
9040 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9041   yes:no: )
9042     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9043 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9044     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9045 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9046     ac_header_preproc=yes
9047     ;;
9048   no:yes:* )
9049     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9050 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9051     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9052 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9053     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9054 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9055     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9056 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9057     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9058 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9059     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9060 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9061     (
9062       cat <<\_ASBOX
9063 ## ------------------------------------------ ##
9064 ## Report this to the AC_PACKAGE_NAME lists.  ##
9065 ## ------------------------------------------ ##
9066 _ASBOX
9067     ) |
9068       sed "s/^/$as_me: WARNING:     /" >&2
9069     ;;
9070 esac
9071 echo "$as_me:$LINENO: checking for $ac_header" >&5
9072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9074   echo $ECHO_N "(cached) $ECHO_C" >&6
9075 else
9076   eval "$as_ac_Header=\$ac_header_preproc"
9077 fi
9078 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9080
9081 fi
9082 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9083   cat >>confdefs.h <<_ACEOF
9084 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9085 _ACEOF
9086
9087 fi
9088
9089 done
9090
9091
9092 for ac_header in unistd.h
9093 do
9094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9095 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9096   echo "$as_me:$LINENO: checking for $ac_header" >&5
9097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 fi
9101 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9102 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9103 else
9104   # Is the header compilable?
9105 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9106 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9107 cat >conftest.$ac_ext <<_ACEOF
9108 /* confdefs.h.  */
9109 _ACEOF
9110 cat confdefs.h >>conftest.$ac_ext
9111 cat >>conftest.$ac_ext <<_ACEOF
9112 /* end confdefs.h.  */
9113 $ac_includes_default
9114 #include <$ac_header>
9115 _ACEOF
9116 rm -f conftest.$ac_objext
9117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9118   (eval $ac_compile) 2>conftest.er1
9119   ac_status=$?
9120   grep -v '^ *+' conftest.er1 >conftest.err
9121   rm -f conftest.er1
9122   cat conftest.err >&5
9123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124   (exit $ac_status); } &&
9125          { ac_try='test -z "$ac_cxx_werror_flag"
9126                          || test ! -s conftest.err'
9127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9128   (eval $ac_try) 2>&5
9129   ac_status=$?
9130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131   (exit $ac_status); }; } &&
9132          { ac_try='test -s conftest.$ac_objext'
9133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134   (eval $ac_try) 2>&5
9135   ac_status=$?
9136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137   (exit $ac_status); }; }; then
9138   ac_header_compiler=yes
9139 else
9140   echo "$as_me: failed program was:" >&5
9141 sed 's/^/| /' conftest.$ac_ext >&5
9142
9143 ac_header_compiler=no
9144 fi
9145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9146 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9147 echo "${ECHO_T}$ac_header_compiler" >&6
9148
9149 # Is the header present?
9150 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9151 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9152 cat >conftest.$ac_ext <<_ACEOF
9153 /* confdefs.h.  */
9154 _ACEOF
9155 cat confdefs.h >>conftest.$ac_ext
9156 cat >>conftest.$ac_ext <<_ACEOF
9157 /* end confdefs.h.  */
9158 #include <$ac_header>
9159 _ACEOF
9160 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9161   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9162   ac_status=$?
9163   grep -v '^ *+' conftest.er1 >conftest.err
9164   rm -f conftest.er1
9165   cat conftest.err >&5
9166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167   (exit $ac_status); } >/dev/null; then
9168   if test -s conftest.err; then
9169     ac_cpp_err=$ac_cxx_preproc_warn_flag
9170     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9171   else
9172     ac_cpp_err=
9173   fi
9174 else
9175   ac_cpp_err=yes
9176 fi
9177 if test -z "$ac_cpp_err"; then
9178   ac_header_preproc=yes
9179 else
9180   echo "$as_me: failed program was:" >&5
9181 sed 's/^/| /' conftest.$ac_ext >&5
9182
9183   ac_header_preproc=no
9184 fi
9185 rm -f conftest.err conftest.$ac_ext
9186 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9187 echo "${ECHO_T}$ac_header_preproc" >&6
9188
9189 # So?  What about this header?
9190 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9191   yes:no: )
9192     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9193 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9194     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9195 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9196     ac_header_preproc=yes
9197     ;;
9198   no:yes:* )
9199     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9200 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9201     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9202 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9203     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9204 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9205     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9206 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9207     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9208 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9209     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9210 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9211     (
9212       cat <<\_ASBOX
9213 ## ------------------------------------------ ##
9214 ## Report this to the AC_PACKAGE_NAME lists.  ##
9215 ## ------------------------------------------ ##
9216 _ASBOX
9217     ) |
9218       sed "s/^/$as_me: WARNING:     /" >&2
9219     ;;
9220 esac
9221 echo "$as_me:$LINENO: checking for $ac_header" >&5
9222 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9223 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9224   echo $ECHO_N "(cached) $ECHO_C" >&6
9225 else
9226   eval "$as_ac_Header=\$ac_header_preproc"
9227 fi
9228 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9229 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9230
9231 fi
9232 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9233   cat >>confdefs.h <<_ACEOF
9234 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9235 _ACEOF
9236
9237 fi
9238
9239 done
9240
9241
9242 if test "${ac_cv_header_termios_h+set}" = set; then
9243   echo "$as_me:$LINENO: checking for termios.h" >&5
9244 echo $ECHO_N "checking for termios.h... $ECHO_C" >&6
9245 if test "${ac_cv_header_termios_h+set}" = set; then
9246   echo $ECHO_N "(cached) $ECHO_C" >&6
9247 fi
9248 echo "$as_me:$LINENO: result: $ac_cv_header_termios_h" >&5
9249 echo "${ECHO_T}$ac_cv_header_termios_h" >&6
9250 else
9251   # Is the header compilable?
9252 echo "$as_me:$LINENO: checking termios.h usability" >&5
9253 echo $ECHO_N "checking termios.h usability... $ECHO_C" >&6
9254 cat >conftest.$ac_ext <<_ACEOF
9255 /* confdefs.h.  */
9256 _ACEOF
9257 cat confdefs.h >>conftest.$ac_ext
9258 cat >>conftest.$ac_ext <<_ACEOF
9259 /* end confdefs.h.  */
9260 $ac_includes_default
9261 #include <termios.h>
9262 _ACEOF
9263 rm -f conftest.$ac_objext
9264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9265   (eval $ac_compile) 2>conftest.er1
9266   ac_status=$?
9267   grep -v '^ *+' conftest.er1 >conftest.err
9268   rm -f conftest.er1
9269   cat conftest.err >&5
9270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271   (exit $ac_status); } &&
9272          { ac_try='test -z "$ac_cxx_werror_flag"
9273                          || test ! -s conftest.err'
9274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9275   (eval $ac_try) 2>&5
9276   ac_status=$?
9277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278   (exit $ac_status); }; } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   ac_header_compiler=yes
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 sed 's/^/| /' conftest.$ac_ext >&5
9289
9290 ac_header_compiler=no
9291 fi
9292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9293 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9294 echo "${ECHO_T}$ac_header_compiler" >&6
9295
9296 # Is the header present?
9297 echo "$as_me:$LINENO: checking termios.h presence" >&5
9298 echo $ECHO_N "checking termios.h presence... $ECHO_C" >&6
9299 cat >conftest.$ac_ext <<_ACEOF
9300 /* confdefs.h.  */
9301 _ACEOF
9302 cat confdefs.h >>conftest.$ac_ext
9303 cat >>conftest.$ac_ext <<_ACEOF
9304 /* end confdefs.h.  */
9305 #include <termios.h>
9306 _ACEOF
9307 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9309   ac_status=$?
9310   grep -v '^ *+' conftest.er1 >conftest.err
9311   rm -f conftest.er1
9312   cat conftest.err >&5
9313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314   (exit $ac_status); } >/dev/null; then
9315   if test -s conftest.err; then
9316     ac_cpp_err=$ac_cxx_preproc_warn_flag
9317     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9318   else
9319     ac_cpp_err=
9320   fi
9321 else
9322   ac_cpp_err=yes
9323 fi
9324 if test -z "$ac_cpp_err"; then
9325   ac_header_preproc=yes
9326 else
9327   echo "$as_me: failed program was:" >&5
9328 sed 's/^/| /' conftest.$ac_ext >&5
9329
9330   ac_header_preproc=no
9331 fi
9332 rm -f conftest.err conftest.$ac_ext
9333 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9334 echo "${ECHO_T}$ac_header_preproc" >&6
9335
9336 # So?  What about this header?
9337 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9338   yes:no: )
9339     { echo "$as_me:$LINENO: WARNING: termios.h: accepted by the compiler, rejected by the preprocessor!" >&5
9340 echo "$as_me: WARNING: termios.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9341     { echo "$as_me:$LINENO: WARNING: termios.h: proceeding with the compiler's result" >&5
9342 echo "$as_me: WARNING: termios.h: proceeding with the compiler's result" >&2;}
9343     ac_header_preproc=yes
9344     ;;
9345   no:yes:* )
9346     { echo "$as_me:$LINENO: WARNING: termios.h: present but cannot be compiled" >&5
9347 echo "$as_me: WARNING: termios.h: present but cannot be compiled" >&2;}
9348     { echo "$as_me:$LINENO: WARNING: termios.h:     check for missing prerequisite headers?" >&5
9349 echo "$as_me: WARNING: termios.h:     check for missing prerequisite headers?" >&2;}
9350     { echo "$as_me:$LINENO: WARNING: termios.h: see the Autoconf documentation" >&5
9351 echo "$as_me: WARNING: termios.h: see the Autoconf documentation" >&2;}
9352     { echo "$as_me:$LINENO: WARNING: termios.h:     section \"Present But Cannot Be Compiled\"" >&5
9353 echo "$as_me: WARNING: termios.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9354     { echo "$as_me:$LINENO: WARNING: termios.h: proceeding with the preprocessor's result" >&5
9355 echo "$as_me: WARNING: termios.h: proceeding with the preprocessor's result" >&2;}
9356     { echo "$as_me:$LINENO: WARNING: termios.h: in the future, the compiler will take precedence" >&5
9357 echo "$as_me: WARNING: termios.h: in the future, the compiler will take precedence" >&2;}
9358     (
9359       cat <<\_ASBOX
9360 ## ------------------------------------------ ##
9361 ## Report this to the AC_PACKAGE_NAME lists.  ##
9362 ## ------------------------------------------ ##
9363 _ASBOX
9364     ) |
9365       sed "s/^/$as_me: WARNING:     /" >&2
9366     ;;
9367 esac
9368 echo "$as_me:$LINENO: checking for termios.h" >&5
9369 echo $ECHO_N "checking for termios.h... $ECHO_C" >&6
9370 if test "${ac_cv_header_termios_h+set}" = set; then
9371   echo $ECHO_N "(cached) $ECHO_C" >&6
9372 else
9373   ac_cv_header_termios_h=$ac_header_preproc
9374 fi
9375 echo "$as_me:$LINENO: result: $ac_cv_header_termios_h" >&5
9376 echo "${ECHO_T}$ac_cv_header_termios_h" >&6
9377
9378 fi
9379 if test $ac_cv_header_termios_h = yes; then
9380   cat >>confdefs.h <<\_ACEOF
9381 #define HAVE_TERMIOS_H 1
9382 _ACEOF
9383
9384   SERIAL_AVAIL=1
9385 else
9386   SERIAL_AVAIL=0
9387
9388 fi
9389
9390
9391
9392
9393 if test "${ac_cv_header_curses_h+set}" = set; then
9394   echo "$as_me:$LINENO: checking for curses.h" >&5
9395 echo $ECHO_N "checking for curses.h... $ECHO_C" >&6
9396 if test "${ac_cv_header_curses_h+set}" = set; then
9397   echo $ECHO_N "(cached) $ECHO_C" >&6
9398 fi
9399 echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
9400 echo "${ECHO_T}$ac_cv_header_curses_h" >&6
9401 else
9402   # Is the header compilable?
9403 echo "$as_me:$LINENO: checking curses.h usability" >&5
9404 echo $ECHO_N "checking curses.h usability... $ECHO_C" >&6
9405 cat >conftest.$ac_ext <<_ACEOF
9406 /* confdefs.h.  */
9407 _ACEOF
9408 cat confdefs.h >>conftest.$ac_ext
9409 cat >>conftest.$ac_ext <<_ACEOF
9410 /* end confdefs.h.  */
9411 $ac_includes_default
9412 #include <curses.h>
9413 _ACEOF
9414 rm -f conftest.$ac_objext
9415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9416   (eval $ac_compile) 2>conftest.er1
9417   ac_status=$?
9418   grep -v '^ *+' conftest.er1 >conftest.err
9419   rm -f conftest.er1
9420   cat conftest.err >&5
9421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9422   (exit $ac_status); } &&
9423          { ac_try='test -z "$ac_cxx_werror_flag"
9424                          || test ! -s conftest.err'
9425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9426   (eval $ac_try) 2>&5
9427   ac_status=$?
9428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9429   (exit $ac_status); }; } &&
9430          { ac_try='test -s conftest.$ac_objext'
9431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432   (eval $ac_try) 2>&5
9433   ac_status=$?
9434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435   (exit $ac_status); }; }; then
9436   ac_header_compiler=yes
9437 else
9438   echo "$as_me: failed program was:" >&5
9439 sed 's/^/| /' conftest.$ac_ext >&5
9440
9441 ac_header_compiler=no
9442 fi
9443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9444 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9445 echo "${ECHO_T}$ac_header_compiler" >&6
9446
9447 # Is the header present?
9448 echo "$as_me:$LINENO: checking curses.h presence" >&5
9449 echo $ECHO_N "checking curses.h presence... $ECHO_C" >&6
9450 cat >conftest.$ac_ext <<_ACEOF
9451 /* confdefs.h.  */
9452 _ACEOF
9453 cat confdefs.h >>conftest.$ac_ext
9454 cat >>conftest.$ac_ext <<_ACEOF
9455 /* end confdefs.h.  */
9456 #include <curses.h>
9457 _ACEOF
9458 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9460   ac_status=$?
9461   grep -v '^ *+' conftest.er1 >conftest.err
9462   rm -f conftest.er1
9463   cat conftest.err >&5
9464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9465   (exit $ac_status); } >/dev/null; then
9466   if test -s conftest.err; then
9467     ac_cpp_err=$ac_cxx_preproc_warn_flag
9468     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9469   else
9470     ac_cpp_err=
9471   fi
9472 else
9473   ac_cpp_err=yes
9474 fi
9475 if test -z "$ac_cpp_err"; then
9476   ac_header_preproc=yes
9477 else
9478   echo "$as_me: failed program was:" >&5
9479 sed 's/^/| /' conftest.$ac_ext >&5
9480
9481   ac_header_preproc=no
9482 fi
9483 rm -f conftest.err conftest.$ac_ext
9484 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9485 echo "${ECHO_T}$ac_header_preproc" >&6
9486
9487 # So?  What about this header?
9488 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9489   yes:no: )
9490     { echo "$as_me:$LINENO: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&5
9491 echo "$as_me: WARNING: curses.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9492     { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the compiler's result" >&5
9493 echo "$as_me: WARNING: curses.h: proceeding with the compiler's result" >&2;}
9494     ac_header_preproc=yes
9495     ;;
9496   no:yes:* )
9497     { echo "$as_me:$LINENO: WARNING: curses.h: present but cannot be compiled" >&5
9498 echo "$as_me: WARNING: curses.h: present but cannot be compiled" >&2;}
9499     { echo "$as_me:$LINENO: WARNING: curses.h:     check for missing prerequisite headers?" >&5
9500 echo "$as_me: WARNING: curses.h:     check for missing prerequisite headers?" >&2;}
9501     { echo "$as_me:$LINENO: WARNING: curses.h: see the Autoconf documentation" >&5
9502 echo "$as_me: WARNING: curses.h: see the Autoconf documentation" >&2;}
9503     { echo "$as_me:$LINENO: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&5
9504 echo "$as_me: WARNING: curses.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9505     { echo "$as_me:$LINENO: WARNING: curses.h: proceeding with the preprocessor's result" >&5
9506 echo "$as_me: WARNING: curses.h: proceeding with the preprocessor's result" >&2;}
9507     { echo "$as_me:$LINENO: WARNING: curses.h: in the future, the compiler will take precedence" >&5
9508 echo "$as_me: WARNING: curses.h: in the future, the compiler will take precedence" >&2;}
9509     (
9510       cat <<\_ASBOX
9511 ## ------------------------------------------ ##
9512 ## Report this to the AC_PACKAGE_NAME lists.  ##
9513 ## ------------------------------------------ ##
9514 _ASBOX
9515     ) |
9516       sed "s/^/$as_me: WARNING:     /" >&2
9517     ;;
9518 esac
9519 echo "$as_me:$LINENO: checking for curses.h" >&5
9520 echo $ECHO_N "checking for curses.h... $ECHO_C" >&6
9521 if test "${ac_cv_header_curses_h+set}" = set; then
9522   echo $ECHO_N "(cached) $ECHO_C" >&6
9523 else
9524   ac_cv_header_curses_h=$ac_header_preproc
9525 fi
9526 echo "$as_me:$LINENO: result: $ac_cv_header_curses_h" >&5
9527 echo "${ECHO_T}$ac_cv_header_curses_h" >&6
9528
9529 fi
9530 if test $ac_cv_header_curses_h = yes; then
9531   cat >>confdefs.h <<\_ACEOF
9532 #define HAVE_CURSES_H 1
9533 _ACEOF
9534
9535   curses_h_ok=yes
9536 else
9537   curses_h_ok=no
9538
9539 fi
9540
9541
9542
9543 ucsim_cv_socket="unknown"
9544 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9545   echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9546 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9547 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9548   echo $ECHO_N "(cached) $ECHO_C" >&6
9549 fi
9550 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9551 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9552 else
9553   # Is the header compilable?
9554 echo "$as_me:$LINENO: checking sys/socket.h usability" >&5
9555 echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6
9556 cat >conftest.$ac_ext <<_ACEOF
9557 /* confdefs.h.  */
9558 _ACEOF
9559 cat confdefs.h >>conftest.$ac_ext
9560 cat >>conftest.$ac_ext <<_ACEOF
9561 /* end confdefs.h.  */
9562 $ac_includes_default
9563 #include <sys/socket.h>
9564 _ACEOF
9565 rm -f conftest.$ac_objext
9566 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9567   (eval $ac_compile) 2>conftest.er1
9568   ac_status=$?
9569   grep -v '^ *+' conftest.er1 >conftest.err
9570   rm -f conftest.er1
9571   cat conftest.err >&5
9572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9573   (exit $ac_status); } &&
9574          { ac_try='test -z "$ac_cxx_werror_flag"
9575                          || test ! -s conftest.err'
9576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9577   (eval $ac_try) 2>&5
9578   ac_status=$?
9579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580   (exit $ac_status); }; } &&
9581          { ac_try='test -s conftest.$ac_objext'
9582   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9583   (eval $ac_try) 2>&5
9584   ac_status=$?
9585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586   (exit $ac_status); }; }; then
9587   ac_header_compiler=yes
9588 else
9589   echo "$as_me: failed program was:" >&5
9590 sed 's/^/| /' conftest.$ac_ext >&5
9591
9592 ac_header_compiler=no
9593 fi
9594 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9595 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9596 echo "${ECHO_T}$ac_header_compiler" >&6
9597
9598 # Is the header present?
9599 echo "$as_me:$LINENO: checking sys/socket.h presence" >&5
9600 echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6
9601 cat >conftest.$ac_ext <<_ACEOF
9602 /* confdefs.h.  */
9603 _ACEOF
9604 cat confdefs.h >>conftest.$ac_ext
9605 cat >>conftest.$ac_ext <<_ACEOF
9606 /* end confdefs.h.  */
9607 #include <sys/socket.h>
9608 _ACEOF
9609 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9610   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9611   ac_status=$?
9612   grep -v '^ *+' conftest.er1 >conftest.err
9613   rm -f conftest.er1
9614   cat conftest.err >&5
9615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616   (exit $ac_status); } >/dev/null; then
9617   if test -s conftest.err; then
9618     ac_cpp_err=$ac_cxx_preproc_warn_flag
9619     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9620   else
9621     ac_cpp_err=
9622   fi
9623 else
9624   ac_cpp_err=yes
9625 fi
9626 if test -z "$ac_cpp_err"; then
9627   ac_header_preproc=yes
9628 else
9629   echo "$as_me: failed program was:" >&5
9630 sed 's/^/| /' conftest.$ac_ext >&5
9631
9632   ac_header_preproc=no
9633 fi
9634 rm -f conftest.err conftest.$ac_ext
9635 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9636 echo "${ECHO_T}$ac_header_preproc" >&6
9637
9638 # So?  What about this header?
9639 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9640   yes:no: )
9641     { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
9642 echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9643     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5
9644 echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;}
9645     ac_header_preproc=yes
9646     ;;
9647   no:yes:* )
9648     { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5
9649 echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;}
9650     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&5
9651 echo "$as_me: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&2;}
9652     { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5
9653 echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;}
9654     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&5
9655 echo "$as_me: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9656     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
9657 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
9658     { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5
9659 echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;}
9660     (
9661       cat <<\_ASBOX
9662 ## ------------------------------------------ ##
9663 ## Report this to the AC_PACKAGE_NAME lists.  ##
9664 ## ------------------------------------------ ##
9665 _ASBOX
9666     ) |
9667       sed "s/^/$as_me: WARNING:     /" >&2
9668     ;;
9669 esac
9670 echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9671 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9672 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675   ac_cv_header_sys_socket_h=$ac_header_preproc
9676 fi
9677 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9678 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9679
9680 fi
9681 if test $ac_cv_header_sys_socket_h = yes; then
9682   cat >>confdefs.h <<\_ACEOF
9683 #define HAVE_SYS_SOCKET_H 1
9684 _ACEOF
9685
9686   cat >>confdefs.h <<\_ACEOF
9687 #define SOCKET_AVAIL 1
9688 _ACEOF
9689
9690   cat >>confdefs.h <<_ACEOF
9691 #define UCSOCKET_T int
9692 _ACEOF
9693
9694   ucsim_cv_socket="<sys/socket.h>"
9695
9696 fi
9697
9698
9699
9700 if test $ucsim_cv_socket = unknown; then
9701   if test "${ac_cv_header_winsock2_h+set}" = set; then
9702   echo "$as_me:$LINENO: checking for winsock2.h" >&5
9703 echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
9704 if test "${ac_cv_header_winsock2_h+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 fi
9707 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
9708 echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
9709 else
9710   # Is the header compilable?
9711 echo "$as_me:$LINENO: checking winsock2.h usability" >&5
9712 echo $ECHO_N "checking winsock2.h usability... $ECHO_C" >&6
9713 cat >conftest.$ac_ext <<_ACEOF
9714 /* confdefs.h.  */
9715 _ACEOF
9716 cat confdefs.h >>conftest.$ac_ext
9717 cat >>conftest.$ac_ext <<_ACEOF
9718 /* end confdefs.h.  */
9719 $ac_includes_default
9720 #include <winsock2.h>
9721 _ACEOF
9722 rm -f conftest.$ac_objext
9723 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9724   (eval $ac_compile) 2>conftest.er1
9725   ac_status=$?
9726   grep -v '^ *+' conftest.er1 >conftest.err
9727   rm -f conftest.er1
9728   cat conftest.err >&5
9729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9730   (exit $ac_status); } &&
9731          { ac_try='test -z "$ac_cxx_werror_flag"
9732                          || test ! -s conftest.err'
9733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734   (eval $ac_try) 2>&5
9735   ac_status=$?
9736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737   (exit $ac_status); }; } &&
9738          { ac_try='test -s conftest.$ac_objext'
9739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9740   (eval $ac_try) 2>&5
9741   ac_status=$?
9742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743   (exit $ac_status); }; }; then
9744   ac_header_compiler=yes
9745 else
9746   echo "$as_me: failed program was:" >&5
9747 sed 's/^/| /' conftest.$ac_ext >&5
9748
9749 ac_header_compiler=no
9750 fi
9751 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9752 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9753 echo "${ECHO_T}$ac_header_compiler" >&6
9754
9755 # Is the header present?
9756 echo "$as_me:$LINENO: checking winsock2.h presence" >&5
9757 echo $ECHO_N "checking winsock2.h presence... $ECHO_C" >&6
9758 cat >conftest.$ac_ext <<_ACEOF
9759 /* confdefs.h.  */
9760 _ACEOF
9761 cat confdefs.h >>conftest.$ac_ext
9762 cat >>conftest.$ac_ext <<_ACEOF
9763 /* end confdefs.h.  */
9764 #include <winsock2.h>
9765 _ACEOF
9766 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9767   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9768   ac_status=$?
9769   grep -v '^ *+' conftest.er1 >conftest.err
9770   rm -f conftest.er1
9771   cat conftest.err >&5
9772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9773   (exit $ac_status); } >/dev/null; then
9774   if test -s conftest.err; then
9775     ac_cpp_err=$ac_cxx_preproc_warn_flag
9776     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9777   else
9778     ac_cpp_err=
9779   fi
9780 else
9781   ac_cpp_err=yes
9782 fi
9783 if test -z "$ac_cpp_err"; then
9784   ac_header_preproc=yes
9785 else
9786   echo "$as_me: failed program was:" >&5
9787 sed 's/^/| /' conftest.$ac_ext >&5
9788
9789   ac_header_preproc=no
9790 fi
9791 rm -f conftest.err conftest.$ac_ext
9792 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9793 echo "${ECHO_T}$ac_header_preproc" >&6
9794
9795 # So?  What about this header?
9796 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9797   yes:no: )
9798     { echo "$as_me:$LINENO: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&5
9799 echo "$as_me: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9800     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the compiler's result" >&5
9801 echo "$as_me: WARNING: winsock2.h: proceeding with the compiler's result" >&2;}
9802     ac_header_preproc=yes
9803     ;;
9804   no:yes:* )
9805     { echo "$as_me:$LINENO: WARNING: winsock2.h: present but cannot be compiled" >&5
9806 echo "$as_me: WARNING: winsock2.h: present but cannot be compiled" >&2;}
9807     { echo "$as_me:$LINENO: WARNING: winsock2.h:     check for missing prerequisite headers?" >&5
9808 echo "$as_me: WARNING: winsock2.h:     check for missing prerequisite headers?" >&2;}
9809     { echo "$as_me:$LINENO: WARNING: winsock2.h: see the Autoconf documentation" >&5
9810 echo "$as_me: WARNING: winsock2.h: see the Autoconf documentation" >&2;}
9811     { echo "$as_me:$LINENO: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&5
9812 echo "$as_me: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9813     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the preprocessor's result" >&5
9814 echo "$as_me: WARNING: winsock2.h: proceeding with the preprocessor's result" >&2;}
9815     { echo "$as_me:$LINENO: WARNING: winsock2.h: in the future, the compiler will take precedence" >&5
9816 echo "$as_me: WARNING: winsock2.h: in the future, the compiler will take precedence" >&2;}
9817     (
9818       cat <<\_ASBOX
9819 ## ------------------------------------------ ##
9820 ## Report this to the AC_PACKAGE_NAME lists.  ##
9821 ## ------------------------------------------ ##
9822 _ASBOX
9823     ) |
9824       sed "s/^/$as_me: WARNING:     /" >&2
9825     ;;
9826 esac
9827 echo "$as_me:$LINENO: checking for winsock2.h" >&5
9828 echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
9829 if test "${ac_cv_header_winsock2_h+set}" = set; then
9830   echo $ECHO_N "(cached) $ECHO_C" >&6
9831 else
9832   ac_cv_header_winsock2_h=$ac_header_preproc
9833 fi
9834 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
9835 echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
9836
9837 fi
9838 if test $ac_cv_header_winsock2_h = yes; then
9839   cat >>confdefs.h <<\_ACEOF
9840 #define HAVE_WINSOCK2_H 1
9841 _ACEOF
9842
9843     cat >>confdefs.h <<\_ACEOF
9844 #define SOCKET_AVAIL 1
9845 _ACEOF
9846
9847     cat >>confdefs.h <<_ACEOF
9848 #define UCSOCKET_T SOCKET
9849 _ACEOF
9850
9851     ucsim_cv_socket="<winsock2.h>"
9852
9853 fi
9854
9855
9856 fi
9857
9858 if test $ucsim_cv_socket != unknown; then
9859   cat >conftest.$ac_ext <<_ACEOF
9860 /* confdefs.h.  */
9861 _ACEOF
9862 cat confdefs.h >>conftest.$ac_ext
9863 cat >>conftest.$ac_ext <<_ACEOF
9864 /* end confdefs.h.  */
9865 #include <$ucsim_cv_socket>
9866
9867 _ACEOF
9868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9869   $EGREP "socklen_t" >/dev/null 2>&1; then
9870   cat >>confdefs.h <<_ACEOF
9871 #define SOCKLEN_T socklen_t
9872 _ACEOF
9873
9874 else
9875   cat >>confdefs.h <<_ACEOF
9876 #define SOCKLEN_T uint
9877 _ACEOF
9878
9879 fi
9880 rm -f conftest*
9881
9882 fi
9883 cat >>confdefs.h <<_ACEOF
9884 #define HEADER_SOCKET ${ucsim_cv_socket}
9885 _ACEOF
9886
9887
9888 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9889   echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9890 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
9891 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9892   echo $ECHO_N "(cached) $ECHO_C" >&6
9893 fi
9894 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9895 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
9896 else
9897   # Is the header compilable?
9898 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
9899 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
9900 cat >conftest.$ac_ext <<_ACEOF
9901 /* confdefs.h.  */
9902 _ACEOF
9903 cat confdefs.h >>conftest.$ac_ext
9904 cat >>conftest.$ac_ext <<_ACEOF
9905 /* end confdefs.h.  */
9906 $ac_includes_default
9907 #include <dlfcn.h>
9908 _ACEOF
9909 rm -f conftest.$ac_objext
9910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9911   (eval $ac_compile) 2>conftest.er1
9912   ac_status=$?
9913   grep -v '^ *+' conftest.er1 >conftest.err
9914   rm -f conftest.er1
9915   cat conftest.err >&5
9916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917   (exit $ac_status); } &&
9918          { ac_try='test -z "$ac_cxx_werror_flag"
9919                          || test ! -s conftest.err'
9920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9921   (eval $ac_try) 2>&5
9922   ac_status=$?
9923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924   (exit $ac_status); }; } &&
9925          { ac_try='test -s conftest.$ac_objext'
9926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9927   (eval $ac_try) 2>&5
9928   ac_status=$?
9929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9930   (exit $ac_status); }; }; then
9931   ac_header_compiler=yes
9932 else
9933   echo "$as_me: failed program was:" >&5
9934 sed 's/^/| /' conftest.$ac_ext >&5
9935
9936 ac_header_compiler=no
9937 fi
9938 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9939 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9940 echo "${ECHO_T}$ac_header_compiler" >&6
9941
9942 # Is the header present?
9943 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
9944 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
9945 cat >conftest.$ac_ext <<_ACEOF
9946 /* confdefs.h.  */
9947 _ACEOF
9948 cat confdefs.h >>conftest.$ac_ext
9949 cat >>conftest.$ac_ext <<_ACEOF
9950 /* end confdefs.h.  */
9951 #include <dlfcn.h>
9952 _ACEOF
9953 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9955   ac_status=$?
9956   grep -v '^ *+' conftest.er1 >conftest.err
9957   rm -f conftest.er1
9958   cat conftest.err >&5
9959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960   (exit $ac_status); } >/dev/null; then
9961   if test -s conftest.err; then
9962     ac_cpp_err=$ac_cxx_preproc_warn_flag
9963     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9964   else
9965     ac_cpp_err=
9966   fi
9967 else
9968   ac_cpp_err=yes
9969 fi
9970 if test -z "$ac_cpp_err"; then
9971   ac_header_preproc=yes
9972 else
9973   echo "$as_me: failed program was:" >&5
9974 sed 's/^/| /' conftest.$ac_ext >&5
9975
9976   ac_header_preproc=no
9977 fi
9978 rm -f conftest.err conftest.$ac_ext
9979 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9980 echo "${ECHO_T}$ac_header_preproc" >&6
9981
9982 # So?  What about this header?
9983 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9984   yes:no: )
9985     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
9986 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9987     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
9988 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
9989     ac_header_preproc=yes
9990     ;;
9991   no:yes:* )
9992     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
9993 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
9994     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
9995 echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
9996     { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
9997 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
9998     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
9999 echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10000     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
10001 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
10002     { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
10003 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
10004     (
10005       cat <<\_ASBOX
10006 ## ------------------------------------------ ##
10007 ## Report this to the AC_PACKAGE_NAME lists.  ##
10008 ## ------------------------------------------ ##
10009 _ASBOX
10010     ) |
10011       sed "s/^/$as_me: WARNING:     /" >&2
10012     ;;
10013 esac
10014 echo "$as_me:$LINENO: checking for dlfcn.h" >&5
10015 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
10016 if test "${ac_cv_header_dlfcn_h+set}" = set; then
10017   echo $ECHO_N "(cached) $ECHO_C" >&6
10018 else
10019   ac_cv_header_dlfcn_h=$ac_header_preproc
10020 fi
10021 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
10022 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
10023
10024 fi
10025
10026
10027
10028
10029
10030
10031
10032 ac_header_dirent=no
10033 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10034   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10035 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
10036 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10037 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10038   echo $ECHO_N "(cached) $ECHO_C" >&6
10039 else
10040   cat >conftest.$ac_ext <<_ACEOF
10041 /* confdefs.h.  */
10042 _ACEOF
10043 cat confdefs.h >>conftest.$ac_ext
10044 cat >>conftest.$ac_ext <<_ACEOF
10045 /* end confdefs.h.  */
10046 #include <sys/types.h>
10047 #include <$ac_hdr>
10048
10049 int
10050 main ()
10051 {
10052 if ((DIR *) 0)
10053 return 0;
10054   ;
10055   return 0;
10056 }
10057 _ACEOF
10058 rm -f conftest.$ac_objext
10059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10060   (eval $ac_compile) 2>conftest.er1
10061   ac_status=$?
10062   grep -v '^ *+' conftest.er1 >conftest.err
10063   rm -f conftest.er1
10064   cat conftest.err >&5
10065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10066   (exit $ac_status); } &&
10067          { ac_try='test -z "$ac_cxx_werror_flag"
10068                          || test ! -s conftest.err'
10069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10070   (eval $ac_try) 2>&5
10071   ac_status=$?
10072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073   (exit $ac_status); }; } &&
10074          { ac_try='test -s conftest.$ac_objext'
10075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10076   (eval $ac_try) 2>&5
10077   ac_status=$?
10078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10079   (exit $ac_status); }; }; then
10080   eval "$as_ac_Header=yes"
10081 else
10082   echo "$as_me: failed program was:" >&5
10083 sed 's/^/| /' conftest.$ac_ext >&5
10084
10085 eval "$as_ac_Header=no"
10086 fi
10087 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10088 fi
10089 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10090 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10092   cat >>confdefs.h <<_ACEOF
10093 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10094 _ACEOF
10095
10096 ac_header_dirent=$ac_hdr; break
10097 fi
10098
10099 done
10100 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10101 if test $ac_header_dirent = dirent.h; then
10102   echo "$as_me:$LINENO: checking for library containing opendir" >&5
10103 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10104 if test "${ac_cv_search_opendir+set}" = set; then
10105   echo $ECHO_N "(cached) $ECHO_C" >&6
10106 else
10107   ac_func_search_save_LIBS=$LIBS
10108 ac_cv_search_opendir=no
10109 cat >conftest.$ac_ext <<_ACEOF
10110 /* confdefs.h.  */
10111 _ACEOF
10112 cat confdefs.h >>conftest.$ac_ext
10113 cat >>conftest.$ac_ext <<_ACEOF
10114 /* end confdefs.h.  */
10115
10116 /* Override any gcc2 internal prototype to avoid an error.  */
10117 #ifdef __cplusplus
10118 extern "C"
10119 #endif
10120 /* We use char because int might match the return type of a gcc2
10121    builtin and then its argument prototype would still apply.  */
10122 char opendir ();
10123 int
10124 main ()
10125 {
10126 opendir ();
10127   ;
10128   return 0;
10129 }
10130 _ACEOF
10131 rm -f conftest.$ac_objext conftest$ac_exeext
10132 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10133   (eval $ac_link) 2>conftest.er1
10134   ac_status=$?
10135   grep -v '^ *+' conftest.er1 >conftest.err
10136   rm -f conftest.er1
10137   cat conftest.err >&5
10138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10139   (exit $ac_status); } &&
10140          { ac_try='test -z "$ac_cxx_werror_flag"
10141                          || test ! -s conftest.err'
10142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10143   (eval $ac_try) 2>&5
10144   ac_status=$?
10145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146   (exit $ac_status); }; } &&
10147          { ac_try='test -s conftest$ac_exeext'
10148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10149   (eval $ac_try) 2>&5
10150   ac_status=$?
10151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10152   (exit $ac_status); }; }; then
10153   ac_cv_search_opendir="none required"
10154 else
10155   echo "$as_me: failed program was:" >&5
10156 sed 's/^/| /' conftest.$ac_ext >&5
10157
10158 fi
10159 rm -f conftest.err conftest.$ac_objext \
10160       conftest$ac_exeext conftest.$ac_ext
10161 if test "$ac_cv_search_opendir" = no; then
10162   for ac_lib in dir; do
10163     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10164     cat >conftest.$ac_ext <<_ACEOF
10165 /* confdefs.h.  */
10166 _ACEOF
10167 cat confdefs.h >>conftest.$ac_ext
10168 cat >>conftest.$ac_ext <<_ACEOF
10169 /* end confdefs.h.  */
10170
10171 /* Override any gcc2 internal prototype to avoid an error.  */
10172 #ifdef __cplusplus
10173 extern "C"
10174 #endif
10175 /* We use char because int might match the return type of a gcc2
10176    builtin and then its argument prototype would still apply.  */
10177 char opendir ();
10178 int
10179 main ()
10180 {
10181 opendir ();
10182   ;
10183   return 0;
10184 }
10185 _ACEOF
10186 rm -f conftest.$ac_objext conftest$ac_exeext
10187 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10188   (eval $ac_link) 2>conftest.er1
10189   ac_status=$?
10190   grep -v '^ *+' conftest.er1 >conftest.err
10191   rm -f conftest.er1
10192   cat conftest.err >&5
10193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194   (exit $ac_status); } &&
10195          { ac_try='test -z "$ac_cxx_werror_flag"
10196                          || test ! -s conftest.err'
10197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10198   (eval $ac_try) 2>&5
10199   ac_status=$?
10200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201   (exit $ac_status); }; } &&
10202          { ac_try='test -s conftest$ac_exeext'
10203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207   (exit $ac_status); }; }; then
10208   ac_cv_search_opendir="-l$ac_lib"
10209 break
10210 else
10211   echo "$as_me: failed program was:" >&5
10212 sed 's/^/| /' conftest.$ac_ext >&5
10213
10214 fi
10215 rm -f conftest.err conftest.$ac_objext \
10216       conftest$ac_exeext conftest.$ac_ext
10217   done
10218 fi
10219 LIBS=$ac_func_search_save_LIBS
10220 fi
10221 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10222 echo "${ECHO_T}$ac_cv_search_opendir" >&6
10223 if test "$ac_cv_search_opendir" != no; then
10224   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10225
10226 fi
10227
10228 else
10229   echo "$as_me:$LINENO: checking for library containing opendir" >&5
10230 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10231 if test "${ac_cv_search_opendir+set}" = set; then
10232   echo $ECHO_N "(cached) $ECHO_C" >&6
10233 else
10234   ac_func_search_save_LIBS=$LIBS
10235 ac_cv_search_opendir=no
10236 cat >conftest.$ac_ext <<_ACEOF
10237 /* confdefs.h.  */
10238 _ACEOF
10239 cat confdefs.h >>conftest.$ac_ext
10240 cat >>conftest.$ac_ext <<_ACEOF
10241 /* end confdefs.h.  */
10242
10243 /* Override any gcc2 internal prototype to avoid an error.  */
10244 #ifdef __cplusplus
10245 extern "C"
10246 #endif
10247 /* We use char because int might match the return type of a gcc2
10248    builtin and then its argument prototype would still apply.  */
10249 char opendir ();
10250 int
10251 main ()
10252 {
10253 opendir ();
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f conftest.$ac_objext conftest$ac_exeext
10259 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10260   (eval $ac_link) 2>conftest.er1
10261   ac_status=$?
10262   grep -v '^ *+' conftest.er1 >conftest.err
10263   rm -f conftest.er1
10264   cat conftest.err >&5
10265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10266   (exit $ac_status); } &&
10267          { ac_try='test -z "$ac_cxx_werror_flag"
10268                          || test ! -s conftest.err'
10269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10270   (eval $ac_try) 2>&5
10271   ac_status=$?
10272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10273   (exit $ac_status); }; } &&
10274          { ac_try='test -s conftest$ac_exeext'
10275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10276   (eval $ac_try) 2>&5
10277   ac_status=$?
10278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279   (exit $ac_status); }; }; then
10280   ac_cv_search_opendir="none required"
10281 else
10282   echo "$as_me: failed program was:" >&5
10283 sed 's/^/| /' conftest.$ac_ext >&5
10284
10285 fi
10286 rm -f conftest.err conftest.$ac_objext \
10287       conftest$ac_exeext conftest.$ac_ext
10288 if test "$ac_cv_search_opendir" = no; then
10289   for ac_lib in x; do
10290     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10291     cat >conftest.$ac_ext <<_ACEOF
10292 /* confdefs.h.  */
10293 _ACEOF
10294 cat confdefs.h >>conftest.$ac_ext
10295 cat >>conftest.$ac_ext <<_ACEOF
10296 /* end confdefs.h.  */
10297
10298 /* Override any gcc2 internal prototype to avoid an error.  */
10299 #ifdef __cplusplus
10300 extern "C"
10301 #endif
10302 /* We use char because int might match the return type of a gcc2
10303    builtin and then its argument prototype would still apply.  */
10304 char opendir ();
10305 int
10306 main ()
10307 {
10308 opendir ();
10309   ;
10310   return 0;
10311 }
10312 _ACEOF
10313 rm -f conftest.$ac_objext conftest$ac_exeext
10314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10315   (eval $ac_link) 2>conftest.er1
10316   ac_status=$?
10317   grep -v '^ *+' conftest.er1 >conftest.err
10318   rm -f conftest.er1
10319   cat conftest.err >&5
10320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321   (exit $ac_status); } &&
10322          { ac_try='test -z "$ac_cxx_werror_flag"
10323                          || test ! -s conftest.err'
10324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10328   (exit $ac_status); }; } &&
10329          { ac_try='test -s conftest$ac_exeext'
10330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10331   (eval $ac_try) 2>&5
10332   ac_status=$?
10333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334   (exit $ac_status); }; }; then
10335   ac_cv_search_opendir="-l$ac_lib"
10336 break
10337 else
10338   echo "$as_me: failed program was:" >&5
10339 sed 's/^/| /' conftest.$ac_ext >&5
10340
10341 fi
10342 rm -f conftest.err conftest.$ac_objext \
10343       conftest$ac_exeext conftest.$ac_ext
10344   done
10345 fi
10346 LIBS=$ac_func_search_save_LIBS
10347 fi
10348 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10349 echo "${ECHO_T}$ac_cv_search_opendir" >&6
10350 if test "$ac_cv_search_opendir" != no; then
10351   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10352
10353 fi
10354
10355 fi
10356
10357
10358 # This must be after CXXCPP
10359
10360 echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
10361 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
10362 if test "${ucsim_cv_fd+set}" = set; then
10363   echo $ECHO_N "(cached) $ECHO_C" >&6
10364 else
10365   ucsim_cv_fd="unknown"
10366 cat >conftest.$ac_ext <<_ACEOF
10367 /* confdefs.h.  */
10368 _ACEOF
10369 cat confdefs.h >>conftest.$ac_ext
10370 cat >>conftest.$ac_ext <<_ACEOF
10371 /* end confdefs.h.  */
10372
10373 #include <winsock2.h>
10374 #ifdef FD_ZERO
10375 yes
10376 #endif
10377 _ACEOF
10378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10379   $EGREP "yes" >/dev/null 2>&1; then
10380   ucsim_cv_fd="<winsock2.h>"
10381 fi
10382 rm -f conftest*
10383
10384 cat >conftest.$ac_ext <<_ACEOF
10385 /* confdefs.h.  */
10386 _ACEOF
10387 cat confdefs.h >>conftest.$ac_ext
10388 cat >>conftest.$ac_ext <<_ACEOF
10389 /* end confdefs.h.  */
10390
10391 #include <sys/time.h>
10392 #ifdef FD_ZERO
10393 yes
10394 #endif
10395 _ACEOF
10396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10397   $EGREP "yes" >/dev/null 2>&1; then
10398   ucsim_cv_fd="<sys/time.h>"
10399 fi
10400 rm -f conftest*
10401
10402 cat >conftest.$ac_ext <<_ACEOF
10403 /* confdefs.h.  */
10404 _ACEOF
10405 cat confdefs.h >>conftest.$ac_ext
10406 cat >>conftest.$ac_ext <<_ACEOF
10407 /* end confdefs.h.  */
10408
10409 #include <sys/types.h>
10410 #ifdef FD_ZERO
10411 yes
10412 #endif
10413 _ACEOF
10414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10415   $EGREP "yes" >/dev/null 2>&1; then
10416   ucsim_cv_fd="<sys/types.h>"
10417 fi
10418 rm -f conftest*
10419
10420 cat >conftest.$ac_ext <<_ACEOF
10421 /* confdefs.h.  */
10422 _ACEOF
10423 cat confdefs.h >>conftest.$ac_ext
10424 cat >>conftest.$ac_ext <<_ACEOF
10425 /* end confdefs.h.  */
10426
10427 #include <sys/select.h>
10428 #ifdef FD_ZERO
10429 yes
10430 #endif
10431 _ACEOF
10432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10433   $EGREP "yes" >/dev/null 2>&1; then
10434   ucsim_cv_fd="<sys/select.h>"
10435 fi
10436 rm -f conftest*
10437
10438 fi
10439 echo "$as_me:$LINENO: result: $ucsim_cv_fd" >&5
10440 echo "${ECHO_T}$ucsim_cv_fd" >&6
10441
10442 ucsim_cv_header_ok=0
10443 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
10444 cat >>confdefs.h <<\_ACEOF
10445 #define FD_NEED_TIME_H 1
10446 _ACEOF
10447
10448 ucsim_cv_header_ok=1
10449 else
10450 cat >>confdefs.h <<\_ACEOF
10451 #define FD_NEED_TIME_H 0
10452 _ACEOF
10453
10454 fi
10455 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
10456 cat >>confdefs.h <<\_ACEOF
10457 #define FD_NEED_TYPES_H 1
10458 _ACEOF
10459
10460 ucsim_cv_header_ok=1
10461 else
10462 cat >>confdefs.h <<\_ACEOF
10463 #define FD_NEED_TYPES_H 0
10464 _ACEOF
10465
10466 fi
10467 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
10468 cat >>confdefs.h <<\_ACEOF
10469 #define FD_NEED_SELECT_H 1
10470 _ACEOF
10471
10472 ucsim_cv_header_ok=1
10473 else
10474 cat >>confdefs.h <<\_ACEOF
10475 #define FD_NEED_SELECT_H 0
10476 _ACEOF
10477
10478 fi
10479 if echo $ucsim_cv_fd|grep winsock2 >/dev/null 2>&1; then
10480 cat >>confdefs.h <<\_ACEOF
10481 #define FD_NEED_WINSOCK2_H 1
10482 _ACEOF
10483
10484 ucsim_cv_header_ok=1
10485 else
10486 cat >>confdefs.h <<\_ACEOF
10487 #define FD_NEED_WINSOCK2_H 0
10488 _ACEOF
10489
10490 fi
10491
10492 cat >>confdefs.h <<_ACEOF
10493 #define FD_HEADER_OK ${ucsim_cv_header_ok}
10494 _ACEOF
10495
10496 cat >>confdefs.h <<_ACEOF
10497 #define HEADER_FD ${ucsim_cv_fd}
10498 _ACEOF
10499
10500
10501
10502 # Checking for functions/libs
10503 # ===========================================================================
10504 if echo $ucsim_cv_socket|grep winsock2 >/dev/null 2>&1; then
10505   LIBS="-lwsock32 $LIBS"
10506 else
10507
10508 echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10509 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10510 if test "${ac_cv_lib_socket_socket+set}" = set; then
10511   echo $ECHO_N "(cached) $ECHO_C" >&6
10512 else
10513   ac_check_lib_save_LIBS=$LIBS
10514 LIBS="-lsocket  $LIBS"
10515 cat >conftest.$ac_ext <<_ACEOF
10516 /* confdefs.h.  */
10517 _ACEOF
10518 cat confdefs.h >>conftest.$ac_ext
10519 cat >>conftest.$ac_ext <<_ACEOF
10520 /* end confdefs.h.  */
10521
10522 /* Override any gcc2 internal prototype to avoid an error.  */
10523 #ifdef __cplusplus
10524 extern "C"
10525 #endif
10526 /* We use char because int might match the return type of a gcc2
10527    builtin and then its argument prototype would still apply.  */
10528 char socket ();
10529 int
10530 main ()
10531 {
10532 socket ();
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 rm -f conftest.$ac_objext conftest$ac_exeext
10538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10539   (eval $ac_link) 2>conftest.er1
10540   ac_status=$?
10541   grep -v '^ *+' conftest.er1 >conftest.err
10542   rm -f conftest.er1
10543   cat conftest.err >&5
10544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545   (exit $ac_status); } &&
10546          { ac_try='test -z "$ac_cxx_werror_flag"
10547                          || test ! -s conftest.err'
10548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10549   (eval $ac_try) 2>&5
10550   ac_status=$?
10551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10552   (exit $ac_status); }; } &&
10553          { ac_try='test -s conftest$ac_exeext'
10554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10555   (eval $ac_try) 2>&5
10556   ac_status=$?
10557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10558   (exit $ac_status); }; }; then
10559   ac_cv_lib_socket_socket=yes
10560 else
10561   echo "$as_me: failed program was:" >&5
10562 sed 's/^/| /' conftest.$ac_ext >&5
10563
10564 ac_cv_lib_socket_socket=no
10565 fi
10566 rm -f conftest.err conftest.$ac_objext \
10567       conftest$ac_exeext conftest.$ac_ext
10568 LIBS=$ac_check_lib_save_LIBS
10569 fi
10570 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10571 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10572 if test $ac_cv_lib_socket_socket = yes; then
10573   cat >>confdefs.h <<_ACEOF
10574 #define HAVE_LIBSOCKET 1
10575 _ACEOF
10576
10577   LIBS="-lsocket $LIBS"
10578
10579 fi
10580
10581
10582 echo "$as_me:$LINENO: checking for xdr_short in -lnsl" >&5
10583 echo $ECHO_N "checking for xdr_short in -lnsl... $ECHO_C" >&6
10584 if test "${ac_cv_lib_nsl_xdr_short+set}" = set; then
10585   echo $ECHO_N "(cached) $ECHO_C" >&6
10586 else
10587   ac_check_lib_save_LIBS=$LIBS
10588 LIBS="-lnsl  $LIBS"
10589 cat >conftest.$ac_ext <<_ACEOF
10590 /* confdefs.h.  */
10591 _ACEOF
10592 cat confdefs.h >>conftest.$ac_ext
10593 cat >>conftest.$ac_ext <<_ACEOF
10594 /* end confdefs.h.  */
10595
10596 /* Override any gcc2 internal prototype to avoid an error.  */
10597 #ifdef __cplusplus
10598 extern "C"
10599 #endif
10600 /* We use char because int might match the return type of a gcc2
10601    builtin and then its argument prototype would still apply.  */
10602 char xdr_short ();
10603 int
10604 main ()
10605 {
10606 xdr_short ();
10607   ;
10608   return 0;
10609 }
10610 _ACEOF
10611 rm -f conftest.$ac_objext conftest$ac_exeext
10612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10613   (eval $ac_link) 2>conftest.er1
10614   ac_status=$?
10615   grep -v '^ *+' conftest.er1 >conftest.err
10616   rm -f conftest.er1
10617   cat conftest.err >&5
10618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619   (exit $ac_status); } &&
10620          { ac_try='test -z "$ac_cxx_werror_flag"
10621                          || test ! -s conftest.err'
10622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10623   (eval $ac_try) 2>&5
10624   ac_status=$?
10625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10626   (exit $ac_status); }; } &&
10627          { ac_try='test -s conftest$ac_exeext'
10628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10629   (eval $ac_try) 2>&5
10630   ac_status=$?
10631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10632   (exit $ac_status); }; }; then
10633   ac_cv_lib_nsl_xdr_short=yes
10634 else
10635   echo "$as_me: failed program was:" >&5
10636 sed 's/^/| /' conftest.$ac_ext >&5
10637
10638 ac_cv_lib_nsl_xdr_short=no
10639 fi
10640 rm -f conftest.err conftest.$ac_objext \
10641       conftest$ac_exeext conftest.$ac_ext
10642 LIBS=$ac_check_lib_save_LIBS
10643 fi
10644 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_xdr_short" >&5
10645 echo "${ECHO_T}$ac_cv_lib_nsl_xdr_short" >&6
10646 if test $ac_cv_lib_nsl_xdr_short = yes; then
10647   cat >>confdefs.h <<_ACEOF
10648 #define HAVE_LIBNSL 1
10649 _ACEOF
10650
10651   LIBS="-lnsl $LIBS"
10652
10653 fi
10654
10655 fi
10656
10657 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10658 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10659 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10660   echo $ECHO_N "(cached) $ECHO_C" >&6
10661 else
10662   ac_check_lib_save_LIBS=$LIBS
10663 LIBS="-ldl  $LIBS"
10664 cat >conftest.$ac_ext <<_ACEOF
10665 /* confdefs.h.  */
10666 _ACEOF
10667 cat confdefs.h >>conftest.$ac_ext
10668 cat >>conftest.$ac_ext <<_ACEOF
10669 /* end confdefs.h.  */
10670
10671 /* Override any gcc2 internal prototype to avoid an error.  */
10672 #ifdef __cplusplus
10673 extern "C"
10674 #endif
10675 /* We use char because int might match the return type of a gcc2
10676    builtin and then its argument prototype would still apply.  */
10677 char dlopen ();
10678 int
10679 main ()
10680 {
10681 dlopen ();
10682   ;
10683   return 0;
10684 }
10685 _ACEOF
10686 rm -f conftest.$ac_objext conftest$ac_exeext
10687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10688   (eval $ac_link) 2>conftest.er1
10689   ac_status=$?
10690   grep -v '^ *+' conftest.er1 >conftest.err
10691   rm -f conftest.er1
10692   cat conftest.err >&5
10693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694   (exit $ac_status); } &&
10695          { ac_try='test -z "$ac_cxx_werror_flag"
10696                          || test ! -s conftest.err'
10697   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10698   (eval $ac_try) 2>&5
10699   ac_status=$?
10700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10701   (exit $ac_status); }; } &&
10702          { ac_try='test -s conftest$ac_exeext'
10703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10704   (eval $ac_try) 2>&5
10705   ac_status=$?
10706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10707   (exit $ac_status); }; }; then
10708   ac_cv_lib_dl_dlopen=yes
10709 else
10710   echo "$as_me: failed program was:" >&5
10711 sed 's/^/| /' conftest.$ac_ext >&5
10712
10713 ac_cv_lib_dl_dlopen=no
10714 fi
10715 rm -f conftest.err conftest.$ac_objext \
10716       conftest$ac_exeext conftest.$ac_ext
10717 LIBS=$ac_check_lib_save_LIBS
10718 fi
10719 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10720 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10721 if test $ac_cv_lib_dl_dlopen = yes; then
10722   dl_ok="yes"
10723 DL="-ldl"
10724 else
10725   dl_ok="no"
10726 DL=""
10727 fi
10728
10729
10730
10731
10732 #AC_CHECK_LIB(panel,panel_above,
10733 #panel_ok="yes"
10734 #curses_ok="yes"
10735 #CURSES_LIBS="-lpanel -lcurses"
10736 #,
10737 #panel_ok="no"
10738 #AC_CHECK_LIB(curses,nl,
10739 #curses_ok="yes"
10740 #CURSES_LIBS="-lcurses"
10741 #,
10742 #curses_ok="no")
10743 #,
10744 #-lcurses)
10745
10746 if test $curses_h_ok != yes; then
10747   panel_ok="no"
10748   curses_ok="no"
10749 else
10750   echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5
10751 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
10752 if test "${ac_cv_lib_panel_panel_above+set}" = set; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755   ac_check_lib_save_LIBS=$LIBS
10756 LIBS="-lpanel  $LIBS"
10757 cat >conftest.$ac_ext <<_ACEOF
10758 /* confdefs.h.  */
10759 _ACEOF
10760 cat confdefs.h >>conftest.$ac_ext
10761 cat >>conftest.$ac_ext <<_ACEOF
10762 /* end confdefs.h.  */
10763
10764 /* Override any gcc2 internal prototype to avoid an error.  */
10765 #ifdef __cplusplus
10766 extern "C"
10767 #endif
10768 /* We use char because int might match the return type of a gcc2
10769    builtin and then its argument prototype would still apply.  */
10770 char panel_above ();
10771 int
10772 main ()
10773 {
10774 panel_above ();
10775   ;
10776   return 0;
10777 }
10778 _ACEOF
10779 rm -f conftest.$ac_objext conftest$ac_exeext
10780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10781   (eval $ac_link) 2>conftest.er1
10782   ac_status=$?
10783   grep -v '^ *+' conftest.er1 >conftest.err
10784   rm -f conftest.er1
10785   cat conftest.err >&5
10786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10787   (exit $ac_status); } &&
10788          { ac_try='test -z "$ac_cxx_werror_flag"
10789                          || test ! -s conftest.err'
10790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10791   (eval $ac_try) 2>&5
10792   ac_status=$?
10793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10794   (exit $ac_status); }; } &&
10795          { ac_try='test -s conftest$ac_exeext'
10796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10797   (eval $ac_try) 2>&5
10798   ac_status=$?
10799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800   (exit $ac_status); }; }; then
10801   ac_cv_lib_panel_panel_above=yes
10802 else
10803   echo "$as_me: failed program was:" >&5
10804 sed 's/^/| /' conftest.$ac_ext >&5
10805
10806 ac_cv_lib_panel_panel_above=no
10807 fi
10808 rm -f conftest.err conftest.$ac_objext \
10809       conftest$ac_exeext conftest.$ac_ext
10810 LIBS=$ac_check_lib_save_LIBS
10811 fi
10812 echo "$as_me:$LINENO: result: $ac_cv_lib_panel_panel_above" >&5
10813 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6
10814 if test $ac_cv_lib_panel_panel_above = yes; then
10815   panel_ok="yes"
10816     curses_ok="yes"
10817     CURSES_LIBS="-lpanel"
10818 else
10819   panel_ok="no"
10820     curses_ok="no"
10821
10822 fi
10823
10824
10825   if test $curses_ok != yes; then
10826     echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
10827 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
10828 if test "${ac_cv_lib_curses_nl+set}" = set; then
10829   echo $ECHO_N "(cached) $ECHO_C" >&6
10830 else
10831   ac_check_lib_save_LIBS=$LIBS
10832 LIBS="-lcurses  $LIBS"
10833 cat >conftest.$ac_ext <<_ACEOF
10834 /* confdefs.h.  */
10835 _ACEOF
10836 cat confdefs.h >>conftest.$ac_ext
10837 cat >>conftest.$ac_ext <<_ACEOF
10838 /* end confdefs.h.  */
10839
10840 /* Override any gcc2 internal prototype to avoid an error.  */
10841 #ifdef __cplusplus
10842 extern "C"
10843 #endif
10844 /* We use char because int might match the return type of a gcc2
10845    builtin and then its argument prototype would still apply.  */
10846 char nl ();
10847 int
10848 main ()
10849 {
10850 nl ();
10851   ;
10852   return 0;
10853 }
10854 _ACEOF
10855 rm -f conftest.$ac_objext conftest$ac_exeext
10856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10857   (eval $ac_link) 2>conftest.er1
10858   ac_status=$?
10859   grep -v '^ *+' conftest.er1 >conftest.err
10860   rm -f conftest.er1
10861   cat conftest.err >&5
10862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10863   (exit $ac_status); } &&
10864          { ac_try='test -z "$ac_cxx_werror_flag"
10865                          || test ! -s conftest.err'
10866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10867   (eval $ac_try) 2>&5
10868   ac_status=$?
10869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870   (exit $ac_status); }; } &&
10871          { ac_try='test -s conftest$ac_exeext'
10872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10873   (eval $ac_try) 2>&5
10874   ac_status=$?
10875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876   (exit $ac_status); }; }; then
10877   ac_cv_lib_curses_nl=yes
10878 else
10879   echo "$as_me: failed program was:" >&5
10880 sed 's/^/| /' conftest.$ac_ext >&5
10881
10882 ac_cv_lib_curses_nl=no
10883 fi
10884 rm -f conftest.err conftest.$ac_objext \
10885       conftest$ac_exeext conftest.$ac_ext
10886 LIBS=$ac_check_lib_save_LIBS
10887 fi
10888 echo "$as_me:$LINENO: result: $ac_cv_lib_curses_nl" >&5
10889 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
10890 if test $ac_cv_lib_curses_nl = yes; then
10891   curses_ok="yes"
10892       CURSES_LIBS="-lcurses"
10893 else
10894   curses_ok="no"
10895 fi
10896
10897   fi
10898
10899   if test $curses_ok != yes; then
10900     echo "$as_me:$LINENO: checking for nl in -lncurses" >&5
10901 echo $ECHO_N "checking for nl in -lncurses... $ECHO_C" >&6
10902 if test "${ac_cv_lib_ncurses_nl+set}" = set; then
10903   echo $ECHO_N "(cached) $ECHO_C" >&6
10904 else
10905   ac_check_lib_save_LIBS=$LIBS
10906 LIBS="-lncurses  $LIBS"
10907 cat >conftest.$ac_ext <<_ACEOF
10908 /* confdefs.h.  */
10909 _ACEOF
10910 cat confdefs.h >>conftest.$ac_ext
10911 cat >>conftest.$ac_ext <<_ACEOF
10912 /* end confdefs.h.  */
10913
10914 /* Override any gcc2 internal prototype to avoid an error.  */
10915 #ifdef __cplusplus
10916 extern "C"
10917 #endif
10918 /* We use char because int might match the return type of a gcc2
10919    builtin and then its argument prototype would still apply.  */
10920 char nl ();
10921 int
10922 main ()
10923 {
10924 nl ();
10925   ;
10926   return 0;
10927 }
10928 _ACEOF
10929 rm -f conftest.$ac_objext conftest$ac_exeext
10930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10931   (eval $ac_link) 2>conftest.er1
10932   ac_status=$?
10933   grep -v '^ *+' conftest.er1 >conftest.err
10934   rm -f conftest.er1
10935   cat conftest.err >&5
10936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10937   (exit $ac_status); } &&
10938          { ac_try='test -z "$ac_cxx_werror_flag"
10939                          || test ! -s conftest.err'
10940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10944   (exit $ac_status); }; } &&
10945          { ac_try='test -s conftest$ac_exeext'
10946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10947   (eval $ac_try) 2>&5
10948   ac_status=$?
10949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950   (exit $ac_status); }; }; then
10951   ac_cv_lib_ncurses_nl=yes
10952 else
10953   echo "$as_me: failed program was:" >&5
10954 sed 's/^/| /' conftest.$ac_ext >&5
10955
10956 ac_cv_lib_ncurses_nl=no
10957 fi
10958 rm -f conftest.err conftest.$ac_objext \
10959       conftest$ac_exeext conftest.$ac_ext
10960 LIBS=$ac_check_lib_save_LIBS
10961 fi
10962 echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_nl" >&5
10963 echo "${ECHO_T}$ac_cv_lib_ncurses_nl" >&6
10964 if test $ac_cv_lib_ncurses_nl = yes; then
10965   curses_ok="yes"
10966       CURSES_LIBS="-lncurses"
10967 else
10968   curses_ok="no"
10969 fi
10970
10971   fi
10972 fi
10973
10974
10975
10976
10977
10978
10979 for ac_func in vprintf
10980 do
10981 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10982 echo "$as_me:$LINENO: checking for $ac_func" >&5
10983 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10984 if eval "test \"\${$as_ac_var+set}\" = set"; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   cat >conftest.$ac_ext <<_ACEOF
10988 /* confdefs.h.  */
10989 _ACEOF
10990 cat confdefs.h >>conftest.$ac_ext
10991 cat >>conftest.$ac_ext <<_ACEOF
10992 /* end confdefs.h.  */
10993 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10994    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10995 #define $ac_func innocuous_$ac_func
10996
10997 /* System header to define __stub macros and hopefully few prototypes,
10998     which can conflict with char $ac_func (); below.
10999     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11000     <limits.h> exists even on freestanding compilers.  */
11001
11002 #ifdef __STDC__
11003 # include <limits.h>
11004 #else
11005 # include <assert.h>
11006 #endif
11007
11008 #undef $ac_func
11009
11010 /* Override any gcc2 internal prototype to avoid an error.  */
11011 #ifdef __cplusplus
11012 extern "C"
11013 {
11014 #endif
11015 /* We use char because int might match the return type of a gcc2
11016    builtin and then its argument prototype would still apply.  */
11017 char $ac_func ();
11018 /* The GNU C library defines this for functions which it implements
11019     to always fail with ENOSYS.  Some functions are actually named
11020     something starting with __ and the normal name is an alias.  */
11021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11022 choke me
11023 #else
11024 char (*f) () = $ac_func;
11025 #endif
11026 #ifdef __cplusplus
11027 }
11028 #endif
11029
11030 int
11031 main ()
11032 {
11033 return f != $ac_func;
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038 rm -f conftest.$ac_objext conftest$ac_exeext
11039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11040   (eval $ac_link) 2>conftest.er1
11041   ac_status=$?
11042   grep -v '^ *+' conftest.er1 >conftest.err
11043   rm -f conftest.er1
11044   cat conftest.err >&5
11045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046   (exit $ac_status); } &&
11047          { ac_try='test -z "$ac_cxx_werror_flag"
11048                          || test ! -s conftest.err'
11049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11050   (eval $ac_try) 2>&5
11051   ac_status=$?
11052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11053   (exit $ac_status); }; } &&
11054          { ac_try='test -s conftest$ac_exeext'
11055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11056   (eval $ac_try) 2>&5
11057   ac_status=$?
11058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059   (exit $ac_status); }; }; then
11060   eval "$as_ac_var=yes"
11061 else
11062   echo "$as_me: failed program was:" >&5
11063 sed 's/^/| /' conftest.$ac_ext >&5
11064
11065 eval "$as_ac_var=no"
11066 fi
11067 rm -f conftest.err conftest.$ac_objext \
11068       conftest$ac_exeext conftest.$ac_ext
11069 fi
11070 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11071 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11072 if test `eval echo '${'$as_ac_var'}'` = yes; then
11073   cat >>confdefs.h <<_ACEOF
11074 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11075 _ACEOF
11076
11077 echo "$as_me:$LINENO: checking for _doprnt" >&5
11078 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
11079 if test "${ac_cv_func__doprnt+set}" = set; then
11080   echo $ECHO_N "(cached) $ECHO_C" >&6
11081 else
11082   cat >conftest.$ac_ext <<_ACEOF
11083 /* confdefs.h.  */
11084 _ACEOF
11085 cat confdefs.h >>conftest.$ac_ext
11086 cat >>conftest.$ac_ext <<_ACEOF
11087 /* end confdefs.h.  */
11088 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
11089    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11090 #define _doprnt innocuous__doprnt
11091
11092 /* System header to define __stub macros and hopefully few prototypes,
11093     which can conflict with char _doprnt (); below.
11094     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11095     <limits.h> exists even on freestanding compilers.  */
11096
11097 #ifdef __STDC__
11098 # include <limits.h>
11099 #else
11100 # include <assert.h>
11101 #endif
11102
11103 #undef _doprnt
11104
11105 /* Override any gcc2 internal prototype to avoid an error.  */
11106 #ifdef __cplusplus
11107 extern "C"
11108 {
11109 #endif
11110 /* We use char because int might match the return type of a gcc2
11111    builtin and then its argument prototype would still apply.  */
11112 char _doprnt ();
11113 /* The GNU C library defines this for functions which it implements
11114     to always fail with ENOSYS.  Some functions are actually named
11115     something starting with __ and the normal name is an alias.  */
11116 #if defined (__stub__doprnt) || defined (__stub____doprnt)
11117 choke me
11118 #else
11119 char (*f) () = _doprnt;
11120 #endif
11121 #ifdef __cplusplus
11122 }
11123 #endif
11124
11125 int
11126 main ()
11127 {
11128 return f != _doprnt;
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 rm -f conftest.$ac_objext conftest$ac_exeext
11134 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11135   (eval $ac_link) 2>conftest.er1
11136   ac_status=$?
11137   grep -v '^ *+' conftest.er1 >conftest.err
11138   rm -f conftest.er1
11139   cat conftest.err >&5
11140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11141   (exit $ac_status); } &&
11142          { ac_try='test -z "$ac_cxx_werror_flag"
11143                          || test ! -s conftest.err'
11144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148   (exit $ac_status); }; } &&
11149          { ac_try='test -s conftest$ac_exeext'
11150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11151   (eval $ac_try) 2>&5
11152   ac_status=$?
11153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154   (exit $ac_status); }; }; then
11155   ac_cv_func__doprnt=yes
11156 else
11157   echo "$as_me: failed program was:" >&5
11158 sed 's/^/| /' conftest.$ac_ext >&5
11159
11160 ac_cv_func__doprnt=no
11161 fi
11162 rm -f conftest.err conftest.$ac_objext \
11163       conftest$ac_exeext conftest.$ac_ext
11164 fi
11165 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
11166 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
11167 if test $ac_cv_func__doprnt = yes; then
11168
11169 cat >>confdefs.h <<\_ACEOF
11170 #define HAVE_DOPRNT 1
11171 _ACEOF
11172
11173 fi
11174
11175 fi
11176 done
11177
11178
11179
11180 for ac_func in vsnprintf
11181 do
11182 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11183 echo "$as_me:$LINENO: checking for $ac_func" >&5
11184 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11185 if eval "test \"\${$as_ac_var+set}\" = set"; then
11186   echo $ECHO_N "(cached) $ECHO_C" >&6
11187 else
11188   cat >conftest.$ac_ext <<_ACEOF
11189 /* confdefs.h.  */
11190 _ACEOF
11191 cat confdefs.h >>conftest.$ac_ext
11192 cat >>conftest.$ac_ext <<_ACEOF
11193 /* end confdefs.h.  */
11194 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11195    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11196 #define $ac_func innocuous_$ac_func
11197
11198 /* System header to define __stub macros and hopefully few prototypes,
11199     which can conflict with char $ac_func (); below.
11200     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11201     <limits.h> exists even on freestanding compilers.  */
11202
11203 #ifdef __STDC__
11204 # include <limits.h>
11205 #else
11206 # include <assert.h>
11207 #endif
11208
11209 #undef $ac_func
11210
11211 /* Override any gcc2 internal prototype to avoid an error.  */
11212 #ifdef __cplusplus
11213 extern "C"
11214 {
11215 #endif
11216 /* We use char because int might match the return type of a gcc2
11217    builtin and then its argument prototype would still apply.  */
11218 char $ac_func ();
11219 /* The GNU C library defines this for functions which it implements
11220     to always fail with ENOSYS.  Some functions are actually named
11221     something starting with __ and the normal name is an alias.  */
11222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11223 choke me
11224 #else
11225 char (*f) () = $ac_func;
11226 #endif
11227 #ifdef __cplusplus
11228 }
11229 #endif
11230
11231 int
11232 main ()
11233 {
11234 return f != $ac_func;
11235   ;
11236   return 0;
11237 }
11238 _ACEOF
11239 rm -f conftest.$ac_objext conftest$ac_exeext
11240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11241   (eval $ac_link) 2>conftest.er1
11242   ac_status=$?
11243   grep -v '^ *+' conftest.er1 >conftest.err
11244   rm -f conftest.er1
11245   cat conftest.err >&5
11246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11247   (exit $ac_status); } &&
11248          { ac_try='test -z "$ac_cxx_werror_flag"
11249                          || test ! -s conftest.err'
11250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11251   (eval $ac_try) 2>&5
11252   ac_status=$?
11253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11254   (exit $ac_status); }; } &&
11255          { ac_try='test -s conftest$ac_exeext'
11256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11257   (eval $ac_try) 2>&5
11258   ac_status=$?
11259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260   (exit $ac_status); }; }; then
11261   eval "$as_ac_var=yes"
11262 else
11263   echo "$as_me: failed program was:" >&5
11264 sed 's/^/| /' conftest.$ac_ext >&5
11265
11266 eval "$as_ac_var=no"
11267 fi
11268 rm -f conftest.err conftest.$ac_objext \
11269       conftest$ac_exeext conftest.$ac_ext
11270 fi
11271 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11272 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11273 if test `eval echo '${'$as_ac_var'}'` = yes; then
11274   cat >>confdefs.h <<_ACEOF
11275 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11276 _ACEOF
11277
11278 fi
11279 done
11280
11281
11282 for ac_func in vasprintf
11283 do
11284 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11285 echo "$as_me:$LINENO: checking for $ac_func" >&5
11286 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11287 if eval "test \"\${$as_ac_var+set}\" = set"; then
11288   echo $ECHO_N "(cached) $ECHO_C" >&6
11289 else
11290   cat >conftest.$ac_ext <<_ACEOF
11291 /* confdefs.h.  */
11292 _ACEOF
11293 cat confdefs.h >>conftest.$ac_ext
11294 cat >>conftest.$ac_ext <<_ACEOF
11295 /* end confdefs.h.  */
11296 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11297    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11298 #define $ac_func innocuous_$ac_func
11299
11300 /* System header to define __stub macros and hopefully few prototypes,
11301     which can conflict with char $ac_func (); below.
11302     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11303     <limits.h> exists even on freestanding compilers.  */
11304
11305 #ifdef __STDC__
11306 # include <limits.h>
11307 #else
11308 # include <assert.h>
11309 #endif
11310
11311 #undef $ac_func
11312
11313 /* Override any gcc2 internal prototype to avoid an error.  */
11314 #ifdef __cplusplus
11315 extern "C"
11316 {
11317 #endif
11318 /* We use char because int might match the return type of a gcc2
11319    builtin and then its argument prototype would still apply.  */
11320 char $ac_func ();
11321 /* The GNU C library defines this for functions which it implements
11322     to always fail with ENOSYS.  Some functions are actually named
11323     something starting with __ and the normal name is an alias.  */
11324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11325 choke me
11326 #else
11327 char (*f) () = $ac_func;
11328 #endif
11329 #ifdef __cplusplus
11330 }
11331 #endif
11332
11333 int
11334 main ()
11335 {
11336 return f != $ac_func;
11337   ;
11338   return 0;
11339 }
11340 _ACEOF
11341 rm -f conftest.$ac_objext conftest$ac_exeext
11342 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11343   (eval $ac_link) 2>conftest.er1
11344   ac_status=$?
11345   grep -v '^ *+' conftest.er1 >conftest.err
11346   rm -f conftest.er1
11347   cat conftest.err >&5
11348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11349   (exit $ac_status); } &&
11350          { ac_try='test -z "$ac_cxx_werror_flag"
11351                          || test ! -s conftest.err'
11352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11353   (eval $ac_try) 2>&5
11354   ac_status=$?
11355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11356   (exit $ac_status); }; } &&
11357          { ac_try='test -s conftest$ac_exeext'
11358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11359   (eval $ac_try) 2>&5
11360   ac_status=$?
11361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11362   (exit $ac_status); }; }; then
11363   eval "$as_ac_var=yes"
11364 else
11365   echo "$as_me: failed program was:" >&5
11366 sed 's/^/| /' conftest.$ac_ext >&5
11367
11368 eval "$as_ac_var=no"
11369 fi
11370 rm -f conftest.err conftest.$ac_objext \
11371       conftest$ac_exeext conftest.$ac_ext
11372 fi
11373 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11374 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11375 if test `eval echo '${'$as_ac_var'}'` = yes; then
11376   cat >>confdefs.h <<_ACEOF
11377 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11378 _ACEOF
11379
11380 fi
11381 done
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
11392 do
11393 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11394 echo "$as_me:$LINENO: checking for $ac_func" >&5
11395 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11396 if eval "test \"\${$as_ac_var+set}\" = set"; then
11397   echo $ECHO_N "(cached) $ECHO_C" >&6
11398 else
11399   cat >conftest.$ac_ext <<_ACEOF
11400 /* confdefs.h.  */
11401 _ACEOF
11402 cat confdefs.h >>conftest.$ac_ext
11403 cat >>conftest.$ac_ext <<_ACEOF
11404 /* end confdefs.h.  */
11405 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11406    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11407 #define $ac_func innocuous_$ac_func
11408
11409 /* System header to define __stub macros and hopefully few prototypes,
11410     which can conflict with char $ac_func (); below.
11411     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11412     <limits.h> exists even on freestanding compilers.  */
11413
11414 #ifdef __STDC__
11415 # include <limits.h>
11416 #else
11417 # include <assert.h>
11418 #endif
11419
11420 #undef $ac_func
11421
11422 /* Override any gcc2 internal prototype to avoid an error.  */
11423 #ifdef __cplusplus
11424 extern "C"
11425 {
11426 #endif
11427 /* We use char because int might match the return type of a gcc2
11428    builtin and then its argument prototype would still apply.  */
11429 char $ac_func ();
11430 /* The GNU C library defines this for functions which it implements
11431     to always fail with ENOSYS.  Some functions are actually named
11432     something starting with __ and the normal name is an alias.  */
11433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11434 choke me
11435 #else
11436 char (*f) () = $ac_func;
11437 #endif
11438 #ifdef __cplusplus
11439 }
11440 #endif
11441
11442 int
11443 main ()
11444 {
11445 return f != $ac_func;
11446   ;
11447   return 0;
11448 }
11449 _ACEOF
11450 rm -f conftest.$ac_objext conftest$ac_exeext
11451 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11452   (eval $ac_link) 2>conftest.er1
11453   ac_status=$?
11454   grep -v '^ *+' conftest.er1 >conftest.err
11455   rm -f conftest.er1
11456   cat conftest.err >&5
11457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11458   (exit $ac_status); } &&
11459          { ac_try='test -z "$ac_cxx_werror_flag"
11460                          || test ! -s conftest.err'
11461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11462   (eval $ac_try) 2>&5
11463   ac_status=$?
11464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465   (exit $ac_status); }; } &&
11466          { ac_try='test -s conftest$ac_exeext'
11467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11468   (eval $ac_try) 2>&5
11469   ac_status=$?
11470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471   (exit $ac_status); }; }; then
11472   eval "$as_ac_var=yes"
11473 else
11474   echo "$as_me: failed program was:" >&5
11475 sed 's/^/| /' conftest.$ac_ext >&5
11476
11477 eval "$as_ac_var=no"
11478 fi
11479 rm -f conftest.err conftest.$ac_objext \
11480       conftest$ac_exeext conftest.$ac_ext
11481 fi
11482 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11483 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11484 if test `eval echo '${'$as_ac_var'}'` = yes; then
11485   cat >>confdefs.h <<_ACEOF
11486 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11487 _ACEOF
11488
11489 fi
11490 done
11491
11492
11493
11494 for ac_func in strchr memcpy
11495 do
11496 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11497 echo "$as_me:$LINENO: checking for $ac_func" >&5
11498 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11499 if eval "test \"\${$as_ac_var+set}\" = set"; then
11500   echo $ECHO_N "(cached) $ECHO_C" >&6
11501 else
11502   cat >conftest.$ac_ext <<_ACEOF
11503 /* confdefs.h.  */
11504 _ACEOF
11505 cat confdefs.h >>conftest.$ac_ext
11506 cat >>conftest.$ac_ext <<_ACEOF
11507 /* end confdefs.h.  */
11508 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11509    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11510 #define $ac_func innocuous_$ac_func
11511
11512 /* System header to define __stub macros and hopefully few prototypes,
11513     which can conflict with char $ac_func (); below.
11514     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11515     <limits.h> exists even on freestanding compilers.  */
11516
11517 #ifdef __STDC__
11518 # include <limits.h>
11519 #else
11520 # include <assert.h>
11521 #endif
11522
11523 #undef $ac_func
11524
11525 /* Override any gcc2 internal prototype to avoid an error.  */
11526 #ifdef __cplusplus
11527 extern "C"
11528 {
11529 #endif
11530 /* We use char because int might match the return type of a gcc2
11531    builtin and then its argument prototype would still apply.  */
11532 char $ac_func ();
11533 /* The GNU C library defines this for functions which it implements
11534     to always fail with ENOSYS.  Some functions are actually named
11535     something starting with __ and the normal name is an alias.  */
11536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11537 choke me
11538 #else
11539 char (*f) () = $ac_func;
11540 #endif
11541 #ifdef __cplusplus
11542 }
11543 #endif
11544
11545 int
11546 main ()
11547 {
11548 return f != $ac_func;
11549   ;
11550   return 0;
11551 }
11552 _ACEOF
11553 rm -f conftest.$ac_objext conftest$ac_exeext
11554 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11555   (eval $ac_link) 2>conftest.er1
11556   ac_status=$?
11557   grep -v '^ *+' conftest.er1 >conftest.err
11558   rm -f conftest.er1
11559   cat conftest.err >&5
11560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561   (exit $ac_status); } &&
11562          { ac_try='test -z "$ac_cxx_werror_flag"
11563                          || test ! -s conftest.err'
11564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11565   (eval $ac_try) 2>&5
11566   ac_status=$?
11567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11568   (exit $ac_status); }; } &&
11569          { ac_try='test -s conftest$ac_exeext'
11570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11571   (eval $ac_try) 2>&5
11572   ac_status=$?
11573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11574   (exit $ac_status); }; }; then
11575   eval "$as_ac_var=yes"
11576 else
11577   echo "$as_me: failed program was:" >&5
11578 sed 's/^/| /' conftest.$ac_ext >&5
11579
11580 eval "$as_ac_var=no"
11581 fi
11582 rm -f conftest.err conftest.$ac_objext \
11583       conftest$ac_exeext conftest.$ac_ext
11584 fi
11585 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11586 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11587 if test `eval echo '${'$as_ac_var'}'` = yes; then
11588   cat >>confdefs.h <<_ACEOF
11589 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11590 _ACEOF
11591
11592 fi
11593 done
11594
11595
11596 for ac_func in fgets
11597 do
11598 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11599 echo "$as_me:$LINENO: checking for $ac_func" >&5
11600 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11601 if eval "test \"\${$as_ac_var+set}\" = set"; then
11602   echo $ECHO_N "(cached) $ECHO_C" >&6
11603 else
11604   cat >conftest.$ac_ext <<_ACEOF
11605 /* confdefs.h.  */
11606 _ACEOF
11607 cat confdefs.h >>conftest.$ac_ext
11608 cat >>conftest.$ac_ext <<_ACEOF
11609 /* end confdefs.h.  */
11610 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11611    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11612 #define $ac_func innocuous_$ac_func
11613
11614 /* System header to define __stub macros and hopefully few prototypes,
11615     which can conflict with char $ac_func (); below.
11616     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11617     <limits.h> exists even on freestanding compilers.  */
11618
11619 #ifdef __STDC__
11620 # include <limits.h>
11621 #else
11622 # include <assert.h>
11623 #endif
11624
11625 #undef $ac_func
11626
11627 /* Override any gcc2 internal prototype to avoid an error.  */
11628 #ifdef __cplusplus
11629 extern "C"
11630 {
11631 #endif
11632 /* We use char because int might match the return type of a gcc2
11633    builtin and then its argument prototype would still apply.  */
11634 char $ac_func ();
11635 /* The GNU C library defines this for functions which it implements
11636     to always fail with ENOSYS.  Some functions are actually named
11637     something starting with __ and the normal name is an alias.  */
11638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11639 choke me
11640 #else
11641 char (*f) () = $ac_func;
11642 #endif
11643 #ifdef __cplusplus
11644 }
11645 #endif
11646
11647 int
11648 main ()
11649 {
11650 return f != $ac_func;
11651   ;
11652   return 0;
11653 }
11654 _ACEOF
11655 rm -f conftest.$ac_objext conftest$ac_exeext
11656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11657   (eval $ac_link) 2>conftest.er1
11658   ac_status=$?
11659   grep -v '^ *+' conftest.er1 >conftest.err
11660   rm -f conftest.er1
11661   cat conftest.err >&5
11662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663   (exit $ac_status); } &&
11664          { ac_try='test -z "$ac_cxx_werror_flag"
11665                          || test ! -s conftest.err'
11666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11670   (exit $ac_status); }; } &&
11671          { ac_try='test -s conftest$ac_exeext'
11672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11673   (eval $ac_try) 2>&5
11674   ac_status=$?
11675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676   (exit $ac_status); }; }; then
11677   eval "$as_ac_var=yes"
11678 else
11679   echo "$as_me: failed program was:" >&5
11680 sed 's/^/| /' conftest.$ac_ext >&5
11681
11682 eval "$as_ac_var=no"
11683 fi
11684 rm -f conftest.err conftest.$ac_objext \
11685       conftest$ac_exeext conftest.$ac_ext
11686 fi
11687 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11688 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11689 if test `eval echo '${'$as_ac_var'}'` = yes; then
11690   cat >>confdefs.h <<_ACEOF
11691 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11692 _ACEOF
11693
11694 fi
11695 done
11696
11697
11698 for ac_func in yylex
11699 do
11700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11701 echo "$as_me:$LINENO: checking for $ac_func" >&5
11702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11703 if eval "test \"\${$as_ac_var+set}\" = set"; then
11704   echo $ECHO_N "(cached) $ECHO_C" >&6
11705 else
11706   cat >conftest.$ac_ext <<_ACEOF
11707 /* confdefs.h.  */
11708 _ACEOF
11709 cat confdefs.h >>conftest.$ac_ext
11710 cat >>conftest.$ac_ext <<_ACEOF
11711 /* end confdefs.h.  */
11712 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11713    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11714 #define $ac_func innocuous_$ac_func
11715
11716 /* System header to define __stub macros and hopefully few prototypes,
11717     which can conflict with char $ac_func (); below.
11718     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11719     <limits.h> exists even on freestanding compilers.  */
11720
11721 #ifdef __STDC__
11722 # include <limits.h>
11723 #else
11724 # include <assert.h>
11725 #endif
11726
11727 #undef $ac_func
11728
11729 /* Override any gcc2 internal prototype to avoid an error.  */
11730 #ifdef __cplusplus
11731 extern "C"
11732 {
11733 #endif
11734 /* We use char because int might match the return type of a gcc2
11735    builtin and then its argument prototype would still apply.  */
11736 char $ac_func ();
11737 /* The GNU C library defines this for functions which it implements
11738     to always fail with ENOSYS.  Some functions are actually named
11739     something starting with __ and the normal name is an alias.  */
11740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11741 choke me
11742 #else
11743 char (*f) () = $ac_func;
11744 #endif
11745 #ifdef __cplusplus
11746 }
11747 #endif
11748
11749 int
11750 main ()
11751 {
11752 return f != $ac_func;
11753   ;
11754   return 0;
11755 }
11756 _ACEOF
11757 rm -f conftest.$ac_objext conftest$ac_exeext
11758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11759   (eval $ac_link) 2>conftest.er1
11760   ac_status=$?
11761   grep -v '^ *+' conftest.er1 >conftest.err
11762   rm -f conftest.er1
11763   cat conftest.err >&5
11764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765   (exit $ac_status); } &&
11766          { ac_try='test -z "$ac_cxx_werror_flag"
11767                          || test ! -s conftest.err'
11768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11769   (eval $ac_try) 2>&5
11770   ac_status=$?
11771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772   (exit $ac_status); }; } &&
11773          { ac_try='test -s conftest$ac_exeext'
11774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778   (exit $ac_status); }; }; then
11779   eval "$as_ac_var=yes"
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 sed 's/^/| /' conftest.$ac_ext >&5
11783
11784 eval "$as_ac_var=no"
11785 fi
11786 rm -f conftest.err conftest.$ac_objext \
11787       conftest$ac_exeext conftest.$ac_ext
11788 fi
11789 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11790 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11791 if test `eval echo '${'$as_ac_var'}'` = yes; then
11792   cat >>confdefs.h <<_ACEOF
11793 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11794 _ACEOF
11795
11796 fi
11797 done
11798
11799
11800 echo "$as_me:$LINENO: checking whether scanf knows %a" >&5
11801 echo $ECHO_N "checking whether scanf knows %a... $ECHO_C" >&6
11802 if test "${ucsim_cv_scanf_a+set}" = set; then
11803   echo $ECHO_N "(cached) $ECHO_C" >&6
11804 else
11805   echo "a b" >conftest.data
11806 if test "$cross_compiling" = yes; then
11807   ucsim_cv_scanf_a="unknown"
11808 else
11809   cat >conftest.$ac_ext <<_ACEOF
11810 /* confdefs.h.  */
11811 _ACEOF
11812 cat confdefs.h >>conftest.$ac_ext
11813 cat >>conftest.$ac_ext <<_ACEOF
11814 /* end confdefs.h.  */
11815
11816 #include <stdio.h>
11817 void main(void)
11818 {
11819   FILE *f;
11820   char *a;
11821   int  i;
11822   if ((f= fopen("conftest.data", "r")) == NULL)
11823     exit(1);
11824   i= fscanf(f, " %a[a-z] ", &a);
11825   fclose(f);
11826   if (i == 0)
11827     exit(2);
11828   if (i == 1)
11829     exit(0);
11830   exit(3);
11831 }
11832 _ACEOF
11833 rm -f conftest$ac_exeext
11834 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11835   (eval $ac_link) 2>&5
11836   ac_status=$?
11837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11838   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11840   (eval $ac_try) 2>&5
11841   ac_status=$?
11842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11843   (exit $ac_status); }; }; then
11844   ucsim_cv_scanf_a="yes"
11845 else
11846   echo "$as_me: program exited with status $ac_status" >&5
11847 echo "$as_me: failed program was:" >&5
11848 sed 's/^/| /' conftest.$ac_ext >&5
11849
11850 ( exit $ac_status )
11851 ucsim_cv_scanf_a="no"
11852 fi
11853 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11854 fi
11855
11856 fi
11857 echo "$as_me:$LINENO: result: $ucsim_cv_scanf_a" >&5
11858 echo "${ECHO_T}$ucsim_cv_scanf_a" >&6
11859 if test "$ucsim_cv_scanf_a" = "yes"; then
11860   cat >>confdefs.h <<\_ACEOF
11861 #define SCANF_A 1
11862 _ACEOF
11863
11864 fi
11865
11866 echo "$as_me:$LINENO: checking whether getcwd is GNUish" >&5
11867 echo $ECHO_N "checking whether getcwd is GNUish... $ECHO_C" >&6
11868 if test "${ucsim_cv_getcwd+set}" = set; then
11869   echo $ECHO_N "(cached) $ECHO_C" >&6
11870 else
11871   if test "$cross_compiling" = yes; then
11872   ucsim_cv_getcwd="unknown"
11873 else
11874   cat >conftest.$ac_ext <<_ACEOF
11875 /* confdefs.h.  */
11876 _ACEOF
11877 cat confdefs.h >>conftest.$ac_ext
11878 cat >>conftest.$ac_ext <<_ACEOF
11879 /* end confdefs.h.  */
11880
11881 #include <unistd.h>
11882 void main(void)
11883 {
11884   if ((getcwd(NULL, 0)) == NULL)
11885     exit(1);
11886   exit(0);
11887 }
11888 _ACEOF
11889 rm -f conftest$ac_exeext
11890 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11891   (eval $ac_link) 2>&5
11892   ac_status=$?
11893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11894   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11896   (eval $ac_try) 2>&5
11897   ac_status=$?
11898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11899   (exit $ac_status); }; }; then
11900   ucsim_cv_getcwd="yes"
11901 else
11902   echo "$as_me: program exited with status $ac_status" >&5
11903 echo "$as_me: failed program was:" >&5
11904 sed 's/^/| /' conftest.$ac_ext >&5
11905
11906 ( exit $ac_status )
11907 ucsim_cv_getcwd="no"
11908 fi
11909 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11910 fi
11911
11912 fi
11913 echo "$as_me:$LINENO: result: $ucsim_cv_getcwd" >&5
11914 echo "${ECHO_T}$ucsim_cv_getcwd" >&6
11915 if test "$ucsim_cv_getcwd" = "yes"; then
11916   cat >>confdefs.h <<\_ACEOF
11917 #define GNU_GETCWD 1
11918 _ACEOF
11919
11920 fi
11921
11922
11923 #'
11924
11925 echo "$as_me:$LINENO: checking for type of length pointer parameter of accept" >&5
11926 echo $ECHO_N "checking for type of length pointer parameter of accept... $ECHO_C" >&6
11927 if test "${ucsim_cv_accept_length_type+set}" = set; then
11928   echo $ECHO_N "(cached) $ECHO_C" >&6
11929 else
11930   ac_save_CPPFLAGS="$CPPFLAGS"
11931     ucsim_cv_accept_length_type=no
11932     for ac_val in int size_t socklen_t; do
11933       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
11934       cat >conftest.$ac_ext <<_ACEOF
11935 /* confdefs.h.  */
11936 _ACEOF
11937 cat confdefs.h >>conftest.$ac_ext
11938 cat >>conftest.$ac_ext <<_ACEOF
11939 /* end confdefs.h.  */
11940 #include <sys/types.h>
11941 #include ${ucsim_cv_socket}
11942 int
11943 main ()
11944 {
11945 struct sockaddr a; $ac_val len; accept (0, &a, &len);
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f conftest.$ac_objext
11951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11952   (eval $ac_compile) 2>conftest.er1
11953   ac_status=$?
11954   grep -v '^ *+' conftest.er1 >conftest.err
11955   rm -f conftest.er1
11956   cat conftest.err >&5
11957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958   (exit $ac_status); } &&
11959          { ac_try='test -z "$ac_cxx_werror_flag"
11960                          || test ! -s conftest.err'
11961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11962   (eval $ac_try) 2>&5
11963   ac_status=$?
11964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11965   (exit $ac_status); }; } &&
11966          { ac_try='test -s conftest.$ac_objext'
11967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   ucsim_cv_accept_length_type=$ac_val; break
11973 else
11974   echo "$as_me: failed program was:" >&5
11975 sed 's/^/| /' conftest.$ac_ext >&5
11976
11977 fi
11978 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11979     done
11980     CPPFLAGS="$ac_save_CPPFLAGS"
11981 fi
11982 echo "$as_me:$LINENO: result: $ucsim_cv_accept_length_type" >&5
11983 echo "${ECHO_T}$ucsim_cv_accept_length_type" >&6
11984   if test "$ucsim_cv_accept_length_type" != no; then
11985
11986 cat >>confdefs.h <<_ACEOF
11987 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
11988 _ACEOF
11989
11990   fi
11991
11992
11993
11994 # Macro definitions
11995 ###################
11996
11997 # DD_COPT macro checks if the compiler specified as the 1st parameter
11998 # supports option specified as the 2nd parameter
11999 # For example: DD_COPT(CXX, fPIC)
12000
12001
12002
12003
12004 # Checking characteristics of compilers and other programs
12005 # --------------------------------------------------------
12006
12007 # Cross compiling overrides
12008 # FIXME
12009 if test "$CC" = "i586-mingw32msvc-gcc"; then
12010   ac_cv_c_bigendian=no
12011   ac_cv_sizeof_char=1
12012   ac_cv_sizeof_short=2
12013   ac_cv_sizeof_int=4
12014   ac_cv_sizeof_long=4
12015   ac_cv_sizeof_long_long=4
12016 fi
12017
12018 if test "$cross_compiling" = "no"
12019 then
12020     echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
12021 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
12022 if test "${ac_cv_c_bigendian+set}" = set; then
12023   echo $ECHO_N "(cached) $ECHO_C" >&6
12024 else
12025   # See if sys/param.h defines the BYTE_ORDER macro.
12026 cat >conftest.$ac_ext <<_ACEOF
12027 /* confdefs.h.  */
12028 _ACEOF
12029 cat confdefs.h >>conftest.$ac_ext
12030 cat >>conftest.$ac_ext <<_ACEOF
12031 /* end confdefs.h.  */
12032 #include <sys/types.h>
12033 #include <sys/param.h>
12034
12035 int
12036 main ()
12037 {
12038 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
12039  bogus endian macros
12040 #endif
12041
12042   ;
12043   return 0;
12044 }
12045 _ACEOF
12046 rm -f conftest.$ac_objext
12047 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12048   (eval $ac_compile) 2>conftest.er1
12049   ac_status=$?
12050   grep -v '^ *+' conftest.er1 >conftest.err
12051   rm -f conftest.er1
12052   cat conftest.err >&5
12053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054   (exit $ac_status); } &&
12055          { ac_try='test -z "$ac_cxx_werror_flag"
12056                          || test ! -s conftest.err'
12057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12058   (eval $ac_try) 2>&5
12059   ac_status=$?
12060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12061   (exit $ac_status); }; } &&
12062          { ac_try='test -s conftest.$ac_objext'
12063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12064   (eval $ac_try) 2>&5
12065   ac_status=$?
12066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067   (exit $ac_status); }; }; then
12068   # It does; now see whether it defined to BIG_ENDIAN or not.
12069 cat >conftest.$ac_ext <<_ACEOF
12070 /* confdefs.h.  */
12071 _ACEOF
12072 cat confdefs.h >>conftest.$ac_ext
12073 cat >>conftest.$ac_ext <<_ACEOF
12074 /* end confdefs.h.  */
12075 #include <sys/types.h>
12076 #include <sys/param.h>
12077
12078 int
12079 main ()
12080 {
12081 #if BYTE_ORDER != BIG_ENDIAN
12082  not big endian
12083 #endif
12084
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f conftest.$ac_objext
12090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12091   (eval $ac_compile) 2>conftest.er1
12092   ac_status=$?
12093   grep -v '^ *+' conftest.er1 >conftest.err
12094   rm -f conftest.er1
12095   cat conftest.err >&5
12096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12097   (exit $ac_status); } &&
12098          { ac_try='test -z "$ac_cxx_werror_flag"
12099                          || test ! -s conftest.err'
12100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104   (exit $ac_status); }; } &&
12105          { ac_try='test -s conftest.$ac_objext'
12106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12107   (eval $ac_try) 2>&5
12108   ac_status=$?
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); }; }; then
12111   ac_cv_c_bigendian=yes
12112 else
12113   echo "$as_me: failed program was:" >&5
12114 sed 's/^/| /' conftest.$ac_ext >&5
12115
12116 ac_cv_c_bigendian=no
12117 fi
12118 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12119 else
12120   echo "$as_me: failed program was:" >&5
12121 sed 's/^/| /' conftest.$ac_ext >&5
12122
12123 # It does not; compile a test program.
12124 if test "$cross_compiling" = yes; then
12125   # try to guess the endianness by grepping values into an object file
12126   ac_cv_c_bigendian=unknown
12127   cat >conftest.$ac_ext <<_ACEOF
12128 /* confdefs.h.  */
12129 _ACEOF
12130 cat confdefs.h >>conftest.$ac_ext
12131 cat >>conftest.$ac_ext <<_ACEOF
12132 /* end confdefs.h.  */
12133 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12134 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12135 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
12136 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12137 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12138 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
12139 int
12140 main ()
12141 {
12142  _ascii (); _ebcdic ();
12143   ;
12144   return 0;
12145 }
12146 _ACEOF
12147 rm -f conftest.$ac_objext
12148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12149   (eval $ac_compile) 2>conftest.er1
12150   ac_status=$?
12151   grep -v '^ *+' conftest.er1 >conftest.err
12152   rm -f conftest.er1
12153   cat conftest.err >&5
12154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12155   (exit $ac_status); } &&
12156          { ac_try='test -z "$ac_cxx_werror_flag"
12157                          || test ! -s conftest.err'
12158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12159   (eval $ac_try) 2>&5
12160   ac_status=$?
12161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12162   (exit $ac_status); }; } &&
12163          { ac_try='test -s conftest.$ac_objext'
12164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12165   (eval $ac_try) 2>&5
12166   ac_status=$?
12167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168   (exit $ac_status); }; }; then
12169   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
12170   ac_cv_c_bigendian=yes
12171 fi
12172 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12173   if test "$ac_cv_c_bigendian" = unknown; then
12174     ac_cv_c_bigendian=no
12175   else
12176     # finding both strings is unlikely to happen, but who knows?
12177     ac_cv_c_bigendian=unknown
12178   fi
12179 fi
12180 else
12181   echo "$as_me: failed program was:" >&5
12182 sed 's/^/| /' conftest.$ac_ext >&5
12183
12184 fi
12185 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12186 else
12187   cat >conftest.$ac_ext <<_ACEOF
12188 /* confdefs.h.  */
12189 _ACEOF
12190 cat confdefs.h >>conftest.$ac_ext
12191 cat >>conftest.$ac_ext <<_ACEOF
12192 /* end confdefs.h.  */
12193 int
12194 main ()
12195 {
12196   /* Are we little or big endian?  From Harbison&Steele.  */
12197   union
12198   {
12199     long l;
12200     char c[sizeof (long)];
12201   } u;
12202   u.l = 1;
12203   exit (u.c[sizeof (long) - 1] == 1);
12204 }
12205 _ACEOF
12206 rm -f conftest$ac_exeext
12207 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12208   (eval $ac_link) 2>&5
12209   ac_status=$?
12210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12213   (eval $ac_try) 2>&5
12214   ac_status=$?
12215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12216   (exit $ac_status); }; }; then
12217   ac_cv_c_bigendian=no
12218 else
12219   echo "$as_me: program exited with status $ac_status" >&5
12220 echo "$as_me: failed program was:" >&5
12221 sed 's/^/| /' conftest.$ac_ext >&5
12222
12223 ( exit $ac_status )
12224 ac_cv_c_bigendian=yes
12225 fi
12226 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12227 fi
12228 fi
12229 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12230 fi
12231 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
12232 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
12233 case $ac_cv_c_bigendian in
12234   yes)
12235
12236 cat >>confdefs.h <<\_ACEOF
12237 #define WORDS_BIGENDIAN 1
12238 _ACEOF
12239  ;;
12240   no)
12241      ;;
12242   *)
12243     { { echo "$as_me:$LINENO: error: unknown endianness
12244 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
12245 echo "$as_me: error: unknown endianness
12246 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
12247    { (exit 1); exit 1; }; } ;;
12248 esac
12249
12250 else
12251 #echo "CROSS ENDIAN"
12252     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
12253         ac_cv_c_bigendian=no
12254     else
12255         : # FIXME
12256     fi
12257 #echo "CROSS ENDIAN DONE"
12258 fi
12259
12260 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
12261 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
12262 if test "${ucsim_cv_MM+set}" = set; then
12263   echo $ECHO_N "(cached) $ECHO_C" >&6
12264 else
12265   echo "#include <stdio.h>" >_test_.c
12266 echo "" >>_test_.c
12267 $CXXCPP -v -MM _test_.c 1>&5 2>&5
12268 if test "$?" = "0"; then
12269   ucsim_cv_MM="-MM"
12270 else
12271   ucsim_cv_MM="-M"
12272 fi
12273 rm -f _test_.*
12274 fi
12275 echo "$as_me:$LINENO: result: $ucsim_cv_MM" >&5
12276 echo "${ECHO_T}$ucsim_cv_MM" >&6
12277 M_OR_MM=$ucsim_cv_MM
12278
12279
12280 # This is the first time when CFLAGS are set/modified!!
12281
12282
12283 echo "$as_me:$LINENO: checking whether $CXX accepts -ggdb" >&5
12284 echo $ECHO_N "checking whether $CXX accepts -ggdb... $ECHO_C" >&6
12285 if test "${ucsim_cv_CXXggdb+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288   cat >_test_.c <<EOF
12289 #include <stdio.h>
12290 int main(void) {return(0);}
12291 EOF
12292 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
12293 if test "$?" = "0"; then
12294   ucsim_cv_CXXggdb="yes"
12295 else
12296   ucsim_cv_CXXggdb="no"
12297 fi
12298 rm -f _test_.* a.out
12299 fi
12300 echo "$as_me:$LINENO: result: $ucsim_cv_CXXggdb" >&5
12301 echo "${ECHO_T}$ucsim_cv_CXXggdb" >&6
12302
12303
12304 echo "$as_me:$LINENO: checking whether $CXX accepts -gstabs" >&5
12305 echo $ECHO_N "checking whether $CXX accepts -gstabs... $ECHO_C" >&6
12306 if test "${ucsim_cv_CXXgstabs+set}" = set; then
12307   echo $ECHO_N "(cached) $ECHO_C" >&6
12308 else
12309   cat >_test_.c <<EOF
12310 #include <stdio.h>
12311 int main(void) {return(0);}
12312 EOF
12313 $CXX -v -gstabs -c _test_.c 1>&5 2>&5
12314 if test "$?" = "0"; then
12315   ucsim_cv_CXXgstabs="yes"
12316 else
12317   ucsim_cv_CXXgstabs="no"
12318 fi
12319 rm -f _test_.* a.out
12320 fi
12321 echo "$as_me:$LINENO: result: $ucsim_cv_CXXgstabs" >&5
12322 echo "${ECHO_T}$ucsim_cv_CXXgstabs" >&6
12323
12324 if test "$ucsim_cv_CXXgstabs" = "yes"; then
12325    gopt="-gstabs+ -g3"
12326 elif test "$ucsim_cv_CXXggdb" = "yes"; then
12327      gopt="-ggdb -g3"
12328 else
12329      gopt="-g"
12330 fi
12331 if test "$CXXFLAGS"x = x ;then
12332         CXXFLAGS="$gopt"
12333 else
12334         CXXFLAGS="$CXXFLAGS $gopt"
12335 fi
12336
12337
12338 echo "$as_me:$LINENO: checking whether $CXX accepts -pipe" >&5
12339 echo $ECHO_N "checking whether $CXX accepts -pipe... $ECHO_C" >&6
12340 if test "${ucsim_cv_CXXpipe+set}" = set; then
12341   echo $ECHO_N "(cached) $ECHO_C" >&6
12342 else
12343   cat >_test_.c <<EOF
12344 #include <stdio.h>
12345 int main(void) {return(0);}
12346 EOF
12347 $CXX -v -pipe -c _test_.c 1>&5 2>&5
12348 if test "$?" = "0"; then
12349   ucsim_cv_CXXpipe="yes"
12350 else
12351   ucsim_cv_CXXpipe="no"
12352 fi
12353 rm -f _test_.* a.out
12354 fi
12355 echo "$as_me:$LINENO: result: $ucsim_cv_CXXpipe" >&5
12356 echo "${ECHO_T}$ucsim_cv_CXXpipe" >&6
12357
12358 if test "$ucsim_cv_CXXpipe" = "yes"; then
12359   CXXFLAGS="$CXXFLAGS -pipe"
12360 fi
12361
12362 PICOPT=""
12363 SHAREDLIB="no"
12364
12365 echo "$as_me:$LINENO: checking whether $CXX accepts -fPIC" >&5
12366 echo $ECHO_N "checking whether $CXX accepts -fPIC... $ECHO_C" >&6
12367 if test "${ucsim_cv_CXXfPIC+set}" = set; then
12368   echo $ECHO_N "(cached) $ECHO_C" >&6
12369 else
12370   cat >_test_.c <<EOF
12371 #include <stdio.h>
12372 int main(void) {return(0);}
12373 EOF
12374 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
12375 if test "$?" = "0"; then
12376   ucsim_cv_CXXfPIC="yes"
12377 else
12378   ucsim_cv_CXXfPIC="no"
12379 fi
12380 rm -f _test_.* a.out
12381 fi
12382 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfPIC" >&5
12383 echo "${ECHO_T}$ucsim_cv_CXXfPIC" >&6
12384
12385 if test "$ucsim_cv_CXXfPIC" = "yes"; then
12386     PICOPT="-fPIC"
12387 else
12388
12389 echo "$as_me:$LINENO: checking whether $CXX accepts -fpic" >&5
12390 echo $ECHO_N "checking whether $CXX accepts -fpic... $ECHO_C" >&6
12391 if test "${ucsim_cv_CXXfpic+set}" = set; then
12392   echo $ECHO_N "(cached) $ECHO_C" >&6
12393 else
12394   cat >_test_.c <<EOF
12395 #include <stdio.h>
12396 int main(void) {return(0);}
12397 EOF
12398 $CXX -v -fpic -c _test_.c 1>&5 2>&5
12399 if test "$?" = "0"; then
12400   ucsim_cv_CXXfpic="yes"
12401 else
12402   ucsim_cv_CXXfpic="no"
12403 fi
12404 rm -f _test_.* a.out
12405 fi
12406 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfpic" >&5
12407 echo "${ECHO_T}$ucsim_cv_CXXfpic" >&6
12408
12409     if test "$ucsim_cv_CXXfpic" = "yes"; then
12410         PICOPT="-fpic"
12411     fi
12412 fi
12413 if test "$PICOPT"x != "x"; then
12414     SHAREDLIB="yes"
12415 fi
12416 # If this is Cygwin neither use Position Independant Code
12417 # nor build .so
12418 # Quick + dirty by Bernhard
12419 # FIXME
12420 if $CXX --version 2>&1 | grep -i cygming 1>&5 2>&5 || $CXX --version 2>&1 | grep -i cygwin 1>&5 2>&5; then
12421     PICOPT=""
12422     SHAREDLIB="no"
12423 fi
12424
12425
12426
12427 dlso_ok="no"
12428 if test $SHAREDLIB = "yes" -a $dl_ok = "yes" -a $enable_dlso = "yes"; then
12429     dlso_ok="yes"
12430 fi
12431
12432
12433 # Checks for typedefs, structures, and compiler characteristics.
12434 # ===========================================================================
12435
12436 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
12437 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12438 if test "${ac_cv_type_signal+set}" = set; then
12439   echo $ECHO_N "(cached) $ECHO_C" >&6
12440 else
12441   cat >conftest.$ac_ext <<_ACEOF
12442 /* confdefs.h.  */
12443 _ACEOF
12444 cat confdefs.h >>conftest.$ac_ext
12445 cat >>conftest.$ac_ext <<_ACEOF
12446 /* end confdefs.h.  */
12447 #include <sys/types.h>
12448 #include <signal.h>
12449 #ifdef signal
12450 # undef signal
12451 #endif
12452 #ifdef __cplusplus
12453 extern "C" void (*signal (int, void (*)(int)))(int);
12454 #else
12455 void (*signal ()) ();
12456 #endif
12457
12458 int
12459 main ()
12460 {
12461 int i;
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f conftest.$ac_objext
12467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12468   (eval $ac_compile) 2>conftest.er1
12469   ac_status=$?
12470   grep -v '^ *+' conftest.er1 >conftest.err
12471   rm -f conftest.er1
12472   cat conftest.err >&5
12473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474   (exit $ac_status); } &&
12475          { ac_try='test -z "$ac_cxx_werror_flag"
12476                          || test ! -s conftest.err'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; } &&
12482          { ac_try='test -s conftest.$ac_objext'
12483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12484   (eval $ac_try) 2>&5
12485   ac_status=$?
12486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487   (exit $ac_status); }; }; then
12488   ac_cv_type_signal=void
12489 else
12490   echo "$as_me: failed program was:" >&5
12491 sed 's/^/| /' conftest.$ac_ext >&5
12492
12493 ac_cv_type_signal=int
12494 fi
12495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12496 fi
12497 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
12498 echo "${ECHO_T}$ac_cv_type_signal" >&6
12499
12500 cat >>confdefs.h <<_ACEOF
12501 #define RETSIGTYPE $ac_cv_type_signal
12502 _ACEOF
12503
12504
12505 if test "$cross_compiling" = "no"; then
12506 echo "$as_me:$LINENO: checking for char" >&5
12507 echo $ECHO_N "checking for char... $ECHO_C" >&6
12508 if test "${ac_cv_type_char+set}" = set; then
12509   echo $ECHO_N "(cached) $ECHO_C" >&6
12510 else
12511   cat >conftest.$ac_ext <<_ACEOF
12512 /* confdefs.h.  */
12513 _ACEOF
12514 cat confdefs.h >>conftest.$ac_ext
12515 cat >>conftest.$ac_ext <<_ACEOF
12516 /* end confdefs.h.  */
12517 $ac_includes_default
12518 int
12519 main ()
12520 {
12521 if ((char *) 0)
12522   return 0;
12523 if (sizeof (char))
12524   return 0;
12525   ;
12526   return 0;
12527 }
12528 _ACEOF
12529 rm -f conftest.$ac_objext
12530 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12531   (eval $ac_compile) 2>conftest.er1
12532   ac_status=$?
12533   grep -v '^ *+' conftest.er1 >conftest.err
12534   rm -f conftest.er1
12535   cat conftest.err >&5
12536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537   (exit $ac_status); } &&
12538          { ac_try='test -z "$ac_cxx_werror_flag"
12539                          || test ! -s conftest.err'
12540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12544   (exit $ac_status); }; } &&
12545          { ac_try='test -s conftest.$ac_objext'
12546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12547   (eval $ac_try) 2>&5
12548   ac_status=$?
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); }; }; then
12551   ac_cv_type_char=yes
12552 else
12553   echo "$as_me: failed program was:" >&5
12554 sed 's/^/| /' conftest.$ac_ext >&5
12555
12556 ac_cv_type_char=no
12557 fi
12558 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12559 fi
12560 echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
12561 echo "${ECHO_T}$ac_cv_type_char" >&6
12562
12563 echo "$as_me:$LINENO: checking size of char" >&5
12564 echo $ECHO_N "checking size of char... $ECHO_C" >&6
12565 if test "${ac_cv_sizeof_char+set}" = set; then
12566   echo $ECHO_N "(cached) $ECHO_C" >&6
12567 else
12568   if test "$ac_cv_type_char" = yes; then
12569   # The cast to unsigned long works around a bug in the HP C Compiler
12570   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12571   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12572   # This bug is HP SR number 8606223364.
12573   if test "$cross_compiling" = yes; then
12574   # Depending upon the size, compute the lo and hi bounds.
12575 cat >conftest.$ac_ext <<_ACEOF
12576 /* confdefs.h.  */
12577 _ACEOF
12578 cat confdefs.h >>conftest.$ac_ext
12579 cat >>conftest.$ac_ext <<_ACEOF
12580 /* end confdefs.h.  */
12581 $ac_includes_default
12582 int
12583 main ()
12584 {
12585 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
12586 test_array [0] = 0
12587
12588   ;
12589   return 0;
12590 }
12591 _ACEOF
12592 rm -f conftest.$ac_objext
12593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12594   (eval $ac_compile) 2>conftest.er1
12595   ac_status=$?
12596   grep -v '^ *+' conftest.er1 >conftest.err
12597   rm -f conftest.er1
12598   cat conftest.err >&5
12599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12600   (exit $ac_status); } &&
12601          { ac_try='test -z "$ac_cxx_werror_flag"
12602                          || test ! -s conftest.err'
12603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604   (eval $ac_try) 2>&5
12605   ac_status=$?
12606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607   (exit $ac_status); }; } &&
12608          { ac_try='test -s conftest.$ac_objext'
12609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610   (eval $ac_try) 2>&5
12611   ac_status=$?
12612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613   (exit $ac_status); }; }; then
12614   ac_lo=0 ac_mid=0
12615   while :; do
12616     cat >conftest.$ac_ext <<_ACEOF
12617 /* confdefs.h.  */
12618 _ACEOF
12619 cat confdefs.h >>conftest.$ac_ext
12620 cat >>conftest.$ac_ext <<_ACEOF
12621 /* end confdefs.h.  */
12622 $ac_includes_default
12623 int
12624 main ()
12625 {
12626 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
12627 test_array [0] = 0
12628
12629   ;
12630   return 0;
12631 }
12632 _ACEOF
12633 rm -f conftest.$ac_objext
12634 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12635   (eval $ac_compile) 2>conftest.er1
12636   ac_status=$?
12637   grep -v '^ *+' conftest.er1 >conftest.err
12638   rm -f conftest.er1
12639   cat conftest.err >&5
12640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641   (exit $ac_status); } &&
12642          { ac_try='test -z "$ac_cxx_werror_flag"
12643                          || test ! -s conftest.err'
12644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12645   (eval $ac_try) 2>&5
12646   ac_status=$?
12647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12648   (exit $ac_status); }; } &&
12649          { ac_try='test -s conftest.$ac_objext'
12650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12651   (eval $ac_try) 2>&5
12652   ac_status=$?
12653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654   (exit $ac_status); }; }; then
12655   ac_hi=$ac_mid; break
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 sed 's/^/| /' conftest.$ac_ext >&5
12659
12660 ac_lo=`expr $ac_mid + 1`
12661                     if test $ac_lo -le $ac_mid; then
12662                       ac_lo= ac_hi=
12663                       break
12664                     fi
12665                     ac_mid=`expr 2 '*' $ac_mid + 1`
12666 fi
12667 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12668   done
12669 else
12670   echo "$as_me: failed program was:" >&5
12671 sed 's/^/| /' conftest.$ac_ext >&5
12672
12673 cat >conftest.$ac_ext <<_ACEOF
12674 /* confdefs.h.  */
12675 _ACEOF
12676 cat confdefs.h >>conftest.$ac_ext
12677 cat >>conftest.$ac_ext <<_ACEOF
12678 /* end confdefs.h.  */
12679 $ac_includes_default
12680 int
12681 main ()
12682 {
12683 static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
12684 test_array [0] = 0
12685
12686   ;
12687   return 0;
12688 }
12689 _ACEOF
12690 rm -f conftest.$ac_objext
12691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12692   (eval $ac_compile) 2>conftest.er1
12693   ac_status=$?
12694   grep -v '^ *+' conftest.er1 >conftest.err
12695   rm -f conftest.er1
12696   cat conftest.err >&5
12697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698   (exit $ac_status); } &&
12699          { ac_try='test -z "$ac_cxx_werror_flag"
12700                          || test ! -s conftest.err'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; } &&
12706          { ac_try='test -s conftest.$ac_objext'
12707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12708   (eval $ac_try) 2>&5
12709   ac_status=$?
12710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711   (exit $ac_status); }; }; then
12712   ac_hi=-1 ac_mid=-1
12713   while :; do
12714     cat >conftest.$ac_ext <<_ACEOF
12715 /* confdefs.h.  */
12716 _ACEOF
12717 cat confdefs.h >>conftest.$ac_ext
12718 cat >>conftest.$ac_ext <<_ACEOF
12719 /* end confdefs.h.  */
12720 $ac_includes_default
12721 int
12722 main ()
12723 {
12724 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
12725 test_array [0] = 0
12726
12727   ;
12728   return 0;
12729 }
12730 _ACEOF
12731 rm -f conftest.$ac_objext
12732 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12733   (eval $ac_compile) 2>conftest.er1
12734   ac_status=$?
12735   grep -v '^ *+' conftest.er1 >conftest.err
12736   rm -f conftest.er1
12737   cat conftest.err >&5
12738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12739   (exit $ac_status); } &&
12740          { ac_try='test -z "$ac_cxx_werror_flag"
12741                          || test ! -s conftest.err'
12742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12743   (eval $ac_try) 2>&5
12744   ac_status=$?
12745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746   (exit $ac_status); }; } &&
12747          { ac_try='test -s conftest.$ac_objext'
12748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12749   (eval $ac_try) 2>&5
12750   ac_status=$?
12751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12752   (exit $ac_status); }; }; then
12753   ac_lo=$ac_mid; break
12754 else
12755   echo "$as_me: failed program was:" >&5
12756 sed 's/^/| /' conftest.$ac_ext >&5
12757
12758 ac_hi=`expr '(' $ac_mid ')' - 1`
12759                        if test $ac_mid -le $ac_hi; then
12760                          ac_lo= ac_hi=
12761                          break
12762                        fi
12763                        ac_mid=`expr 2 '*' $ac_mid`
12764 fi
12765 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12766   done
12767 else
12768   echo "$as_me: failed program was:" >&5
12769 sed 's/^/| /' conftest.$ac_ext >&5
12770
12771 ac_lo= ac_hi=
12772 fi
12773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12774 fi
12775 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12776 # Binary search between lo and hi bounds.
12777 while test "x$ac_lo" != "x$ac_hi"; do
12778   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12779   cat >conftest.$ac_ext <<_ACEOF
12780 /* confdefs.h.  */
12781 _ACEOF
12782 cat confdefs.h >>conftest.$ac_ext
12783 cat >>conftest.$ac_ext <<_ACEOF
12784 /* end confdefs.h.  */
12785 $ac_includes_default
12786 int
12787 main ()
12788 {
12789 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
12790 test_array [0] = 0
12791
12792   ;
12793   return 0;
12794 }
12795 _ACEOF
12796 rm -f conftest.$ac_objext
12797 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12798   (eval $ac_compile) 2>conftest.er1
12799   ac_status=$?
12800   grep -v '^ *+' conftest.er1 >conftest.err
12801   rm -f conftest.er1
12802   cat conftest.err >&5
12803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12804   (exit $ac_status); } &&
12805          { ac_try='test -z "$ac_cxx_werror_flag"
12806                          || test ! -s conftest.err'
12807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12808   (eval $ac_try) 2>&5
12809   ac_status=$?
12810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12811   (exit $ac_status); }; } &&
12812          { ac_try='test -s conftest.$ac_objext'
12813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12817   (exit $ac_status); }; }; then
12818   ac_hi=$ac_mid
12819 else
12820   echo "$as_me: failed program was:" >&5
12821 sed 's/^/| /' conftest.$ac_ext >&5
12822
12823 ac_lo=`expr '(' $ac_mid ')' + 1`
12824 fi
12825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12826 done
12827 case $ac_lo in
12828 ?*) ac_cv_sizeof_char=$ac_lo;;
12829 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12830 See \`config.log' for more details." >&5
12831 echo "$as_me: error: cannot compute sizeof (char), 77
12832 See \`config.log' for more details." >&2;}
12833    { (exit 1); exit 1; }; } ;;
12834 esac
12835 else
12836   if test "$cross_compiling" = yes; then
12837   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12838 See \`config.log' for more details." >&5
12839 echo "$as_me: error: cannot run test program while cross compiling
12840 See \`config.log' for more details." >&2;}
12841    { (exit 1); exit 1; }; }
12842 else
12843   cat >conftest.$ac_ext <<_ACEOF
12844 /* confdefs.h.  */
12845 _ACEOF
12846 cat confdefs.h >>conftest.$ac_ext
12847 cat >>conftest.$ac_ext <<_ACEOF
12848 /* end confdefs.h.  */
12849 $ac_includes_default
12850 long longval () { return (long) (sizeof (char)); }
12851 unsigned long ulongval () { return (long) (sizeof (char)); }
12852 #include <stdio.h>
12853 #include <stdlib.h>
12854 int
12855 main ()
12856 {
12857
12858   FILE *f = fopen ("conftest.val", "w");
12859   if (! f)
12860     exit (1);
12861   if (((long) (sizeof (char))) < 0)
12862     {
12863       long i = longval ();
12864       if (i != ((long) (sizeof (char))))
12865         exit (1);
12866       fprintf (f, "%ld\n", i);
12867     }
12868   else
12869     {
12870       unsigned long i = ulongval ();
12871       if (i != ((long) (sizeof (char))))
12872         exit (1);
12873       fprintf (f, "%lu\n", i);
12874     }
12875   exit (ferror (f) || fclose (f) != 0);
12876
12877   ;
12878   return 0;
12879 }
12880 _ACEOF
12881 rm -f conftest$ac_exeext
12882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   ac_cv_sizeof_char=`cat conftest.val`
12893 else
12894   echo "$as_me: program exited with status $ac_status" >&5
12895 echo "$as_me: failed program was:" >&5
12896 sed 's/^/| /' conftest.$ac_ext >&5
12897
12898 ( exit $ac_status )
12899 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12900 See \`config.log' for more details." >&5
12901 echo "$as_me: error: cannot compute sizeof (char), 77
12902 See \`config.log' for more details." >&2;}
12903    { (exit 1); exit 1; }; }
12904 fi
12905 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12906 fi
12907 fi
12908 rm -f conftest.val
12909 else
12910   ac_cv_sizeof_char=0
12911 fi
12912 fi
12913 echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
12914 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
12915 cat >>confdefs.h <<_ACEOF
12916 #define SIZEOF_CHAR $ac_cv_sizeof_char
12917 _ACEOF
12918
12919
12920 echo "$as_me:$LINENO: checking for short" >&5
12921 echo $ECHO_N "checking for short... $ECHO_C" >&6
12922 if test "${ac_cv_type_short+set}" = set; then
12923   echo $ECHO_N "(cached) $ECHO_C" >&6
12924 else
12925   cat >conftest.$ac_ext <<_ACEOF
12926 /* confdefs.h.  */
12927 _ACEOF
12928 cat confdefs.h >>conftest.$ac_ext
12929 cat >>conftest.$ac_ext <<_ACEOF
12930 /* end confdefs.h.  */
12931 $ac_includes_default
12932 int
12933 main ()
12934 {
12935 if ((short *) 0)
12936   return 0;
12937 if (sizeof (short))
12938   return 0;
12939   ;
12940   return 0;
12941 }
12942 _ACEOF
12943 rm -f conftest.$ac_objext
12944 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12945   (eval $ac_compile) 2>conftest.er1
12946   ac_status=$?
12947   grep -v '^ *+' conftest.er1 >conftest.err
12948   rm -f conftest.er1
12949   cat conftest.err >&5
12950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951   (exit $ac_status); } &&
12952          { ac_try='test -z "$ac_cxx_werror_flag"
12953                          || test ! -s conftest.err'
12954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12955   (eval $ac_try) 2>&5
12956   ac_status=$?
12957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12958   (exit $ac_status); }; } &&
12959          { ac_try='test -s conftest.$ac_objext'
12960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12961   (eval $ac_try) 2>&5
12962   ac_status=$?
12963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12964   (exit $ac_status); }; }; then
12965   ac_cv_type_short=yes
12966 else
12967   echo "$as_me: failed program was:" >&5
12968 sed 's/^/| /' conftest.$ac_ext >&5
12969
12970 ac_cv_type_short=no
12971 fi
12972 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12973 fi
12974 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
12975 echo "${ECHO_T}$ac_cv_type_short" >&6
12976
12977 echo "$as_me:$LINENO: checking size of short" >&5
12978 echo $ECHO_N "checking size of short... $ECHO_C" >&6
12979 if test "${ac_cv_sizeof_short+set}" = set; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   if test "$ac_cv_type_short" = yes; then
12983   # The cast to unsigned long works around a bug in the HP C Compiler
12984   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12985   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12986   # This bug is HP SR number 8606223364.
12987   if test "$cross_compiling" = yes; then
12988   # Depending upon the size, compute the lo and hi bounds.
12989 cat >conftest.$ac_ext <<_ACEOF
12990 /* confdefs.h.  */
12991 _ACEOF
12992 cat confdefs.h >>conftest.$ac_ext
12993 cat >>conftest.$ac_ext <<_ACEOF
12994 /* end confdefs.h.  */
12995 $ac_includes_default
12996 int
12997 main ()
12998 {
12999 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
13000 test_array [0] = 0
13001
13002   ;
13003   return 0;
13004 }
13005 _ACEOF
13006 rm -f conftest.$ac_objext
13007 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13008   (eval $ac_compile) 2>conftest.er1
13009   ac_status=$?
13010   grep -v '^ *+' conftest.er1 >conftest.err
13011   rm -f conftest.er1
13012   cat conftest.err >&5
13013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014   (exit $ac_status); } &&
13015          { ac_try='test -z "$ac_cxx_werror_flag"
13016                          || test ! -s conftest.err'
13017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13018   (eval $ac_try) 2>&5
13019   ac_status=$?
13020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021   (exit $ac_status); }; } &&
13022          { ac_try='test -s conftest.$ac_objext'
13023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13024   (eval $ac_try) 2>&5
13025   ac_status=$?
13026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027   (exit $ac_status); }; }; then
13028   ac_lo=0 ac_mid=0
13029   while :; do
13030     cat >conftest.$ac_ext <<_ACEOF
13031 /* confdefs.h.  */
13032 _ACEOF
13033 cat confdefs.h >>conftest.$ac_ext
13034 cat >>conftest.$ac_ext <<_ACEOF
13035 /* end confdefs.h.  */
13036 $ac_includes_default
13037 int
13038 main ()
13039 {
13040 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
13041 test_array [0] = 0
13042
13043   ;
13044   return 0;
13045 }
13046 _ACEOF
13047 rm -f conftest.$ac_objext
13048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13049   (eval $ac_compile) 2>conftest.er1
13050   ac_status=$?
13051   grep -v '^ *+' conftest.er1 >conftest.err
13052   rm -f conftest.er1
13053   cat conftest.err >&5
13054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13055   (exit $ac_status); } &&
13056          { ac_try='test -z "$ac_cxx_werror_flag"
13057                          || test ! -s conftest.err'
13058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13059   (eval $ac_try) 2>&5
13060   ac_status=$?
13061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062   (exit $ac_status); }; } &&
13063          { ac_try='test -s conftest.$ac_objext'
13064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   ac_hi=$ac_mid; break
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 sed 's/^/| /' conftest.$ac_ext >&5
13073
13074 ac_lo=`expr $ac_mid + 1`
13075                     if test $ac_lo -le $ac_mid; then
13076                       ac_lo= ac_hi=
13077                       break
13078                     fi
13079                     ac_mid=`expr 2 '*' $ac_mid + 1`
13080 fi
13081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13082   done
13083 else
13084   echo "$as_me: failed program was:" >&5
13085 sed 's/^/| /' conftest.$ac_ext >&5
13086
13087 cat >conftest.$ac_ext <<_ACEOF
13088 /* confdefs.h.  */
13089 _ACEOF
13090 cat confdefs.h >>conftest.$ac_ext
13091 cat >>conftest.$ac_ext <<_ACEOF
13092 /* end confdefs.h.  */
13093 $ac_includes_default
13094 int
13095 main ()
13096 {
13097 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
13098 test_array [0] = 0
13099
13100   ;
13101   return 0;
13102 }
13103 _ACEOF
13104 rm -f conftest.$ac_objext
13105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13106   (eval $ac_compile) 2>conftest.er1
13107   ac_status=$?
13108   grep -v '^ *+' conftest.er1 >conftest.err
13109   rm -f conftest.er1
13110   cat conftest.err >&5
13111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112   (exit $ac_status); } &&
13113          { ac_try='test -z "$ac_cxx_werror_flag"
13114                          || test ! -s conftest.err'
13115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13116   (eval $ac_try) 2>&5
13117   ac_status=$?
13118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119   (exit $ac_status); }; } &&
13120          { ac_try='test -s conftest.$ac_objext'
13121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13122   (eval $ac_try) 2>&5
13123   ac_status=$?
13124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13125   (exit $ac_status); }; }; then
13126   ac_hi=-1 ac_mid=-1
13127   while :; do
13128     cat >conftest.$ac_ext <<_ACEOF
13129 /* confdefs.h.  */
13130 _ACEOF
13131 cat confdefs.h >>conftest.$ac_ext
13132 cat >>conftest.$ac_ext <<_ACEOF
13133 /* end confdefs.h.  */
13134 $ac_includes_default
13135 int
13136 main ()
13137 {
13138 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
13139 test_array [0] = 0
13140
13141   ;
13142   return 0;
13143 }
13144 _ACEOF
13145 rm -f conftest.$ac_objext
13146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13147   (eval $ac_compile) 2>conftest.er1
13148   ac_status=$?
13149   grep -v '^ *+' conftest.er1 >conftest.err
13150   rm -f conftest.er1
13151   cat conftest.err >&5
13152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153   (exit $ac_status); } &&
13154          { ac_try='test -z "$ac_cxx_werror_flag"
13155                          || test ! -s conftest.err'
13156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13157   (eval $ac_try) 2>&5
13158   ac_status=$?
13159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160   (exit $ac_status); }; } &&
13161          { ac_try='test -s conftest.$ac_objext'
13162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13163   (eval $ac_try) 2>&5
13164   ac_status=$?
13165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166   (exit $ac_status); }; }; then
13167   ac_lo=$ac_mid; break
13168 else
13169   echo "$as_me: failed program was:" >&5
13170 sed 's/^/| /' conftest.$ac_ext >&5
13171
13172 ac_hi=`expr '(' $ac_mid ')' - 1`
13173                        if test $ac_mid -le $ac_hi; then
13174                          ac_lo= ac_hi=
13175                          break
13176                        fi
13177                        ac_mid=`expr 2 '*' $ac_mid`
13178 fi
13179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13180   done
13181 else
13182   echo "$as_me: failed program was:" >&5
13183 sed 's/^/| /' conftest.$ac_ext >&5
13184
13185 ac_lo= ac_hi=
13186 fi
13187 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13188 fi
13189 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13190 # Binary search between lo and hi bounds.
13191 while test "x$ac_lo" != "x$ac_hi"; do
13192   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13193   cat >conftest.$ac_ext <<_ACEOF
13194 /* confdefs.h.  */
13195 _ACEOF
13196 cat confdefs.h >>conftest.$ac_ext
13197 cat >>conftest.$ac_ext <<_ACEOF
13198 /* end confdefs.h.  */
13199 $ac_includes_default
13200 int
13201 main ()
13202 {
13203 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
13204 test_array [0] = 0
13205
13206   ;
13207   return 0;
13208 }
13209 _ACEOF
13210 rm -f conftest.$ac_objext
13211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13212   (eval $ac_compile) 2>conftest.er1
13213   ac_status=$?
13214   grep -v '^ *+' conftest.er1 >conftest.err
13215   rm -f conftest.er1
13216   cat conftest.err >&5
13217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218   (exit $ac_status); } &&
13219          { ac_try='test -z "$ac_cxx_werror_flag"
13220                          || test ! -s conftest.err'
13221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225   (exit $ac_status); }; } &&
13226          { ac_try='test -s conftest.$ac_objext'
13227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231   (exit $ac_status); }; }; then
13232   ac_hi=$ac_mid
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 sed 's/^/| /' conftest.$ac_ext >&5
13236
13237 ac_lo=`expr '(' $ac_mid ')' + 1`
13238 fi
13239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13240 done
13241 case $ac_lo in
13242 ?*) ac_cv_sizeof_short=$ac_lo;;
13243 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
13244 See \`config.log' for more details." >&5
13245 echo "$as_me: error: cannot compute sizeof (short), 77
13246 See \`config.log' for more details." >&2;}
13247    { (exit 1); exit 1; }; } ;;
13248 esac
13249 else
13250   if test "$cross_compiling" = yes; then
13251   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13252 See \`config.log' for more details." >&5
13253 echo "$as_me: error: cannot run test program while cross compiling
13254 See \`config.log' for more details." >&2;}
13255    { (exit 1); exit 1; }; }
13256 else
13257   cat >conftest.$ac_ext <<_ACEOF
13258 /* confdefs.h.  */
13259 _ACEOF
13260 cat confdefs.h >>conftest.$ac_ext
13261 cat >>conftest.$ac_ext <<_ACEOF
13262 /* end confdefs.h.  */
13263 $ac_includes_default
13264 long longval () { return (long) (sizeof (short)); }
13265 unsigned long ulongval () { return (long) (sizeof (short)); }
13266 #include <stdio.h>
13267 #include <stdlib.h>
13268 int
13269 main ()
13270 {
13271
13272   FILE *f = fopen ("conftest.val", "w");
13273   if (! f)
13274     exit (1);
13275   if (((long) (sizeof (short))) < 0)
13276     {
13277       long i = longval ();
13278       if (i != ((long) (sizeof (short))))
13279         exit (1);
13280       fprintf (f, "%ld\n", i);
13281     }
13282   else
13283     {
13284       unsigned long i = ulongval ();
13285       if (i != ((long) (sizeof (short))))
13286         exit (1);
13287       fprintf (f, "%lu\n", i);
13288     }
13289   exit (ferror (f) || fclose (f) != 0);
13290
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f conftest$ac_exeext
13296 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13297   (eval $ac_link) 2>&5
13298   ac_status=$?
13299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13302   (eval $ac_try) 2>&5
13303   ac_status=$?
13304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305   (exit $ac_status); }; }; then
13306   ac_cv_sizeof_short=`cat conftest.val`
13307 else
13308   echo "$as_me: program exited with status $ac_status" >&5
13309 echo "$as_me: failed program was:" >&5
13310 sed 's/^/| /' conftest.$ac_ext >&5
13311
13312 ( exit $ac_status )
13313 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
13314 See \`config.log' for more details." >&5
13315 echo "$as_me: error: cannot compute sizeof (short), 77
13316 See \`config.log' for more details." >&2;}
13317    { (exit 1); exit 1; }; }
13318 fi
13319 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13320 fi
13321 fi
13322 rm -f conftest.val
13323 else
13324   ac_cv_sizeof_short=0
13325 fi
13326 fi
13327 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
13328 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
13329 cat >>confdefs.h <<_ACEOF
13330 #define SIZEOF_SHORT $ac_cv_sizeof_short
13331 _ACEOF
13332
13333
13334 echo "$as_me:$LINENO: checking for int" >&5
13335 echo $ECHO_N "checking for int... $ECHO_C" >&6
13336 if test "${ac_cv_type_int+set}" = set; then
13337   echo $ECHO_N "(cached) $ECHO_C" >&6
13338 else
13339   cat >conftest.$ac_ext <<_ACEOF
13340 /* confdefs.h.  */
13341 _ACEOF
13342 cat confdefs.h >>conftest.$ac_ext
13343 cat >>conftest.$ac_ext <<_ACEOF
13344 /* end confdefs.h.  */
13345 $ac_includes_default
13346 int
13347 main ()
13348 {
13349 if ((int *) 0)
13350   return 0;
13351 if (sizeof (int))
13352   return 0;
13353   ;
13354   return 0;
13355 }
13356 _ACEOF
13357 rm -f conftest.$ac_objext
13358 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13359   (eval $ac_compile) 2>conftest.er1
13360   ac_status=$?
13361   grep -v '^ *+' conftest.er1 >conftest.err
13362   rm -f conftest.er1
13363   cat conftest.err >&5
13364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13365   (exit $ac_status); } &&
13366          { ac_try='test -z "$ac_cxx_werror_flag"
13367                          || test ! -s conftest.err'
13368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13369   (eval $ac_try) 2>&5
13370   ac_status=$?
13371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13372   (exit $ac_status); }; } &&
13373          { ac_try='test -s conftest.$ac_objext'
13374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13375   (eval $ac_try) 2>&5
13376   ac_status=$?
13377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13378   (exit $ac_status); }; }; then
13379   ac_cv_type_int=yes
13380 else
13381   echo "$as_me: failed program was:" >&5
13382 sed 's/^/| /' conftest.$ac_ext >&5
13383
13384 ac_cv_type_int=no
13385 fi
13386 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13387 fi
13388 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
13389 echo "${ECHO_T}$ac_cv_type_int" >&6
13390
13391 echo "$as_me:$LINENO: checking size of int" >&5
13392 echo $ECHO_N "checking size of int... $ECHO_C" >&6
13393 if test "${ac_cv_sizeof_int+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396   if test "$ac_cv_type_int" = yes; then
13397   # The cast to unsigned long works around a bug in the HP C Compiler
13398   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13399   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13400   # This bug is HP SR number 8606223364.
13401   if test "$cross_compiling" = yes; then
13402   # Depending upon the size, compute the lo and hi bounds.
13403 cat >conftest.$ac_ext <<_ACEOF
13404 /* confdefs.h.  */
13405 _ACEOF
13406 cat confdefs.h >>conftest.$ac_ext
13407 cat >>conftest.$ac_ext <<_ACEOF
13408 /* end confdefs.h.  */
13409 $ac_includes_default
13410 int
13411 main ()
13412 {
13413 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
13414 test_array [0] = 0
13415
13416   ;
13417   return 0;
13418 }
13419 _ACEOF
13420 rm -f conftest.$ac_objext
13421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13422   (eval $ac_compile) 2>conftest.er1
13423   ac_status=$?
13424   grep -v '^ *+' conftest.er1 >conftest.err
13425   rm -f conftest.er1
13426   cat conftest.err >&5
13427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428   (exit $ac_status); } &&
13429          { ac_try='test -z "$ac_cxx_werror_flag"
13430                          || test ! -s conftest.err'
13431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435   (exit $ac_status); }; } &&
13436          { ac_try='test -s conftest.$ac_objext'
13437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441   (exit $ac_status); }; }; then
13442   ac_lo=0 ac_mid=0
13443   while :; do
13444     cat >conftest.$ac_ext <<_ACEOF
13445 /* confdefs.h.  */
13446 _ACEOF
13447 cat confdefs.h >>conftest.$ac_ext
13448 cat >>conftest.$ac_ext <<_ACEOF
13449 /* end confdefs.h.  */
13450 $ac_includes_default
13451 int
13452 main ()
13453 {
13454 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
13455 test_array [0] = 0
13456
13457   ;
13458   return 0;
13459 }
13460 _ACEOF
13461 rm -f conftest.$ac_objext
13462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13463   (eval $ac_compile) 2>conftest.er1
13464   ac_status=$?
13465   grep -v '^ *+' conftest.er1 >conftest.err
13466   rm -f conftest.er1
13467   cat conftest.err >&5
13468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13469   (exit $ac_status); } &&
13470          { ac_try='test -z "$ac_cxx_werror_flag"
13471                          || test ! -s conftest.err'
13472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13473   (eval $ac_try) 2>&5
13474   ac_status=$?
13475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476   (exit $ac_status); }; } &&
13477          { ac_try='test -s conftest.$ac_objext'
13478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13479   (eval $ac_try) 2>&5
13480   ac_status=$?
13481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13482   (exit $ac_status); }; }; then
13483   ac_hi=$ac_mid; break
13484 else
13485   echo "$as_me: failed program was:" >&5
13486 sed 's/^/| /' conftest.$ac_ext >&5
13487
13488 ac_lo=`expr $ac_mid + 1`
13489                     if test $ac_lo -le $ac_mid; then
13490                       ac_lo= ac_hi=
13491                       break
13492                     fi
13493                     ac_mid=`expr 2 '*' $ac_mid + 1`
13494 fi
13495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13496   done
13497 else
13498   echo "$as_me: failed program was:" >&5
13499 sed 's/^/| /' conftest.$ac_ext >&5
13500
13501 cat >conftest.$ac_ext <<_ACEOF
13502 /* confdefs.h.  */
13503 _ACEOF
13504 cat confdefs.h >>conftest.$ac_ext
13505 cat >>conftest.$ac_ext <<_ACEOF
13506 /* end confdefs.h.  */
13507 $ac_includes_default
13508 int
13509 main ()
13510 {
13511 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
13512 test_array [0] = 0
13513
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f conftest.$ac_objext
13519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13520   (eval $ac_compile) 2>conftest.er1
13521   ac_status=$?
13522   grep -v '^ *+' conftest.er1 >conftest.err
13523   rm -f conftest.er1
13524   cat conftest.err >&5
13525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526   (exit $ac_status); } &&
13527          { ac_try='test -z "$ac_cxx_werror_flag"
13528                          || test ! -s conftest.err'
13529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13530   (eval $ac_try) 2>&5
13531   ac_status=$?
13532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533   (exit $ac_status); }; } &&
13534          { ac_try='test -s conftest.$ac_objext'
13535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13536   (eval $ac_try) 2>&5
13537   ac_status=$?
13538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13539   (exit $ac_status); }; }; then
13540   ac_hi=-1 ac_mid=-1
13541   while :; do
13542     cat >conftest.$ac_ext <<_ACEOF
13543 /* confdefs.h.  */
13544 _ACEOF
13545 cat confdefs.h >>conftest.$ac_ext
13546 cat >>conftest.$ac_ext <<_ACEOF
13547 /* end confdefs.h.  */
13548 $ac_includes_default
13549 int
13550 main ()
13551 {
13552 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
13553 test_array [0] = 0
13554
13555   ;
13556   return 0;
13557 }
13558 _ACEOF
13559 rm -f conftest.$ac_objext
13560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13561   (eval $ac_compile) 2>conftest.er1
13562   ac_status=$?
13563   grep -v '^ *+' conftest.er1 >conftest.err
13564   rm -f conftest.er1
13565   cat conftest.err >&5
13566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13567   (exit $ac_status); } &&
13568          { ac_try='test -z "$ac_cxx_werror_flag"
13569                          || test ! -s conftest.err'
13570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13571   (eval $ac_try) 2>&5
13572   ac_status=$?
13573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574   (exit $ac_status); }; } &&
13575          { ac_try='test -s conftest.$ac_objext'
13576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13577   (eval $ac_try) 2>&5
13578   ac_status=$?
13579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13580   (exit $ac_status); }; }; then
13581   ac_lo=$ac_mid; break
13582 else
13583   echo "$as_me: failed program was:" >&5
13584 sed 's/^/| /' conftest.$ac_ext >&5
13585
13586 ac_hi=`expr '(' $ac_mid ')' - 1`
13587                        if test $ac_mid -le $ac_hi; then
13588                          ac_lo= ac_hi=
13589                          break
13590                        fi
13591                        ac_mid=`expr 2 '*' $ac_mid`
13592 fi
13593 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13594   done
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 sed 's/^/| /' conftest.$ac_ext >&5
13598
13599 ac_lo= ac_hi=
13600 fi
13601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13602 fi
13603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13604 # Binary search between lo and hi bounds.
13605 while test "x$ac_lo" != "x$ac_hi"; do
13606   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13607   cat >conftest.$ac_ext <<_ACEOF
13608 /* confdefs.h.  */
13609 _ACEOF
13610 cat confdefs.h >>conftest.$ac_ext
13611 cat >>conftest.$ac_ext <<_ACEOF
13612 /* end confdefs.h.  */
13613 $ac_includes_default
13614 int
13615 main ()
13616 {
13617 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
13618 test_array [0] = 0
13619
13620   ;
13621   return 0;
13622 }
13623 _ACEOF
13624 rm -f conftest.$ac_objext
13625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13626   (eval $ac_compile) 2>conftest.er1
13627   ac_status=$?
13628   grep -v '^ *+' conftest.er1 >conftest.err
13629   rm -f conftest.er1
13630   cat conftest.err >&5
13631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13632   (exit $ac_status); } &&
13633          { ac_try='test -z "$ac_cxx_werror_flag"
13634                          || test ! -s conftest.err'
13635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13636   (eval $ac_try) 2>&5
13637   ac_status=$?
13638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639   (exit $ac_status); }; } &&
13640          { ac_try='test -s conftest.$ac_objext'
13641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13642   (eval $ac_try) 2>&5
13643   ac_status=$?
13644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645   (exit $ac_status); }; }; then
13646   ac_hi=$ac_mid
13647 else
13648   echo "$as_me: failed program was:" >&5
13649 sed 's/^/| /' conftest.$ac_ext >&5
13650
13651 ac_lo=`expr '(' $ac_mid ')' + 1`
13652 fi
13653 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13654 done
13655 case $ac_lo in
13656 ?*) ac_cv_sizeof_int=$ac_lo;;
13657 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
13658 See \`config.log' for more details." >&5
13659 echo "$as_me: error: cannot compute sizeof (int), 77
13660 See \`config.log' for more details." >&2;}
13661    { (exit 1); exit 1; }; } ;;
13662 esac
13663 else
13664   if test "$cross_compiling" = yes; then
13665   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13666 See \`config.log' for more details." >&5
13667 echo "$as_me: error: cannot run test program while cross compiling
13668 See \`config.log' for more details." >&2;}
13669    { (exit 1); exit 1; }; }
13670 else
13671   cat >conftest.$ac_ext <<_ACEOF
13672 /* confdefs.h.  */
13673 _ACEOF
13674 cat confdefs.h >>conftest.$ac_ext
13675 cat >>conftest.$ac_ext <<_ACEOF
13676 /* end confdefs.h.  */
13677 $ac_includes_default
13678 long longval () { return (long) (sizeof (int)); }
13679 unsigned long ulongval () { return (long) (sizeof (int)); }
13680 #include <stdio.h>
13681 #include <stdlib.h>
13682 int
13683 main ()
13684 {
13685
13686   FILE *f = fopen ("conftest.val", "w");
13687   if (! f)
13688     exit (1);
13689   if (((long) (sizeof (int))) < 0)
13690     {
13691       long i = longval ();
13692       if (i != ((long) (sizeof (int))))
13693         exit (1);
13694       fprintf (f, "%ld\n", i);
13695     }
13696   else
13697     {
13698       unsigned long i = ulongval ();
13699       if (i != ((long) (sizeof (int))))
13700         exit (1);
13701       fprintf (f, "%lu\n", i);
13702     }
13703   exit (ferror (f) || fclose (f) != 0);
13704
13705   ;
13706   return 0;
13707 }
13708 _ACEOF
13709 rm -f conftest$ac_exeext
13710 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13711   (eval $ac_link) 2>&5
13712   ac_status=$?
13713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13714   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13716   (eval $ac_try) 2>&5
13717   ac_status=$?
13718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719   (exit $ac_status); }; }; then
13720   ac_cv_sizeof_int=`cat conftest.val`
13721 else
13722   echo "$as_me: program exited with status $ac_status" >&5
13723 echo "$as_me: failed program was:" >&5
13724 sed 's/^/| /' conftest.$ac_ext >&5
13725
13726 ( exit $ac_status )
13727 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
13728 See \`config.log' for more details." >&5
13729 echo "$as_me: error: cannot compute sizeof (int), 77
13730 See \`config.log' for more details." >&2;}
13731    { (exit 1); exit 1; }; }
13732 fi
13733 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13734 fi
13735 fi
13736 rm -f conftest.val
13737 else
13738   ac_cv_sizeof_int=0
13739 fi
13740 fi
13741 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
13742 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
13743 cat >>confdefs.h <<_ACEOF
13744 #define SIZEOF_INT $ac_cv_sizeof_int
13745 _ACEOF
13746
13747
13748 echo "$as_me:$LINENO: checking for long" >&5
13749 echo $ECHO_N "checking for long... $ECHO_C" >&6
13750 if test "${ac_cv_type_long+set}" = set; then
13751   echo $ECHO_N "(cached) $ECHO_C" >&6
13752 else
13753   cat >conftest.$ac_ext <<_ACEOF
13754 /* confdefs.h.  */
13755 _ACEOF
13756 cat confdefs.h >>conftest.$ac_ext
13757 cat >>conftest.$ac_ext <<_ACEOF
13758 /* end confdefs.h.  */
13759 $ac_includes_default
13760 int
13761 main ()
13762 {
13763 if ((long *) 0)
13764   return 0;
13765 if (sizeof (long))
13766   return 0;
13767   ;
13768   return 0;
13769 }
13770 _ACEOF
13771 rm -f conftest.$ac_objext
13772 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13773   (eval $ac_compile) 2>conftest.er1
13774   ac_status=$?
13775   grep -v '^ *+' conftest.er1 >conftest.err
13776   rm -f conftest.er1
13777   cat conftest.err >&5
13778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779   (exit $ac_status); } &&
13780          { ac_try='test -z "$ac_cxx_werror_flag"
13781                          || test ! -s conftest.err'
13782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13783   (eval $ac_try) 2>&5
13784   ac_status=$?
13785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13786   (exit $ac_status); }; } &&
13787          { ac_try='test -s conftest.$ac_objext'
13788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13792   (exit $ac_status); }; }; then
13793   ac_cv_type_long=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 sed 's/^/| /' conftest.$ac_ext >&5
13797
13798 ac_cv_type_long=no
13799 fi
13800 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13801 fi
13802 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
13803 echo "${ECHO_T}$ac_cv_type_long" >&6
13804
13805 echo "$as_me:$LINENO: checking size of long" >&5
13806 echo $ECHO_N "checking size of long... $ECHO_C" >&6
13807 if test "${ac_cv_sizeof_long+set}" = set; then
13808   echo $ECHO_N "(cached) $ECHO_C" >&6
13809 else
13810   if test "$ac_cv_type_long" = yes; then
13811   # The cast to unsigned long works around a bug in the HP C Compiler
13812   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13813   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13814   # This bug is HP SR number 8606223364.
13815   if test "$cross_compiling" = yes; then
13816   # Depending upon the size, compute the lo and hi bounds.
13817 cat >conftest.$ac_ext <<_ACEOF
13818 /* confdefs.h.  */
13819 _ACEOF
13820 cat confdefs.h >>conftest.$ac_ext
13821 cat >>conftest.$ac_ext <<_ACEOF
13822 /* end confdefs.h.  */
13823 $ac_includes_default
13824 int
13825 main ()
13826 {
13827 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
13828 test_array [0] = 0
13829
13830   ;
13831   return 0;
13832 }
13833 _ACEOF
13834 rm -f conftest.$ac_objext
13835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13836   (eval $ac_compile) 2>conftest.er1
13837   ac_status=$?
13838   grep -v '^ *+' conftest.er1 >conftest.err
13839   rm -f conftest.er1
13840   cat conftest.err >&5
13841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842   (exit $ac_status); } &&
13843          { ac_try='test -z "$ac_cxx_werror_flag"
13844                          || test ! -s conftest.err'
13845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846   (eval $ac_try) 2>&5
13847   ac_status=$?
13848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849   (exit $ac_status); }; } &&
13850          { ac_try='test -s conftest.$ac_objext'
13851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13852   (eval $ac_try) 2>&5
13853   ac_status=$?
13854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855   (exit $ac_status); }; }; then
13856   ac_lo=0 ac_mid=0
13857   while :; do
13858     cat >conftest.$ac_ext <<_ACEOF
13859 /* confdefs.h.  */
13860 _ACEOF
13861 cat confdefs.h >>conftest.$ac_ext
13862 cat >>conftest.$ac_ext <<_ACEOF
13863 /* end confdefs.h.  */
13864 $ac_includes_default
13865 int
13866 main ()
13867 {
13868 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
13869 test_array [0] = 0
13870
13871   ;
13872   return 0;
13873 }
13874 _ACEOF
13875 rm -f conftest.$ac_objext
13876 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13877   (eval $ac_compile) 2>conftest.er1
13878   ac_status=$?
13879   grep -v '^ *+' conftest.er1 >conftest.err
13880   rm -f conftest.er1
13881   cat conftest.err >&5
13882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883   (exit $ac_status); } &&
13884          { ac_try='test -z "$ac_cxx_werror_flag"
13885                          || test ! -s conftest.err'
13886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13887   (eval $ac_try) 2>&5
13888   ac_status=$?
13889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13890   (exit $ac_status); }; } &&
13891          { ac_try='test -s conftest.$ac_objext'
13892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13893   (eval $ac_try) 2>&5
13894   ac_status=$?
13895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896   (exit $ac_status); }; }; then
13897   ac_hi=$ac_mid; break
13898 else
13899   echo "$as_me: failed program was:" >&5
13900 sed 's/^/| /' conftest.$ac_ext >&5
13901
13902 ac_lo=`expr $ac_mid + 1`
13903                     if test $ac_lo -le $ac_mid; then
13904                       ac_lo= ac_hi=
13905                       break
13906                     fi
13907                     ac_mid=`expr 2 '*' $ac_mid + 1`
13908 fi
13909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13910   done
13911 else
13912   echo "$as_me: failed program was:" >&5
13913 sed 's/^/| /' conftest.$ac_ext >&5
13914
13915 cat >conftest.$ac_ext <<_ACEOF
13916 /* confdefs.h.  */
13917 _ACEOF
13918 cat confdefs.h >>conftest.$ac_ext
13919 cat >>conftest.$ac_ext <<_ACEOF
13920 /* end confdefs.h.  */
13921 $ac_includes_default
13922 int
13923 main ()
13924 {
13925 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
13926 test_array [0] = 0
13927
13928   ;
13929   return 0;
13930 }
13931 _ACEOF
13932 rm -f conftest.$ac_objext
13933 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13934   (eval $ac_compile) 2>conftest.er1
13935   ac_status=$?
13936   grep -v '^ *+' conftest.er1 >conftest.err
13937   rm -f conftest.er1
13938   cat conftest.err >&5
13939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13940   (exit $ac_status); } &&
13941          { ac_try='test -z "$ac_cxx_werror_flag"
13942                          || test ! -s conftest.err'
13943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13944   (eval $ac_try) 2>&5
13945   ac_status=$?
13946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13947   (exit $ac_status); }; } &&
13948          { ac_try='test -s conftest.$ac_objext'
13949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13950   (eval $ac_try) 2>&5
13951   ac_status=$?
13952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13953   (exit $ac_status); }; }; then
13954   ac_hi=-1 ac_mid=-1
13955   while :; do
13956     cat >conftest.$ac_ext <<_ACEOF
13957 /* confdefs.h.  */
13958 _ACEOF
13959 cat confdefs.h >>conftest.$ac_ext
13960 cat >>conftest.$ac_ext <<_ACEOF
13961 /* end confdefs.h.  */
13962 $ac_includes_default
13963 int
13964 main ()
13965 {
13966 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
13967 test_array [0] = 0
13968
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 rm -f conftest.$ac_objext
13974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13975   (eval $ac_compile) 2>conftest.er1
13976   ac_status=$?
13977   grep -v '^ *+' conftest.er1 >conftest.err
13978   rm -f conftest.er1
13979   cat conftest.err >&5
13980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981   (exit $ac_status); } &&
13982          { ac_try='test -z "$ac_cxx_werror_flag"
13983                          || test ! -s conftest.err'
13984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13985   (eval $ac_try) 2>&5
13986   ac_status=$?
13987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988   (exit $ac_status); }; } &&
13989          { ac_try='test -s conftest.$ac_objext'
13990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13991   (eval $ac_try) 2>&5
13992   ac_status=$?
13993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13994   (exit $ac_status); }; }; then
13995   ac_lo=$ac_mid; break
13996 else
13997   echo "$as_me: failed program was:" >&5
13998 sed 's/^/| /' conftest.$ac_ext >&5
13999
14000 ac_hi=`expr '(' $ac_mid ')' - 1`
14001                        if test $ac_mid -le $ac_hi; then
14002                          ac_lo= ac_hi=
14003                          break
14004                        fi
14005                        ac_mid=`expr 2 '*' $ac_mid`
14006 fi
14007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14008   done
14009 else
14010   echo "$as_me: failed program was:" >&5
14011 sed 's/^/| /' conftest.$ac_ext >&5
14012
14013 ac_lo= ac_hi=
14014 fi
14015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14016 fi
14017 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14018 # Binary search between lo and hi bounds.
14019 while test "x$ac_lo" != "x$ac_hi"; do
14020   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14021   cat >conftest.$ac_ext <<_ACEOF
14022 /* confdefs.h.  */
14023 _ACEOF
14024 cat confdefs.h >>conftest.$ac_ext
14025 cat >>conftest.$ac_ext <<_ACEOF
14026 /* end confdefs.h.  */
14027 $ac_includes_default
14028 int
14029 main ()
14030 {
14031 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
14032 test_array [0] = 0
14033
14034   ;
14035   return 0;
14036 }
14037 _ACEOF
14038 rm -f conftest.$ac_objext
14039 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14040   (eval $ac_compile) 2>conftest.er1
14041   ac_status=$?
14042   grep -v '^ *+' conftest.er1 >conftest.err
14043   rm -f conftest.er1
14044   cat conftest.err >&5
14045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -z "$ac_cxx_werror_flag"
14048                          || test ! -s conftest.err'
14049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14050   (eval $ac_try) 2>&5
14051   ac_status=$?
14052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053   (exit $ac_status); }; } &&
14054          { ac_try='test -s conftest.$ac_objext'
14055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14056   (eval $ac_try) 2>&5
14057   ac_status=$?
14058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059   (exit $ac_status); }; }; then
14060   ac_hi=$ac_mid
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 sed 's/^/| /' conftest.$ac_ext >&5
14064
14065 ac_lo=`expr '(' $ac_mid ')' + 1`
14066 fi
14067 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14068 done
14069 case $ac_lo in
14070 ?*) ac_cv_sizeof_long=$ac_lo;;
14071 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
14072 See \`config.log' for more details." >&5
14073 echo "$as_me: error: cannot compute sizeof (long), 77
14074 See \`config.log' for more details." >&2;}
14075    { (exit 1); exit 1; }; } ;;
14076 esac
14077 else
14078   if test "$cross_compiling" = yes; then
14079   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
14080 See \`config.log' for more details." >&5
14081 echo "$as_me: error: cannot run test program while cross compiling
14082 See \`config.log' for more details." >&2;}
14083    { (exit 1); exit 1; }; }
14084 else
14085   cat >conftest.$ac_ext <<_ACEOF
14086 /* confdefs.h.  */
14087 _ACEOF
14088 cat confdefs.h >>conftest.$ac_ext
14089 cat >>conftest.$ac_ext <<_ACEOF
14090 /* end confdefs.h.  */
14091 $ac_includes_default
14092 long longval () { return (long) (sizeof (long)); }
14093 unsigned long ulongval () { return (long) (sizeof (long)); }
14094 #include <stdio.h>
14095 #include <stdlib.h>
14096 int
14097 main ()
14098 {
14099
14100   FILE *f = fopen ("conftest.val", "w");
14101   if (! f)
14102     exit (1);
14103   if (((long) (sizeof (long))) < 0)
14104     {
14105       long i = longval ();
14106       if (i != ((long) (sizeof (long))))
14107         exit (1);
14108       fprintf (f, "%ld\n", i);
14109     }
14110   else
14111     {
14112       unsigned long i = ulongval ();
14113       if (i != ((long) (sizeof (long))))
14114         exit (1);
14115       fprintf (f, "%lu\n", i);
14116     }
14117   exit (ferror (f) || fclose (f) != 0);
14118
14119   ;
14120   return 0;
14121 }
14122 _ACEOF
14123 rm -f conftest$ac_exeext
14124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14125   (eval $ac_link) 2>&5
14126   ac_status=$?
14127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130   (eval $ac_try) 2>&5
14131   ac_status=$?
14132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133   (exit $ac_status); }; }; then
14134   ac_cv_sizeof_long=`cat conftest.val`
14135 else
14136   echo "$as_me: program exited with status $ac_status" >&5
14137 echo "$as_me: failed program was:" >&5
14138 sed 's/^/| /' conftest.$ac_ext >&5
14139
14140 ( exit $ac_status )
14141 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
14142 See \`config.log' for more details." >&5
14143 echo "$as_me: error: cannot compute sizeof (long), 77
14144 See \`config.log' for more details." >&2;}
14145    { (exit 1); exit 1; }; }
14146 fi
14147 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14148 fi
14149 fi
14150 rm -f conftest.val
14151 else
14152   ac_cv_sizeof_long=0
14153 fi
14154 fi
14155 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
14156 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
14157 cat >>confdefs.h <<_ACEOF
14158 #define SIZEOF_LONG $ac_cv_sizeof_long
14159 _ACEOF
14160
14161
14162 echo "$as_me:$LINENO: checking for long long" >&5
14163 echo $ECHO_N "checking for long long... $ECHO_C" >&6
14164 if test "${ac_cv_type_long_long+set}" = set; then
14165   echo $ECHO_N "(cached) $ECHO_C" >&6
14166 else
14167   cat >conftest.$ac_ext <<_ACEOF
14168 /* confdefs.h.  */
14169 _ACEOF
14170 cat confdefs.h >>conftest.$ac_ext
14171 cat >>conftest.$ac_ext <<_ACEOF
14172 /* end confdefs.h.  */
14173 $ac_includes_default
14174 int
14175 main ()
14176 {
14177 if ((long long *) 0)
14178   return 0;
14179 if (sizeof (long long))
14180   return 0;
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f conftest.$ac_objext
14186 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14187   (eval $ac_compile) 2>conftest.er1
14188   ac_status=$?
14189   grep -v '^ *+' conftest.er1 >conftest.err
14190   rm -f conftest.er1
14191   cat conftest.err >&5
14192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193   (exit $ac_status); } &&
14194          { ac_try='test -z "$ac_cxx_werror_flag"
14195                          || test ! -s conftest.err'
14196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200   (exit $ac_status); }; } &&
14201          { ac_try='test -s conftest.$ac_objext'
14202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206   (exit $ac_status); }; }; then
14207   ac_cv_type_long_long=yes
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 sed 's/^/| /' conftest.$ac_ext >&5
14211
14212 ac_cv_type_long_long=no
14213 fi
14214 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14215 fi
14216 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
14217 echo "${ECHO_T}$ac_cv_type_long_long" >&6
14218
14219 echo "$as_me:$LINENO: checking size of long long" >&5
14220 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
14221 if test "${ac_cv_sizeof_long_long+set}" = set; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224   if test "$ac_cv_type_long_long" = yes; then
14225   # The cast to unsigned long works around a bug in the HP C Compiler
14226   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14227   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14228   # This bug is HP SR number 8606223364.
14229   if test "$cross_compiling" = yes; then
14230   # Depending upon the size, compute the lo and hi bounds.
14231 cat >conftest.$ac_ext <<_ACEOF
14232 /* confdefs.h.  */
14233 _ACEOF
14234 cat confdefs.h >>conftest.$ac_ext
14235 cat >>conftest.$ac_ext <<_ACEOF
14236 /* end confdefs.h.  */
14237 $ac_includes_default
14238 int
14239 main ()
14240 {
14241 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
14242 test_array [0] = 0
14243
14244   ;
14245   return 0;
14246 }
14247 _ACEOF
14248 rm -f conftest.$ac_objext
14249 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14250   (eval $ac_compile) 2>conftest.er1
14251   ac_status=$?
14252   grep -v '^ *+' conftest.er1 >conftest.err
14253   rm -f conftest.er1
14254   cat conftest.err >&5
14255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14256   (exit $ac_status); } &&
14257          { ac_try='test -z "$ac_cxx_werror_flag"
14258                          || test ! -s conftest.err'
14259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14260   (eval $ac_try) 2>&5
14261   ac_status=$?
14262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263   (exit $ac_status); }; } &&
14264          { ac_try='test -s conftest.$ac_objext'
14265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266   (eval $ac_try) 2>&5
14267   ac_status=$?
14268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269   (exit $ac_status); }; }; then
14270   ac_lo=0 ac_mid=0
14271   while :; do
14272     cat >conftest.$ac_ext <<_ACEOF
14273 /* confdefs.h.  */
14274 _ACEOF
14275 cat confdefs.h >>conftest.$ac_ext
14276 cat >>conftest.$ac_ext <<_ACEOF
14277 /* end confdefs.h.  */
14278 $ac_includes_default
14279 int
14280 main ()
14281 {
14282 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
14283 test_array [0] = 0
14284
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 rm -f conftest.$ac_objext
14290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14291   (eval $ac_compile) 2>conftest.er1
14292   ac_status=$?
14293   grep -v '^ *+' conftest.er1 >conftest.err
14294   rm -f conftest.er1
14295   cat conftest.err >&5
14296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297   (exit $ac_status); } &&
14298          { ac_try='test -z "$ac_cxx_werror_flag"
14299                          || test ! -s conftest.err'
14300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14301   (eval $ac_try) 2>&5
14302   ac_status=$?
14303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14304   (exit $ac_status); }; } &&
14305          { ac_try='test -s conftest.$ac_objext'
14306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14307   (eval $ac_try) 2>&5
14308   ac_status=$?
14309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310   (exit $ac_status); }; }; then
14311   ac_hi=$ac_mid; break
14312 else
14313   echo "$as_me: failed program was:" >&5
14314 sed 's/^/| /' conftest.$ac_ext >&5
14315
14316 ac_lo=`expr $ac_mid + 1`
14317                     if test $ac_lo -le $ac_mid; then
14318                       ac_lo= ac_hi=
14319                       break
14320                     fi
14321                     ac_mid=`expr 2 '*' $ac_mid + 1`
14322 fi
14323 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14324   done
14325 else
14326   echo "$as_me: failed program was:" >&5
14327 sed 's/^/| /' conftest.$ac_ext >&5
14328
14329 cat >conftest.$ac_ext <<_ACEOF
14330 /* confdefs.h.  */
14331 _ACEOF
14332 cat confdefs.h >>conftest.$ac_ext
14333 cat >>conftest.$ac_ext <<_ACEOF
14334 /* end confdefs.h.  */
14335 $ac_includes_default
14336 int
14337 main ()
14338 {
14339 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
14340 test_array [0] = 0
14341
14342   ;
14343   return 0;
14344 }
14345 _ACEOF
14346 rm -f conftest.$ac_objext
14347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14348   (eval $ac_compile) 2>conftest.er1
14349   ac_status=$?
14350   grep -v '^ *+' conftest.er1 >conftest.err
14351   rm -f conftest.er1
14352   cat conftest.err >&5
14353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14354   (exit $ac_status); } &&
14355          { ac_try='test -z "$ac_cxx_werror_flag"
14356                          || test ! -s conftest.err'
14357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361   (exit $ac_status); }; } &&
14362          { ac_try='test -s conftest.$ac_objext'
14363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14364   (eval $ac_try) 2>&5
14365   ac_status=$?
14366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367   (exit $ac_status); }; }; then
14368   ac_hi=-1 ac_mid=-1
14369   while :; do
14370     cat >conftest.$ac_ext <<_ACEOF
14371 /* confdefs.h.  */
14372 _ACEOF
14373 cat confdefs.h >>conftest.$ac_ext
14374 cat >>conftest.$ac_ext <<_ACEOF
14375 /* end confdefs.h.  */
14376 $ac_includes_default
14377 int
14378 main ()
14379 {
14380 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
14381 test_array [0] = 0
14382
14383   ;
14384   return 0;
14385 }
14386 _ACEOF
14387 rm -f conftest.$ac_objext
14388 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14389   (eval $ac_compile) 2>conftest.er1
14390   ac_status=$?
14391   grep -v '^ *+' conftest.er1 >conftest.err
14392   rm -f conftest.er1
14393   cat conftest.err >&5
14394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395   (exit $ac_status); } &&
14396          { ac_try='test -z "$ac_cxx_werror_flag"
14397                          || test ! -s conftest.err'
14398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14399   (eval $ac_try) 2>&5
14400   ac_status=$?
14401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14402   (exit $ac_status); }; } &&
14403          { ac_try='test -s conftest.$ac_objext'
14404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14405   (eval $ac_try) 2>&5
14406   ac_status=$?
14407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14408   (exit $ac_status); }; }; then
14409   ac_lo=$ac_mid; break
14410 else
14411   echo "$as_me: failed program was:" >&5
14412 sed 's/^/| /' conftest.$ac_ext >&5
14413
14414 ac_hi=`expr '(' $ac_mid ')' - 1`
14415                        if test $ac_mid -le $ac_hi; then
14416                          ac_lo= ac_hi=
14417                          break
14418                        fi
14419                        ac_mid=`expr 2 '*' $ac_mid`
14420 fi
14421 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14422   done
14423 else
14424   echo "$as_me: failed program was:" >&5
14425 sed 's/^/| /' conftest.$ac_ext >&5
14426
14427 ac_lo= ac_hi=
14428 fi
14429 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14430 fi
14431 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14432 # Binary search between lo and hi bounds.
14433 while test "x$ac_lo" != "x$ac_hi"; do
14434   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14435   cat >conftest.$ac_ext <<_ACEOF
14436 /* confdefs.h.  */
14437 _ACEOF
14438 cat confdefs.h >>conftest.$ac_ext
14439 cat >>conftest.$ac_ext <<_ACEOF
14440 /* end confdefs.h.  */
14441 $ac_includes_default
14442 int
14443 main ()
14444 {
14445 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
14446 test_array [0] = 0
14447
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 rm -f conftest.$ac_objext
14453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14454   (eval $ac_compile) 2>conftest.er1
14455   ac_status=$?
14456   grep -v '^ *+' conftest.er1 >conftest.err
14457   rm -f conftest.er1
14458   cat conftest.err >&5
14459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14460   (exit $ac_status); } &&
14461          { ac_try='test -z "$ac_cxx_werror_flag"
14462                          || test ! -s conftest.err'
14463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14464   (eval $ac_try) 2>&5
14465   ac_status=$?
14466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14467   (exit $ac_status); }; } &&
14468          { ac_try='test -s conftest.$ac_objext'
14469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14470   (eval $ac_try) 2>&5
14471   ac_status=$?
14472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14473   (exit $ac_status); }; }; then
14474   ac_hi=$ac_mid
14475 else
14476   echo "$as_me: failed program was:" >&5
14477 sed 's/^/| /' conftest.$ac_ext >&5
14478
14479 ac_lo=`expr '(' $ac_mid ')' + 1`
14480 fi
14481 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14482 done
14483 case $ac_lo in
14484 ?*) ac_cv_sizeof_long_long=$ac_lo;;
14485 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
14486 See \`config.log' for more details." >&5
14487 echo "$as_me: error: cannot compute sizeof (long long), 77
14488 See \`config.log' for more details." >&2;}
14489    { (exit 1); exit 1; }; } ;;
14490 esac
14491 else
14492   if test "$cross_compiling" = yes; then
14493   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
14494 See \`config.log' for more details." >&5
14495 echo "$as_me: error: cannot run test program while cross compiling
14496 See \`config.log' for more details." >&2;}
14497    { (exit 1); exit 1; }; }
14498 else
14499   cat >conftest.$ac_ext <<_ACEOF
14500 /* confdefs.h.  */
14501 _ACEOF
14502 cat confdefs.h >>conftest.$ac_ext
14503 cat >>conftest.$ac_ext <<_ACEOF
14504 /* end confdefs.h.  */
14505 $ac_includes_default
14506 long longval () { return (long) (sizeof (long long)); }
14507 unsigned long ulongval () { return (long) (sizeof (long long)); }
14508 #include <stdio.h>
14509 #include <stdlib.h>
14510 int
14511 main ()
14512 {
14513
14514   FILE *f = fopen ("conftest.val", "w");
14515   if (! f)
14516     exit (1);
14517   if (((long) (sizeof (long long))) < 0)
14518     {
14519       long i = longval ();
14520       if (i != ((long) (sizeof (long long))))
14521         exit (1);
14522       fprintf (f, "%ld\n", i);
14523     }
14524   else
14525     {
14526       unsigned long i = ulongval ();
14527       if (i != ((long) (sizeof (long long))))
14528         exit (1);
14529       fprintf (f, "%lu\n", i);
14530     }
14531   exit (ferror (f) || fclose (f) != 0);
14532
14533   ;
14534   return 0;
14535 }
14536 _ACEOF
14537 rm -f conftest$ac_exeext
14538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14539   (eval $ac_link) 2>&5
14540   ac_status=$?
14541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14544   (eval $ac_try) 2>&5
14545   ac_status=$?
14546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14547   (exit $ac_status); }; }; then
14548   ac_cv_sizeof_long_long=`cat conftest.val`
14549 else
14550   echo "$as_me: program exited with status $ac_status" >&5
14551 echo "$as_me: failed program was:" >&5
14552 sed 's/^/| /' conftest.$ac_ext >&5
14553
14554 ( exit $ac_status )
14555 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
14556 See \`config.log' for more details." >&5
14557 echo "$as_me: error: cannot compute sizeof (long long), 77
14558 See \`config.log' for more details." >&2;}
14559    { (exit 1); exit 1; }; }
14560 fi
14561 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14562 fi
14563 fi
14564 rm -f conftest.val
14565 else
14566   ac_cv_sizeof_long_long=0
14567 fi
14568 fi
14569 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
14570 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
14571 cat >>confdefs.h <<_ACEOF
14572 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
14573 _ACEOF
14574
14575
14576 else
14577     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
14578         ac_cv_sizeof_char=1
14579         ac_cv_sizeof_short=2
14580         ac_cv_sizeof_int=4
14581         ac_cv_sizeof_long=4
14582         ac_cv_sizeof_long_long=4
14583     else
14584         : # FIXME
14585     fi
14586 #echo
14587 fi
14588
14589 type_name()
14590 {
14591     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
14592         echo "char"
14593         exit
14594     fi
14595     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
14596         echo "short"
14597         exit
14598     fi
14599     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
14600         echo "int"
14601         exit
14602     fi
14603     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
14604         echo "long"
14605         exit
14606     fi
14607     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
14608         echo "long long"
14609         exit
14610     fi
14611     echo "long long"
14612 }
14613
14614 echo "$as_me:$LINENO: checking type name for byte" >&5
14615 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
14616 TYPE_BYTE=`type_name 1`
14617 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
14618 echo "${ECHO_T}$TYPE_BYTE" >&6
14619 echo "$as_me:$LINENO: checking type name for word" >&5
14620 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
14621 TYPE_WORD=`type_name 2`
14622 echo "$as_me:$LINENO: result: $TYPE_WORD" >&5
14623 echo "${ECHO_T}$TYPE_WORD" >&6
14624 echo "$as_me:$LINENO: checking type name for dword" >&5
14625 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
14626 TYPE_DWORD=`type_name 4`
14627 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
14628 echo "${ECHO_T}$TYPE_DWORD" >&6
14629 cat >>confdefs.h <<_ACEOF
14630 #define TYPE_BYTE $TYPE_BYTE
14631 _ACEOF
14632
14633 cat >>confdefs.h <<_ACEOF
14634 #define TYPE_WORD $TYPE_WORD
14635 _ACEOF
14636
14637 cat >>confdefs.h <<_ACEOF
14638 #define TYPE_DWORD $TYPE_DWORD
14639 _ACEOF
14640
14641
14642 if echo $TYPE_DWORD|grep short >/dev/null; then
14643     A="h"
14644 elif echo $TYPE_DWORD|grep long >/dev/null; then
14645     A="l"
14646 else
14647     A=""
14648 fi
14649
14650 if echo $TYPE_WORD|grep short >/dev/null; then M="h"
14651 elif echo $TYPE_WORD|grep long >/dev/null; then M="l"
14652 else M=""
14653 fi
14654
14655 cat >>confdefs.h <<_ACEOF
14656 #define _A_ "${A}"
14657 _ACEOF
14658
14659 cat >>confdefs.h <<_ACEOF
14660 #define _M_ "${M}"
14661 _ACEOF
14662
14663
14664 # Generating output files
14665 # ===========================================================================
14666
14667                                                                                                                                   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"
14668 cat >confcache <<\_ACEOF
14669 # This file is a shell script that caches the results of configure
14670 # tests run on this system so they can be shared between configure
14671 # scripts and configure runs, see configure's option --config-cache.
14672 # It is not useful on other systems.  If it contains results you don't
14673 # want to keep, you may remove or edit it.
14674 #
14675 # config.status only pays attention to the cache file if you give it
14676 # the --recheck option to rerun configure.
14677 #
14678 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14679 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14680 # following values.
14681
14682 _ACEOF
14683
14684 # The following way of writing the cache mishandles newlines in values,
14685 # but we know of no workaround that is simple, portable, and efficient.
14686 # So, don't put newlines in cache variables' values.
14687 # Ultrix sh set writes to stderr and can't be redirected directly,
14688 # and sets the high bit in the cache file unless we assign to the vars.
14689 {
14690   (set) 2>&1 |
14691     case `(ac_space=' '; set | grep ac_space) 2>&1` in
14692     *ac_space=\ *)
14693       # `set' does not quote correctly, so add quotes (double-quote
14694       # substitution turns \\\\ into \\, and sed turns \\ into \).
14695       sed -n \
14696         "s/'/'\\\\''/g;
14697           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14698       ;;
14699     *)
14700       # `set' quotes correctly as required by POSIX, so do not add quotes.
14701       sed -n \
14702         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14703       ;;
14704     esac;
14705 } |
14706   sed '
14707      t clear
14708      : clear
14709      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14710      t end
14711      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14712      : end' >>confcache
14713 if diff $cache_file confcache >/dev/null 2>&1; then :; else
14714   if test -w $cache_file; then
14715     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14716     cat confcache >$cache_file
14717   else
14718     echo "not updating unwritable cache $cache_file"
14719   fi
14720 fi
14721 rm -f confcache
14722
14723 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14724 # Let make expand exec_prefix.
14725 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14726
14727 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14728 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14729 # trailing colons and then remove the whole line if VPATH becomes empty
14730 # (actually we leave an empty line to preserve line numbers).
14731 if test "x$srcdir" = x.; then
14732   ac_vpsub='/^[  ]*VPATH[        ]*=/{
14733 s/:*\$(srcdir):*/:/;
14734 s/:*\${srcdir}:*/:/;
14735 s/:*@srcdir@:*/:/;
14736 s/^\([^=]*=[     ]*\):*/\1/;
14737 s/:*$//;
14738 s/^[^=]*=[       ]*$//;
14739 }'
14740 fi
14741
14742 DEFS=-DHAVE_CONFIG_H
14743
14744 ac_libobjs=
14745 ac_ltlibobjs=
14746 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14747   # 1. Remove the extension, and $U if already installed.
14748   ac_i=`echo "$ac_i" |
14749          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
14750   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14751   #    will be set to the directory where LIBOBJS objects are built.
14752   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14753   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
14754 done
14755 LIBOBJS=$ac_libobjs
14756
14757 LTLIBOBJS=$ac_ltlibobjs
14758
14759
14760
14761 : ${CONFIG_STATUS=./config.status}
14762 ac_clean_files_save=$ac_clean_files
14763 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14764 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
14765 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14766 cat >$CONFIG_STATUS <<_ACEOF
14767 #! $SHELL
14768 # Generated by $as_me.
14769 # Run this file to recreate the current configuration.
14770 # Compiler output produced by configure, useful for debugging
14771 # configure, is in config.log if it exists.
14772
14773 debug=false
14774 ac_cs_recheck=false
14775 ac_cs_silent=false
14776 SHELL=\${CONFIG_SHELL-$SHELL}
14777 _ACEOF
14778
14779 cat >>$CONFIG_STATUS <<\_ACEOF
14780 ## --------------------- ##
14781 ## M4sh Initialization.  ##
14782 ## --------------------- ##
14783
14784 # Be Bourne compatible
14785 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14786   emulate sh
14787   NULLCMD=:
14788   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
14789   # is contrary to our usage.  Disable this feature.
14790   alias -g '${1+"$@"}'='"$@"'
14791 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14792   set -o posix
14793 fi
14794 DUALCASE=1; export DUALCASE # for MKS sh
14795
14796 # Support unset when possible.
14797 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14798   as_unset=unset
14799 else
14800   as_unset=false
14801 fi
14802
14803
14804 # Work around bugs in pre-3.0 UWIN ksh.
14805 $as_unset ENV MAIL MAILPATH
14806 PS1='$ '
14807 PS2='> '
14808 PS4='+ '
14809
14810 # NLS nuisances.
14811 for as_var in \
14812   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
14813   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
14814   LC_TELEPHONE LC_TIME
14815 do
14816   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
14817     eval $as_var=C; export $as_var
14818   else
14819     $as_unset $as_var
14820   fi
14821 done
14822
14823 # Required to use basename.
14824 if expr a : '\(a\)' >/dev/null 2>&1; then
14825   as_expr=expr
14826 else
14827   as_expr=false
14828 fi
14829
14830 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
14831   as_basename=basename
14832 else
14833   as_basename=false
14834 fi
14835
14836
14837 # Name of the executable.
14838 as_me=`$as_basename "$0" ||
14839 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14840          X"$0" : 'X\(//\)$' \| \
14841          X"$0" : 'X\(/\)$' \| \
14842          .     : '\(.\)' 2>/dev/null ||
14843 echo X/"$0" |
14844     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
14845           /^X\/\(\/\/\)$/{ s//\1/; q; }
14846           /^X\/\(\/\).*/{ s//\1/; q; }
14847           s/.*/./; q'`
14848
14849
14850 # PATH needs CR, and LINENO needs CR and PATH.
14851 # Avoid depending upon Character Ranges.
14852 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14853 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14854 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14855 as_cr_digits='0123456789'
14856 as_cr_alnum=$as_cr_Letters$as_cr_digits
14857
14858 # The user is always right.
14859 if test "${PATH_SEPARATOR+set}" != set; then
14860   echo "#! /bin/sh" >conf$$.sh
14861   echo  "exit 0"   >>conf$$.sh
14862   chmod +x conf$$.sh
14863   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
14864     PATH_SEPARATOR=';'
14865   else
14866     PATH_SEPARATOR=:
14867   fi
14868   rm -f conf$$.sh
14869 fi
14870
14871
14872   as_lineno_1=$LINENO
14873   as_lineno_2=$LINENO
14874   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14875   test "x$as_lineno_1" != "x$as_lineno_2" &&
14876   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
14877   # Find who we are.  Look in the path if we contain no path at all
14878   # relative or not.
14879   case $0 in
14880     *[\\/]* ) as_myself=$0 ;;
14881     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14882 for as_dir in $PATH
14883 do
14884   IFS=$as_save_IFS
14885   test -z "$as_dir" && as_dir=.
14886   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14887 done
14888
14889        ;;
14890   esac
14891   # We did not find ourselves, most probably we were run as `sh COMMAND'
14892   # in which case we are not to be found in the path.
14893   if test "x$as_myself" = x; then
14894     as_myself=$0
14895   fi
14896   if test ! -f "$as_myself"; then
14897     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
14898 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
14899    { (exit 1); exit 1; }; }
14900   fi
14901   case $CONFIG_SHELL in
14902   '')
14903     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14904 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
14905 do
14906   IFS=$as_save_IFS
14907   test -z "$as_dir" && as_dir=.
14908   for as_base in sh bash ksh sh5; do
14909          case $as_dir in
14910          /*)
14911            if ("$as_dir/$as_base" -c '
14912   as_lineno_1=$LINENO
14913   as_lineno_2=$LINENO
14914   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14915   test "x$as_lineno_1" != "x$as_lineno_2" &&
14916   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
14917              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
14918              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
14919              CONFIG_SHELL=$as_dir/$as_base
14920              export CONFIG_SHELL
14921              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
14922            fi;;
14923          esac
14924        done
14925 done
14926 ;;
14927   esac
14928
14929   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
14930   # uniformly replaced by the line number.  The first 'sed' inserts a
14931   # line-number line before each line; the second 'sed' does the real
14932   # work.  The second script uses 'N' to pair each line-number line
14933   # with the numbered line, and appends trailing '-' during
14934   # substitution so that $LINENO is not a special case at line end.
14935   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
14936   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
14937   sed '=' <$as_myself |
14938     sed '
14939       N
14940       s,$,-,
14941       : loop
14942       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
14943       t loop
14944       s,-$,,
14945       s,^['$as_cr_digits']*\n,,
14946     ' >$as_me.lineno &&
14947   chmod +x $as_me.lineno ||
14948     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
14949 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
14950    { (exit 1); exit 1; }; }
14951
14952   # Don't try to exec as it changes $[0], causing all sort of problems
14953   # (the dirname of $[0] is not the place where we might find the
14954   # original and so on.  Autoconf is especially sensible to this).
14955   . ./$as_me.lineno
14956   # Exit status is that of the last command.
14957   exit
14958 }
14959
14960
14961 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
14962   *c*,-n*) ECHO_N= ECHO_C='
14963 ' ECHO_T='      ' ;;
14964   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
14965   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
14966 esac
14967
14968 if expr a : '\(a\)' >/dev/null 2>&1; then
14969   as_expr=expr
14970 else
14971   as_expr=false
14972 fi
14973
14974 rm -f conf$$ conf$$.exe conf$$.file
14975 echo >conf$$.file
14976 if ln -s conf$$.file conf$$ 2>/dev/null; then
14977   # We could just check for DJGPP; but this test a) works b) is more generic
14978   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14979   if test -f conf$$.exe; then
14980     # Don't use ln at all; we don't have any links
14981     as_ln_s='cp -p'
14982   else
14983     as_ln_s='ln -s'
14984   fi
14985 elif ln conf$$.file conf$$ 2>/dev/null; then
14986   as_ln_s=ln
14987 else
14988   as_ln_s='cp -p'
14989 fi
14990 rm -f conf$$ conf$$.exe conf$$.file
14991
14992 if mkdir -p . 2>/dev/null; then
14993   as_mkdir_p=:
14994 else
14995   test -d ./-p && rmdir ./-p
14996   as_mkdir_p=false
14997 fi
14998
14999 as_executable_p="test -f"
15000
15001 # Sed expression to map a string onto a valid CPP name.
15002 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15003
15004 # Sed expression to map a string onto a valid variable name.
15005 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15006
15007
15008 # IFS
15009 # We need space, tab and new line, in precisely that order.
15010 as_nl='
15011 '
15012 IFS="   $as_nl"
15013
15014 # CDPATH.
15015 $as_unset CDPATH
15016
15017 exec 6>&1
15018
15019 # Open the log real soon, to keep \$[0] and so on meaningful, and to
15020 # report actual input values of CONFIG_FILES etc. instead of their
15021 # values after options handling.  Logging --version etc. is OK.
15022 exec 5>>config.log
15023 {
15024   echo
15025   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15026 ## Running $as_me. ##
15027 _ASBOX
15028 } >&5
15029 cat >&5 <<_CSEOF
15030
15031 This file was extended by $as_me, which was
15032 generated by GNU Autoconf 2.59.  Invocation command line was
15033
15034   CONFIG_FILES    = $CONFIG_FILES
15035   CONFIG_HEADERS  = $CONFIG_HEADERS
15036   CONFIG_LINKS    = $CONFIG_LINKS
15037   CONFIG_COMMANDS = $CONFIG_COMMANDS
15038   $ $0 $@
15039
15040 _CSEOF
15041 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
15042 echo >&5
15043 _ACEOF
15044
15045 # Files that config.status was made for.
15046 if test -n "$ac_config_files"; then
15047   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15048 fi
15049
15050 if test -n "$ac_config_headers"; then
15051   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15052 fi
15053
15054 if test -n "$ac_config_links"; then
15055   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15056 fi
15057
15058 if test -n "$ac_config_commands"; then
15059   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15060 fi
15061
15062 cat >>$CONFIG_STATUS <<\_ACEOF
15063
15064 ac_cs_usage="\
15065 \`$as_me' instantiates files from templates according to the
15066 current configuration.
15067
15068 Usage: $0 [OPTIONS] [FILE]...
15069
15070   -h, --help       print this help, then exit
15071   -V, --version    print version number, then exit
15072   -q, --quiet      do not print progress messages
15073   -d, --debug      don't remove temporary files
15074       --recheck    update $as_me by reconfiguring in the same conditions
15075   --file=FILE[:TEMPLATE]
15076                    instantiate the configuration file FILE
15077   --header=FILE[:TEMPLATE]
15078                    instantiate the configuration header FILE
15079
15080 Configuration files:
15081 $config_files
15082
15083 Configuration headers:
15084 $config_headers
15085
15086 Report bugs to <bug-autoconf@gnu.org>."
15087 _ACEOF
15088
15089 cat >>$CONFIG_STATUS <<_ACEOF
15090 ac_cs_version="\\
15091 config.status
15092 configured by $0, generated by GNU Autoconf 2.59,
15093   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15094
15095 Copyright (C) 2003 Free Software Foundation, Inc.
15096 This config.status script is free software; the Free Software Foundation
15097 gives unlimited permission to copy, distribute and modify it."
15098 srcdir=$srcdir
15099 INSTALL="$INSTALL"
15100 _ACEOF
15101
15102 cat >>$CONFIG_STATUS <<\_ACEOF
15103 # If no file are specified by the user, then we need to provide default
15104 # value.  By we need to know if files were specified by the user.
15105 ac_need_defaults=:
15106 while test $# != 0
15107 do
15108   case $1 in
15109   --*=*)
15110     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15111     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15112     ac_shift=:
15113     ;;
15114   -*)
15115     ac_option=$1
15116     ac_optarg=$2
15117     ac_shift=shift
15118     ;;
15119   *) # This is not an option, so the user has probably given explicit
15120      # arguments.
15121      ac_option=$1
15122      ac_need_defaults=false;;
15123   esac
15124
15125   case $ac_option in
15126   # Handling of the options.
15127 _ACEOF
15128 cat >>$CONFIG_STATUS <<\_ACEOF
15129   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15130     ac_cs_recheck=: ;;
15131   --version | --vers* | -V )
15132     echo "$ac_cs_version"; exit 0 ;;
15133   --he | --h)
15134     # Conflict between --help and --header
15135     { { echo "$as_me:$LINENO: error: ambiguous option: $1
15136 Try \`$0 --help' for more information." >&5
15137 echo "$as_me: error: ambiguous option: $1
15138 Try \`$0 --help' for more information." >&2;}
15139    { (exit 1); exit 1; }; };;
15140   --help | --hel | -h )
15141     echo "$ac_cs_usage"; exit 0 ;;
15142   --debug | --d* | -d )
15143     debug=: ;;
15144   --file | --fil | --fi | --f )
15145     $ac_shift
15146     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
15147     ac_need_defaults=false;;
15148   --header | --heade | --head | --hea )
15149     $ac_shift
15150     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
15151     ac_need_defaults=false;;
15152   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15153   | -silent | --silent | --silen | --sile | --sil | --si | --s)
15154     ac_cs_silent=: ;;
15155
15156   # This is an error.
15157   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
15158 Try \`$0 --help' for more information." >&5
15159 echo "$as_me: error: unrecognized option: $1
15160 Try \`$0 --help' for more information." >&2;}
15161    { (exit 1); exit 1; }; } ;;
15162
15163   *) ac_config_targets="$ac_config_targets $1" ;;
15164
15165   esac
15166   shift
15167 done
15168
15169 ac_configure_extra_args=
15170
15171 if $ac_cs_silent; then
15172   exec 6>/dev/null
15173   ac_configure_extra_args="$ac_configure_extra_args --silent"
15174 fi
15175
15176 _ACEOF
15177 cat >>$CONFIG_STATUS <<_ACEOF
15178 if \$ac_cs_recheck; then
15179   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
15180   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15181 fi
15182
15183 _ACEOF
15184
15185
15186
15187
15188
15189 cat >>$CONFIG_STATUS <<\_ACEOF
15190 for ac_config_target in $ac_config_targets
15191 do
15192   case "$ac_config_target" in
15193   # Handling of arguments.
15194   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15195   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
15196   "packages.mk" ) CONFIG_FILES="$CONFIG_FILES packages.mk:packages_in.mk" ;;
15197   "sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
15198   "cmd.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd.src/Makefile" ;;
15199   "s51.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES s51.src/Makefile" ;;
15200   "avr.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES avr.src/Makefile" ;;
15201   "z80.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES z80.src/Makefile" ;;
15202   "hc08.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hc08.src/Makefile" ;;
15203   "xa.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES xa.src/Makefile" ;;
15204   "gui.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/Makefile" ;;
15205   "gui.src/serio.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/serio.src/Makefile" ;;
15206   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
15207   "ddconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ddconfig.h:ddconfig_in.h" ;;
15208   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15209 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15210    { (exit 1); exit 1; }; };;
15211   esac
15212 done
15213
15214 # If the user did not use the arguments to specify the items to instantiate,
15215 # then the envvar interface is used.  Set only those that are not.
15216 # We use the long form for the default assignment because of an extremely
15217 # bizarre bug on SunOS 4.1.3.
15218 if $ac_need_defaults; then
15219   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15220   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15221 fi
15222
15223 # Have a temporary directory for convenience.  Make it in the build tree
15224 # simply because there is no reason to put it here, and in addition,
15225 # creating and moving files from /tmp can sometimes cause problems.
15226 # Create a temporary directory, and hook for its removal unless debugging.
15227 $debug ||
15228 {
15229   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15230   trap '{ (exit 1); exit 1; }' 1 2 13 15
15231 }
15232
15233 # Create a (secure) tmp directory for tmp files.
15234
15235 {
15236   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
15237   test -n "$tmp" && test -d "$tmp"
15238 }  ||
15239 {
15240   tmp=./confstat$$-$RANDOM
15241   (umask 077 && mkdir $tmp)
15242 } ||
15243 {
15244    echo "$me: cannot create a temporary directory in ." >&2
15245    { (exit 1); exit 1; }
15246 }
15247
15248 _ACEOF
15249
15250 cat >>$CONFIG_STATUS <<_ACEOF
15251
15252 #
15253 # CONFIG_FILES section.
15254 #
15255
15256 # No need to generate the scripts if there are no CONFIG_FILES.
15257 # This happens for instance when ./config.status config.h
15258 if test -n "\$CONFIG_FILES"; then
15259   # Protect against being on the right side of a sed subst in config.status.
15260   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15261    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15262 s,@SHELL@,$SHELL,;t t
15263 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15264 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15265 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15266 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15267 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15268 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15269 s,@exec_prefix@,$exec_prefix,;t t
15270 s,@prefix@,$prefix,;t t
15271 s,@program_transform_name@,$program_transform_name,;t t
15272 s,@bindir@,$bindir,;t t
15273 s,@sbindir@,$sbindir,;t t
15274 s,@libexecdir@,$libexecdir,;t t
15275 s,@datadir@,$datadir,;t t
15276 s,@sysconfdir@,$sysconfdir,;t t
15277 s,@sharedstatedir@,$sharedstatedir,;t t
15278 s,@localstatedir@,$localstatedir,;t t
15279 s,@libdir@,$libdir,;t t
15280 s,@includedir@,$includedir,;t t
15281 s,@oldincludedir@,$oldincludedir,;t t
15282 s,@infodir@,$infodir,;t t
15283 s,@mandir@,$mandir,;t t
15284 s,@build_alias@,$build_alias,;t t
15285 s,@host_alias@,$host_alias,;t t
15286 s,@target_alias@,$target_alias,;t t
15287 s,@DEFS@,$DEFS,;t t
15288 s,@ECHO_C@,$ECHO_C,;t t
15289 s,@ECHO_N@,$ECHO_N,;t t
15290 s,@ECHO_T@,$ECHO_T,;t t
15291 s,@LIBS@,$LIBS,;t t
15292 s,@AWK@,$AWK,;t t
15293 s,@VERSION@,$VERSION,;t t
15294 s,@VERSIONHI@,$VERSIONHI,;t t
15295 s,@VERSIONLO@,$VERSIONLO,;t t
15296 s,@VERSIONP@,$VERSIONP,;t t
15297 s,@docdir@,$docdir,;t t
15298 s,@enable_ucsim@,$enable_ucsim,;t t
15299 s,@enable_dlso@,$enable_dlso,;t t
15300 s,@enable_51@,$enable_51,;t t
15301 s,@enable_avr@,$enable_avr,;t t
15302 s,@enable_z80@,$enable_z80,;t t
15303 s,@enable_hc08@,$enable_hc08,;t t
15304 s,@enable_xa@,$enable_xa,;t t
15305 s,@enable_serio@,$enable_serio,;t t
15306 s,@CXX@,$CXX,;t t
15307 s,@CXXFLAGS@,$CXXFLAGS,;t t
15308 s,@LDFLAGS@,$LDFLAGS,;t t
15309 s,@CPPFLAGS@,$CPPFLAGS,;t t
15310 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15311 s,@EXEEXT@,$EXEEXT,;t t
15312 s,@OBJEXT@,$OBJEXT,;t t
15313 s,@CXXCPP@,$CXXCPP,;t t
15314 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15315 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15316 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15317 s,@RANLIB@,$RANLIB,;t t
15318 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15319 s,@STRIP@,$STRIP,;t t
15320 s,@build@,$build,;t t
15321 s,@build_cpu@,$build_cpu,;t t
15322 s,@build_vendor@,$build_vendor,;t t
15323 s,@build_os@,$build_os,;t t
15324 s,@host@,$host,;t t
15325 s,@host_cpu@,$host_cpu,;t t
15326 s,@host_vendor@,$host_vendor,;t t
15327 s,@host_os@,$host_os,;t t
15328 s,@CC@,$CC,;t t
15329 s,@CFLAGS@,$CFLAGS,;t t
15330 s,@ac_ct_CC@,$ac_ct_CC,;t t
15331 s,@LN_S@,$LN_S,;t t
15332 s,@ECHO@,$ECHO,;t t
15333 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
15334 s,@CPP@,$CPP,;t t
15335 s,@EGREP@,$EGREP,;t t
15336 s,@LIBTOOL@,$LIBTOOL,;t t
15337 s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
15338 s,@LEX@,$LEX,;t t
15339 s,@LEXLIB@,$LEXLIB,;t t
15340 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
15341 s,@YACC@,$YACC,;t t
15342 s,@BISON_PLUS_PLUS@,$BISON_PLUS_PLUS,;t t
15343 s,@SERIAL_AVAIL@,$SERIAL_AVAIL,;t t
15344 s,@dl_ok@,$dl_ok,;t t
15345 s,@DL@,$DL,;t t
15346 s,@panel_ok@,$panel_ok,;t t
15347 s,@curses_ok@,$curses_ok,;t t
15348 s,@CURSES_LIBS@,$CURSES_LIBS,;t t
15349 s,@M_OR_MM@,$M_OR_MM,;t t
15350 s,@SHAREDLIB@,$SHAREDLIB,;t t
15351 s,@PICOPT@,$PICOPT,;t t
15352 s,@dlso_ok@,$dlso_ok,;t t
15353 s,@LIBOBJS@,$LIBOBJS,;t t
15354 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
15355 CEOF
15356
15357 _ACEOF
15358
15359   cat >>$CONFIG_STATUS <<\_ACEOF
15360   # Split the substitutions into bite-sized pieces for seds with
15361   # small command number limits, like on Digital OSF/1 and HP-UX.
15362   ac_max_sed_lines=48
15363   ac_sed_frag=1 # Number of current file.
15364   ac_beg=1 # First line for current file.
15365   ac_end=$ac_max_sed_lines # Line after last line for current file.
15366   ac_more_lines=:
15367   ac_sed_cmds=
15368   while $ac_more_lines; do
15369     if test $ac_beg -gt 1; then
15370       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15371     else
15372       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15373     fi
15374     if test ! -s $tmp/subs.frag; then
15375       ac_more_lines=false
15376     else
15377       # The purpose of the label and of the branching condition is to
15378       # speed up the sed processing (if there are no `@' at all, there
15379       # is no need to browse any of the substitutions).
15380       # These are the two extra sed commands mentioned above.
15381       (echo ':t
15382   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15383       if test -z "$ac_sed_cmds"; then
15384         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15385       else
15386         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15387       fi
15388       ac_sed_frag=`expr $ac_sed_frag + 1`
15389       ac_beg=$ac_end
15390       ac_end=`expr $ac_end + $ac_max_sed_lines`
15391     fi
15392   done
15393   if test -z "$ac_sed_cmds"; then
15394     ac_sed_cmds=cat
15395   fi
15396 fi # test -n "$CONFIG_FILES"
15397
15398 _ACEOF
15399 cat >>$CONFIG_STATUS <<\_ACEOF
15400 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15401   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15402   case $ac_file in
15403   - | *:- | *:-:* ) # input from stdin
15404         cat >$tmp/stdin
15405         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15406         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15407   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15408         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15409   * )   ac_file_in=$ac_file.in ;;
15410   esac
15411
15412   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15413   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15414 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15415          X"$ac_file" : 'X\(//\)[^/]' \| \
15416          X"$ac_file" : 'X\(//\)$' \| \
15417          X"$ac_file" : 'X\(/\)' \| \
15418          .     : '\(.\)' 2>/dev/null ||
15419 echo X"$ac_file" |
15420     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15421           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15422           /^X\(\/\/\)$/{ s//\1/; q; }
15423           /^X\(\/\).*/{ s//\1/; q; }
15424           s/.*/./; q'`
15425   { if $as_mkdir_p; then
15426     mkdir -p "$ac_dir"
15427   else
15428     as_dir="$ac_dir"
15429     as_dirs=
15430     while test ! -d "$as_dir"; do
15431       as_dirs="$as_dir $as_dirs"
15432       as_dir=`(dirname "$as_dir") 2>/dev/null ||
15433 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15434          X"$as_dir" : 'X\(//\)[^/]' \| \
15435          X"$as_dir" : 'X\(//\)$' \| \
15436          X"$as_dir" : 'X\(/\)' \| \
15437          .     : '\(.\)' 2>/dev/null ||
15438 echo X"$as_dir" |
15439     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15440           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15441           /^X\(\/\/\)$/{ s//\1/; q; }
15442           /^X\(\/\).*/{ s//\1/; q; }
15443           s/.*/./; q'`
15444     done
15445     test ! -n "$as_dirs" || mkdir $as_dirs
15446   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15447 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15448    { (exit 1); exit 1; }; }; }
15449
15450   ac_builddir=.
15451
15452 if test "$ac_dir" != .; then
15453   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
15454   # A "../" for each directory in $ac_dir_suffix.
15455   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
15456 else
15457   ac_dir_suffix= ac_top_builddir=
15458 fi
15459
15460 case $srcdir in
15461   .)  # No --srcdir option.  We are building in place.
15462     ac_srcdir=.
15463     if test -z "$ac_top_builddir"; then
15464        ac_top_srcdir=.
15465     else
15466        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
15467     fi ;;
15468   [\\/]* | ?:[\\/]* )  # Absolute path.
15469     ac_srcdir=$srcdir$ac_dir_suffix;
15470     ac_top_srcdir=$srcdir ;;
15471   *) # Relative path.
15472     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
15473     ac_top_srcdir=$ac_top_builddir$srcdir ;;
15474 esac
15475
15476 # Do not use `cd foo && pwd` to compute absolute paths, because
15477 # the directories may not exist.
15478 case `pwd` in
15479 .) ac_abs_builddir="$ac_dir";;
15480 *)
15481   case "$ac_dir" in
15482   .) ac_abs_builddir=`pwd`;;
15483   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
15484   *) ac_abs_builddir=`pwd`/"$ac_dir";;
15485   esac;;
15486 esac
15487 case $ac_abs_builddir in
15488 .) ac_abs_top_builddir=${ac_top_builddir}.;;
15489 *)
15490   case ${ac_top_builddir}. in
15491   .) ac_abs_top_builddir=$ac_abs_builddir;;
15492   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
15493   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
15494   esac;;
15495 esac
15496 case $ac_abs_builddir in
15497 .) ac_abs_srcdir=$ac_srcdir;;
15498 *)
15499   case $ac_srcdir in
15500   .) ac_abs_srcdir=$ac_abs_builddir;;
15501   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
15502   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
15503   esac;;
15504 esac
15505 case $ac_abs_builddir in
15506 .) ac_abs_top_srcdir=$ac_top_srcdir;;
15507 *)
15508   case $ac_top_srcdir in
15509   .) ac_abs_top_srcdir=$ac_abs_builddir;;
15510   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
15511   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
15512   esac;;
15513 esac
15514
15515
15516   case $INSTALL in
15517   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15518   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
15519   esac
15520
15521   if test x"$ac_file" != x-; then
15522     { echo "$as_me:$LINENO: creating $ac_file" >&5
15523 echo "$as_me: creating $ac_file" >&6;}
15524     rm -f "$ac_file"
15525   fi
15526   # Let's still pretend it is `configure' which instantiates (i.e., don't
15527   # use $as_me), people would be surprised to read:
15528   #    /* config.h.  Generated by config.status.  */
15529   if test x"$ac_file" = x-; then
15530     configure_input=
15531   else
15532     configure_input="$ac_file.  "
15533   fi
15534   configure_input=$configure_input"Generated from `echo $ac_file_in |
15535                                      sed 's,.*/,,'` by configure."
15536
15537   # First look for the input files in the build tree, otherwise in the
15538   # src tree.
15539   ac_file_inputs=`IFS=:
15540     for f in $ac_file_in; do
15541       case $f in
15542       -) echo $tmp/stdin ;;
15543       [\\/$]*)
15544          # Absolute (can't be DOS-style, as IFS=:)
15545          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15546 echo "$as_me: error: cannot find input file: $f" >&2;}
15547    { (exit 1); exit 1; }; }
15548          echo "$f";;
15549       *) # Relative
15550          if test -f "$f"; then
15551            # Build tree
15552            echo "$f"
15553          elif test -f "$srcdir/$f"; then
15554            # Source tree
15555            echo "$srcdir/$f"
15556          else
15557            # /dev/null tree
15558            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15559 echo "$as_me: error: cannot find input file: $f" >&2;}
15560    { (exit 1); exit 1; }; }
15561          fi;;
15562       esac
15563     done` || { (exit 1); exit 1; }
15564 _ACEOF
15565 cat >>$CONFIG_STATUS <<_ACEOF
15566   sed "$ac_vpsub
15567 $extrasub
15568 _ACEOF
15569 cat >>$CONFIG_STATUS <<\_ACEOF
15570 :t
15571 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15572 s,@configure_input@,$configure_input,;t t
15573 s,@srcdir@,$ac_srcdir,;t t
15574 s,@abs_srcdir@,$ac_abs_srcdir,;t t
15575 s,@top_srcdir@,$ac_top_srcdir,;t t
15576 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
15577 s,@builddir@,$ac_builddir,;t t
15578 s,@abs_builddir@,$ac_abs_builddir,;t t
15579 s,@top_builddir@,$ac_top_builddir,;t t
15580 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
15581 s,@INSTALL@,$ac_INSTALL,;t t
15582 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15583   rm -f $tmp/stdin
15584   if test x"$ac_file" != x-; then
15585     mv $tmp/out $ac_file
15586   else
15587     cat $tmp/out
15588     rm -f $tmp/out
15589   fi
15590
15591 done
15592 _ACEOF
15593 cat >>$CONFIG_STATUS <<\_ACEOF
15594
15595 #
15596 # CONFIG_HEADER section.
15597 #
15598
15599 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15600 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15601 #
15602 # ac_d sets the value in "#define NAME VALUE" lines.
15603 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
15604 ac_dB='[         ].*$,\1#\2'
15605 ac_dC=' '
15606 ac_dD=',;t'
15607 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15608 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15609 ac_uB='$,\1#\2define\3'
15610 ac_uC=' '
15611 ac_uD=',;t'
15612
15613 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15614   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15615   case $ac_file in
15616   - | *:- | *:-:* ) # input from stdin
15617         cat >$tmp/stdin
15618         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15619         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15620   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15621         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15622   * )   ac_file_in=$ac_file.in ;;
15623   esac
15624
15625   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
15626 echo "$as_me: creating $ac_file" >&6;}
15627
15628   # First look for the input files in the build tree, otherwise in the
15629   # src tree.
15630   ac_file_inputs=`IFS=:
15631     for f in $ac_file_in; do
15632       case $f in
15633       -) echo $tmp/stdin ;;
15634       [\\/$]*)
15635          # Absolute (can't be DOS-style, as IFS=:)
15636          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15637 echo "$as_me: error: cannot find input file: $f" >&2;}
15638    { (exit 1); exit 1; }; }
15639          # Do quote $f, to prevent DOS paths from being IFS'd.
15640          echo "$f";;
15641       *) # Relative
15642          if test -f "$f"; then
15643            # Build tree
15644            echo "$f"
15645          elif test -f "$srcdir/$f"; then
15646            # Source tree
15647            echo "$srcdir/$f"
15648          else
15649            # /dev/null tree
15650            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
15651 echo "$as_me: error: cannot find input file: $f" >&2;}
15652    { (exit 1); exit 1; }; }
15653          fi;;
15654       esac
15655     done` || { (exit 1); exit 1; }
15656   # Remove the trailing spaces.
15657   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
15658
15659 _ACEOF
15660
15661 # Transform confdefs.h into two sed scripts, `conftest.defines' and
15662 # `conftest.undefs', that substitutes the proper values into
15663 # config.h.in to produce config.h.  The first handles `#define'
15664 # templates, and the second `#undef' templates.
15665 # And first: Protect against being on the right side of a sed subst in
15666 # config.status.  Protect against being in an unquoted here document
15667 # in config.status.
15668 rm -f conftest.defines conftest.undefs
15669 # Using a here document instead of a string reduces the quoting nightmare.
15670 # Putting comments in sed scripts is not portable.
15671 #
15672 # `end' is used to avoid that the second main sed command (meant for
15673 # 0-ary CPP macros) applies to n-ary macro definitions.
15674 # See the Autoconf documentation for `clear'.
15675 cat >confdef2sed.sed <<\_ACEOF
15676 s/[\\&,]/\\&/g
15677 s,[\\$`],\\&,g
15678 t clear
15679 : clear
15680 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
15681 t end
15682 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
15683 : end
15684 _ACEOF
15685 # If some macros were called several times there might be several times
15686 # the same #defines, which is useless.  Nevertheless, we may not want to
15687 # sort them, since we want the *last* AC-DEFINE to be honored.
15688 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
15689 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
15690 rm -f confdef2sed.sed
15691
15692 # This sed command replaces #undef with comments.  This is necessary, for
15693 # example, in the case of _POSIX_SOURCE, which is predefined and required
15694 # on some systems where configure will not decide to define it.
15695 cat >>conftest.undefs <<\_ACEOF
15696 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
15697 _ACEOF
15698
15699 # Break up conftest.defines because some shells have a limit on the size
15700 # of here documents, and old seds have small limits too (100 cmds).
15701 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
15702 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
15703 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
15704 echo '  :' >>$CONFIG_STATUS
15705 rm -f conftest.tail
15706 while grep . conftest.defines >/dev/null
15707 do
15708   # Write a limited-size here document to $tmp/defines.sed.
15709   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
15710   # Speed up: don't consider the non `#define' lines.
15711   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
15712   # Work around the forget-to-reset-the-flag bug.
15713   echo 't clr' >>$CONFIG_STATUS
15714   echo ': clr' >>$CONFIG_STATUS
15715   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
15716   echo 'CEOF
15717   sed -f $tmp/defines.sed $tmp/in >$tmp/out
15718   rm -f $tmp/in
15719   mv $tmp/out $tmp/in
15720 ' >>$CONFIG_STATUS
15721   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
15722   rm -f conftest.defines
15723   mv conftest.tail conftest.defines
15724 done
15725 rm -f conftest.defines
15726 echo '  fi # grep' >>$CONFIG_STATUS
15727 echo >>$CONFIG_STATUS
15728
15729 # Break up conftest.undefs because some shells have a limit on the size
15730 # of here documents, and old seds have small limits too (100 cmds).
15731 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
15732 rm -f conftest.tail
15733 while grep . conftest.undefs >/dev/null
15734 do
15735   # Write a limited-size here document to $tmp/undefs.sed.
15736   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
15737   # Speed up: don't consider the non `#undef'
15738   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
15739   # Work around the forget-to-reset-the-flag bug.
15740   echo 't clr' >>$CONFIG_STATUS
15741   echo ': clr' >>$CONFIG_STATUS
15742   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
15743   echo 'CEOF
15744   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
15745   rm -f $tmp/in
15746   mv $tmp/out $tmp/in
15747 ' >>$CONFIG_STATUS
15748   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
15749   rm -f conftest.undefs
15750   mv conftest.tail conftest.undefs
15751 done
15752 rm -f conftest.undefs
15753
15754 cat >>$CONFIG_STATUS <<\_ACEOF
15755   # Let's still pretend it is `configure' which instantiates (i.e., don't
15756   # use $as_me), people would be surprised to read:
15757   #    /* config.h.  Generated by config.status.  */
15758   if test x"$ac_file" = x-; then
15759     echo "/* Generated by configure.  */" >$tmp/config.h
15760   else
15761     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
15762   fi
15763   cat $tmp/in >>$tmp/config.h
15764   rm -f $tmp/in
15765   if test x"$ac_file" != x-; then
15766     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
15767       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
15768 echo "$as_me: $ac_file is unchanged" >&6;}
15769     else
15770       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15771 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15772          X"$ac_file" : 'X\(//\)[^/]' \| \
15773          X"$ac_file" : 'X\(//\)$' \| \
15774          X"$ac_file" : 'X\(/\)' \| \
15775          .     : '\(.\)' 2>/dev/null ||
15776 echo X"$ac_file" |
15777     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15778           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15779           /^X\(\/\/\)$/{ s//\1/; q; }
15780           /^X\(\/\).*/{ s//\1/; q; }
15781           s/.*/./; q'`
15782       { if $as_mkdir_p; then
15783     mkdir -p "$ac_dir"
15784   else
15785     as_dir="$ac_dir"
15786     as_dirs=
15787     while test ! -d "$as_dir"; do
15788       as_dirs="$as_dir $as_dirs"
15789       as_dir=`(dirname "$as_dir") 2>/dev/null ||
15790 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15791          X"$as_dir" : 'X\(//\)[^/]' \| \
15792          X"$as_dir" : 'X\(//\)$' \| \
15793          X"$as_dir" : 'X\(/\)' \| \
15794          .     : '\(.\)' 2>/dev/null ||
15795 echo X"$as_dir" |
15796     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15797           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15798           /^X\(\/\/\)$/{ s//\1/; q; }
15799           /^X\(\/\).*/{ s//\1/; q; }
15800           s/.*/./; q'`
15801     done
15802     test ! -n "$as_dirs" || mkdir $as_dirs
15803   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15804 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15805    { (exit 1); exit 1; }; }; }
15806
15807       rm -f $ac_file
15808       mv $tmp/config.h $ac_file
15809     fi
15810   else
15811     cat $tmp/config.h
15812     rm -f $tmp/config.h
15813   fi
15814 done
15815 _ACEOF
15816
15817 cat >>$CONFIG_STATUS <<\_ACEOF
15818
15819 { (exit 0); exit 0; }
15820 _ACEOF
15821 chmod +x $CONFIG_STATUS
15822 ac_clean_files=$ac_clean_files_save
15823
15824
15825 # configure is writing to config.log, and then calls config.status.
15826 # config.status does its own redirection, appending to config.log.
15827 # Unfortunately, on DOS this fails, as config.log is still kept open
15828 # by configure, so config.status won't be able to write to it; its
15829 # output is simply discarded.  So we exec the FD to /dev/null,
15830 # effectively closing config.log, so it can be properly (re)opened and
15831 # appended to by config.status.  When coming back to configure, we
15832 # need to make the FD available again.
15833 if test "$no_create" != yes; then
15834   ac_cs_success=:
15835   ac_config_status_args=
15836   test "$silent" = yes &&
15837     ac_config_status_args="$ac_config_status_args --quiet"
15838   exec 5>/dev/null
15839   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15840   exec 5>>config.log
15841   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15842   # would make configure fail if this is the last instruction.
15843   $ac_cs_success || { (exit 1); exit 1; }
15844 fi
15845
15846
15847 #gui.src/portmon.src/Makefile
15848
15849
15850 # End of configure/configure.in