version 0.5.2
[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 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   --enable-z80            compile simulator for Z80
1027   --enable-hc08           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 .version; then
1540   VERSION=`cat .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="no"
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="yes"
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"                         || test ! -s conftest.err'
2027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2028   (eval $ac_try) 2>&5
2029   ac_status=$?
2030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031   (exit $ac_status); }; } &&
2032          { ac_try='test -s conftest.$ac_objext'
2033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2034   (eval $ac_try) 2>&5
2035   ac_status=$?
2036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037   (exit $ac_status); }; }; then
2038   ac_compiler_gnu=yes
2039 else
2040   echo "$as_me: failed program was:" >&5
2041 sed 's/^/| /' conftest.$ac_ext >&5
2042
2043 ac_compiler_gnu=no
2044 fi
2045 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2046 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2047
2048 fi
2049 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
2050 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2051 GXX=`test $ac_compiler_gnu = yes && echo yes`
2052 ac_test_CXXFLAGS=${CXXFLAGS+set}
2053 ac_save_CXXFLAGS=$CXXFLAGS
2054 CXXFLAGS="-g"
2055 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2056 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2057 if test "${ac_cv_prog_cxx_g+set}" = set; then
2058   echo $ECHO_N "(cached) $ECHO_C" >&6
2059 else
2060   cat >conftest.$ac_ext <<_ACEOF
2061 /* confdefs.h.  */
2062 _ACEOF
2063 cat confdefs.h >>conftest.$ac_ext
2064 cat >>conftest.$ac_ext <<_ACEOF
2065 /* end confdefs.h.  */
2066
2067 int
2068 main ()
2069 {
2070
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 rm -f conftest.$ac_objext
2076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2077   (eval $ac_compile) 2>conftest.er1
2078   ac_status=$?
2079   grep -v '^ *+' conftest.er1 >conftest.err
2080   rm -f conftest.er1
2081   cat conftest.err >&5
2082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2083   (exit $ac_status); } &&
2084          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
2085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2086   (eval $ac_try) 2>&5
2087   ac_status=$?
2088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2089   (exit $ac_status); }; } &&
2090          { ac_try='test -s conftest.$ac_objext'
2091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2092   (eval $ac_try) 2>&5
2093   ac_status=$?
2094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2095   (exit $ac_status); }; }; then
2096   ac_cv_prog_cxx_g=yes
2097 else
2098   echo "$as_me: failed program was:" >&5
2099 sed 's/^/| /' conftest.$ac_ext >&5
2100
2101 ac_cv_prog_cxx_g=no
2102 fi
2103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2104 fi
2105 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2106 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2107 if test "$ac_test_CXXFLAGS" = set; then
2108   CXXFLAGS=$ac_save_CXXFLAGS
2109 elif test $ac_cv_prog_cxx_g = yes; then
2110   if test "$GXX" = yes; then
2111     CXXFLAGS="-g -O2"
2112   else
2113     CXXFLAGS="-g"
2114   fi
2115 else
2116   if test "$GXX" = yes; then
2117     CXXFLAGS="-O2"
2118   else
2119     CXXFLAGS=
2120   fi
2121 fi
2122 for ac_declaration in \
2123    '' \
2124    'extern "C" void std::exit (int) throw (); using std::exit;' \
2125    'extern "C" void std::exit (int); using std::exit;' \
2126    'extern "C" void exit (int) throw ();' \
2127    'extern "C" void exit (int);' \
2128    'void exit (int);'
2129 do
2130   cat >conftest.$ac_ext <<_ACEOF
2131 /* confdefs.h.  */
2132 _ACEOF
2133 cat confdefs.h >>conftest.$ac_ext
2134 cat >>conftest.$ac_ext <<_ACEOF
2135 /* end confdefs.h.  */
2136 $ac_declaration
2137 #include <stdlib.h>
2138 int
2139 main ()
2140 {
2141 exit (42);
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 rm -f conftest.$ac_objext
2147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2148   (eval $ac_compile) 2>conftest.er1
2149   ac_status=$?
2150   grep -v '^ *+' conftest.er1 >conftest.err
2151   rm -f conftest.er1
2152   cat conftest.err >&5
2153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154   (exit $ac_status); } &&
2155          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
2156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2160   (exit $ac_status); }; } &&
2161          { ac_try='test -s conftest.$ac_objext'
2162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2163   (eval $ac_try) 2>&5
2164   ac_status=$?
2165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2166   (exit $ac_status); }; }; then
2167   :
2168 else
2169   echo "$as_me: failed program was:" >&5
2170 sed 's/^/| /' conftest.$ac_ext >&5
2171
2172 continue
2173 fi
2174 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2175   cat >conftest.$ac_ext <<_ACEOF
2176 /* confdefs.h.  */
2177 _ACEOF
2178 cat confdefs.h >>conftest.$ac_ext
2179 cat >>conftest.$ac_ext <<_ACEOF
2180 /* end confdefs.h.  */
2181 $ac_declaration
2182 int
2183 main ()
2184 {
2185 exit (42);
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 rm -f conftest.$ac_objext
2191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2192   (eval $ac_compile) 2>conftest.er1
2193   ac_status=$?
2194   grep -v '^ *+' conftest.er1 >conftest.err
2195   rm -f conftest.er1
2196   cat conftest.err >&5
2197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2198   (exit $ac_status); } &&
2199          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
2200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2204   (exit $ac_status); }; } &&
2205          { ac_try='test -s conftest.$ac_objext'
2206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2207   (eval $ac_try) 2>&5
2208   ac_status=$?
2209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2210   (exit $ac_status); }; }; then
2211   break
2212 else
2213   echo "$as_me: failed program was:" >&5
2214 sed 's/^/| /' conftest.$ac_ext >&5
2215
2216 fi
2217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2218 done
2219 rm -f conftest*
2220 if test -n "$ac_declaration"; then
2221   echo '#ifdef __cplusplus' >>confdefs.h
2222   echo $ac_declaration      >>confdefs.h
2223   echo '#endif'             >>confdefs.h
2224 fi
2225
2226 ac_ext=c
2227 ac_cpp='$CPP $CPPFLAGS'
2228 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2229 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2230 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2231
2232 ac_ext=cc
2233 ac_cpp='$CXXCPP $CPPFLAGS'
2234 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2235 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2236 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2237 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
2238 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
2239 if test -z "$CXXCPP"; then
2240   if test "${ac_cv_prog_CXXCPP+set}" = set; then
2241   echo $ECHO_N "(cached) $ECHO_C" >&6
2242 else
2243       # Double quotes because CXXCPP needs to be expanded
2244     for CXXCPP in "$CXX -E" "/lib/cpp"
2245     do
2246       ac_preproc_ok=false
2247 for ac_cxx_preproc_warn_flag in '' yes
2248 do
2249   # Use a header file that comes with gcc, so configuring glibc
2250   # with a fresh cross-compiler works.
2251   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2252   # <limits.h> exists even on freestanding compilers.
2253   # On the NeXT, cc -E runs the code through the compiler's parser,
2254   # not just through cpp. "Syntax error" is here to catch this case.
2255   cat >conftest.$ac_ext <<_ACEOF
2256 /* confdefs.h.  */
2257 _ACEOF
2258 cat confdefs.h >>conftest.$ac_ext
2259 cat >>conftest.$ac_ext <<_ACEOF
2260 /* end confdefs.h.  */
2261 #ifdef __STDC__
2262 # include <limits.h>
2263 #else
2264 # include <assert.h>
2265 #endif
2266                      Syntax error
2267 _ACEOF
2268 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2270   ac_status=$?
2271   grep -v '^ *+' conftest.er1 >conftest.err
2272   rm -f conftest.er1
2273   cat conftest.err >&5
2274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275   (exit $ac_status); } >/dev/null; then
2276   if test -s conftest.err; then
2277     ac_cpp_err=$ac_cxx_preproc_warn_flag
2278     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2279   else
2280     ac_cpp_err=
2281   fi
2282 else
2283   ac_cpp_err=yes
2284 fi
2285 if test -z "$ac_cpp_err"; then
2286   :
2287 else
2288   echo "$as_me: failed program was:" >&5
2289 sed 's/^/| /' conftest.$ac_ext >&5
2290
2291   # Broken: fails on valid input.
2292 continue
2293 fi
2294 rm -f conftest.err conftest.$ac_ext
2295
2296   # OK, works on sane cases.  Now check whether non-existent headers
2297   # can be detected and how.
2298   cat >conftest.$ac_ext <<_ACEOF
2299 /* confdefs.h.  */
2300 _ACEOF
2301 cat confdefs.h >>conftest.$ac_ext
2302 cat >>conftest.$ac_ext <<_ACEOF
2303 /* end confdefs.h.  */
2304 #include <ac_nonexistent.h>
2305 _ACEOF
2306 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2307   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2308   ac_status=$?
2309   grep -v '^ *+' conftest.er1 >conftest.err
2310   rm -f conftest.er1
2311   cat conftest.err >&5
2312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313   (exit $ac_status); } >/dev/null; then
2314   if test -s conftest.err; then
2315     ac_cpp_err=$ac_cxx_preproc_warn_flag
2316     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2317   else
2318     ac_cpp_err=
2319   fi
2320 else
2321   ac_cpp_err=yes
2322 fi
2323 if test -z "$ac_cpp_err"; then
2324   # Broken: success on invalid input.
2325 continue
2326 else
2327   echo "$as_me: failed program was:" >&5
2328 sed 's/^/| /' conftest.$ac_ext >&5
2329
2330   # Passes both tests.
2331 ac_preproc_ok=:
2332 break
2333 fi
2334 rm -f conftest.err conftest.$ac_ext
2335
2336 done
2337 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2338 rm -f conftest.err conftest.$ac_ext
2339 if $ac_preproc_ok; then
2340   break
2341 fi
2342
2343     done
2344     ac_cv_prog_CXXCPP=$CXXCPP
2345
2346 fi
2347   CXXCPP=$ac_cv_prog_CXXCPP
2348 else
2349   ac_cv_prog_CXXCPP=$CXXCPP
2350 fi
2351 echo "$as_me:$LINENO: result: $CXXCPP" >&5
2352 echo "${ECHO_T}$CXXCPP" >&6
2353 ac_preproc_ok=false
2354 for ac_cxx_preproc_warn_flag in '' yes
2355 do
2356   # Use a header file that comes with gcc, so configuring glibc
2357   # with a fresh cross-compiler works.
2358   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2359   # <limits.h> exists even on freestanding compilers.
2360   # On the NeXT, cc -E runs the code through the compiler's parser,
2361   # not just through cpp. "Syntax error" is here to catch this case.
2362   cat >conftest.$ac_ext <<_ACEOF
2363 /* confdefs.h.  */
2364 _ACEOF
2365 cat confdefs.h >>conftest.$ac_ext
2366 cat >>conftest.$ac_ext <<_ACEOF
2367 /* end confdefs.h.  */
2368 #ifdef __STDC__
2369 # include <limits.h>
2370 #else
2371 # include <assert.h>
2372 #endif
2373                      Syntax error
2374 _ACEOF
2375 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2376   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2377   ac_status=$?
2378   grep -v '^ *+' conftest.er1 >conftest.err
2379   rm -f conftest.er1
2380   cat conftest.err >&5
2381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2382   (exit $ac_status); } >/dev/null; then
2383   if test -s conftest.err; then
2384     ac_cpp_err=$ac_cxx_preproc_warn_flag
2385     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2386   else
2387     ac_cpp_err=
2388   fi
2389 else
2390   ac_cpp_err=yes
2391 fi
2392 if test -z "$ac_cpp_err"; then
2393   :
2394 else
2395   echo "$as_me: failed program was:" >&5
2396 sed 's/^/| /' conftest.$ac_ext >&5
2397
2398   # Broken: fails on valid input.
2399 continue
2400 fi
2401 rm -f conftest.err conftest.$ac_ext
2402
2403   # OK, works on sane cases.  Now check whether non-existent headers
2404   # can be detected and how.
2405   cat >conftest.$ac_ext <<_ACEOF
2406 /* confdefs.h.  */
2407 _ACEOF
2408 cat confdefs.h >>conftest.$ac_ext
2409 cat >>conftest.$ac_ext <<_ACEOF
2410 /* end confdefs.h.  */
2411 #include <ac_nonexistent.h>
2412 _ACEOF
2413 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2415   ac_status=$?
2416   grep -v '^ *+' conftest.er1 >conftest.err
2417   rm -f conftest.er1
2418   cat conftest.err >&5
2419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2420   (exit $ac_status); } >/dev/null; then
2421   if test -s conftest.err; then
2422     ac_cpp_err=$ac_cxx_preproc_warn_flag
2423     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
2424   else
2425     ac_cpp_err=
2426   fi
2427 else
2428   ac_cpp_err=yes
2429 fi
2430 if test -z "$ac_cpp_err"; then
2431   # Broken: success on invalid input.
2432 continue
2433 else
2434   echo "$as_me: failed program was:" >&5
2435 sed 's/^/| /' conftest.$ac_ext >&5
2436
2437   # Passes both tests.
2438 ac_preproc_ok=:
2439 break
2440 fi
2441 rm -f conftest.err conftest.$ac_ext
2442
2443 done
2444 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2445 rm -f conftest.err conftest.$ac_ext
2446 if $ac_preproc_ok; then
2447   :
2448 else
2449   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2450 See \`config.log' for more details." >&5
2451 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2452 See \`config.log' for more details." >&2;}
2453    { (exit 1); exit 1; }; }
2454 fi
2455
2456 ac_ext=c
2457 ac_cpp='$CPP $CPPFLAGS'
2458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2461
2462 ac_aux_dir=
2463 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2464   if test -f $ac_dir/install-sh; then
2465     ac_aux_dir=$ac_dir
2466     ac_install_sh="$ac_aux_dir/install-sh -c"
2467     break
2468   elif 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/shtool; then
2473     ac_aux_dir=$ac_dir
2474     ac_install_sh="$ac_aux_dir/shtool install -c"
2475     break
2476   fi
2477 done
2478 if test -z "$ac_aux_dir"; then
2479   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2480 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2481    { (exit 1); exit 1; }; }
2482 fi
2483 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2484 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2485 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2486
2487 # Find a good install program.  We prefer a C program (faster),
2488 # so one script is as good as another.  But avoid the broken or
2489 # incompatible versions:
2490 # SysV /etc/install, /usr/sbin/install
2491 # SunOS /usr/etc/install
2492 # IRIX /sbin/install
2493 # AIX /bin/install
2494 # AmigaOS /C/install, which installs bootblocks on floppy discs
2495 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2496 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2497 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2498 # OS/2's system install, which has a completely different semantic
2499 # ./install, which can be erroneously created by make from ./install.sh.
2500 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2501 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2502 if test -z "$INSTALL"; then
2503 if test "${ac_cv_path_install+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2507 for as_dir in $PATH
2508 do
2509   IFS=$as_save_IFS
2510   test -z "$as_dir" && as_dir=.
2511   # Account for people who put trailing slashes in PATH elements.
2512 case $as_dir/ in
2513   ./ | .// | /cC/* | \
2514   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2515   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2516   /usr/ucb/* ) ;;
2517   *)
2518     # OSF1 and SCO ODT 3.0 have their own names for install.
2519     # Don't use installbsd from OSF since it installs stuff as root
2520     # by default.
2521     for ac_prog in ginstall scoinst install; do
2522       for ac_exec_ext in '' $ac_executable_extensions; do
2523         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2524           if test $ac_prog = install &&
2525             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2526             # AIX install.  It has an incompatible calling convention.
2527             :
2528           elif test $ac_prog = install &&
2529             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2530             # program-specific install script used by HP pwplus--don't use.
2531             :
2532           else
2533             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2534             break 3
2535           fi
2536         fi
2537       done
2538     done
2539     ;;
2540 esac
2541 done
2542
2543
2544 fi
2545   if test "${ac_cv_path_install+set}" = set; then
2546     INSTALL=$ac_cv_path_install
2547   else
2548     # As a last resort, use the slow shell script.  We don't cache a
2549     # path for INSTALL within a source directory, because that will
2550     # break other packages using the cache if that directory is
2551     # removed, or if the path is relative.
2552     INSTALL=$ac_install_sh
2553   fi
2554 fi
2555 echo "$as_me:$LINENO: result: $INSTALL" >&5
2556 echo "${ECHO_T}$INSTALL" >&6
2557
2558 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2559 # It thinks the first close brace ends the variable substitution.
2560 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2561
2562 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2563
2564 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2565
2566 if test -n "$ac_tool_prefix"; then
2567   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2568 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2569 echo "$as_me:$LINENO: checking for $ac_word" >&5
2570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2571 if test "${ac_cv_prog_RANLIB+set}" = set; then
2572   echo $ECHO_N "(cached) $ECHO_C" >&6
2573 else
2574   if test -n "$RANLIB"; then
2575   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2576 else
2577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2578 for as_dir in $PATH
2579 do
2580   IFS=$as_save_IFS
2581   test -z "$as_dir" && as_dir=.
2582   for ac_exec_ext in '' $ac_executable_extensions; do
2583   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2584     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2585     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2586     break 2
2587   fi
2588 done
2589 done
2590
2591 fi
2592 fi
2593 RANLIB=$ac_cv_prog_RANLIB
2594 if test -n "$RANLIB"; then
2595   echo "$as_me:$LINENO: result: $RANLIB" >&5
2596 echo "${ECHO_T}$RANLIB" >&6
2597 else
2598   echo "$as_me:$LINENO: result: no" >&5
2599 echo "${ECHO_T}no" >&6
2600 fi
2601
2602 fi
2603 if test -z "$ac_cv_prog_RANLIB"; then
2604   ac_ct_RANLIB=$RANLIB
2605   # Extract the first word of "ranlib", so it can be a program name with args.
2606 set dummy ranlib; ac_word=$2
2607 echo "$as_me:$LINENO: checking for $ac_word" >&5
2608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2609 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2610   echo $ECHO_N "(cached) $ECHO_C" >&6
2611 else
2612   if test -n "$ac_ct_RANLIB"; then
2613   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2614 else
2615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2616 for as_dir in $PATH
2617 do
2618   IFS=$as_save_IFS
2619   test -z "$as_dir" && as_dir=.
2620   for ac_exec_ext in '' $ac_executable_extensions; do
2621   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2622     ac_cv_prog_ac_ct_RANLIB="ranlib"
2623     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2624     break 2
2625   fi
2626 done
2627 done
2628
2629   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2630 fi
2631 fi
2632 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2633 if test -n "$ac_ct_RANLIB"; then
2634   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2635 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2636 else
2637   echo "$as_me:$LINENO: result: no" >&5
2638 echo "${ECHO_T}no" >&6
2639 fi
2640
2641   RANLIB=$ac_ct_RANLIB
2642 else
2643   RANLIB="$ac_cv_prog_RANLIB"
2644 fi
2645
2646
2647 # Extract the first word of "strip", so it can be a program name with args.
2648 set dummy strip; ac_word=$2
2649 echo "$as_me:$LINENO: checking for $ac_word" >&5
2650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2651 if test "${ac_cv_prog_STRIP+set}" = set; then
2652   echo $ECHO_N "(cached) $ECHO_C" >&6
2653 else
2654   if test -n "$STRIP"; then
2655   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2656 else
2657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2658 for as_dir in $PATH
2659 do
2660   IFS=$as_save_IFS
2661   test -z "$as_dir" && as_dir=.
2662   for ac_exec_ext in '' $ac_executable_extensions; do
2663   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2664     ac_cv_prog_STRIP="strip"
2665     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2666     break 2
2667   fi
2668 done
2669 done
2670
2671   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2672 fi
2673 fi
2674 STRIP=$ac_cv_prog_STRIP
2675 if test -n "$STRIP"; then
2676   echo "$as_me:$LINENO: result: $STRIP" >&5
2677 echo "${ECHO_T}$STRIP" >&6
2678 else
2679   echo "$as_me:$LINENO: result: no" >&5
2680 echo "${ECHO_T}no" >&6
2681 fi
2682
2683
2684
2685 # Check whether --enable-shared or --disable-shared was given.
2686 if test "${enable_shared+set}" = set; then
2687   enableval="$enable_shared"
2688   p=${PACKAGE-default}
2689 case $enableval in
2690 yes) enable_shared=yes ;;
2691 no) enable_shared=no ;;
2692 *)
2693   enable_shared=no
2694   # Look at the argument we got.  We use all the common list separators.
2695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2696   for pkg in $enableval; do
2697     if test "X$pkg" = "X$p"; then
2698       enable_shared=yes
2699     fi
2700   done
2701   IFS="$ac_save_ifs"
2702   ;;
2703 esac
2704 else
2705   enable_shared=yes
2706 fi;
2707 # Check whether --enable-static or --disable-static was given.
2708 if test "${enable_static+set}" = set; then
2709   enableval="$enable_static"
2710   p=${PACKAGE-default}
2711 case $enableval in
2712 yes) enable_static=yes ;;
2713 no) enable_static=no ;;
2714 *)
2715   enable_static=no
2716   # Look at the argument we got.  We use all the common list separators.
2717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2718   for pkg in $enableval; do
2719     if test "X$pkg" = "X$p"; then
2720       enable_static=yes
2721     fi
2722   done
2723   IFS="$ac_save_ifs"
2724   ;;
2725 esac
2726 else
2727   enable_static=yes
2728 fi;
2729 # Check whether --enable-fast-install or --disable-fast-install was given.
2730 if test "${enable_fast_install+set}" = set; then
2731   enableval="$enable_fast_install"
2732   p=${PACKAGE-default}
2733 case $enableval in
2734 yes) enable_fast_install=yes ;;
2735 no) enable_fast_install=no ;;
2736 *)
2737   enable_fast_install=no
2738   # Look at the argument we got.  We use all the common list separators.
2739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2740   for pkg in $enableval; do
2741     if test "X$pkg" = "X$p"; then
2742       enable_fast_install=yes
2743     fi
2744   done
2745   IFS="$ac_save_ifs"
2746   ;;
2747 esac
2748 else
2749   enable_fast_install=yes
2750 fi;
2751 # Make sure we can run config.sub.
2752 $ac_config_sub sun4 >/dev/null 2>&1 ||
2753   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2754 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2755    { (exit 1); exit 1; }; }
2756
2757 echo "$as_me:$LINENO: checking build system type" >&5
2758 echo $ECHO_N "checking build system type... $ECHO_C" >&6
2759 if test "${ac_cv_build+set}" = set; then
2760   echo $ECHO_N "(cached) $ECHO_C" >&6
2761 else
2762   ac_cv_build_alias=$build_alias
2763 test -z "$ac_cv_build_alias" &&
2764   ac_cv_build_alias=`$ac_config_guess`
2765 test -z "$ac_cv_build_alias" &&
2766   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2767 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2768    { (exit 1); exit 1; }; }
2769 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2770   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2771 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2772    { (exit 1); exit 1; }; }
2773
2774 fi
2775 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2776 echo "${ECHO_T}$ac_cv_build" >&6
2777 build=$ac_cv_build
2778 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2779 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2780 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2781
2782
2783 echo "$as_me:$LINENO: checking host system type" >&5
2784 echo $ECHO_N "checking host system type... $ECHO_C" >&6
2785 if test "${ac_cv_host+set}" = set; then
2786   echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788   ac_cv_host_alias=$host_alias
2789 test -z "$ac_cv_host_alias" &&
2790   ac_cv_host_alias=$ac_cv_build_alias
2791 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2792   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2793 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2794    { (exit 1); exit 1; }; }
2795
2796 fi
2797 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2798 echo "${ECHO_T}$ac_cv_host" >&6
2799 host=$ac_cv_host
2800 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2801 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2802 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2803
2804
2805 ac_ext=c
2806 ac_cpp='$CPP $CPPFLAGS'
2807 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2808 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2809 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2810 if test -n "$ac_tool_prefix"; then
2811   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2812 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2813 echo "$as_me:$LINENO: checking for $ac_word" >&5
2814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2815 if test "${ac_cv_prog_CC+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818   if test -n "$CC"; then
2819   ac_cv_prog_CC="$CC" # Let the user override the test.
2820 else
2821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822 for as_dir in $PATH
2823 do
2824   IFS=$as_save_IFS
2825   test -z "$as_dir" && as_dir=.
2826   for ac_exec_ext in '' $ac_executable_extensions; do
2827   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2828     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2829     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2830     break 2
2831   fi
2832 done
2833 done
2834
2835 fi
2836 fi
2837 CC=$ac_cv_prog_CC
2838 if test -n "$CC"; then
2839   echo "$as_me:$LINENO: result: $CC" >&5
2840 echo "${ECHO_T}$CC" >&6
2841 else
2842   echo "$as_me:$LINENO: result: no" >&5
2843 echo "${ECHO_T}no" >&6
2844 fi
2845
2846 fi
2847 if test -z "$ac_cv_prog_CC"; then
2848   ac_ct_CC=$CC
2849   # Extract the first word of "gcc", so it can be a program name with args.
2850 set dummy gcc; ac_word=$2
2851 echo "$as_me:$LINENO: checking for $ac_word" >&5
2852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2853 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2854   echo $ECHO_N "(cached) $ECHO_C" >&6
2855 else
2856   if test -n "$ac_ct_CC"; then
2857   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2858 else
2859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2860 for as_dir in $PATH
2861 do
2862   IFS=$as_save_IFS
2863   test -z "$as_dir" && as_dir=.
2864   for ac_exec_ext in '' $ac_executable_extensions; do
2865   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2866     ac_cv_prog_ac_ct_CC="gcc"
2867     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2868     break 2
2869   fi
2870 done
2871 done
2872
2873 fi
2874 fi
2875 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2876 if test -n "$ac_ct_CC"; then
2877   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2878 echo "${ECHO_T}$ac_ct_CC" >&6
2879 else
2880   echo "$as_me:$LINENO: result: no" >&5
2881 echo "${ECHO_T}no" >&6
2882 fi
2883
2884   CC=$ac_ct_CC
2885 else
2886   CC="$ac_cv_prog_CC"
2887 fi
2888
2889 if test -z "$CC"; then
2890   if test -n "$ac_tool_prefix"; then
2891   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2892 set dummy ${ac_tool_prefix}cc; ac_word=$2
2893 echo "$as_me:$LINENO: checking for $ac_word" >&5
2894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2895 if test "${ac_cv_prog_CC+set}" = set; then
2896   echo $ECHO_N "(cached) $ECHO_C" >&6
2897 else
2898   if test -n "$CC"; then
2899   ac_cv_prog_CC="$CC" # Let the user override the test.
2900 else
2901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902 for as_dir in $PATH
2903 do
2904   IFS=$as_save_IFS
2905   test -z "$as_dir" && as_dir=.
2906   for ac_exec_ext in '' $ac_executable_extensions; do
2907   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2908     ac_cv_prog_CC="${ac_tool_prefix}cc"
2909     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2910     break 2
2911   fi
2912 done
2913 done
2914
2915 fi
2916 fi
2917 CC=$ac_cv_prog_CC
2918 if test -n "$CC"; then
2919   echo "$as_me:$LINENO: result: $CC" >&5
2920 echo "${ECHO_T}$CC" >&6
2921 else
2922   echo "$as_me:$LINENO: result: no" >&5
2923 echo "${ECHO_T}no" >&6
2924 fi
2925
2926 fi
2927 if test -z "$ac_cv_prog_CC"; then
2928   ac_ct_CC=$CC
2929   # Extract the first word of "cc", so it can be a program name with args.
2930 set dummy cc; ac_word=$2
2931 echo "$as_me:$LINENO: checking for $ac_word" >&5
2932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2933 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2934   echo $ECHO_N "(cached) $ECHO_C" >&6
2935 else
2936   if test -n "$ac_ct_CC"; then
2937   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2938 else
2939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2940 for as_dir in $PATH
2941 do
2942   IFS=$as_save_IFS
2943   test -z "$as_dir" && as_dir=.
2944   for ac_exec_ext in '' $ac_executable_extensions; do
2945   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2946     ac_cv_prog_ac_ct_CC="cc"
2947     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2948     break 2
2949   fi
2950 done
2951 done
2952
2953 fi
2954 fi
2955 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2956 if test -n "$ac_ct_CC"; then
2957   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2958 echo "${ECHO_T}$ac_ct_CC" >&6
2959 else
2960   echo "$as_me:$LINENO: result: no" >&5
2961 echo "${ECHO_T}no" >&6
2962 fi
2963
2964   CC=$ac_ct_CC
2965 else
2966   CC="$ac_cv_prog_CC"
2967 fi
2968
2969 fi
2970 if test -z "$CC"; then
2971   # Extract the first word of "cc", so it can be a program name with args.
2972 set dummy cc; ac_word=$2
2973 echo "$as_me:$LINENO: checking for $ac_word" >&5
2974 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2975 if test "${ac_cv_prog_CC+set}" = set; then
2976   echo $ECHO_N "(cached) $ECHO_C" >&6
2977 else
2978   if test -n "$CC"; then
2979   ac_cv_prog_CC="$CC" # Let the user override the test.
2980 else
2981   ac_prog_rejected=no
2982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2983 for as_dir in $PATH
2984 do
2985   IFS=$as_save_IFS
2986   test -z "$as_dir" && as_dir=.
2987   for ac_exec_ext in '' $ac_executable_extensions; do
2988   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2989     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2990        ac_prog_rejected=yes
2991        continue
2992      fi
2993     ac_cv_prog_CC="cc"
2994     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2995     break 2
2996   fi
2997 done
2998 done
2999
3000 if test $ac_prog_rejected = yes; then
3001   # We found a bogon in the path, so make sure we never use it.
3002   set dummy $ac_cv_prog_CC
3003   shift
3004   if test $# != 0; then
3005     # We chose a different compiler from the bogus one.
3006     # However, it has the same basename, so the bogon will be chosen
3007     # first if we set CC to just the basename; use the full file name.
3008     shift
3009     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3010   fi
3011 fi
3012 fi
3013 fi
3014 CC=$ac_cv_prog_CC
3015 if test -n "$CC"; then
3016   echo "$as_me:$LINENO: result: $CC" >&5
3017 echo "${ECHO_T}$CC" >&6
3018 else
3019   echo "$as_me:$LINENO: result: no" >&5
3020 echo "${ECHO_T}no" >&6
3021 fi
3022
3023 fi
3024 if test -z "$CC"; then
3025   if test -n "$ac_tool_prefix"; then
3026   for ac_prog in cl
3027   do
3028     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3029 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3030 echo "$as_me:$LINENO: checking for $ac_word" >&5
3031 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3032 if test "${ac_cv_prog_CC+set}" = set; then
3033   echo $ECHO_N "(cached) $ECHO_C" >&6
3034 else
3035   if test -n "$CC"; then
3036   ac_cv_prog_CC="$CC" # Let the user override the test.
3037 else
3038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039 for as_dir in $PATH
3040 do
3041   IFS=$as_save_IFS
3042   test -z "$as_dir" && as_dir=.
3043   for ac_exec_ext in '' $ac_executable_extensions; do
3044   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3045     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3046     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3047     break 2
3048   fi
3049 done
3050 done
3051
3052 fi
3053 fi
3054 CC=$ac_cv_prog_CC
3055 if test -n "$CC"; then
3056   echo "$as_me:$LINENO: result: $CC" >&5
3057 echo "${ECHO_T}$CC" >&6
3058 else
3059   echo "$as_me:$LINENO: result: no" >&5
3060 echo "${ECHO_T}no" >&6
3061 fi
3062
3063     test -n "$CC" && break
3064   done
3065 fi
3066 if test -z "$CC"; then
3067   ac_ct_CC=$CC
3068   for ac_prog in cl
3069 do
3070   # Extract the first word of "$ac_prog", so it can be a program name with args.
3071 set dummy $ac_prog; ac_word=$2
3072 echo "$as_me:$LINENO: checking for $ac_word" >&5
3073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3074 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3075   echo $ECHO_N "(cached) $ECHO_C" >&6
3076 else
3077   if test -n "$ac_ct_CC"; then
3078   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3079 else
3080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3081 for as_dir in $PATH
3082 do
3083   IFS=$as_save_IFS
3084   test -z "$as_dir" && as_dir=.
3085   for ac_exec_ext in '' $ac_executable_extensions; do
3086   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3087     ac_cv_prog_ac_ct_CC="$ac_prog"
3088     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3089     break 2
3090   fi
3091 done
3092 done
3093
3094 fi
3095 fi
3096 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3097 if test -n "$ac_ct_CC"; then
3098   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3099 echo "${ECHO_T}$ac_ct_CC" >&6
3100 else
3101   echo "$as_me:$LINENO: result: no" >&5
3102 echo "${ECHO_T}no" >&6
3103 fi
3104
3105   test -n "$ac_ct_CC" && break
3106 done
3107
3108   CC=$ac_ct_CC
3109 fi
3110
3111 fi
3112
3113
3114 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3115 See \`config.log' for more details." >&5
3116 echo "$as_me: error: no acceptable C compiler found in \$PATH
3117 See \`config.log' for more details." >&2;}
3118    { (exit 1); exit 1; }; }
3119
3120 # Provide some information about the compiler.
3121 echo "$as_me:$LINENO:" \
3122      "checking for C compiler version" >&5
3123 ac_compiler=`set X $ac_compile; echo $2`
3124 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3125   (eval $ac_compiler --version </dev/null >&5) 2>&5
3126   ac_status=$?
3127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3128   (exit $ac_status); }
3129 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3130   (eval $ac_compiler -v </dev/null >&5) 2>&5
3131   ac_status=$?
3132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3133   (exit $ac_status); }
3134 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3135   (eval $ac_compiler -V </dev/null >&5) 2>&5
3136   ac_status=$?
3137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3138   (exit $ac_status); }
3139
3140 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3141 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3142 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3143   echo $ECHO_N "(cached) $ECHO_C" >&6
3144 else
3145   cat >conftest.$ac_ext <<_ACEOF
3146 /* confdefs.h.  */
3147 _ACEOF
3148 cat confdefs.h >>conftest.$ac_ext
3149 cat >>conftest.$ac_ext <<_ACEOF
3150 /* end confdefs.h.  */
3151
3152 int
3153 main ()
3154 {
3155 #ifndef __GNUC__
3156        choke me
3157 #endif
3158
3159   ;
3160   return 0;
3161 }
3162 _ACEOF
3163 rm -f conftest.$ac_objext
3164 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3165   (eval $ac_compile) 2>conftest.er1
3166   ac_status=$?
3167   grep -v '^ *+' conftest.er1 >conftest.err
3168   rm -f conftest.er1
3169   cat conftest.err >&5
3170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3171   (exit $ac_status); } &&
3172          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3174   (eval $ac_try) 2>&5
3175   ac_status=$?
3176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3177   (exit $ac_status); }; } &&
3178          { ac_try='test -s conftest.$ac_objext'
3179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3180   (eval $ac_try) 2>&5
3181   ac_status=$?
3182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3183   (exit $ac_status); }; }; then
3184   ac_compiler_gnu=yes
3185 else
3186   echo "$as_me: failed program was:" >&5
3187 sed 's/^/| /' conftest.$ac_ext >&5
3188
3189 ac_compiler_gnu=no
3190 fi
3191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3192 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3193
3194 fi
3195 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3196 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3197 GCC=`test $ac_compiler_gnu = yes && echo yes`
3198 ac_test_CFLAGS=${CFLAGS+set}
3199 ac_save_CFLAGS=$CFLAGS
3200 CFLAGS="-g"
3201 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3202 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3203 if test "${ac_cv_prog_cc_g+set}" = set; then
3204   echo $ECHO_N "(cached) $ECHO_C" >&6
3205 else
3206   cat >conftest.$ac_ext <<_ACEOF
3207 /* confdefs.h.  */
3208 _ACEOF
3209 cat confdefs.h >>conftest.$ac_ext
3210 cat >>conftest.$ac_ext <<_ACEOF
3211 /* end confdefs.h.  */
3212
3213 int
3214 main ()
3215 {
3216
3217   ;
3218   return 0;
3219 }
3220 _ACEOF
3221 rm -f conftest.$ac_objext
3222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3223   (eval $ac_compile) 2>conftest.er1
3224   ac_status=$?
3225   grep -v '^ *+' conftest.er1 >conftest.err
3226   rm -f conftest.er1
3227   cat conftest.err >&5
3228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3229   (exit $ac_status); } &&
3230          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3232   (eval $ac_try) 2>&5
3233   ac_status=$?
3234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3235   (exit $ac_status); }; } &&
3236          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
3242   ac_cv_prog_cc_g=yes
3243 else
3244   echo "$as_me: failed program was:" >&5
3245 sed 's/^/| /' conftest.$ac_ext >&5
3246
3247 ac_cv_prog_cc_g=no
3248 fi
3249 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3250 fi
3251 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3252 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
3253 if test "$ac_test_CFLAGS" = set; then
3254   CFLAGS=$ac_save_CFLAGS
3255 elif test $ac_cv_prog_cc_g = yes; then
3256   if test "$GCC" = yes; then
3257     CFLAGS="-g -O2"
3258   else
3259     CFLAGS="-g"
3260   fi
3261 else
3262   if test "$GCC" = yes; then
3263     CFLAGS="-O2"
3264   else
3265     CFLAGS=
3266   fi
3267 fi
3268 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3269 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3270 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3271   echo $ECHO_N "(cached) $ECHO_C" >&6
3272 else
3273   ac_cv_prog_cc_stdc=no
3274 ac_save_CC=$CC
3275 cat >conftest.$ac_ext <<_ACEOF
3276 /* confdefs.h.  */
3277 _ACEOF
3278 cat confdefs.h >>conftest.$ac_ext
3279 cat >>conftest.$ac_ext <<_ACEOF
3280 /* end confdefs.h.  */
3281 #include <stdarg.h>
3282 #include <stdio.h>
3283 #include <sys/types.h>
3284 #include <sys/stat.h>
3285 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3286 struct buf { int x; };
3287 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3288 static char *e (p, i)
3289      char **p;
3290      int i;
3291 {
3292   return p[i];
3293 }
3294 static char *f (char * (*g) (char **, int), char **p, ...)
3295 {
3296   char *s;
3297   va_list v;
3298   va_start (v,p);
3299   s = g (p, va_arg (v,int));
3300   va_end (v);
3301   return s;
3302 }
3303
3304 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3305    function prototypes and stuff, but not '\xHH' hex character constants.
3306    These don't provoke an error unfortunately, instead are silently treated
3307    as 'x'.  The following induces an error, until -std1 is added to get
3308    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3309    array size at least.  It's necessary to write '\x00'==0 to get something
3310    that's true only with -std1.  */
3311 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3312
3313 int test (int i, double x);
3314 struct s1 {int (*f) (int a);};
3315 struct s2 {int (*f) (double a);};
3316 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3317 int argc;
3318 char **argv;
3319 int
3320 main ()
3321 {
3322 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 # Don't try gcc -ansi; that turns off useful extensions and
3328 # breaks some systems' header files.
3329 # AIX                   -qlanglvl=ansi
3330 # Ultrix and OSF/1      -std1
3331 # HP-UX 10.20 and later -Ae
3332 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3333 # SVR4                  -Xc -D__EXTENSIONS__
3334 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3335 do
3336   CC="$ac_save_CC $ac_arg"
3337   rm -f conftest.$ac_objext
3338 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3339   (eval $ac_compile) 2>conftest.er1
3340   ac_status=$?
3341   grep -v '^ *+' conftest.er1 >conftest.err
3342   rm -f conftest.er1
3343   cat conftest.err >&5
3344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3345   (exit $ac_status); } &&
3346          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3348   (eval $ac_try) 2>&5
3349   ac_status=$?
3350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3351   (exit $ac_status); }; } &&
3352          { ac_try='test -s conftest.$ac_objext'
3353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3354   (eval $ac_try) 2>&5
3355   ac_status=$?
3356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3357   (exit $ac_status); }; }; then
3358   ac_cv_prog_cc_stdc=$ac_arg
3359 break
3360 else
3361   echo "$as_me: failed program was:" >&5
3362 sed 's/^/| /' conftest.$ac_ext >&5
3363
3364 fi
3365 rm -f conftest.err conftest.$ac_objext
3366 done
3367 rm -f conftest.$ac_ext conftest.$ac_objext
3368 CC=$ac_save_CC
3369
3370 fi
3371
3372 case "x$ac_cv_prog_cc_stdc" in
3373   x|xno)
3374     echo "$as_me:$LINENO: result: none needed" >&5
3375 echo "${ECHO_T}none needed" >&6 ;;
3376   *)
3377     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3378 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3379     CC="$CC $ac_cv_prog_cc_stdc" ;;
3380 esac
3381
3382 # Some people use a C++ compiler to compile C.  Since we use `exit',
3383 # in C++ we need to declare it.  In case someone uses the same compiler
3384 # for both compiling C and C++ we need to have the C++ compiler decide
3385 # the declaration of exit, since it's the most demanding environment.
3386 cat >conftest.$ac_ext <<_ACEOF
3387 #ifndef __cplusplus
3388   choke me
3389 #endif
3390 _ACEOF
3391 rm -f conftest.$ac_objext
3392 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3393   (eval $ac_compile) 2>conftest.er1
3394   ac_status=$?
3395   grep -v '^ *+' conftest.er1 >conftest.err
3396   rm -f conftest.er1
3397   cat conftest.err >&5
3398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3399   (exit $ac_status); } &&
3400          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3402   (eval $ac_try) 2>&5
3403   ac_status=$?
3404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3405   (exit $ac_status); }; } &&
3406          { ac_try='test -s conftest.$ac_objext'
3407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3408   (eval $ac_try) 2>&5
3409   ac_status=$?
3410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3411   (exit $ac_status); }; }; then
3412   for ac_declaration in \
3413    '' \
3414    'extern "C" void std::exit (int) throw (); using std::exit;' \
3415    'extern "C" void std::exit (int); using std::exit;' \
3416    'extern "C" void exit (int) throw ();' \
3417    'extern "C" void exit (int);' \
3418    'void exit (int);'
3419 do
3420   cat >conftest.$ac_ext <<_ACEOF
3421 /* confdefs.h.  */
3422 _ACEOF
3423 cat confdefs.h >>conftest.$ac_ext
3424 cat >>conftest.$ac_ext <<_ACEOF
3425 /* end confdefs.h.  */
3426 $ac_declaration
3427 #include <stdlib.h>
3428 int
3429 main ()
3430 {
3431 exit (42);
3432   ;
3433   return 0;
3434 }
3435 _ACEOF
3436 rm -f conftest.$ac_objext
3437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3438   (eval $ac_compile) 2>conftest.er1
3439   ac_status=$?
3440   grep -v '^ *+' conftest.er1 >conftest.err
3441   rm -f conftest.er1
3442   cat conftest.err >&5
3443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3444   (exit $ac_status); } &&
3445          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3447   (eval $ac_try) 2>&5
3448   ac_status=$?
3449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3450   (exit $ac_status); }; } &&
3451          { ac_try='test -s conftest.$ac_objext'
3452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3453   (eval $ac_try) 2>&5
3454   ac_status=$?
3455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456   (exit $ac_status); }; }; then
3457   :
3458 else
3459   echo "$as_me: failed program was:" >&5
3460 sed 's/^/| /' conftest.$ac_ext >&5
3461
3462 continue
3463 fi
3464 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3465   cat >conftest.$ac_ext <<_ACEOF
3466 /* confdefs.h.  */
3467 _ACEOF
3468 cat confdefs.h >>conftest.$ac_ext
3469 cat >>conftest.$ac_ext <<_ACEOF
3470 /* end confdefs.h.  */
3471 $ac_declaration
3472 int
3473 main ()
3474 {
3475 exit (42);
3476   ;
3477   return 0;
3478 }
3479 _ACEOF
3480 rm -f conftest.$ac_objext
3481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3482   (eval $ac_compile) 2>conftest.er1
3483   ac_status=$?
3484   grep -v '^ *+' conftest.er1 >conftest.err
3485   rm -f conftest.er1
3486   cat conftest.err >&5
3487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3488   (exit $ac_status); } &&
3489          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
3490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3491   (eval $ac_try) 2>&5
3492   ac_status=$?
3493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3494   (exit $ac_status); }; } &&
3495          { ac_try='test -s conftest.$ac_objext'
3496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3497   (eval $ac_try) 2>&5
3498   ac_status=$?
3499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3500   (exit $ac_status); }; }; then
3501   break
3502 else
3503   echo "$as_me: failed program was:" >&5
3504 sed 's/^/| /' conftest.$ac_ext >&5
3505
3506 fi
3507 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3508 done
3509 rm -f conftest*
3510 if test -n "$ac_declaration"; then
3511   echo '#ifdef __cplusplus' >>confdefs.h
3512   echo $ac_declaration      >>confdefs.h
3513   echo '#endif'             >>confdefs.h
3514 fi
3515
3516 else
3517   echo "$as_me: failed program was:" >&5
3518 sed 's/^/| /' conftest.$ac_ext >&5
3519
3520 fi
3521 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3522 ac_ext=c
3523 ac_cpp='$CPP $CPPFLAGS'
3524 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3527
3528 # Find the correct PATH separator.  Usually this is `:', but
3529 # DJGPP uses `;' like DOS.
3530 if test "X${PATH_SEPARATOR+set}" != Xset; then
3531   UNAME=${UNAME-`uname 2>/dev/null`}
3532   case X$UNAME in
3533     *-DOS) lt_cv_sys_path_separator=';' ;;
3534     *)     lt_cv_sys_path_separator=':' ;;
3535   esac
3536   PATH_SEPARATOR=$lt_cv_sys_path_separator
3537 fi
3538
3539
3540 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3541 if test "${with_gnu_ld+set}" = set; then
3542   withval="$with_gnu_ld"
3543   test "$withval" = no || with_gnu_ld=yes
3544 else
3545   with_gnu_ld=no
3546 fi;
3547 ac_prog=ld
3548 if test "$GCC" = yes; then
3549   # Check if gcc -print-prog-name=ld gives a path.
3550   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3551 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3552   case $host in
3553   *-*-mingw*)
3554     # gcc leaves a trailing carriage return which upsets mingw
3555     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3556   *)
3557     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3558   esac
3559   case $ac_prog in
3560     # Accept absolute paths.
3561     [\\/]* | [A-Za-z]:[\\/]*)
3562       re_direlt='/[^/][^/]*/\.\./'
3563       # Canonicalize the path of ld
3564       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3565       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3566         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3567       done
3568       test -z "$LD" && LD="$ac_prog"
3569       ;;
3570   "")
3571     # If it fails, then pretend we aren't using GCC.
3572     ac_prog=ld
3573     ;;
3574   *)
3575     # If it is relative, then search for the first ld in PATH.
3576     with_gnu_ld=unknown
3577     ;;
3578   esac
3579 elif test "$with_gnu_ld" = yes; then
3580   echo "$as_me:$LINENO: checking for GNU ld" >&5
3581 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3582 else
3583   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3584 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3585 fi
3586 if test "${lt_cv_path_LD+set}" = set; then
3587   echo $ECHO_N "(cached) $ECHO_C" >&6
3588 else
3589   if test -z "$LD"; then
3590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3591   for ac_dir in $PATH; do
3592     test -z "$ac_dir" && ac_dir=.
3593     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3594       lt_cv_path_LD="$ac_dir/$ac_prog"
3595       # Check to see if the program is GNU ld.  I'd rather use --version,
3596       # but apparently some GNU ld's only accept -v.
3597       # Break only if it was the GNU/non-GNU ld that we prefer.
3598       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3599         test "$with_gnu_ld" != no && break
3600       else
3601         test "$with_gnu_ld" != yes && break
3602       fi
3603     fi
3604   done
3605   IFS="$ac_save_ifs"
3606 else
3607   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3608 fi
3609 fi
3610
3611 LD="$lt_cv_path_LD"
3612 if test -n "$LD"; then
3613   echo "$as_me:$LINENO: result: $LD" >&5
3614 echo "${ECHO_T}$LD" >&6
3615 else
3616   echo "$as_me:$LINENO: result: no" >&5
3617 echo "${ECHO_T}no" >&6
3618 fi
3619 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3620 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3621    { (exit 1); exit 1; }; }
3622 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3623 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3624 if test "${lt_cv_prog_gnu_ld+set}" = set; then
3625   echo $ECHO_N "(cached) $ECHO_C" >&6
3626 else
3627   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3628 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3629   lt_cv_prog_gnu_ld=yes
3630 else
3631   lt_cv_prog_gnu_ld=no
3632 fi
3633 fi
3634 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3635 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
3636 with_gnu_ld=$lt_cv_prog_gnu_ld
3637
3638
3639 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3640 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3641 if test "${lt_cv_ld_reload_flag+set}" = set; then
3642   echo $ECHO_N "(cached) $ECHO_C" >&6
3643 else
3644   lt_cv_ld_reload_flag='-r'
3645 fi
3646 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3647 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
3648 reload_flag=$lt_cv_ld_reload_flag
3649 test -n "$reload_flag" && reload_flag=" $reload_flag"
3650
3651 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3652 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3653 if test "${lt_cv_path_NM+set}" = set; then
3654   echo $ECHO_N "(cached) $ECHO_C" >&6
3655 else
3656   if test -n "$NM"; then
3657   # Let the user override the test.
3658   lt_cv_path_NM="$NM"
3659 else
3660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3661   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3662     test -z "$ac_dir" && ac_dir=.
3663     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3664     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3665       # Check to see if the nm accepts a BSD-compat flag.
3666       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3667       #   nm: unknown option "B" ignored
3668       # Tru64's nm complains that /dev/null is an invalid object file
3669       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3670         lt_cv_path_NM="$tmp_nm -B"
3671         break
3672       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3673         lt_cv_path_NM="$tmp_nm -p"
3674         break
3675       else
3676         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3677         continue # so that we can try to find one that supports BSD flags
3678       fi
3679     fi
3680   done
3681   IFS="$ac_save_ifs"
3682   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3683 fi
3684 fi
3685
3686 NM="$lt_cv_path_NM"
3687 echo "$as_me:$LINENO: result: $NM" >&5
3688 echo "${ECHO_T}$NM" >&6
3689
3690 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3691 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3692 LN_S=$as_ln_s
3693 if test "$LN_S" = "ln -s"; then
3694   echo "$as_me:$LINENO: result: yes" >&5
3695 echo "${ECHO_T}yes" >&6
3696 else
3697   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3698 echo "${ECHO_T}no, using $LN_S" >&6
3699 fi
3700
3701 echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3702 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3703 if test "${lt_cv_deplibs_check_method+set}" = set; then
3704   echo $ECHO_N "(cached) $ECHO_C" >&6
3705 else
3706   lt_cv_file_magic_cmd='$MAGIC_CMD'
3707 lt_cv_file_magic_test_file=
3708 lt_cv_deplibs_check_method='unknown'
3709 # Need to set the preceding variable on all platforms that support
3710 # interlibrary dependencies.
3711 # 'none' -- dependencies not supported.
3712 # `unknown' -- same as none, but documents that we really don't know.
3713 # 'pass_all' -- all dependencies passed with no checks.
3714 # 'test_compile' -- check by making test program.
3715 # 'file_magic [[regex]]' -- check by looking for files in library path
3716 # which responds to the $file_magic_cmd with a given egrep regex.
3717 # If you have `file' or equivalent on your system and you're not sure
3718 # whether `pass_all' will *always* work, you probably want this one.
3719
3720 case $host_os in
3721 aix4* | aix5*)
3722   lt_cv_deplibs_check_method=pass_all
3723   ;;
3724
3725 beos*)
3726   lt_cv_deplibs_check_method=pass_all
3727   ;;
3728
3729 bsdi4*)
3730   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3731   lt_cv_file_magic_cmd='/usr/bin/file -L'
3732   lt_cv_file_magic_test_file=/shlib/libc.so
3733   ;;
3734
3735 cygwin* | mingw* | pw32*)
3736   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3737   lt_cv_file_magic_cmd='$OBJDUMP -f'
3738   ;;
3739
3740 darwin* | rhapsody*)
3741   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3742   lt_cv_file_magic_cmd='/usr/bin/file -L'
3743   case "$host_os" in
3744   rhapsody* | darwin1.[012])
3745     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3746     ;;
3747   *) # Darwin 1.3 on
3748     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3749     ;;
3750   esac
3751   ;;
3752
3753 freebsd*)
3754   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3755     case $host_cpu in
3756     i*86 )
3757       # Not sure whether the presence of OpenBSD here was a mistake.
3758       # Let's accept both of them until this is cleared up.
3759       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3760       lt_cv_file_magic_cmd=/usr/bin/file
3761       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3762       ;;
3763     esac
3764   else
3765     lt_cv_deplibs_check_method=pass_all
3766   fi
3767   ;;
3768
3769 gnu*)
3770   lt_cv_deplibs_check_method=pass_all
3771   ;;
3772
3773 hpux10.20*|hpux11*)
3774   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3775   lt_cv_file_magic_cmd=/usr/bin/file
3776   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3777   ;;
3778
3779 irix5* | irix6* | nonstopux*)
3780   case $host_os in
3781   irix5* | nonstopux*)
3782     # this will be overridden with pass_all, but let us keep it just in case
3783     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3784     ;;
3785   *)
3786     case $LD in
3787     *-32|*"-32 ") libmagic=32-bit;;
3788     *-n32|*"-n32 ") libmagic=N32;;
3789     *-64|*"-64 ") libmagic=64-bit;;
3790     *) libmagic=never-match;;
3791     esac
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 ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3794     ;;
3795   esac
3796   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3797   lt_cv_deplibs_check_method=pass_all
3798   ;;
3799
3800 # This must be Linux ELF.
3801 linux-gnu*)
3802   case $host_cpu in
3803   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3804     lt_cv_deplibs_check_method=pass_all ;;
3805   *)
3806     # glibc up to 2.1.1 does not perform some relocations on ARM
3807     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3808   esac
3809   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3810   ;;
3811
3812 netbsd*)
3813   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3814     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3815   else
3816     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3817   fi
3818   ;;
3819
3820 newos6*)
3821   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3822   lt_cv_file_magic_cmd=/usr/bin/file
3823   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3824   ;;
3825
3826 openbsd*)
3827   lt_cv_file_magic_cmd=/usr/bin/file
3828   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3829   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3830     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3831   else
3832     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3833   fi
3834   ;;
3835
3836 osf3* | osf4* | osf5*)
3837   # this will be overridden with pass_all, but let us keep it just in case
3838   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3839   lt_cv_file_magic_test_file=/shlib/libc.so
3840   lt_cv_deplibs_check_method=pass_all
3841   ;;
3842
3843 sco3.2v5*)
3844   lt_cv_deplibs_check_method=pass_all
3845   ;;
3846
3847 solaris*)
3848   lt_cv_deplibs_check_method=pass_all
3849   lt_cv_file_magic_test_file=/lib/libc.so
3850   ;;
3851
3852 sysv5uw[78]* | sysv4*uw2*)
3853   lt_cv_deplibs_check_method=pass_all
3854   ;;
3855
3856 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3857   case $host_vendor in
3858   motorola)
3859     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]'
3860     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3861     ;;
3862   ncr)
3863     lt_cv_deplibs_check_method=pass_all
3864     ;;
3865   sequent)
3866     lt_cv_file_magic_cmd='/bin/file'
3867     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3868     ;;
3869   sni)
3870     lt_cv_file_magic_cmd='/bin/file'
3871     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3872     lt_cv_file_magic_test_file=/lib/libc.so
3873     ;;
3874   esac
3875   ;;
3876 esac
3877
3878 fi
3879 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3880 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
3881 file_magic_cmd=$lt_cv_file_magic_cmd
3882 deplibs_check_method=$lt_cv_deplibs_check_method
3883
3884
3885
3886
3887
3888
3889
3890
3891 # Check for command to grab the raw symbol name followed by C symbol from nm.
3892 echo "$as_me:$LINENO: checking command to parse $NM output" >&5
3893 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
3894 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
3895   echo $ECHO_N "(cached) $ECHO_C" >&6
3896 else
3897
3898 # These are sane defaults that work on at least a few old systems.
3899 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3900
3901 # Character class describing NM global symbol codes.
3902 symcode='[BCDEGRST]'
3903
3904 # Regexp to match symbols that can be accessed directly from C.
3905 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3906
3907 # Transform the above into a raw symbol and a C symbol.
3908 symxfrm='\1 \2\3 \3'
3909
3910 # Transform an extracted symbol line into a proper C declaration
3911 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3912
3913 # Transform an extracted symbol line into symbol name and symbol address
3914 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'"
3915
3916 # Define system-specific variables.
3917 case $host_os in
3918 aix*)
3919   symcode='[BCDT]'
3920   ;;
3921 cygwin* | mingw* | pw32*)
3922   symcode='[ABCDGISTW]'
3923   ;;
3924 hpux*) # Its linker distinguishes data from code symbols
3925   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3926   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'"
3927   ;;
3928 irix* | nonstopux*)
3929   symcode='[BCDEGRST]'
3930   ;;
3931 solaris* | sysv5*)
3932   symcode='[BDT]'
3933   ;;
3934 sysv4)
3935   symcode='[DFNSTU]'
3936   ;;
3937 esac
3938
3939 # Handle CRLF in mingw tool chain
3940 opt_cr=
3941 case $host_os in
3942 mingw*)
3943   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3944   ;;
3945 esac
3946
3947 # If we're using GNU nm, then use its standard symbol codes.
3948 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3949   symcode='[ABCDGISTW]'
3950 fi
3951
3952 # Try without a prefix undercore, then with it.
3953 for ac_symprfx in "" "_"; do
3954
3955   # Write the raw and C identifiers.
3956 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3957
3958   # Check to see that the pipe works correctly.
3959   pipe_works=no
3960   rm -f conftest*
3961   cat > conftest.$ac_ext <<EOF
3962 #ifdef __cplusplus
3963 extern "C" {
3964 #endif
3965 char nm_test_var;
3966 void nm_test_func(){}
3967 #ifdef __cplusplus
3968 }
3969 #endif
3970 int main(){nm_test_var='a';nm_test_func();return(0);}
3971 EOF
3972
3973   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3974   (eval $ac_compile) 2>&5
3975   ac_status=$?
3976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3977   (exit $ac_status); }; then
3978     # Now try to grab the symbols.
3979     nlist=conftest.nm
3980     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
3981   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
3982   ac_status=$?
3983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984   (exit $ac_status); } && test -s "$nlist"; then
3985       # Try sorting and uniquifying the output.
3986       if sort "$nlist" | uniq > "$nlist"T; then
3987         mv -f "$nlist"T "$nlist"
3988       else
3989         rm -f "$nlist"T
3990       fi
3991
3992       # Make sure that we snagged all the symbols we need.
3993       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3994         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3995           cat <<EOF > conftest.$ac_ext
3996 #ifdef __cplusplus
3997 extern "C" {
3998 #endif
3999
4000 EOF
4001           # Now generate the symbol file.
4002           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4003
4004           cat <<EOF >> conftest.$ac_ext
4005 #if defined (__STDC__) && __STDC__
4006 # define lt_ptr void *
4007 #else
4008 # define lt_ptr char *
4009 # define const
4010 #endif
4011
4012 /* The mapping between symbol names and symbols. */
4013 const struct {
4014   const char *name;
4015   lt_ptr address;
4016 }
4017 lt_preloaded_symbols[] =
4018 {
4019 EOF
4020           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4021           cat <<\EOF >> conftest.$ac_ext
4022   {0, (lt_ptr) 0}
4023 };
4024
4025 #ifdef __cplusplus
4026 }
4027 #endif
4028 EOF
4029           # Now try linking the two files.
4030           mv conftest.$ac_objext conftstm.$ac_objext
4031           save_LIBS="$LIBS"
4032           save_CFLAGS="$CFLAGS"
4033           LIBS="conftstm.$ac_objext"
4034           CFLAGS="$CFLAGS$no_builtin_flag"
4035           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4036   (eval $ac_link) 2>&5
4037   ac_status=$?
4038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039   (exit $ac_status); } && test -s conftest; then
4040             pipe_works=yes
4041           fi
4042           LIBS="$save_LIBS"
4043           CFLAGS="$save_CFLAGS"
4044         else
4045           echo "cannot find nm_test_func in $nlist" >&5
4046         fi
4047       else
4048         echo "cannot find nm_test_var in $nlist" >&5
4049       fi
4050     else
4051       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4052     fi
4053   else
4054     echo "$progname: failed program was:" >&5
4055     cat conftest.$ac_ext >&5
4056   fi
4057   rm -f conftest* conftst*
4058
4059   # Do not use the global_symbol_pipe unless it works.
4060   if test "$pipe_works" = yes; then
4061     break
4062   else
4063     lt_cv_sys_global_symbol_pipe=
4064   fi
4065 done
4066
4067 fi
4068
4069 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4070 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4071   global_symbol_to_cdecl=
4072   global_symbol_to_c_name_address=
4073 else
4074   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4075   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4076 fi
4077 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4078 then
4079   echo "$as_me:$LINENO: result: failed" >&5
4080 echo "${ECHO_T}failed" >&6
4081 else
4082   echo "$as_me:$LINENO: result: ok" >&5
4083 echo "${ECHO_T}ok" >&6
4084 fi
4085
4086 ac_ext=c
4087 ac_cpp='$CPP $CPPFLAGS'
4088 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4089 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4091 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4092 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4093 # On Suns, sometimes $CPP names a directory.
4094 if test -n "$CPP" && test -d "$CPP"; then
4095   CPP=
4096 fi
4097 if test -z "$CPP"; then
4098   if test "${ac_cv_prog_CPP+set}" = set; then
4099   echo $ECHO_N "(cached) $ECHO_C" >&6
4100 else
4101       # Double quotes because CPP needs to be expanded
4102     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4103     do
4104       ac_preproc_ok=false
4105 for ac_c_preproc_warn_flag in '' yes
4106 do
4107   # Use a header file that comes with gcc, so configuring glibc
4108   # with a fresh cross-compiler works.
4109   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4110   # <limits.h> exists even on freestanding compilers.
4111   # On the NeXT, cc -E runs the code through the compiler's parser,
4112   # not just through cpp. "Syntax error" is here to catch this case.
4113   cat >conftest.$ac_ext <<_ACEOF
4114 /* confdefs.h.  */
4115 _ACEOF
4116 cat confdefs.h >>conftest.$ac_ext
4117 cat >>conftest.$ac_ext <<_ACEOF
4118 /* end confdefs.h.  */
4119 #ifdef __STDC__
4120 # include <limits.h>
4121 #else
4122 # include <assert.h>
4123 #endif
4124                      Syntax error
4125 _ACEOF
4126 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4128   ac_status=$?
4129   grep -v '^ *+' conftest.er1 >conftest.err
4130   rm -f conftest.er1
4131   cat conftest.err >&5
4132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133   (exit $ac_status); } >/dev/null; then
4134   if test -s conftest.err; then
4135     ac_cpp_err=$ac_c_preproc_warn_flag
4136     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4137   else
4138     ac_cpp_err=
4139   fi
4140 else
4141   ac_cpp_err=yes
4142 fi
4143 if test -z "$ac_cpp_err"; then
4144   :
4145 else
4146   echo "$as_me: failed program was:" >&5
4147 sed 's/^/| /' conftest.$ac_ext >&5
4148
4149   # Broken: fails on valid input.
4150 continue
4151 fi
4152 rm -f conftest.err conftest.$ac_ext
4153
4154   # OK, works on sane cases.  Now check whether non-existent headers
4155   # can be detected and how.
4156   cat >conftest.$ac_ext <<_ACEOF
4157 /* confdefs.h.  */
4158 _ACEOF
4159 cat confdefs.h >>conftest.$ac_ext
4160 cat >>conftest.$ac_ext <<_ACEOF
4161 /* end confdefs.h.  */
4162 #include <ac_nonexistent.h>
4163 _ACEOF
4164 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4166   ac_status=$?
4167   grep -v '^ *+' conftest.er1 >conftest.err
4168   rm -f conftest.er1
4169   cat conftest.err >&5
4170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171   (exit $ac_status); } >/dev/null; then
4172   if test -s conftest.err; then
4173     ac_cpp_err=$ac_c_preproc_warn_flag
4174     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4175   else
4176     ac_cpp_err=
4177   fi
4178 else
4179   ac_cpp_err=yes
4180 fi
4181 if test -z "$ac_cpp_err"; then
4182   # Broken: success on invalid input.
4183 continue
4184 else
4185   echo "$as_me: failed program was:" >&5
4186 sed 's/^/| /' conftest.$ac_ext >&5
4187
4188   # Passes both tests.
4189 ac_preproc_ok=:
4190 break
4191 fi
4192 rm -f conftest.err conftest.$ac_ext
4193
4194 done
4195 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4196 rm -f conftest.err conftest.$ac_ext
4197 if $ac_preproc_ok; then
4198   break
4199 fi
4200
4201     done
4202     ac_cv_prog_CPP=$CPP
4203
4204 fi
4205   CPP=$ac_cv_prog_CPP
4206 else
4207   ac_cv_prog_CPP=$CPP
4208 fi
4209 echo "$as_me:$LINENO: result: $CPP" >&5
4210 echo "${ECHO_T}$CPP" >&6
4211 ac_preproc_ok=false
4212 for ac_c_preproc_warn_flag in '' yes
4213 do
4214   # Use a header file that comes with gcc, so configuring glibc
4215   # with a fresh cross-compiler works.
4216   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4217   # <limits.h> exists even on freestanding compilers.
4218   # On the NeXT, cc -E runs the code through the compiler's parser,
4219   # not just through cpp. "Syntax error" is here to catch this case.
4220   cat >conftest.$ac_ext <<_ACEOF
4221 /* confdefs.h.  */
4222 _ACEOF
4223 cat confdefs.h >>conftest.$ac_ext
4224 cat >>conftest.$ac_ext <<_ACEOF
4225 /* end confdefs.h.  */
4226 #ifdef __STDC__
4227 # include <limits.h>
4228 #else
4229 # include <assert.h>
4230 #endif
4231                      Syntax error
4232 _ACEOF
4233 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4235   ac_status=$?
4236   grep -v '^ *+' conftest.er1 >conftest.err
4237   rm -f conftest.er1
4238   cat conftest.err >&5
4239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240   (exit $ac_status); } >/dev/null; then
4241   if test -s conftest.err; then
4242     ac_cpp_err=$ac_c_preproc_warn_flag
4243     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4244   else
4245     ac_cpp_err=
4246   fi
4247 else
4248   ac_cpp_err=yes
4249 fi
4250 if test -z "$ac_cpp_err"; then
4251   :
4252 else
4253   echo "$as_me: failed program was:" >&5
4254 sed 's/^/| /' conftest.$ac_ext >&5
4255
4256   # Broken: fails on valid input.
4257 continue
4258 fi
4259 rm -f conftest.err conftest.$ac_ext
4260
4261   # OK, works on sane cases.  Now check whether non-existent headers
4262   # can be detected and how.
4263   cat >conftest.$ac_ext <<_ACEOF
4264 /* confdefs.h.  */
4265 _ACEOF
4266 cat confdefs.h >>conftest.$ac_ext
4267 cat >>conftest.$ac_ext <<_ACEOF
4268 /* end confdefs.h.  */
4269 #include <ac_nonexistent.h>
4270 _ACEOF
4271 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4272   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4273   ac_status=$?
4274   grep -v '^ *+' conftest.er1 >conftest.err
4275   rm -f conftest.er1
4276   cat conftest.err >&5
4277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4278   (exit $ac_status); } >/dev/null; then
4279   if test -s conftest.err; then
4280     ac_cpp_err=$ac_c_preproc_warn_flag
4281     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4282   else
4283     ac_cpp_err=
4284   fi
4285 else
4286   ac_cpp_err=yes
4287 fi
4288 if test -z "$ac_cpp_err"; then
4289   # Broken: success on invalid input.
4290 continue
4291 else
4292   echo "$as_me: failed program was:" >&5
4293 sed 's/^/| /' conftest.$ac_ext >&5
4294
4295   # Passes both tests.
4296 ac_preproc_ok=:
4297 break
4298 fi
4299 rm -f conftest.err conftest.$ac_ext
4300
4301 done
4302 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4303 rm -f conftest.err conftest.$ac_ext
4304 if $ac_preproc_ok; then
4305   :
4306 else
4307   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4308 See \`config.log' for more details." >&5
4309 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4310 See \`config.log' for more details." >&2;}
4311    { (exit 1); exit 1; }; }
4312 fi
4313
4314 ac_ext=c
4315 ac_cpp='$CPP $CPPFLAGS'
4316 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4317 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4319
4320
4321 echo "$as_me:$LINENO: checking for egrep" >&5
4322 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4323 if test "${ac_cv_prog_egrep+set}" = set; then
4324   echo $ECHO_N "(cached) $ECHO_C" >&6
4325 else
4326   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4327     then ac_cv_prog_egrep='grep -E'
4328     else ac_cv_prog_egrep='egrep'
4329     fi
4330 fi
4331 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4332 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4333  EGREP=$ac_cv_prog_egrep
4334
4335
4336 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4337 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4338 if test "${ac_cv_header_stdc+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341   cat >conftest.$ac_ext <<_ACEOF
4342 /* confdefs.h.  */
4343 _ACEOF
4344 cat confdefs.h >>conftest.$ac_ext
4345 cat >>conftest.$ac_ext <<_ACEOF
4346 /* end confdefs.h.  */
4347 #include <stdlib.h>
4348 #include <stdarg.h>
4349 #include <string.h>
4350 #include <float.h>
4351
4352 int
4353 main ()
4354 {
4355
4356   ;
4357   return 0;
4358 }
4359 _ACEOF
4360 rm -f conftest.$ac_objext
4361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4362   (eval $ac_compile) 2>conftest.er1
4363   ac_status=$?
4364   grep -v '^ *+' conftest.er1 >conftest.err
4365   rm -f conftest.er1
4366   cat conftest.err >&5
4367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4368   (exit $ac_status); } &&
4369          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
4370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4371   (eval $ac_try) 2>&5
4372   ac_status=$?
4373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4374   (exit $ac_status); }; } &&
4375          { ac_try='test -s conftest.$ac_objext'
4376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4377   (eval $ac_try) 2>&5
4378   ac_status=$?
4379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4380   (exit $ac_status); }; }; then
4381   ac_cv_header_stdc=yes
4382 else
4383   echo "$as_me: failed program was:" >&5
4384 sed 's/^/| /' conftest.$ac_ext >&5
4385
4386 ac_cv_header_stdc=no
4387 fi
4388 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4389
4390 if test $ac_cv_header_stdc = yes; then
4391   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4392   cat >conftest.$ac_ext <<_ACEOF
4393 /* confdefs.h.  */
4394 _ACEOF
4395 cat confdefs.h >>conftest.$ac_ext
4396 cat >>conftest.$ac_ext <<_ACEOF
4397 /* end confdefs.h.  */
4398 #include <string.h>
4399
4400 _ACEOF
4401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4402   $EGREP "memchr" >/dev/null 2>&1; then
4403   :
4404 else
4405   ac_cv_header_stdc=no
4406 fi
4407 rm -f conftest*
4408
4409 fi
4410
4411 if test $ac_cv_header_stdc = yes; then
4412   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4413   cat >conftest.$ac_ext <<_ACEOF
4414 /* confdefs.h.  */
4415 _ACEOF
4416 cat confdefs.h >>conftest.$ac_ext
4417 cat >>conftest.$ac_ext <<_ACEOF
4418 /* end confdefs.h.  */
4419 #include <stdlib.h>
4420
4421 _ACEOF
4422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4423   $EGREP "free" >/dev/null 2>&1; then
4424   :
4425 else
4426   ac_cv_header_stdc=no
4427 fi
4428 rm -f conftest*
4429
4430 fi
4431
4432 if test $ac_cv_header_stdc = yes; then
4433   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4434   if test "$cross_compiling" = yes; then
4435   :
4436 else
4437   cat >conftest.$ac_ext <<_ACEOF
4438 /* confdefs.h.  */
4439 _ACEOF
4440 cat confdefs.h >>conftest.$ac_ext
4441 cat >>conftest.$ac_ext <<_ACEOF
4442 /* end confdefs.h.  */
4443 #include <ctype.h>
4444 #if ((' ' & 0x0FF) == 0x020)
4445 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4446 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4447 #else
4448 # define ISLOWER(c) \
4449                    (('a' <= (c) && (c) <= 'i') \
4450                      || ('j' <= (c) && (c) <= 'r') \
4451                      || ('s' <= (c) && (c) <= 'z'))
4452 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4453 #endif
4454
4455 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4456 int
4457 main ()
4458 {
4459   int i;
4460   for (i = 0; i < 256; i++)
4461     if (XOR (islower (i), ISLOWER (i))
4462         || toupper (i) != TOUPPER (i))
4463       exit(2);
4464   exit (0);
4465 }
4466 _ACEOF
4467 rm -f conftest$ac_exeext
4468 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4469   (eval $ac_link) 2>&5
4470   ac_status=$?
4471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474   (eval $ac_try) 2>&5
4475   ac_status=$?
4476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477   (exit $ac_status); }; }; then
4478   :
4479 else
4480   echo "$as_me: program exited with status $ac_status" >&5
4481 echo "$as_me: failed program was:" >&5
4482 sed 's/^/| /' conftest.$ac_ext >&5
4483
4484 ( exit $ac_status )
4485 ac_cv_header_stdc=no
4486 fi
4487 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4488 fi
4489 fi
4490 fi
4491 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4492 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4493 if test $ac_cv_header_stdc = yes; then
4494
4495 cat >>confdefs.h <<\_ACEOF
4496 #define STDC_HEADERS 1
4497 _ACEOF
4498
4499 fi
4500
4501 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4512                   inttypes.h stdint.h unistd.h
4513 do
4514 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4515 echo "$as_me:$LINENO: checking for $ac_header" >&5
4516 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4517 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520   cat >conftest.$ac_ext <<_ACEOF
4521 /* confdefs.h.  */
4522 _ACEOF
4523 cat confdefs.h >>conftest.$ac_ext
4524 cat >>conftest.$ac_ext <<_ACEOF
4525 /* end confdefs.h.  */
4526 $ac_includes_default
4527
4528 #include <$ac_header>
4529 _ACEOF
4530 rm -f conftest.$ac_objext
4531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4532   (eval $ac_compile) 2>conftest.er1
4533   ac_status=$?
4534   grep -v '^ *+' conftest.er1 >conftest.err
4535   rm -f conftest.er1
4536   cat conftest.err >&5
4537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538   (exit $ac_status); } &&
4539          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
4540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4541   (eval $ac_try) 2>&5
4542   ac_status=$?
4543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544   (exit $ac_status); }; } &&
4545          { ac_try='test -s conftest.$ac_objext'
4546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4547   (eval $ac_try) 2>&5
4548   ac_status=$?
4549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4550   (exit $ac_status); }; }; then
4551   eval "$as_ac_Header=yes"
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556 eval "$as_ac_Header=no"
4557 fi
4558 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4559 fi
4560 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4561 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4562 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4563   cat >>confdefs.h <<_ACEOF
4564 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4565 _ACEOF
4566
4567 fi
4568
4569 done
4570
4571
4572
4573 for ac_header in dlfcn.h
4574 do
4575 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4577   echo "$as_me:$LINENO: checking for $ac_header" >&5
4578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4580   echo $ECHO_N "(cached) $ECHO_C" >&6
4581 fi
4582 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4584 else
4585   # Is the header compilable?
4586 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4587 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4588 cat >conftest.$ac_ext <<_ACEOF
4589 /* confdefs.h.  */
4590 _ACEOF
4591 cat confdefs.h >>conftest.$ac_ext
4592 cat >>conftest.$ac_ext <<_ACEOF
4593 /* end confdefs.h.  */
4594 $ac_includes_default
4595 #include <$ac_header>
4596 _ACEOF
4597 rm -f conftest.$ac_objext
4598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4599   (eval $ac_compile) 2>conftest.er1
4600   ac_status=$?
4601   grep -v '^ *+' conftest.er1 >conftest.err
4602   rm -f conftest.er1
4603   cat conftest.err >&5
4604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605   (exit $ac_status); } &&
4606          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
4607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608   (eval $ac_try) 2>&5
4609   ac_status=$?
4610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611   (exit $ac_status); }; } &&
4612          { ac_try='test -s conftest.$ac_objext'
4613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4614   (eval $ac_try) 2>&5
4615   ac_status=$?
4616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); }; }; then
4618   ac_header_compiler=yes
4619 else
4620   echo "$as_me: failed program was:" >&5
4621 sed 's/^/| /' conftest.$ac_ext >&5
4622
4623 ac_header_compiler=no
4624 fi
4625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4626 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4627 echo "${ECHO_T}$ac_header_compiler" >&6
4628
4629 # Is the header present?
4630 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4631 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4632 cat >conftest.$ac_ext <<_ACEOF
4633 /* confdefs.h.  */
4634 _ACEOF
4635 cat confdefs.h >>conftest.$ac_ext
4636 cat >>conftest.$ac_ext <<_ACEOF
4637 /* end confdefs.h.  */
4638 #include <$ac_header>
4639 _ACEOF
4640 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4642   ac_status=$?
4643   grep -v '^ *+' conftest.er1 >conftest.err
4644   rm -f conftest.er1
4645   cat conftest.err >&5
4646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647   (exit $ac_status); } >/dev/null; then
4648   if test -s conftest.err; then
4649     ac_cpp_err=$ac_c_preproc_warn_flag
4650     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4651   else
4652     ac_cpp_err=
4653   fi
4654 else
4655   ac_cpp_err=yes
4656 fi
4657 if test -z "$ac_cpp_err"; then
4658   ac_header_preproc=yes
4659 else
4660   echo "$as_me: failed program was:" >&5
4661 sed 's/^/| /' conftest.$ac_ext >&5
4662
4663   ac_header_preproc=no
4664 fi
4665 rm -f conftest.err conftest.$ac_ext
4666 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4667 echo "${ECHO_T}$ac_header_preproc" >&6
4668
4669 # So?  What about this header?
4670 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4671   yes:no: )
4672     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4673 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4674     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4675 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4676     ac_header_preproc=yes
4677     ;;
4678   no:yes:* )
4679     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4680 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4681     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4682 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4683     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4684 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4685     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4686 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4687     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4688 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4689     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4690 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4691     (
4692       cat <<\_ASBOX
4693 ## ------------------------------------------ ##
4694 ## Report this to the AC_PACKAGE_NAME lists.  ##
4695 ## ------------------------------------------ ##
4696 _ASBOX
4697     ) |
4698       sed "s/^/$as_me: WARNING:     /" >&2
4699     ;;
4700 esac
4701 echo "$as_me:$LINENO: checking for $ac_header" >&5
4702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4704   echo $ECHO_N "(cached) $ECHO_C" >&6
4705 else
4706   eval "$as_ac_Header=\$ac_header_preproc"
4707 fi
4708 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4709 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4710
4711 fi
4712 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4713   cat >>confdefs.h <<_ACEOF
4714 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4715 _ACEOF
4716
4717 fi
4718
4719 done
4720
4721
4722
4723
4724
4725 # Only perform the check for file, if the check method requires it
4726 case $deplibs_check_method in
4727 file_magic*)
4728   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4729     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
4730 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
4731 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4732   echo $ECHO_N "(cached) $ECHO_C" >&6
4733 else
4734   case $MAGIC_CMD in
4735   /*)
4736   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4737   ;;
4738   ?:/*)
4739   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4740   ;;
4741   *)
4742   ac_save_MAGIC_CMD="$MAGIC_CMD"
4743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4744   ac_dummy="/usr/bin:$PATH"
4745   for ac_dir in $ac_dummy; do
4746     test -z "$ac_dir" && ac_dir=.
4747     if test -f $ac_dir/${ac_tool_prefix}file; then
4748       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4749       if test -n "$file_magic_test_file"; then
4750         case $deplibs_check_method in
4751         "file_magic "*)
4752           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4753           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4754           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4755             egrep "$file_magic_regex" > /dev/null; then
4756             :
4757           else
4758             cat <<EOF 1>&2
4759
4760 *** Warning: the command libtool uses to detect shared libraries,
4761 *** $file_magic_cmd, produces output that libtool cannot recognize.
4762 *** The result is that libtool may fail to recognize shared libraries
4763 *** as such.  This will affect the creation of libtool libraries that
4764 *** depend on shared libraries, but programs linked with such libtool
4765 *** libraries will work regardless of this problem.  Nevertheless, you
4766 *** may want to report the problem to your system manager and/or to
4767 *** bug-libtool@gnu.org
4768
4769 EOF
4770           fi ;;
4771         esac
4772       fi
4773       break
4774     fi
4775   done
4776   IFS="$ac_save_ifs"
4777   MAGIC_CMD="$ac_save_MAGIC_CMD"
4778   ;;
4779 esac
4780 fi
4781
4782 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4783 if test -n "$MAGIC_CMD"; then
4784   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4785 echo "${ECHO_T}$MAGIC_CMD" >&6
4786 else
4787   echo "$as_me:$LINENO: result: no" >&5
4788 echo "${ECHO_T}no" >&6
4789 fi
4790
4791 if test -z "$lt_cv_path_MAGIC_CMD"; then
4792   if test -n "$ac_tool_prefix"; then
4793     echo "$as_me:$LINENO: checking for file" >&5
4794 echo $ECHO_N "checking for file... $ECHO_C" >&6
4795 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798   case $MAGIC_CMD in
4799   /*)
4800   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4801   ;;
4802   ?:/*)
4803   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4804   ;;
4805   *)
4806   ac_save_MAGIC_CMD="$MAGIC_CMD"
4807   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4808   ac_dummy="/usr/bin:$PATH"
4809   for ac_dir in $ac_dummy; do
4810     test -z "$ac_dir" && ac_dir=.
4811     if test -f $ac_dir/file; then
4812       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4813       if test -n "$file_magic_test_file"; then
4814         case $deplibs_check_method in
4815         "file_magic "*)
4816           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4817           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4818           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4819             egrep "$file_magic_regex" > /dev/null; then
4820             :
4821           else
4822             cat <<EOF 1>&2
4823
4824 *** Warning: the command libtool uses to detect shared libraries,
4825 *** $file_magic_cmd, produces output that libtool cannot recognize.
4826 *** The result is that libtool may fail to recognize shared libraries
4827 *** as such.  This will affect the creation of libtool libraries that
4828 *** depend on shared libraries, but programs linked with such libtool
4829 *** libraries will work regardless of this problem.  Nevertheless, you
4830 *** may want to report the problem to your system manager and/or to
4831 *** bug-libtool@gnu.org
4832
4833 EOF
4834           fi ;;
4835         esac
4836       fi
4837       break
4838     fi
4839   done
4840   IFS="$ac_save_ifs"
4841   MAGIC_CMD="$ac_save_MAGIC_CMD"
4842   ;;
4843 esac
4844 fi
4845
4846 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4847 if test -n "$MAGIC_CMD"; then
4848   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4849 echo "${ECHO_T}$MAGIC_CMD" >&6
4850 else
4851   echo "$as_me:$LINENO: result: no" >&5
4852 echo "${ECHO_T}no" >&6
4853 fi
4854
4855   else
4856     MAGIC_CMD=:
4857   fi
4858 fi
4859
4860   fi
4861   ;;
4862 esac
4863
4864 if test -n "$ac_tool_prefix"; then
4865   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4866 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4867 echo "$as_me:$LINENO: checking for $ac_word" >&5
4868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4869 if test "${ac_cv_prog_RANLIB+set}" = set; then
4870   echo $ECHO_N "(cached) $ECHO_C" >&6
4871 else
4872   if test -n "$RANLIB"; then
4873   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4874 else
4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876 for as_dir in $PATH
4877 do
4878   IFS=$as_save_IFS
4879   test -z "$as_dir" && as_dir=.
4880   for ac_exec_ext in '' $ac_executable_extensions; do
4881   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4882     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4883     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4884     break 2
4885   fi
4886 done
4887 done
4888
4889 fi
4890 fi
4891 RANLIB=$ac_cv_prog_RANLIB
4892 if test -n "$RANLIB"; then
4893   echo "$as_me:$LINENO: result: $RANLIB" >&5
4894 echo "${ECHO_T}$RANLIB" >&6
4895 else
4896   echo "$as_me:$LINENO: result: no" >&5
4897 echo "${ECHO_T}no" >&6
4898 fi
4899
4900 fi
4901 if test -z "$ac_cv_prog_RANLIB"; then
4902   ac_ct_RANLIB=$RANLIB
4903   # Extract the first word of "ranlib", so it can be a program name with args.
4904 set dummy ranlib; ac_word=$2
4905 echo "$as_me:$LINENO: checking for $ac_word" >&5
4906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4907 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4908   echo $ECHO_N "(cached) $ECHO_C" >&6
4909 else
4910   if test -n "$ac_ct_RANLIB"; then
4911   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4912 else
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914 for as_dir in $PATH
4915 do
4916   IFS=$as_save_IFS
4917   test -z "$as_dir" && as_dir=.
4918   for ac_exec_ext in '' $ac_executable_extensions; do
4919   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920     ac_cv_prog_ac_ct_RANLIB="ranlib"
4921     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4922     break 2
4923   fi
4924 done
4925 done
4926
4927   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4928 fi
4929 fi
4930 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4931 if test -n "$ac_ct_RANLIB"; then
4932   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4933 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4934 else
4935   echo "$as_me:$LINENO: result: no" >&5
4936 echo "${ECHO_T}no" >&6
4937 fi
4938
4939   RANLIB=$ac_ct_RANLIB
4940 else
4941   RANLIB="$ac_cv_prog_RANLIB"
4942 fi
4943
4944 if test -n "$ac_tool_prefix"; then
4945   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4946 set dummy ${ac_tool_prefix}strip; ac_word=$2
4947 echo "$as_me:$LINENO: checking for $ac_word" >&5
4948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4949 if test "${ac_cv_prog_STRIP+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   if test -n "$STRIP"; then
4953   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4954 else
4955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4956 for as_dir in $PATH
4957 do
4958   IFS=$as_save_IFS
4959   test -z "$as_dir" && as_dir=.
4960   for ac_exec_ext in '' $ac_executable_extensions; do
4961   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4962     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4963     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4964     break 2
4965   fi
4966 done
4967 done
4968
4969 fi
4970 fi
4971 STRIP=$ac_cv_prog_STRIP
4972 if test -n "$STRIP"; then
4973   echo "$as_me:$LINENO: result: $STRIP" >&5
4974 echo "${ECHO_T}$STRIP" >&6
4975 else
4976   echo "$as_me:$LINENO: result: no" >&5
4977 echo "${ECHO_T}no" >&6
4978 fi
4979
4980 fi
4981 if test -z "$ac_cv_prog_STRIP"; then
4982   ac_ct_STRIP=$STRIP
4983   # Extract the first word of "strip", so it can be a program name with args.
4984 set dummy strip; ac_word=$2
4985 echo "$as_me:$LINENO: checking for $ac_word" >&5
4986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4987 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4988   echo $ECHO_N "(cached) $ECHO_C" >&6
4989 else
4990   if test -n "$ac_ct_STRIP"; then
4991   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4992 else
4993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994 for as_dir in $PATH
4995 do
4996   IFS=$as_save_IFS
4997   test -z "$as_dir" && as_dir=.
4998   for ac_exec_ext in '' $ac_executable_extensions; do
4999   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000     ac_cv_prog_ac_ct_STRIP="strip"
5001     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5002     break 2
5003   fi
5004 done
5005 done
5006
5007   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
5008 fi
5009 fi
5010 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5011 if test -n "$ac_ct_STRIP"; then
5012   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
5013 echo "${ECHO_T}$ac_ct_STRIP" >&6
5014 else
5015   echo "$as_me:$LINENO: result: no" >&5
5016 echo "${ECHO_T}no" >&6
5017 fi
5018
5019   STRIP=$ac_ct_STRIP
5020 else
5021   STRIP="$ac_cv_prog_STRIP"
5022 fi
5023
5024
5025 enable_dlopen=no
5026 enable_win32_dll=no
5027
5028 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5029 if test "${enable_libtool_lock+set}" = set; then
5030   enableval="$enable_libtool_lock"
5031
5032 fi;
5033 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5034
5035 # Some flags need to be propagated to the compiler or linker for good
5036 # libtool support.
5037 case $host in
5038 *-*-irix6*)
5039   # Find out which ABI we are using.
5040   echo '#line 5040 "configure"' > conftest.$ac_ext
5041   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042   (eval $ac_compile) 2>&5
5043   ac_status=$?
5044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045   (exit $ac_status); }; then
5046     case `/usr/bin/file conftest.$ac_objext` in
5047     *32-bit*)
5048       LD="${LD-ld} -32"
5049       ;;
5050     *N32*)
5051       LD="${LD-ld} -n32"
5052       ;;
5053     *64-bit*)
5054       LD="${LD-ld} -64"
5055       ;;
5056     esac
5057   fi
5058   rm -rf conftest*
5059   ;;
5060
5061 *-*-sco3.2v5*)
5062   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5063   SAVE_CFLAGS="$CFLAGS"
5064   CFLAGS="$CFLAGS -belf"
5065   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5066 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5067 if test "${lt_cv_cc_needs_belf+set}" = set; then
5068   echo $ECHO_N "(cached) $ECHO_C" >&6
5069 else
5070
5071
5072      ac_ext=c
5073 ac_cpp='$CPP $CPPFLAGS'
5074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5077
5078      cat >conftest.$ac_ext <<_ACEOF
5079 /* confdefs.h.  */
5080 _ACEOF
5081 cat confdefs.h >>conftest.$ac_ext
5082 cat >>conftest.$ac_ext <<_ACEOF
5083 /* end confdefs.h.  */
5084
5085 int
5086 main ()
5087 {
5088
5089   ;
5090   return 0;
5091 }
5092 _ACEOF
5093 rm -f conftest.$ac_objext conftest$ac_exeext
5094 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5095   (eval $ac_link) 2>conftest.er1
5096   ac_status=$?
5097   grep -v '^ *+' conftest.er1 >conftest.err
5098   rm -f conftest.er1
5099   cat conftest.err >&5
5100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101   (exit $ac_status); } &&
5102          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5104   (eval $ac_try) 2>&5
5105   ac_status=$?
5106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107   (exit $ac_status); }; } &&
5108          { ac_try='test -s conftest$ac_exeext'
5109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5110   (eval $ac_try) 2>&5
5111   ac_status=$?
5112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113   (exit $ac_status); }; }; then
5114   lt_cv_cc_needs_belf=yes
5115 else
5116   echo "$as_me: failed program was:" >&5
5117 sed 's/^/| /' conftest.$ac_ext >&5
5118
5119 lt_cv_cc_needs_belf=no
5120 fi
5121 rm -f conftest.err conftest.$ac_objext \
5122       conftest$ac_exeext conftest.$ac_ext
5123      ac_ext=c
5124 ac_cpp='$CPP $CPPFLAGS'
5125 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5126 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5127 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5128
5129 fi
5130 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5131 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5132   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5133     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5134     CFLAGS="$SAVE_CFLAGS"
5135   fi
5136   ;;
5137
5138
5139 esac
5140
5141 # Sed substitution that helps us do robust quoting.  It backslashifies
5142 # metacharacters that are still active within double-quoted strings.
5143 Xsed='sed -e s/^X//'
5144 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5145
5146 # Same as above, but do not quote variable references.
5147 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5148
5149 # Sed substitution to delay expansion of an escaped shell variable in a
5150 # double_quote_subst'ed string.
5151 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5152
5153 # Constants:
5154 rm="rm -f"
5155
5156 # Global variables:
5157 default_ofile=libtool
5158 can_build_shared=yes
5159
5160 # All known linkers require a `.a' archive for static linking (except M$VC,
5161 # which needs '.lib').
5162 libext=a
5163 ltmain="$ac_aux_dir/ltmain.sh"
5164 ofile="$default_ofile"
5165 with_gnu_ld="$lt_cv_prog_gnu_ld"
5166 need_locks="$enable_libtool_lock"
5167
5168 old_CC="$CC"
5169 old_CFLAGS="$CFLAGS"
5170
5171 # Set sane defaults for various variables
5172 test -z "$AR" && AR=ar
5173 test -z "$AR_FLAGS" && AR_FLAGS=cru
5174 test -z "$AS" && AS=as
5175 test -z "$CC" && CC=cc
5176 test -z "$DLLTOOL" && DLLTOOL=dlltool
5177 test -z "$LD" && LD=ld
5178 test -z "$LN_S" && LN_S="ln -s"
5179 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5180 test -z "$NM" && NM=nm
5181 test -z "$OBJDUMP" && OBJDUMP=objdump
5182 test -z "$RANLIB" && RANLIB=:
5183 test -z "$STRIP" && STRIP=:
5184 test -z "$ac_objext" && ac_objext=o
5185
5186 if test x"$host" != x"$build"; then
5187   ac_tool_prefix=${host_alias}-
5188 else
5189   ac_tool_prefix=
5190 fi
5191
5192 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5193 case $host_os in
5194 linux-gnu*) ;;
5195 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5196 esac
5197
5198 case $host_os in
5199 aix3*)
5200   # AIX sometimes has problems with the GCC collect2 program.  For some
5201   # reason, if we set the COLLECT_NAMES environment variable, the problems
5202   # vanish in a puff of smoke.
5203   if test "X${COLLECT_NAMES+set}" != Xset; then
5204     COLLECT_NAMES=
5205     export COLLECT_NAMES
5206   fi
5207   ;;
5208 esac
5209
5210 # Determine commands to create old-style static archives.
5211 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5212 old_postinstall_cmds='chmod 644 $oldlib'
5213 old_postuninstall_cmds=
5214
5215 if test -n "$RANLIB"; then
5216   case $host_os in
5217   openbsd*)
5218     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5219     ;;
5220   *)
5221     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5222     ;;
5223   esac
5224   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5225 fi
5226
5227 # Allow CC to be a program name with arguments.
5228 set dummy $CC
5229 compiler="$2"
5230
5231 ## FIXME: this should be a separate macro
5232 ##
5233 echo "$as_me:$LINENO: checking for objdir" >&5
5234 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
5235 rm -f .libs 2>/dev/null
5236 mkdir .libs 2>/dev/null
5237 if test -d .libs; then
5238   objdir=.libs
5239 else
5240   # MS-DOS does not allow filenames that begin with a dot.
5241   objdir=_libs
5242 fi
5243 rmdir .libs 2>/dev/null
5244 echo "$as_me:$LINENO: result: $objdir" >&5
5245 echo "${ECHO_T}$objdir" >&6
5246 ##
5247 ## END FIXME
5248
5249
5250 ## FIXME: this should be a separate macro
5251 ##
5252
5253 # Check whether --with-pic or --without-pic was given.
5254 if test "${with_pic+set}" = set; then
5255   withval="$with_pic"
5256   pic_mode="$withval"
5257 else
5258   pic_mode=default
5259 fi;
5260 test -z "$pic_mode" && pic_mode=default
5261
5262 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5263 # in isolation, and that seeing it set (from the cache) indicates that
5264 # the associated values are set (in the cache) correctly too.
5265 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
5266 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
5267 if test "${lt_cv_prog_cc_pic+set}" = set; then
5268   echo $ECHO_N "(cached) $ECHO_C" >&6
5269 else
5270    lt_cv_prog_cc_pic=
5271   lt_cv_prog_cc_shlib=
5272   lt_cv_prog_cc_wl=
5273   lt_cv_prog_cc_static=
5274   lt_cv_prog_cc_no_builtin=
5275   lt_cv_prog_cc_can_build_shared=$can_build_shared
5276
5277   if test "$GCC" = yes; then
5278     lt_cv_prog_cc_wl='-Wl,'
5279     lt_cv_prog_cc_static='-static'
5280
5281     case $host_os in
5282     aix*)
5283       # Below there is a dirty hack to force normal static linking with -ldl
5284       # The problem is because libdl dynamically linked with both libc and
5285       # libC (AIX C++ library), which obviously doesn't included in libraries
5286       # list by gcc. This cause undefined symbols with -static flags.
5287       # This hack allows C programs to be linked with "-static -ldl", but
5288       # not sure about C++ programs.
5289       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5290       ;;
5291     amigaos*)
5292       # FIXME: we need at least 68020 code to build shared libraries, but
5293       # adding the `-m68020' flag to GCC prevents building anything better,
5294       # like `-m68040'.
5295       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5296       ;;
5297     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5298       # PIC is the default for these OSes.
5299       ;;
5300     darwin* | rhapsody*)
5301       # PIC is the default on this platform
5302       # Common symbols not allowed in MH_DYLIB files
5303       lt_cv_prog_cc_pic='-fno-common'
5304       ;;
5305     cygwin* | mingw* | pw32* | os2*)
5306       # This hack is so that the source file can tell whether it is being
5307       # built for inclusion in a dll (and should export symbols for example).
5308       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5309       ;;
5310     sysv4*MP*)
5311       if test -d /usr/nec; then
5312          lt_cv_prog_cc_pic=-Kconform_pic
5313       fi
5314       ;;
5315     *)
5316       lt_cv_prog_cc_pic='-fPIC'
5317       ;;
5318     esac
5319   else
5320     # PORTME Check for PIC flags for the system compiler.
5321     case $host_os in
5322     aix3* | aix4* | aix5*)
5323       lt_cv_prog_cc_wl='-Wl,'
5324       # All AIX code is PIC.
5325       if test "$host_cpu" = ia64; then
5326         # AIX 5 now supports IA64 processor
5327         lt_cv_prog_cc_static='-Bstatic'
5328       else
5329         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5330       fi
5331       ;;
5332
5333     hpux9* | hpux10* | hpux11*)
5334       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5335       lt_cv_prog_cc_wl='-Wl,'
5336       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5337       lt_cv_prog_cc_pic='+Z'
5338       ;;
5339
5340     irix5* | irix6* | nonstopux*)
5341       lt_cv_prog_cc_wl='-Wl,'
5342       lt_cv_prog_cc_static='-non_shared'
5343       # PIC (with -KPIC) is the default.
5344       ;;
5345
5346     cygwin* | mingw* | pw32* | os2*)
5347       # This hack is so that the source file can tell whether it is being
5348       # built for inclusion in a dll (and should export symbols for example).
5349       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5350       ;;
5351
5352     newsos6)
5353       lt_cv_prog_cc_pic='-KPIC'
5354       lt_cv_prog_cc_static='-Bstatic'
5355       ;;
5356
5357     osf3* | osf4* | osf5*)
5358       # All OSF/1 code is PIC.
5359       lt_cv_prog_cc_wl='-Wl,'
5360       lt_cv_prog_cc_static='-non_shared'
5361       ;;
5362
5363     sco3.2v5*)
5364       lt_cv_prog_cc_pic='-Kpic'
5365       lt_cv_prog_cc_static='-dn'
5366       lt_cv_prog_cc_shlib='-belf'
5367       ;;
5368
5369     solaris*)
5370       lt_cv_prog_cc_pic='-KPIC'
5371       lt_cv_prog_cc_static='-Bstatic'
5372       lt_cv_prog_cc_wl='-Wl,'
5373       ;;
5374
5375     sunos4*)
5376       lt_cv_prog_cc_pic='-PIC'
5377       lt_cv_prog_cc_static='-Bstatic'
5378       lt_cv_prog_cc_wl='-Qoption ld '
5379       ;;
5380
5381     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5382       lt_cv_prog_cc_pic='-KPIC'
5383       lt_cv_prog_cc_static='-Bstatic'
5384       if test "x$host_vendor" = xsni; then
5385         lt_cv_prog_cc_wl='-LD'
5386       else
5387         lt_cv_prog_cc_wl='-Wl,'
5388       fi
5389       ;;
5390
5391     uts4*)
5392       lt_cv_prog_cc_pic='-pic'
5393       lt_cv_prog_cc_static='-Bstatic'
5394       ;;
5395
5396     sysv4*MP*)
5397       if test -d /usr/nec ;then
5398         lt_cv_prog_cc_pic='-Kconform_pic'
5399         lt_cv_prog_cc_static='-Bstatic'
5400       fi
5401       ;;
5402
5403     *)
5404       lt_cv_prog_cc_can_build_shared=no
5405       ;;
5406     esac
5407   fi
5408
5409 fi
5410
5411 if test -z "$lt_cv_prog_cc_pic"; then
5412   echo "$as_me:$LINENO: result: none" >&5
5413 echo "${ECHO_T}none" >&6
5414 else
5415   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
5416 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
5417
5418   # Check to make sure the pic_flag actually works.
5419   echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5420 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
5421   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
5422   echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424       save_CFLAGS="$CFLAGS"
5425     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5426     cat >conftest.$ac_ext <<_ACEOF
5427 /* confdefs.h.  */
5428 _ACEOF
5429 cat confdefs.h >>conftest.$ac_ext
5430 cat >>conftest.$ac_ext <<_ACEOF
5431 /* end confdefs.h.  */
5432
5433 int
5434 main ()
5435 {
5436
5437   ;
5438   return 0;
5439 }
5440 _ACEOF
5441 rm -f conftest.$ac_objext
5442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5443   (eval $ac_compile) 2>conftest.er1
5444   ac_status=$?
5445   grep -v '^ *+' conftest.er1 >conftest.err
5446   rm -f conftest.er1
5447   cat conftest.err >&5
5448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5449   (exit $ac_status); } &&
5450          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5452   (eval $ac_try) 2>&5
5453   ac_status=$?
5454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455   (exit $ac_status); }; } &&
5456          { ac_try='test -s conftest.$ac_objext'
5457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458   (eval $ac_try) 2>&5
5459   ac_status=$?
5460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461   (exit $ac_status); }; }; then
5462         case $host_os in
5463       hpux9* | hpux10* | hpux11*)
5464         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5465         # they create non-PIC objects.  So, if there were any warnings, we
5466         # assume that PIC is not supported.
5467         if test -s conftest.err; then
5468           lt_cv_prog_cc_pic_works=no
5469         else
5470           lt_cv_prog_cc_pic_works=yes
5471         fi
5472         ;;
5473       *)
5474         lt_cv_prog_cc_pic_works=yes
5475         ;;
5476       esac
5477
5478 else
5479   echo "$as_me: failed program was:" >&5
5480 sed 's/^/| /' conftest.$ac_ext >&5
5481
5482       lt_cv_prog_cc_pic_works=no
5483
5484 fi
5485 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5486     CFLAGS="$save_CFLAGS"
5487
5488 fi
5489
5490
5491   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5492     lt_cv_prog_cc_pic=
5493     lt_cv_prog_cc_can_build_shared=no
5494   else
5495     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5496   fi
5497
5498   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
5499 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
5500 fi
5501 ##
5502 ## END FIXME
5503
5504 # Check for any special shared library compilation flags.
5505 if test -n "$lt_cv_prog_cc_shlib"; then
5506   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
5507 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
5508   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5509   else
5510    { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
5511 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
5512     lt_cv_prog_cc_can_build_shared=no
5513   fi
5514 fi
5515
5516 ## FIXME: this should be a separate macro
5517 ##
5518 echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5519 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
5520 if test "${lt_cv_prog_cc_static_works+set}" = set; then
5521   echo $ECHO_N "(cached) $ECHO_C" >&6
5522 else
5523     lt_cv_prog_cc_static_works=no
5524   save_LDFLAGS="$LDFLAGS"
5525   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5526   cat >conftest.$ac_ext <<_ACEOF
5527 /* confdefs.h.  */
5528 _ACEOF
5529 cat confdefs.h >>conftest.$ac_ext
5530 cat >>conftest.$ac_ext <<_ACEOF
5531 /* end confdefs.h.  */
5532
5533 int
5534 main ()
5535 {
5536
5537   ;
5538   return 0;
5539 }
5540 _ACEOF
5541 rm -f conftest.$ac_objext conftest$ac_exeext
5542 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5543   (eval $ac_link) 2>conftest.er1
5544   ac_status=$?
5545   grep -v '^ *+' conftest.er1 >conftest.err
5546   rm -f conftest.er1
5547   cat conftest.err >&5
5548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5549   (exit $ac_status); } &&
5550          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5552   (eval $ac_try) 2>&5
5553   ac_status=$?
5554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5555   (exit $ac_status); }; } &&
5556          { ac_try='test -s conftest$ac_exeext'
5557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5558   (eval $ac_try) 2>&5
5559   ac_status=$?
5560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561   (exit $ac_status); }; }; then
5562   lt_cv_prog_cc_static_works=yes
5563 else
5564   echo "$as_me: failed program was:" >&5
5565 sed 's/^/| /' conftest.$ac_ext >&5
5566
5567 fi
5568 rm -f conftest.err conftest.$ac_objext \
5569       conftest$ac_exeext conftest.$ac_ext
5570   LDFLAGS="$save_LDFLAGS"
5571
5572 fi
5573
5574
5575 # Belt *and* braces to stop my trousers falling down:
5576 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5577 echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
5578 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
5579
5580 pic_flag="$lt_cv_prog_cc_pic"
5581 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5582 wl="$lt_cv_prog_cc_wl"
5583 link_static_flag="$lt_cv_prog_cc_static"
5584 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5585 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5586 ##
5587 ## END FIXME
5588
5589
5590 ## FIXME: this should be a separate macro
5591 ##
5592 # Check to see if options -o and -c are simultaneously supported by compiler
5593 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
5594 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
5595 if test "${lt_cv_compiler_c_o+set}" = set; then
5596   echo $ECHO_N "(cached) $ECHO_C" >&6
5597 else
5598
5599 $rm -r conftest 2>/dev/null
5600 mkdir conftest
5601 cd conftest
5602 echo "int some_variable = 0;" > conftest.$ac_ext
5603 mkdir out
5604 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5605 # that will create temporary files in the current directory regardless of
5606 # the output directory.  Thus, making CWD read-only will cause this test
5607 # to fail, enabling locking or at least warning the user not to do parallel
5608 # builds.
5609 chmod -w .
5610 save_CFLAGS="$CFLAGS"
5611 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5612 compiler_c_o=no
5613 if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5614   # The compiler can only warn and ignore the option if not recognized
5615   # So say no if there are warnings
5616   if test -s out/conftest.err; then
5617     lt_cv_compiler_c_o=no
5618   else
5619     lt_cv_compiler_c_o=yes
5620   fi
5621 else
5622   # Append any errors to the config.log.
5623   cat out/conftest.err 1>&5
5624   lt_cv_compiler_c_o=no
5625 fi
5626 CFLAGS="$save_CFLAGS"
5627 chmod u+w .
5628 $rm conftest* out/*
5629 rmdir out
5630 cd ..
5631 rmdir conftest
5632 $rm -r conftest 2>/dev/null
5633
5634 fi
5635
5636 compiler_c_o=$lt_cv_compiler_c_o
5637 echo "$as_me:$LINENO: result: $compiler_c_o" >&5
5638 echo "${ECHO_T}$compiler_c_o" >&6
5639
5640 if test x"$compiler_c_o" = x"yes"; then
5641   # Check to see if we can write to a .lo
5642   echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
5643 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
5644   if test "${lt_cv_compiler_o_lo+set}" = set; then
5645   echo $ECHO_N "(cached) $ECHO_C" >&6
5646 else
5647
5648   lt_cv_compiler_o_lo=no
5649   save_CFLAGS="$CFLAGS"
5650   CFLAGS="$CFLAGS -c -o conftest.lo"
5651   save_objext="$ac_objext"
5652   ac_objext=lo
5653   cat >conftest.$ac_ext <<_ACEOF
5654 /* confdefs.h.  */
5655 _ACEOF
5656 cat confdefs.h >>conftest.$ac_ext
5657 cat >>conftest.$ac_ext <<_ACEOF
5658 /* end confdefs.h.  */
5659
5660 int
5661 main ()
5662 {
5663 int some_variable = 0;
5664   ;
5665   return 0;
5666 }
5667 _ACEOF
5668 rm -f conftest.$ac_objext
5669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5670   (eval $ac_compile) 2>conftest.er1
5671   ac_status=$?
5672   grep -v '^ *+' conftest.er1 >conftest.err
5673   rm -f conftest.er1
5674   cat conftest.err >&5
5675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676   (exit $ac_status); } &&
5677          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5679   (eval $ac_try) 2>&5
5680   ac_status=$?
5681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682   (exit $ac_status); }; } &&
5683          { ac_try='test -s conftest.$ac_objext'
5684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5685   (eval $ac_try) 2>&5
5686   ac_status=$?
5687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688   (exit $ac_status); }; }; then
5689       # The compiler can only warn and ignore the option if not recognized
5690     # So say no if there are warnings
5691     if test -s conftest.err; then
5692       lt_cv_compiler_o_lo=no
5693     else
5694       lt_cv_compiler_o_lo=yes
5695     fi
5696
5697 else
5698   echo "$as_me: failed program was:" >&5
5699 sed 's/^/| /' conftest.$ac_ext >&5
5700
5701 fi
5702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5703   ac_objext="$save_objext"
5704   CFLAGS="$save_CFLAGS"
5705
5706 fi
5707
5708   compiler_o_lo=$lt_cv_compiler_o_lo
5709   echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
5710 echo "${ECHO_T}$compiler_o_lo" >&6
5711 else
5712   compiler_o_lo=no
5713 fi
5714 ##
5715 ## END FIXME
5716
5717 ## FIXME: this should be a separate macro
5718 ##
5719 # Check to see if we can do hard links to lock some files if needed
5720 hard_links="nottested"
5721 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5722   # do not overwrite the value of need_locks provided by the user
5723   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
5724 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
5725   hard_links=yes
5726   $rm conftest*
5727   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5728   touch conftest.a
5729   ln conftest.a conftest.b 2>&5 || hard_links=no
5730   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5731   echo "$as_me:$LINENO: result: $hard_links" >&5
5732 echo "${ECHO_T}$hard_links" >&6
5733   if test "$hard_links" = no; then
5734     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
5735 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
5736     need_locks=warn
5737   fi
5738 else
5739   need_locks=no
5740 fi
5741 ##
5742 ## END FIXME
5743
5744 ## FIXME: this should be a separate macro
5745 ##
5746 if test "$GCC" = yes; then
5747   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5748   echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5749 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
5750   echo "int some_variable = 0;" > conftest.$ac_ext
5751   save_CFLAGS="$CFLAGS"
5752   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5753   compiler_rtti_exceptions=no
5754   cat >conftest.$ac_ext <<_ACEOF
5755 /* confdefs.h.  */
5756 _ACEOF
5757 cat confdefs.h >>conftest.$ac_ext
5758 cat >>conftest.$ac_ext <<_ACEOF
5759 /* end confdefs.h.  */
5760
5761 int
5762 main ()
5763 {
5764 int some_variable = 0;
5765   ;
5766   return 0;
5767 }
5768 _ACEOF
5769 rm -f conftest.$ac_objext
5770 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5771   (eval $ac_compile) 2>conftest.er1
5772   ac_status=$?
5773   grep -v '^ *+' conftest.er1 >conftest.err
5774   rm -f conftest.er1
5775   cat conftest.err >&5
5776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777   (exit $ac_status); } &&
5778          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
5779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5780   (eval $ac_try) 2>&5
5781   ac_status=$?
5782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5783   (exit $ac_status); }; } &&
5784          { ac_try='test -s conftest.$ac_objext'
5785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5786   (eval $ac_try) 2>&5
5787   ac_status=$?
5788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789   (exit $ac_status); }; }; then
5790       # The compiler can only warn and ignore the option if not recognized
5791     # So say no if there are warnings
5792     if test -s conftest.err; then
5793       compiler_rtti_exceptions=no
5794     else
5795       compiler_rtti_exceptions=yes
5796     fi
5797
5798 else
5799   echo "$as_me: failed program was:" >&5
5800 sed 's/^/| /' conftest.$ac_ext >&5
5801
5802 fi
5803 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5804   CFLAGS="$save_CFLAGS"
5805   echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
5806 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
5807
5808   if test "$compiler_rtti_exceptions" = "yes"; then
5809     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5810   else
5811     no_builtin_flag=' -fno-builtin'
5812   fi
5813 fi
5814 ##
5815 ## END FIXME
5816
5817 ## FIXME: this should be a separate macro
5818 ##
5819 # See if the linker supports building shared libraries.
5820 echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
5821 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
5822
5823 allow_undefined_flag=
5824 no_undefined_flag=
5825 need_lib_prefix=unknown
5826 need_version=unknown
5827 # when you set need_version to no, make sure it does not cause -set_version
5828 # flags to be left without arguments
5829 archive_cmds=
5830 archive_expsym_cmds=
5831 old_archive_from_new_cmds=
5832 old_archive_from_expsyms_cmds=
5833 export_dynamic_flag_spec=
5834 whole_archive_flag_spec=
5835 thread_safe_flag_spec=
5836 hardcode_into_libs=no
5837 hardcode_libdir_flag_spec=
5838 hardcode_libdir_separator=
5839 hardcode_direct=no
5840 hardcode_minus_L=no
5841 hardcode_shlibpath_var=unsupported
5842 runpath_var=
5843 link_all_deplibs=unknown
5844 always_export_symbols=no
5845 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5846 # include_expsyms should be a list of space-separated symbols to be *always*
5847 # included in the symbol list
5848 include_expsyms=
5849 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5850 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5851 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5852 # as well as any symbol that contains `d'.
5853 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5854 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5855 # platforms (ab)use it in PIC code, but their linkers get confused if
5856 # the symbol is explicitly referenced.  Since portable code cannot
5857 # rely on this symbol name, it's probably fine to never include it in
5858 # preloaded symbol tables.
5859 extract_expsyms_cmds=
5860
5861 case $host_os in
5862 cygwin* | mingw* | pw32*)
5863   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5864   # When not using gcc, we currently assume that we are using
5865   # Microsoft Visual C++.
5866   if test "$GCC" != yes; then
5867     with_gnu_ld=no
5868   fi
5869   ;;
5870 openbsd*)
5871   with_gnu_ld=no
5872   ;;
5873 esac
5874
5875 ld_shlibs=yes
5876 if test "$with_gnu_ld" = yes; then
5877   # If archive_cmds runs LD, not CC, wlarc should be empty
5878   wlarc='${wl}'
5879
5880   # See if GNU ld supports shared libraries.
5881   case $host_os in
5882   aix3* | aix4* | aix5*)
5883     # On AIX, the GNU linker is very broken
5884     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5885     ld_shlibs=no
5886     cat <<EOF 1>&2
5887
5888 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5889 *** to be unable to reliably create shared libraries on AIX.
5890 *** Therefore, libtool is disabling shared libraries support.  If you
5891 *** really care for shared libraries, you may want to modify your PATH
5892 *** so that a non-GNU linker is found, and then restart.
5893
5894 EOF
5895     ;;
5896
5897   amigaos*)
5898     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)'
5899     hardcode_libdir_flag_spec='-L$libdir'
5900     hardcode_minus_L=yes
5901
5902     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5903     # that the semantics of dynamic libraries on AmigaOS, at least up
5904     # to version 4, is to share data among multiple programs linked
5905     # with the same dynamic library.  Since this doesn't match the
5906     # behavior of shared libraries on other platforms, we can use
5907     # them.
5908     ld_shlibs=no
5909     ;;
5910
5911   beos*)
5912     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5913       allow_undefined_flag=unsupported
5914       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5915       # support --undefined.  This deserves some investigation.  FIXME
5916       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5917     else
5918       ld_shlibs=no
5919     fi
5920     ;;
5921
5922   cygwin* | mingw* | pw32*)
5923     # hardcode_libdir_flag_spec is actually meaningless, as there is
5924     # no search path for DLLs.
5925     hardcode_libdir_flag_spec='-L$libdir'
5926     allow_undefined_flag=unsupported
5927     always_export_symbols=yes
5928
5929     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5930       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5931       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5932       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5933       else $CC -o impgen impgen.c ; fi)~
5934       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5935
5936     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5937
5938     # cygwin and mingw dlls have different entry points and sets of symbols
5939     # to exclude.
5940     # FIXME: what about values for MSVC?
5941     dll_entry=__cygwin_dll_entry@12
5942     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5943     case $host_os in
5944     mingw*)
5945       # mingw values
5946       dll_entry=_DllMainCRTStartup@12
5947       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5948       ;;
5949     esac
5950
5951     # mingw and cygwin differ, and it's simplest to just exclude the union
5952     # of the two symbol sets.
5953     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5954
5955     # recent cygwin and mingw systems supply a stub DllMain which the user
5956     # can override, but on older systems we have to supply one (in ltdll.c)
5957     if test "x$lt_cv_need_dllmain" = "xyes"; then
5958       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5959       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~
5960         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5961     else
5962       ltdll_obj=
5963       ltdll_cmds=
5964     fi
5965
5966     # Extract the symbol export list from an `--export-all' def file,
5967     # then regenerate the def file from the symbol export list, so that
5968     # the compiled dll only exports the symbol export list.
5969     # Be careful not to strip the DATA tag left be newer dlltools.
5970     export_symbols_cmds="$ltdll_cmds"'
5971       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5972       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5973
5974     # If the export-symbols file already is a .def file (1st line
5975     # is EXPORTS), use it as is.
5976     # If DATA tags from a recent dlltool are present, honour them!
5977     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5978         cp $export_symbols $output_objdir/$soname-def;
5979       else
5980         echo EXPORTS > $output_objdir/$soname-def;
5981         _lt_hint=1;
5982         cat $export_symbols | while read symbol; do
5983          set dummy \$symbol;
5984          case \$# in
5985            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5986            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5987          esac;
5988          _lt_hint=`expr 1 + \$_lt_hint`;
5989         done;
5990       fi~
5991       '"$ltdll_cmds"'
5992       $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~
5993       $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~
5994       $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~
5995       $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~
5996       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5997     ;;
5998
5999   netbsd*)
6000     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6001       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6002       wlarc=
6003     else
6004       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6005       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6006     fi
6007     ;;
6008
6009   solaris* | sysv5*)
6010     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
6011       ld_shlibs=no
6012       cat <<EOF 1>&2
6013
6014 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6015 *** create shared libraries on Solaris systems.  Therefore, libtool
6016 *** is disabling shared libraries support.  We urge you to upgrade GNU
6017 *** binutils to release 2.9.1 or newer.  Another option is to modify
6018 *** your PATH or compiler configuration so that the native linker is
6019 *** used, and then restart.
6020
6021 EOF
6022     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6023       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6024       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6025     else
6026       ld_shlibs=no
6027     fi
6028     ;;
6029
6030   sunos4*)
6031     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6032     wlarc=
6033     hardcode_direct=yes
6034     hardcode_shlibpath_var=no
6035     ;;
6036
6037   *)
6038     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6039       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6040       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6041     else
6042       ld_shlibs=no
6043     fi
6044     ;;
6045   esac
6046
6047   if test "$ld_shlibs" = yes; then
6048     runpath_var=LD_RUN_PATH
6049     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
6050     export_dynamic_flag_spec='${wl}--export-dynamic'
6051     case $host_os in
6052     cygwin* | mingw* | pw32*)
6053       # dlltool doesn't understand --whole-archive et. al.
6054       whole_archive_flag_spec=
6055       ;;
6056     *)
6057       # ancient GNU ld didn't support --whole-archive et. al.
6058       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
6059         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6060       else
6061         whole_archive_flag_spec=
6062       fi
6063       ;;
6064     esac
6065   fi
6066 else
6067   # PORTME fill in a description of your system's linker (not GNU ld)
6068   case $host_os in
6069   aix3*)
6070     allow_undefined_flag=unsupported
6071     always_export_symbols=yes
6072     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'
6073     # Note: this linker hardcodes the directories in LIBPATH if there
6074     # are no directories specified by -L.
6075     hardcode_minus_L=yes
6076     if test "$GCC" = yes && test -z "$link_static_flag"; then
6077       # Neither direct hardcoding nor static linking is supported with a
6078       # broken collect2.
6079       hardcode_direct=unsupported
6080     fi
6081     ;;
6082
6083   aix4* | aix5*)
6084     if test "$host_cpu" = ia64; then
6085       # On IA64, the linker does run time linking by default, so we don't
6086       # have to do anything special.
6087       aix_use_runtimelinking=no
6088       exp_sym_flag='-Bexport'
6089       no_entry_flag=""
6090     else
6091       aix_use_runtimelinking=no
6092
6093       # Test if we are trying to use run time linking or normal
6094       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6095       # need to do runtime linking.
6096       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
6097         for ld_flag in $LDFLAGS; do
6098           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6099             aix_use_runtimelinking=yes
6100             break
6101           fi
6102         done
6103       esac
6104
6105       exp_sym_flag='-bexport'
6106       no_entry_flag='-bnoentry'
6107     fi
6108
6109     # When large executables or shared objects are built, AIX ld can
6110     # have problems creating the table of contents.  If linking a library
6111     # or program results in "error TOC overflow" add -mminimal-toc to
6112     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6113     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6114
6115     hardcode_direct=yes
6116     archive_cmds=''
6117     hardcode_libdir_separator=':'
6118     if test "$GCC" = yes; then
6119       case $host_os in aix4.[012]|aix4.[012].*)
6120         collect2name=`${CC} -print-prog-name=collect2`
6121         if test -f "$collect2name" && \
6122           strings "$collect2name" | grep resolve_lib_name >/dev/null
6123         then
6124           # We have reworked collect2
6125           hardcode_direct=yes
6126         else
6127           # We have old collect2
6128           hardcode_direct=unsupported
6129           # It fails to find uninstalled libraries when the uninstalled
6130           # path is not listed in the libpath.  Setting hardcode_minus_L
6131           # to unsupported forces relinking
6132           hardcode_minus_L=yes
6133           hardcode_libdir_flag_spec='-L$libdir'
6134           hardcode_libdir_separator=
6135         fi
6136       esac
6137
6138       shared_flag='-shared'
6139     else
6140       # not using gcc
6141       if test "$host_cpu" = ia64; then
6142         shared_flag='${wl}-G'
6143       else
6144         if test "$aix_use_runtimelinking" = yes; then
6145           shared_flag='${wl}-G'
6146         else
6147           shared_flag='${wl}-bM:SRE'
6148         fi
6149       fi
6150     fi
6151
6152     # It seems that -bexpall can do strange things, so it is better to
6153     # generate a list of symbols to export.
6154     always_export_symbols=yes
6155     if test "$aix_use_runtimelinking" = yes; then
6156       # Warning - without using the other runtime loading flags (-brtl),
6157       # -berok will link without error, but may produce a broken library.
6158       allow_undefined_flag='-berok'
6159       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
6160       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"
6161     else
6162       if test "$host_cpu" = ia64; then
6163         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
6164         allow_undefined_flag="-z nodefs"
6165         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"
6166       else
6167         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
6168         # Warning - without using the other run time loading flags,
6169         # -berok will link without error, but may produce a broken library.
6170         allow_undefined_flag='${wl}-berok'
6171         # This is a bit strange, but is similar to how AIX traditionally builds
6172         # it's shared libraries.
6173         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'
6174       fi
6175     fi
6176     ;;
6177
6178   amigaos*)
6179     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)'
6180     hardcode_libdir_flag_spec='-L$libdir'
6181     hardcode_minus_L=yes
6182     # see comment about different semantics on the GNU ld section
6183     ld_shlibs=no
6184     ;;
6185
6186   cygwin* | mingw* | pw32*)
6187     # When not using gcc, we currently assume that we are using
6188     # Microsoft Visual C++.
6189     # hardcode_libdir_flag_spec is actually meaningless, as there is
6190     # no search path for DLLs.
6191     hardcode_libdir_flag_spec=' '
6192     allow_undefined_flag=unsupported
6193     # Tell ltmain to make .lib files, not .a files.
6194     libext=lib
6195     # FIXME: Setting linknames here is a bad hack.
6196     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6197     # The linker will automatically build a .lib file if we build a DLL.
6198     old_archive_from_new_cmds='true'
6199     # FIXME: Should let the user specify the lib program.
6200     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
6201     fix_srcfile_path='`cygpath -w "$srcfile"`'
6202     ;;
6203
6204   darwin* | rhapsody*)
6205     case "$host_os" in
6206     rhapsody* | darwin1.[012])
6207       allow_undefined_flag='-undefined suppress'
6208       ;;
6209     *) # Darwin 1.3 on
6210       allow_undefined_flag='-flat_namespace -undefined suppress'
6211       ;;
6212     esac
6213     # FIXME: Relying on posixy $() will cause problems for
6214     #        cross-compilation, but unfortunately the echo tests do not
6215     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6216     #        `"' quotes if we put them in here... so don't!
6217     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
6218     # We need to add '_' to the symbols in $export_symbols first
6219     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6220     hardcode_direct=yes
6221     hardcode_shlibpath_var=no
6222     whole_archive_flag_spec='-all_load $convenience'
6223     ;;
6224
6225   freebsd1*)
6226     ld_shlibs=no
6227     ;;
6228
6229   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6230   # support.  Future versions do this automatically, but an explicit c++rt0.o
6231   # does not break anything, and helps significantly (at the cost of a little
6232   # extra space).
6233   freebsd2.2*)
6234     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6235     hardcode_libdir_flag_spec='-R$libdir'
6236     hardcode_direct=yes
6237     hardcode_shlibpath_var=no
6238     ;;
6239
6240   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6241   freebsd2*)
6242     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6243     hardcode_direct=yes
6244     hardcode_minus_L=yes
6245     hardcode_shlibpath_var=no
6246     ;;
6247
6248   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6249   freebsd*)
6250     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6251     hardcode_libdir_flag_spec='-R$libdir'
6252     hardcode_direct=yes
6253     hardcode_shlibpath_var=no
6254     ;;
6255
6256   hpux9* | hpux10* | hpux11*)
6257     case $host_os in
6258     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' ;;
6259     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6260     esac
6261     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6262     hardcode_libdir_separator=:
6263     hardcode_direct=yes
6264     hardcode_minus_L=yes # Not in the search PATH, but as the default
6265                          # location of the library.
6266     export_dynamic_flag_spec='${wl}-E'
6267     ;;
6268
6269   irix5* | irix6* | nonstopux*)
6270     if test "$GCC" = yes; then
6271       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'
6272     else
6273       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'
6274     fi
6275     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6276     hardcode_libdir_separator=:
6277     link_all_deplibs=yes
6278     ;;
6279
6280   netbsd*)
6281     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6282       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6283     else
6284       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6285     fi
6286     hardcode_libdir_flag_spec='-R$libdir'
6287     hardcode_direct=yes
6288     hardcode_shlibpath_var=no
6289     ;;
6290
6291   newsos6)
6292     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6293     hardcode_direct=yes
6294     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6295     hardcode_libdir_separator=:
6296     hardcode_shlibpath_var=no
6297     ;;
6298
6299   openbsd*)
6300     hardcode_direct=yes
6301     hardcode_shlibpath_var=no
6302     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6303       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6304       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6305       export_dynamic_flag_spec='${wl}-E'
6306     else
6307       case "$host_os" in
6308       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6309         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6310         hardcode_libdir_flag_spec='-R$libdir'
6311         ;;
6312       *)
6313         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6314         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6315         ;;
6316       esac
6317     fi
6318     ;;
6319
6320   os2*)
6321     hardcode_libdir_flag_spec='-L$libdir'
6322     hardcode_minus_L=yes
6323     allow_undefined_flag=unsupported
6324     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'
6325     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6326     ;;
6327
6328   osf3*)
6329     if test "$GCC" = yes; then
6330       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6331       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'
6332     else
6333       allow_undefined_flag=' -expect_unresolved \*'
6334       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'
6335     fi
6336     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6337     hardcode_libdir_separator=:
6338     ;;
6339
6340   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6341     if test "$GCC" = yes; then
6342       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6343       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'
6344       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6345     else
6346       allow_undefined_flag=' -expect_unresolved \*'
6347       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'
6348       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6349       $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'
6350
6351       #Both c and cxx compiler support -rpath directly
6352       hardcode_libdir_flag_spec='-rpath $libdir'
6353     fi
6354     hardcode_libdir_separator=:
6355     ;;
6356
6357   sco3.2v5*)
6358     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6359     hardcode_shlibpath_var=no
6360     runpath_var=LD_RUN_PATH
6361     hardcode_runpath_var=yes
6362     export_dynamic_flag_spec='${wl}-Bexport'
6363     ;;
6364
6365   solaris*)
6366     # gcc --version < 3.0 without binutils cannot create self contained
6367     # shared libraries reliably, requiring libgcc.a to resolve some of
6368     # the object symbols generated in some cases.  Libraries that use
6369     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6370     # a copy of libgcc.a into every shared library to guarantee resolving
6371     # such symbols causes other problems:  According to Tim Van Holder
6372     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6373     # (to the application) exception stack for one thing.
6374     no_undefined_flag=' -z defs'
6375     if test "$GCC" = yes; then
6376       case `$CC --version 2>/dev/null` in
6377       [12].*)
6378         cat <<EOF 1>&2
6379
6380 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6381 *** create self contained shared libraries on Solaris systems, without
6382 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6383 *** -no-undefined support, which will at least allow you to build shared
6384 *** libraries.  However, you may find that when you link such libraries
6385 *** into an application without using GCC, you have to manually add
6386 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6387 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6388 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6389
6390 EOF
6391         no_undefined_flag=
6392         ;;
6393       esac
6394     fi
6395     # $CC -shared without GNU ld will not create a library from C++
6396     # object files and a static libstdc++, better avoid it by now
6397     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6398     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6399                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6400     hardcode_libdir_flag_spec='-R$libdir'
6401     hardcode_shlibpath_var=no
6402     case $host_os in
6403     solaris2.[0-5] | solaris2.[0-5].*) ;;
6404     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6405       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6406     esac
6407     link_all_deplibs=yes
6408     ;;
6409
6410   sunos4*)
6411     if test "x$host_vendor" = xsequent; then
6412       # Use $CC to link under sequent, because it throws in some extra .o
6413       # files that make .init and .fini sections work.
6414       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6415     else
6416       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6417     fi
6418     hardcode_libdir_flag_spec='-L$libdir'
6419     hardcode_direct=yes
6420     hardcode_minus_L=yes
6421     hardcode_shlibpath_var=no
6422     ;;
6423
6424   sysv4)
6425     if test "x$host_vendor" = xsno; then
6426       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6427       hardcode_direct=yes # is this really true???
6428     else
6429       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6430       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6431     fi
6432     runpath_var='LD_RUN_PATH'
6433     hardcode_shlibpath_var=no
6434     ;;
6435
6436   sysv4.3*)
6437     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6438     hardcode_shlibpath_var=no
6439     export_dynamic_flag_spec='-Bexport'
6440     ;;
6441
6442   sysv5*)
6443     no_undefined_flag=' -z text'
6444     # $CC -shared without GNU ld will not create a library from C++
6445     # object files and a static libstdc++, better avoid it by now
6446     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6447     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6448                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6449     hardcode_libdir_flag_spec=
6450     hardcode_shlibpath_var=no
6451     runpath_var='LD_RUN_PATH'
6452     ;;
6453
6454   uts4*)
6455     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6456     hardcode_libdir_flag_spec='-L$libdir'
6457     hardcode_shlibpath_var=no
6458     ;;
6459
6460   dgux*)
6461     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6462     hardcode_libdir_flag_spec='-L$libdir'
6463     hardcode_shlibpath_var=no
6464     ;;
6465
6466   sysv4*MP*)
6467     if test -d /usr/nec; then
6468       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6469       hardcode_shlibpath_var=no
6470       runpath_var=LD_RUN_PATH
6471       hardcode_runpath_var=yes
6472       ld_shlibs=yes
6473     fi
6474     ;;
6475
6476   sysv4.2uw2*)
6477     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6478     hardcode_direct=yes
6479     hardcode_minus_L=no
6480     hardcode_shlibpath_var=no
6481     hardcode_runpath_var=yes
6482     runpath_var=LD_RUN_PATH
6483     ;;
6484
6485   sysv5uw7* | unixware7*)
6486     no_undefined_flag='${wl}-z ${wl}text'
6487     if test "$GCC" = yes; then
6488       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6489     else
6490       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6491     fi
6492     runpath_var='LD_RUN_PATH'
6493     hardcode_shlibpath_var=no
6494     ;;
6495
6496   *)
6497     ld_shlibs=no
6498     ;;
6499   esac
6500 fi
6501 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
6502 echo "${ECHO_T}$ld_shlibs" >&6
6503 test "$ld_shlibs" = no && can_build_shared=no
6504 ##
6505 ## END FIXME
6506
6507 ## FIXME: this should be a separate macro
6508 ##
6509 # Check hardcoding attributes.
6510 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
6511 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
6512 hardcode_action=
6513 if test -n "$hardcode_libdir_flag_spec" || \
6514    test -n "$runpath_var"; then
6515
6516   # We can hardcode non-existant directories.
6517   if test "$hardcode_direct" != no &&
6518      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6519      # have to relink, otherwise we might link with an installed library
6520      # when we should be linking with a yet-to-be-installed one
6521      ## test "$hardcode_shlibpath_var" != no &&
6522      test "$hardcode_minus_L" != no; then
6523     # Linking always hardcodes the temporary library directory.
6524     hardcode_action=relink
6525   else
6526     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6527     hardcode_action=immediate
6528   fi
6529 else
6530   # We cannot hardcode anything, or else we can only hardcode existing
6531   # directories.
6532   hardcode_action=unsupported
6533 fi
6534 echo "$as_me:$LINENO: result: $hardcode_action" >&5
6535 echo "${ECHO_T}$hardcode_action" >&6
6536 ##
6537 ## END FIXME
6538
6539 ## FIXME: this should be a separate macro
6540 ##
6541 striplib=
6542 old_striplib=
6543 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
6544 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
6545 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6546   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6547   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6548   echo "$as_me:$LINENO: result: yes" >&5
6549 echo "${ECHO_T}yes" >&6
6550 else
6551   echo "$as_me:$LINENO: result: no" >&5
6552 echo "${ECHO_T}no" >&6
6553 fi
6554 ##
6555 ## END FIXME
6556
6557 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6558 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6559
6560 ## FIXME: this should be a separate macro
6561 ##
6562 # PORTME Fill in your ld.so characteristics
6563 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
6564 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
6565 library_names_spec=
6566 libname_spec='lib$name'
6567 soname_spec=
6568 postinstall_cmds=
6569 postuninstall_cmds=
6570 finish_cmds=
6571 finish_eval=
6572 shlibpath_var=
6573 shlibpath_overrides_runpath=unknown
6574 version_type=none
6575 dynamic_linker="$host_os ld.so"
6576 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6577 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6578
6579 case $host_os in
6580 aix3*)
6581   version_type=linux
6582   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6583   shlibpath_var=LIBPATH
6584
6585   # AIX has no versioning support, so we append a major version to the name.
6586   soname_spec='${libname}${release}.so$major'
6587   ;;
6588
6589 aix4* | aix5*)
6590   version_type=linux
6591   if test "$host_cpu" = ia64; then
6592     # AIX 5 supports IA64
6593     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6594     shlibpath_var=LD_LIBRARY_PATH
6595   else
6596     # With GCC up to 2.95.x, collect2 would create an import file
6597     # for dependence libraries.  The import file would start with
6598     # the line `#! .'.  This would cause the generated library to
6599     # depend on `.', always an invalid library.  This was fixed in
6600     # development snapshots of GCC prior to 3.0.
6601     case $host_os in
6602       aix4 | aix4.[01] | aix4.[01].*)
6603         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6604              echo ' yes '
6605              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6606           :
6607         else
6608           can_build_shared=no
6609         fi
6610         ;;
6611     esac
6612     # AIX (on Power*) has no versioning support, so currently we can
6613     # not hardcode correct soname into executable. Probably we can
6614     # add versioning support to collect2, so additional links can
6615     # be useful in future.
6616     if test "$aix_use_runtimelinking" = yes; then
6617       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6618       # instead of lib<name>.a to let people know that these are not
6619       # typical AIX shared libraries.
6620       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6621     else
6622       # We preserve .a as extension for shared libraries through AIX4.2
6623       # and later when we are not doing run time linking.
6624       library_names_spec='${libname}${release}.a $libname.a'
6625       soname_spec='${libname}${release}.so$major'
6626     fi
6627     shlibpath_var=LIBPATH
6628   fi
6629   ;;
6630
6631 amigaos*)
6632   library_names_spec='$libname.ixlibrary $libname.a'
6633   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6634   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'
6635   ;;
6636
6637 beos*)
6638   library_names_spec='${libname}.so'
6639   dynamic_linker="$host_os ld.so"
6640   shlibpath_var=LIBRARY_PATH
6641   ;;
6642
6643 bsdi4*)
6644   version_type=linux
6645   need_version=no
6646   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6647   soname_spec='${libname}${release}.so$major'
6648   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6649   shlibpath_var=LD_LIBRARY_PATH
6650   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6651   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6652   export_dynamic_flag_spec=-rdynamic
6653   # the default ld.so.conf also contains /usr/contrib/lib and
6654   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6655   # libtool to hard-code these into programs
6656   ;;
6657
6658 cygwin* | mingw* | pw32*)
6659   version_type=windows
6660   need_version=no
6661   need_lib_prefix=no
6662   case $GCC,$host_os in
6663   yes,cygwin*)
6664     library_names_spec='$libname.dll.a'
6665     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6666     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6667       dldir=$destdir/`dirname \$dlpath`~
6668       test -d \$dldir || mkdir -p \$dldir~
6669       $install_prog .libs/$dlname \$dldir/$dlname'
6670     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6671       dlpath=$dir/\$dldll~
6672        $rm \$dlpath'
6673     ;;
6674   yes,mingw*)
6675     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6676     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6677     ;;
6678   yes,pw32*)
6679     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6680     ;;
6681   *)
6682     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6683     ;;
6684   esac
6685   dynamic_linker='Win32 ld.exe'
6686   # FIXME: first we should search . and the directory the executable is in
6687   shlibpath_var=PATH
6688   ;;
6689
6690 darwin* | rhapsody*)
6691   dynamic_linker="$host_os dyld"
6692   version_type=darwin
6693   need_lib_prefix=no
6694   need_version=no
6695   # FIXME: Relying on posixy $() will cause problems for
6696   #        cross-compilation, but unfortunately the echo tests do not
6697   #        yet detect zsh echo's removal of \ escapes.
6698   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)'
6699   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6700   shlibpath_overrides_runpath=yes
6701   shlibpath_var=DYLD_LIBRARY_PATH
6702   ;;
6703
6704 freebsd1*)
6705   dynamic_linker=no
6706   ;;
6707
6708 freebsd*)
6709   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6710   version_type=freebsd-$objformat
6711   case $version_type in
6712     freebsd-elf*)
6713       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6714       need_version=no
6715       need_lib_prefix=no
6716       ;;
6717     freebsd-*)
6718       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6719       need_version=yes
6720       ;;
6721   esac
6722   shlibpath_var=LD_LIBRARY_PATH
6723   case $host_os in
6724   freebsd2*)
6725     shlibpath_overrides_runpath=yes
6726     ;;
6727   *)
6728     shlibpath_overrides_runpath=no
6729     hardcode_into_libs=yes
6730     ;;
6731   esac
6732   ;;
6733
6734 gnu*)
6735   version_type=linux
6736   need_lib_prefix=no
6737   need_version=no
6738   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6739   soname_spec='${libname}${release}.so$major'
6740   shlibpath_var=LD_LIBRARY_PATH
6741   hardcode_into_libs=yes
6742   ;;
6743
6744 hpux9* | hpux10* | hpux11*)
6745   # Give a soname corresponding to the major version so that dld.sl refuses to
6746   # link against other versions.
6747   dynamic_linker="$host_os dld.sl"
6748   version_type=sunos
6749   need_lib_prefix=no
6750   need_version=no
6751   shlibpath_var=SHLIB_PATH
6752   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6753   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6754   soname_spec='${libname}${release}.sl$major'
6755   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6756   postinstall_cmds='chmod 555 $lib'
6757   ;;
6758
6759 irix5* | irix6* | nonstopux*)
6760   case $host_os in
6761     nonstopux*) version_type=nonstopux ;;
6762     *)          version_type=irix ;;
6763   esac
6764   need_lib_prefix=no
6765   need_version=no
6766   soname_spec='${libname}${release}.so$major'
6767   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6768   case $host_os in
6769   irix5* | nonstopux*)
6770     libsuff= shlibsuff=
6771     ;;
6772   *)
6773     case $LD in # libtool.m4 will add one of these switches to LD
6774     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6775     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6776     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6777     *) libsuff= shlibsuff= libmagic=never-match;;
6778     esac
6779     ;;
6780   esac
6781   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6782   shlibpath_overrides_runpath=no
6783   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6784   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6785   ;;
6786
6787 # No shared lib support for Linux oldld, aout, or coff.
6788 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6789   dynamic_linker=no
6790   ;;
6791
6792 # This must be Linux ELF.
6793 linux-gnu*)
6794   version_type=linux
6795   need_lib_prefix=no
6796   need_version=no
6797   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6798   soname_spec='${libname}${release}.so$major'
6799   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6800   shlibpath_var=LD_LIBRARY_PATH
6801   shlibpath_overrides_runpath=no
6802   # This implies no fast_install, which is unacceptable.
6803   # Some rework will be needed to allow for fast_install
6804   # before this can be enabled.
6805   hardcode_into_libs=yes
6806
6807   # We used to test for /lib/ld.so.1 and disable shared libraries on
6808   # powerpc, because MkLinux only supported shared libraries with the
6809   # GNU dynamic linker.  Since this was broken with cross compilers,
6810   # most powerpc-linux boxes support dynamic linking these days and
6811   # people can always --disable-shared, the test was removed, and we
6812   # assume the GNU/Linux dynamic linker is in use.
6813   dynamic_linker='GNU/Linux ld.so'
6814   ;;
6815
6816 netbsd*)
6817   version_type=sunos
6818   need_lib_prefix=no
6819   need_version=no
6820   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6821     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6822     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6823     dynamic_linker='NetBSD (a.out) ld.so'
6824   else
6825     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6826     soname_spec='${libname}${release}.so$major'
6827     dynamic_linker='NetBSD ld.elf_so'
6828   fi
6829   shlibpath_var=LD_LIBRARY_PATH
6830   shlibpath_overrides_runpath=yes
6831   hardcode_into_libs=yes
6832   ;;
6833
6834 newsos6)
6835   version_type=linux
6836   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6837   shlibpath_var=LD_LIBRARY_PATH
6838   shlibpath_overrides_runpath=yes
6839   ;;
6840
6841 openbsd*)
6842   version_type=sunos
6843   need_lib_prefix=no
6844   need_version=no
6845   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6846     case "$host_os" in
6847     openbsd2.[89] | openbsd2.[89].*)
6848       shlibpath_overrides_runpath=no
6849       ;;
6850     *)
6851       shlibpath_overrides_runpath=yes
6852       ;;
6853     esac
6854   else
6855     shlibpath_overrides_runpath=yes
6856   fi
6857   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6858   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6859   shlibpath_var=LD_LIBRARY_PATH
6860   ;;
6861
6862 os2*)
6863   libname_spec='$name'
6864   need_lib_prefix=no
6865   library_names_spec='$libname.dll $libname.a'
6866   dynamic_linker='OS/2 ld.exe'
6867   shlibpath_var=LIBPATH
6868   ;;
6869
6870 osf3* | osf4* | osf5*)
6871   version_type=osf
6872   need_version=no
6873   soname_spec='${libname}${release}.so'
6874   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6875   shlibpath_var=LD_LIBRARY_PATH
6876   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6877   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6878   ;;
6879
6880 sco3.2v5*)
6881   version_type=osf
6882   soname_spec='${libname}${release}.so$major'
6883   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6884   shlibpath_var=LD_LIBRARY_PATH
6885   ;;
6886
6887 solaris*)
6888   version_type=linux
6889   need_lib_prefix=no
6890   need_version=no
6891   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6892   soname_spec='${libname}${release}.so$major'
6893   shlibpath_var=LD_LIBRARY_PATH
6894   shlibpath_overrides_runpath=yes
6895   hardcode_into_libs=yes
6896   # ldd complains unless libraries are executable
6897   postinstall_cmds='chmod +x $lib'
6898   ;;
6899
6900 sunos4*)
6901   version_type=sunos
6902   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6903   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6904   shlibpath_var=LD_LIBRARY_PATH
6905   shlibpath_overrides_runpath=yes
6906   if test "$with_gnu_ld" = yes; then
6907     need_lib_prefix=no
6908   fi
6909   need_version=yes
6910   ;;
6911
6912 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6913   version_type=linux
6914   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6915   soname_spec='${libname}${release}.so$major'
6916   shlibpath_var=LD_LIBRARY_PATH
6917   case $host_vendor in
6918     sni)
6919       shlibpath_overrides_runpath=no
6920       ;;
6921     motorola)
6922       need_lib_prefix=no
6923       need_version=no
6924       shlibpath_overrides_runpath=no
6925       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6926       ;;
6927   esac
6928   ;;
6929
6930 uts4*)
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   ;;
6936
6937 dgux*)
6938   version_type=linux
6939   need_lib_prefix=no
6940   need_version=no
6941   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6942   soname_spec='${libname}${release}.so$major'
6943   shlibpath_var=LD_LIBRARY_PATH
6944   ;;
6945
6946 sysv4*MP*)
6947   if test -d /usr/nec ;then
6948     version_type=linux
6949     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6950     soname_spec='$libname.so.$major'
6951     shlibpath_var=LD_LIBRARY_PATH
6952   fi
6953   ;;
6954
6955 *)
6956   dynamic_linker=no
6957   ;;
6958 esac
6959 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
6960 echo "${ECHO_T}$dynamic_linker" >&6
6961 test "$dynamic_linker" = no && can_build_shared=no
6962 ##
6963 ## END FIXME
6964
6965 ## FIXME: this should be a separate macro
6966 ##
6967 # Report the final consequences.
6968 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
6969 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
6970 echo "$as_me:$LINENO: result: $can_build_shared" >&5
6971 echo "${ECHO_T}$can_build_shared" >&6
6972 ##
6973 ## END FIXME
6974
6975 ## FIXME: this should be a separate macro
6976 ##
6977 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
6978 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
6979 test "$can_build_shared" = "no" && enable_shared=no
6980
6981 # On AIX, shared libraries and static libraries use the same namespace, and
6982 # are all built from PIC.
6983 case "$host_os" in
6984 aix3*)
6985   test "$enable_shared" = yes && enable_static=no
6986   if test -n "$RANLIB"; then
6987     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6988     postinstall_cmds='$RANLIB $lib'
6989   fi
6990   ;;
6991
6992 aix4*)
6993   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6994     test "$enable_shared" = yes && enable_static=no
6995   fi
6996   ;;
6997 esac
6998 echo "$as_me:$LINENO: result: $enable_shared" >&5
6999 echo "${ECHO_T}$enable_shared" >&6
7000 ##
7001 ## END FIXME
7002
7003 ## FIXME: this should be a separate macro
7004 ##
7005 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
7006 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
7007 # Make sure either enable_shared or enable_static is yes.
7008 test "$enable_shared" = yes || enable_static=yes
7009 echo "$as_me:$LINENO: result: $enable_static" >&5
7010 echo "${ECHO_T}$enable_static" >&6
7011 ##
7012 ## END FIXME
7013
7014 if test "$hardcode_action" = relink; then
7015   # Fast installation is not supported
7016   enable_fast_install=no
7017 elif test "$shlibpath_overrides_runpath" = yes ||
7018      test "$enable_shared" = no; then
7019   # Fast installation is not necessary
7020   enable_fast_install=needless
7021 fi
7022
7023 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7024 if test "$GCC" = yes; then
7025   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7026 fi
7027
7028 if test "x$enable_dlopen" != xyes; then
7029   enable_dlopen=unknown
7030   enable_dlopen_self=unknown
7031   enable_dlopen_self_static=unknown
7032 else
7033   lt_cv_dlopen=no
7034   lt_cv_dlopen_libs=
7035
7036   case $host_os in
7037   beos*)
7038     lt_cv_dlopen="load_add_on"
7039     lt_cv_dlopen_libs=
7040     lt_cv_dlopen_self=yes
7041     ;;
7042
7043   cygwin* | mingw* | pw32*)
7044     lt_cv_dlopen="LoadLibrary"
7045     lt_cv_dlopen_libs=
7046    ;;
7047
7048   *)
7049     echo "$as_me:$LINENO: checking for shl_load" >&5
7050 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
7051 if test "${ac_cv_func_shl_load+set}" = set; then
7052   echo $ECHO_N "(cached) $ECHO_C" >&6
7053 else
7054   cat >conftest.$ac_ext <<_ACEOF
7055 /* confdefs.h.  */
7056 _ACEOF
7057 cat confdefs.h >>conftest.$ac_ext
7058 cat >>conftest.$ac_ext <<_ACEOF
7059 /* end confdefs.h.  */
7060 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
7061    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7062 #define shl_load innocuous_shl_load
7063
7064 /* System header to define __stub macros and hopefully few prototypes,
7065     which can conflict with char shl_load (); below.
7066     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7067     <limits.h> exists even on freestanding compilers.  */
7068
7069 #ifdef __STDC__
7070 # include <limits.h>
7071 #else
7072 # include <assert.h>
7073 #endif
7074
7075 #undef shl_load
7076
7077 /* Override any gcc2 internal prototype to avoid an error.  */
7078 #ifdef __cplusplus
7079 extern "C"
7080 {
7081 #endif
7082 /* We use char because int might match the return type of a gcc2
7083    builtin and then its argument prototype would still apply.  */
7084 char shl_load ();
7085 /* The GNU C library defines this for functions which it implements
7086     to always fail with ENOSYS.  Some functions are actually named
7087     something starting with __ and the normal name is an alias.  */
7088 #if defined (__stub_shl_load) || defined (__stub___shl_load)
7089 choke me
7090 #else
7091 char (*f) () = shl_load;
7092 #endif
7093 #ifdef __cplusplus
7094 }
7095 #endif
7096
7097 int
7098 main ()
7099 {
7100 return f != shl_load;
7101   ;
7102   return 0;
7103 }
7104 _ACEOF
7105 rm -f conftest.$ac_objext conftest$ac_exeext
7106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7107   (eval $ac_link) 2>conftest.er1
7108   ac_status=$?
7109   grep -v '^ *+' conftest.er1 >conftest.err
7110   rm -f conftest.er1
7111   cat conftest.err >&5
7112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113   (exit $ac_status); } &&
7114          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116   (eval $ac_try) 2>&5
7117   ac_status=$?
7118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119   (exit $ac_status); }; } &&
7120          { ac_try='test -s conftest$ac_exeext'
7121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7122   (eval $ac_try) 2>&5
7123   ac_status=$?
7124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7125   (exit $ac_status); }; }; then
7126   ac_cv_func_shl_load=yes
7127 else
7128   echo "$as_me: failed program was:" >&5
7129 sed 's/^/| /' conftest.$ac_ext >&5
7130
7131 ac_cv_func_shl_load=no
7132 fi
7133 rm -f conftest.err conftest.$ac_objext \
7134       conftest$ac_exeext conftest.$ac_ext
7135 fi
7136 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
7137 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
7138 if test $ac_cv_func_shl_load = yes; then
7139   lt_cv_dlopen="shl_load"
7140 else
7141   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7142 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7143 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7144   echo $ECHO_N "(cached) $ECHO_C" >&6
7145 else
7146   ac_check_lib_save_LIBS=$LIBS
7147 LIBS="-ldld  $LIBS"
7148 cat >conftest.$ac_ext <<_ACEOF
7149 /* confdefs.h.  */
7150 _ACEOF
7151 cat confdefs.h >>conftest.$ac_ext
7152 cat >>conftest.$ac_ext <<_ACEOF
7153 /* end confdefs.h.  */
7154
7155 /* Override any gcc2 internal prototype to avoid an error.  */
7156 #ifdef __cplusplus
7157 extern "C"
7158 #endif
7159 /* We use char because int might match the return type of a gcc2
7160    builtin and then its argument prototype would still apply.  */
7161 char shl_load ();
7162 int
7163 main ()
7164 {
7165 shl_load ();
7166   ;
7167   return 0;
7168 }
7169 _ACEOF
7170 rm -f conftest.$ac_objext conftest$ac_exeext
7171 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7172   (eval $ac_link) 2>conftest.er1
7173   ac_status=$?
7174   grep -v '^ *+' conftest.er1 >conftest.err
7175   rm -f conftest.er1
7176   cat conftest.err >&5
7177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178   (exit $ac_status); } &&
7179          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7181   (eval $ac_try) 2>&5
7182   ac_status=$?
7183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184   (exit $ac_status); }; } &&
7185          { ac_try='test -s conftest$ac_exeext'
7186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7187   (eval $ac_try) 2>&5
7188   ac_status=$?
7189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7190   (exit $ac_status); }; }; then
7191   ac_cv_lib_dld_shl_load=yes
7192 else
7193   echo "$as_me: failed program was:" >&5
7194 sed 's/^/| /' conftest.$ac_ext >&5
7195
7196 ac_cv_lib_dld_shl_load=no
7197 fi
7198 rm -f conftest.err conftest.$ac_objext \
7199       conftest$ac_exeext conftest.$ac_ext
7200 LIBS=$ac_check_lib_save_LIBS
7201 fi
7202 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7203 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7204 if test $ac_cv_lib_dld_shl_load = yes; then
7205   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
7206 else
7207   echo "$as_me:$LINENO: checking for dlopen" >&5
7208 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
7209 if test "${ac_cv_func_dlopen+set}" = set; then
7210   echo $ECHO_N "(cached) $ECHO_C" >&6
7211 else
7212   cat >conftest.$ac_ext <<_ACEOF
7213 /* confdefs.h.  */
7214 _ACEOF
7215 cat confdefs.h >>conftest.$ac_ext
7216 cat >>conftest.$ac_ext <<_ACEOF
7217 /* end confdefs.h.  */
7218 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
7219    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7220 #define dlopen innocuous_dlopen
7221
7222 /* System header to define __stub macros and hopefully few prototypes,
7223     which can conflict with char dlopen (); below.
7224     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7225     <limits.h> exists even on freestanding compilers.  */
7226
7227 #ifdef __STDC__
7228 # include <limits.h>
7229 #else
7230 # include <assert.h>
7231 #endif
7232
7233 #undef dlopen
7234
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 #ifdef __cplusplus
7237 extern "C"
7238 {
7239 #endif
7240 /* We use char because int might match the return type of a gcc2
7241    builtin and then its argument prototype would still apply.  */
7242 char dlopen ();
7243 /* The GNU C library defines this for functions which it implements
7244     to always fail with ENOSYS.  Some functions are actually named
7245     something starting with __ and the normal name is an alias.  */
7246 #if defined (__stub_dlopen) || defined (__stub___dlopen)
7247 choke me
7248 #else
7249 char (*f) () = dlopen;
7250 #endif
7251 #ifdef __cplusplus
7252 }
7253 #endif
7254
7255 int
7256 main ()
7257 {
7258 return f != dlopen;
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 rm -f conftest.$ac_objext conftest$ac_exeext
7264 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7265   (eval $ac_link) 2>conftest.er1
7266   ac_status=$?
7267   grep -v '^ *+' conftest.er1 >conftest.err
7268   rm -f conftest.er1
7269   cat conftest.err >&5
7270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271   (exit $ac_status); } &&
7272          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7274   (eval $ac_try) 2>&5
7275   ac_status=$?
7276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277   (exit $ac_status); }; } &&
7278          { ac_try='test -s conftest$ac_exeext'
7279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7280   (eval $ac_try) 2>&5
7281   ac_status=$?
7282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7283   (exit $ac_status); }; }; then
7284   ac_cv_func_dlopen=yes
7285 else
7286   echo "$as_me: failed program was:" >&5
7287 sed 's/^/| /' conftest.$ac_ext >&5
7288
7289 ac_cv_func_dlopen=no
7290 fi
7291 rm -f conftest.err conftest.$ac_objext \
7292       conftest$ac_exeext conftest.$ac_ext
7293 fi
7294 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
7295 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
7296 if test $ac_cv_func_dlopen = yes; then
7297   lt_cv_dlopen="dlopen"
7298 else
7299   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
7300 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
7301 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
7302   echo $ECHO_N "(cached) $ECHO_C" >&6
7303 else
7304   ac_check_lib_save_LIBS=$LIBS
7305 LIBS="-ldl  $LIBS"
7306 cat >conftest.$ac_ext <<_ACEOF
7307 /* confdefs.h.  */
7308 _ACEOF
7309 cat confdefs.h >>conftest.$ac_ext
7310 cat >>conftest.$ac_ext <<_ACEOF
7311 /* end confdefs.h.  */
7312
7313 /* Override any gcc2 internal prototype to avoid an error.  */
7314 #ifdef __cplusplus
7315 extern "C"
7316 #endif
7317 /* We use char because int might match the return type of a gcc2
7318    builtin and then its argument prototype would still apply.  */
7319 char dlopen ();
7320 int
7321 main ()
7322 {
7323 dlopen ();
7324   ;
7325   return 0;
7326 }
7327 _ACEOF
7328 rm -f conftest.$ac_objext conftest$ac_exeext
7329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7330   (eval $ac_link) 2>conftest.er1
7331   ac_status=$?
7332   grep -v '^ *+' conftest.er1 >conftest.err
7333   rm -f conftest.er1
7334   cat conftest.err >&5
7335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336   (exit $ac_status); } &&
7337          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339   (eval $ac_try) 2>&5
7340   ac_status=$?
7341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342   (exit $ac_status); }; } &&
7343          { ac_try='test -s conftest$ac_exeext'
7344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345   (eval $ac_try) 2>&5
7346   ac_status=$?
7347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348   (exit $ac_status); }; }; then
7349   ac_cv_lib_dl_dlopen=yes
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 sed 's/^/| /' conftest.$ac_ext >&5
7353
7354 ac_cv_lib_dl_dlopen=no
7355 fi
7356 rm -f conftest.err conftest.$ac_objext \
7357       conftest$ac_exeext conftest.$ac_ext
7358 LIBS=$ac_check_lib_save_LIBS
7359 fi
7360 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
7361 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
7362 if test $ac_cv_lib_dl_dlopen = yes; then
7363   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7364 else
7365   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
7366 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
7367 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370   ac_check_lib_save_LIBS=$LIBS
7371 LIBS="-lsvld  $LIBS"
7372 cat >conftest.$ac_ext <<_ACEOF
7373 /* confdefs.h.  */
7374 _ACEOF
7375 cat confdefs.h >>conftest.$ac_ext
7376 cat >>conftest.$ac_ext <<_ACEOF
7377 /* end confdefs.h.  */
7378
7379 /* Override any gcc2 internal prototype to avoid an error.  */
7380 #ifdef __cplusplus
7381 extern "C"
7382 #endif
7383 /* We use char because int might match the return type of a gcc2
7384    builtin and then its argument prototype would still apply.  */
7385 char dlopen ();
7386 int
7387 main ()
7388 {
7389 dlopen ();
7390   ;
7391   return 0;
7392 }
7393 _ACEOF
7394 rm -f conftest.$ac_objext conftest$ac_exeext
7395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7396   (eval $ac_link) 2>conftest.er1
7397   ac_status=$?
7398   grep -v '^ *+' conftest.er1 >conftest.err
7399   rm -f conftest.er1
7400   cat conftest.err >&5
7401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402   (exit $ac_status); } &&
7403          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7405   (eval $ac_try) 2>&5
7406   ac_status=$?
7407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408   (exit $ac_status); }; } &&
7409          { ac_try='test -s conftest$ac_exeext'
7410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7411   (eval $ac_try) 2>&5
7412   ac_status=$?
7413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7414   (exit $ac_status); }; }; then
7415   ac_cv_lib_svld_dlopen=yes
7416 else
7417   echo "$as_me: failed program was:" >&5
7418 sed 's/^/| /' conftest.$ac_ext >&5
7419
7420 ac_cv_lib_svld_dlopen=no
7421 fi
7422 rm -f conftest.err conftest.$ac_objext \
7423       conftest$ac_exeext conftest.$ac_ext
7424 LIBS=$ac_check_lib_save_LIBS
7425 fi
7426 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
7427 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
7428 if test $ac_cv_lib_svld_dlopen = yes; then
7429   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7430 else
7431   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
7432 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
7433 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
7434   echo $ECHO_N "(cached) $ECHO_C" >&6
7435 else
7436   ac_check_lib_save_LIBS=$LIBS
7437 LIBS="-ldld  $LIBS"
7438 cat >conftest.$ac_ext <<_ACEOF
7439 /* confdefs.h.  */
7440 _ACEOF
7441 cat confdefs.h >>conftest.$ac_ext
7442 cat >>conftest.$ac_ext <<_ACEOF
7443 /* end confdefs.h.  */
7444
7445 /* Override any gcc2 internal prototype to avoid an error.  */
7446 #ifdef __cplusplus
7447 extern "C"
7448 #endif
7449 /* We use char because int might match the return type of a gcc2
7450    builtin and then its argument prototype would still apply.  */
7451 char dld_link ();
7452 int
7453 main ()
7454 {
7455 dld_link ();
7456   ;
7457   return 0;
7458 }
7459 _ACEOF
7460 rm -f conftest.$ac_objext conftest$ac_exeext
7461 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7462   (eval $ac_link) 2>conftest.er1
7463   ac_status=$?
7464   grep -v '^ *+' conftest.er1 >conftest.err
7465   rm -f conftest.er1
7466   cat conftest.err >&5
7467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
7470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7474   (exit $ac_status); }; } &&
7475          { ac_try='test -s conftest$ac_exeext'
7476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7477   (eval $ac_try) 2>&5
7478   ac_status=$?
7479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7480   (exit $ac_status); }; }; then
7481   ac_cv_lib_dld_dld_link=yes
7482 else
7483   echo "$as_me: failed program was:" >&5
7484 sed 's/^/| /' conftest.$ac_ext >&5
7485
7486 ac_cv_lib_dld_dld_link=no
7487 fi
7488 rm -f conftest.err conftest.$ac_objext \
7489       conftest$ac_exeext conftest.$ac_ext
7490 LIBS=$ac_check_lib_save_LIBS
7491 fi
7492 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
7493 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
7494 if test $ac_cv_lib_dld_dld_link = yes; then
7495   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7496 fi
7497
7498
7499 fi
7500
7501
7502 fi
7503
7504
7505 fi
7506
7507
7508 fi
7509
7510
7511 fi
7512
7513     ;;
7514   esac
7515
7516   if test "x$lt_cv_dlopen" != xno; then
7517     enable_dlopen=yes
7518   else
7519     enable_dlopen=no
7520   fi
7521
7522   case $lt_cv_dlopen in
7523   dlopen)
7524     save_CPPFLAGS="$CPPFLAGS"
7525         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7526
7527     save_LDFLAGS="$LDFLAGS"
7528     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7529
7530     save_LIBS="$LIBS"
7531     LIBS="$lt_cv_dlopen_libs $LIBS"
7532
7533     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
7534 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
7535 if test "${lt_cv_dlopen_self+set}" = set; then
7536   echo $ECHO_N "(cached) $ECHO_C" >&6
7537 else
7538           if test "$cross_compiling" = yes; then :
7539   lt_cv_dlopen_self=cross
7540 else
7541     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7542   lt_status=$lt_dlunknown
7543   cat > conftest.$ac_ext <<EOF
7544 #line 7544 "configure"
7545 #include "confdefs.h"
7546
7547 #if HAVE_DLFCN_H
7548 #include <dlfcn.h>
7549 #endif
7550
7551 #include <stdio.h>
7552
7553 #ifdef RTLD_GLOBAL
7554 #  define LT_DLGLOBAL           RTLD_GLOBAL
7555 #else
7556 #  ifdef DL_GLOBAL
7557 #    define LT_DLGLOBAL         DL_GLOBAL
7558 #  else
7559 #    define LT_DLGLOBAL         0
7560 #  endif
7561 #endif
7562
7563 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7564    find out it does not work in some platform. */
7565 #ifndef LT_DLLAZY_OR_NOW
7566 #  ifdef RTLD_LAZY
7567 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7568 #  else
7569 #    ifdef DL_LAZY
7570 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7571 #    else
7572 #      ifdef RTLD_NOW
7573 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7574 #      else
7575 #        ifdef DL_NOW
7576 #          define LT_DLLAZY_OR_NOW      DL_NOW
7577 #        else
7578 #          define LT_DLLAZY_OR_NOW      0
7579 #        endif
7580 #      endif
7581 #    endif
7582 #  endif
7583 #endif
7584
7585 #ifdef __cplusplus
7586 extern "C" void exit (int);
7587 #endif
7588
7589 void fnord() { int i=42;}
7590 int main ()
7591 {
7592   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7593   int status = $lt_dlunknown;
7594
7595   if (self)
7596     {
7597       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7598       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7599       /* dlclose (self); */
7600     }
7601
7602     exit (status);
7603 }
7604 EOF
7605   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7606   (eval $ac_link) 2>&5
7607   ac_status=$?
7608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7610     (./conftest; exit; ) 2>/dev/null
7611     lt_status=$?
7612     case x$lt_status in
7613       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7614       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7615       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7616     esac
7617   else :
7618     # compilation failed
7619     lt_cv_dlopen_self=no
7620   fi
7621 fi
7622 rm -fr conftest*
7623
7624
7625 fi
7626 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
7627 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
7628
7629     if test "x$lt_cv_dlopen_self" = xyes; then
7630       LDFLAGS="$LDFLAGS $link_static_flag"
7631       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
7632 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
7633 if test "${lt_cv_dlopen_self_static+set}" = set; then
7634   echo $ECHO_N "(cached) $ECHO_C" >&6
7635 else
7636           if test "$cross_compiling" = yes; then :
7637   lt_cv_dlopen_self_static=cross
7638 else
7639     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7640   lt_status=$lt_dlunknown
7641   cat > conftest.$ac_ext <<EOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644
7645 #if HAVE_DLFCN_H
7646 #include <dlfcn.h>
7647 #endif
7648
7649 #include <stdio.h>
7650
7651 #ifdef RTLD_GLOBAL
7652 #  define LT_DLGLOBAL           RTLD_GLOBAL
7653 #else
7654 #  ifdef DL_GLOBAL
7655 #    define LT_DLGLOBAL         DL_GLOBAL
7656 #  else
7657 #    define LT_DLGLOBAL         0
7658 #  endif
7659 #endif
7660
7661 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7662    find out it does not work in some platform. */
7663 #ifndef LT_DLLAZY_OR_NOW
7664 #  ifdef RTLD_LAZY
7665 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7666 #  else
7667 #    ifdef DL_LAZY
7668 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7669 #    else
7670 #      ifdef RTLD_NOW
7671 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7672 #      else
7673 #        ifdef DL_NOW
7674 #          define LT_DLLAZY_OR_NOW      DL_NOW
7675 #        else
7676 #          define LT_DLLAZY_OR_NOW      0
7677 #        endif
7678 #      endif
7679 #    endif
7680 #  endif
7681 #endif
7682
7683 #ifdef __cplusplus
7684 extern "C" void exit (int);
7685 #endif
7686
7687 void fnord() { int i=42;}
7688 int main ()
7689 {
7690   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7691   int status = $lt_dlunknown;
7692
7693   if (self)
7694     {
7695       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7696       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7697       /* dlclose (self); */
7698     }
7699
7700     exit (status);
7701 }
7702 EOF
7703   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7704   (eval $ac_link) 2>&5
7705   ac_status=$?
7706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7708     (./conftest; exit; ) 2>/dev/null
7709     lt_status=$?
7710     case x$lt_status in
7711       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7712       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7713       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7714     esac
7715   else :
7716     # compilation failed
7717     lt_cv_dlopen_self_static=no
7718   fi
7719 fi
7720 rm -fr conftest*
7721
7722
7723 fi
7724 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
7725 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
7726     fi
7727
7728     CPPFLAGS="$save_CPPFLAGS"
7729     LDFLAGS="$save_LDFLAGS"
7730     LIBS="$save_LIBS"
7731     ;;
7732   esac
7733
7734   case $lt_cv_dlopen_self in
7735   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7736   *) enable_dlopen_self=unknown ;;
7737   esac
7738
7739   case $lt_cv_dlopen_self_static in
7740   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7741   *) enable_dlopen_self_static=unknown ;;
7742   esac
7743 fi
7744
7745
7746 ## FIXME: this should be a separate macro
7747 ##
7748 if test "$enable_shared" = yes && test "$GCC" = yes; then
7749   case $archive_cmds in
7750   *'~'*)
7751     # FIXME: we may have to deal with multi-command sequences.
7752     ;;
7753   '$CC '*)
7754     # Test whether the compiler implicitly links with -lc since on some
7755     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7756     # to ld, don't add -lc before -lgcc.
7757     echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
7758 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
7759     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
7760   echo $ECHO_N "(cached) $ECHO_C" >&6
7761 else
7762   $rm conftest*
7763     echo 'static int dummy;' > conftest.$ac_ext
7764
7765     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7766   (eval $ac_compile) 2>&5
7767   ac_status=$?
7768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769   (exit $ac_status); }; then
7770       soname=conftest
7771       lib=conftest
7772       libobjs=conftest.$ac_objext
7773       deplibs=
7774       wl=$lt_cv_prog_cc_wl
7775       compiler_flags=-v
7776       linker_flags=-v
7777       verstring=
7778       output_objdir=.
7779       libname=conftest
7780       save_allow_undefined_flag=$allow_undefined_flag
7781       allow_undefined_flag=
7782       if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
7783   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
7784   ac_status=$?
7785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786   (exit $ac_status); }
7787       then
7788         lt_cv_archive_cmds_need_lc=no
7789       else
7790         lt_cv_archive_cmds_need_lc=yes
7791       fi
7792       allow_undefined_flag=$save_allow_undefined_flag
7793     else
7794       cat conftest.err 1>&5
7795     fi
7796 fi
7797
7798     echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
7799 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
7800     ;;
7801   esac
7802 fi
7803 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7804 ##
7805 ## END FIXME
7806
7807 ## FIXME: this should be a separate macro
7808 ##
7809 # The second clause should only fire when bootstrapping the
7810 # libtool distribution, otherwise you forgot to ship ltmain.sh
7811 # with your package, and you will get complaints that there are
7812 # no rules to generate ltmain.sh.
7813 if test -f "$ltmain"; then
7814   :
7815 else
7816   # If there is no Makefile yet, we rely on a make rule to execute
7817   # `config.status --recheck' to rerun these tests and create the
7818   # libtool script then.
7819   test -f Makefile && make "$ltmain"
7820 fi
7821
7822 if test -f "$ltmain"; then
7823   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7824   $rm -f "${ofile}T"
7825
7826   echo creating $ofile
7827
7828   # Now quote all the things that may contain metacharacters while being
7829   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7830   # variables and quote the copies for generation of the libtool script.
7831   for var in echo old_CC old_CFLAGS \
7832     AR AR_FLAGS CC LD LN_S NM SHELL \
7833     reload_flag reload_cmds wl \
7834     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7835     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7836     library_names_spec soname_spec \
7837     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7838     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7839     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7840     old_striplib striplib file_magic_cmd export_symbols_cmds \
7841     deplibs_check_method allow_undefined_flag no_undefined_flag \
7842     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7843     global_symbol_to_c_name_address \
7844     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7845     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7846     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7847
7848     case $var in
7849     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7850     old_postinstall_cmds | old_postuninstall_cmds | \
7851     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7852     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7853     postinstall_cmds | postuninstall_cmds | \
7854     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7855       # Double-quote double-evaled strings.
7856       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7857       ;;
7858     *)
7859       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7860       ;;
7861     esac
7862   done
7863
7864   cat <<__EOF__ > "${ofile}T"
7865 #! $SHELL
7866
7867 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7868 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7869 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7870 #
7871 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7872 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7873 #
7874 # This program is free software; you can redistribute it and/or modify
7875 # it under the terms of the GNU General Public License as published by
7876 # the Free Software Foundation; either version 2 of the License, or
7877 # (at your option) any later version.
7878 #
7879 # This program is distributed in the hope that it will be useful, but
7880 # WITHOUT ANY WARRANTY; without even the implied warranty of
7881 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7882 # General Public License for more details.
7883 #
7884 # You should have received a copy of the GNU General Public License
7885 # along with this program; if not, write to the Free Software
7886 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7887 #
7888 # As a special exception to the GNU General Public License, if you
7889 # distribute this file as part of a program that contains a
7890 # configuration script generated by Autoconf, you may include it under
7891 # the same distribution terms that you use for the rest of that program.
7892
7893 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7894 Xsed="sed -e s/^X//"
7895
7896 # The HP-UX ksh and POSIX shell print the target directory to stdout
7897 # if CDPATH is set.
7898 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7899
7900 # ### BEGIN LIBTOOL CONFIG
7901
7902 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7903
7904 # Shell to use when invoking shell scripts.
7905 SHELL=$lt_SHELL
7906
7907 # Whether or not to build shared libraries.
7908 build_libtool_libs=$enable_shared
7909
7910 # Whether or not to build static libraries.
7911 build_old_libs=$enable_static
7912
7913 # Whether or not to add -lc for building shared libraries.
7914 build_libtool_need_lc=$need_lc
7915
7916 # Whether or not to optimize for fast installation.
7917 fast_install=$enable_fast_install
7918
7919 # The host system.
7920 host_alias=$host_alias
7921 host=$host
7922
7923 # An echo program that does not interpret backslashes.
7924 echo=$lt_echo
7925
7926 # The archiver.
7927 AR=$lt_AR
7928 AR_FLAGS=$lt_AR_FLAGS
7929
7930 # The default C compiler.
7931 CC=$lt_CC
7932
7933 # Is the compiler the GNU C compiler?
7934 with_gcc=$GCC
7935
7936 # The linker used to build libraries.
7937 LD=$lt_LD
7938
7939 # Whether we need hard or soft links.
7940 LN_S=$lt_LN_S
7941
7942 # A BSD-compatible nm program.
7943 NM=$lt_NM
7944
7945 # A symbol stripping program
7946 STRIP=$STRIP
7947
7948 # Used to examine libraries when file_magic_cmd begins "file"
7949 MAGIC_CMD=$MAGIC_CMD
7950
7951 # Used on cygwin: DLL creation program.
7952 DLLTOOL="$DLLTOOL"
7953
7954 # Used on cygwin: object dumper.
7955 OBJDUMP="$OBJDUMP"
7956
7957 # Used on cygwin: assembler.
7958 AS="$AS"
7959
7960 # The name of the directory that contains temporary libtool files.
7961 objdir=$objdir
7962
7963 # How to create reloadable object files.
7964 reload_flag=$lt_reload_flag
7965 reload_cmds=$lt_reload_cmds
7966
7967 # How to pass a linker flag through the compiler.
7968 wl=$lt_wl
7969
7970 # Object file suffix (normally "o").
7971 objext="$ac_objext"
7972
7973 # Old archive suffix (normally "a").
7974 libext="$libext"
7975
7976 # Executable file suffix (normally "").
7977 exeext="$exeext"
7978
7979 # Additional compiler flags for building library objects.
7980 pic_flag=$lt_pic_flag
7981 pic_mode=$pic_mode
7982
7983 # Does compiler simultaneously support -c and -o options?
7984 compiler_c_o=$lt_compiler_c_o
7985
7986 # Can we write directly to a .lo ?
7987 compiler_o_lo=$lt_compiler_o_lo
7988
7989 # Must we lock files when doing compilation ?
7990 need_locks=$lt_need_locks
7991
7992 # Do we need the lib prefix for modules?
7993 need_lib_prefix=$need_lib_prefix
7994
7995 # Do we need a version for libraries?
7996 need_version=$need_version
7997
7998 # Whether dlopen is supported.
7999 dlopen_support=$enable_dlopen
8000
8001 # Whether dlopen of programs is supported.
8002 dlopen_self=$enable_dlopen_self
8003
8004 # Whether dlopen of statically linked programs is supported.
8005 dlopen_self_static=$enable_dlopen_self_static
8006
8007 # Compiler flag to prevent dynamic linking.
8008 link_static_flag=$lt_link_static_flag
8009
8010 # Compiler flag to turn off builtin functions.
8011 no_builtin_flag=$lt_no_builtin_flag
8012
8013 # Compiler flag to allow reflexive dlopens.
8014 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
8015
8016 # Compiler flag to generate shared objects directly from archives.
8017 whole_archive_flag_spec=$lt_whole_archive_flag_spec
8018
8019 # Compiler flag to generate thread-safe objects.
8020 thread_safe_flag_spec=$lt_thread_safe_flag_spec
8021
8022 # Library versioning type.
8023 version_type=$version_type
8024
8025 # Format of library name prefix.
8026 libname_spec=$lt_libname_spec
8027
8028 # List of archive names.  First name is the real one, the rest are links.
8029 # The last name is the one that the linker finds with -lNAME.
8030 library_names_spec=$lt_library_names_spec
8031
8032 # The coded name of the library, if different from the real name.
8033 soname_spec=$lt_soname_spec
8034
8035 # Commands used to build and install an old-style archive.
8036 RANLIB=$lt_RANLIB
8037 old_archive_cmds=$lt_old_archive_cmds
8038 old_postinstall_cmds=$lt_old_postinstall_cmds
8039 old_postuninstall_cmds=$lt_old_postuninstall_cmds
8040
8041 # Create an old-style archive from a shared archive.
8042 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
8043
8044 # Create a temporary old-style archive to link instead of a shared archive.
8045 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
8046
8047 # Commands used to build and install a shared archive.
8048 archive_cmds=$lt_archive_cmds
8049 archive_expsym_cmds=$lt_archive_expsym_cmds
8050 postinstall_cmds=$lt_postinstall_cmds
8051 postuninstall_cmds=$lt_postuninstall_cmds
8052
8053 # Commands to strip libraries.
8054 old_striplib=$lt_old_striplib
8055 striplib=$lt_striplib
8056
8057 # Method to check whether dependent libraries are shared objects.
8058 deplibs_check_method=$lt_deplibs_check_method
8059
8060 # Command to use when deplibs_check_method == file_magic.
8061 file_magic_cmd=$lt_file_magic_cmd
8062
8063 # Flag that allows shared libraries with undefined symbols to be built.
8064 allow_undefined_flag=$lt_allow_undefined_flag
8065
8066 # Flag that forces no undefined symbols.
8067 no_undefined_flag=$lt_no_undefined_flag
8068
8069 # Commands used to finish a libtool library installation in a directory.
8070 finish_cmds=$lt_finish_cmds
8071
8072 # Same as above, but a single script fragment to be evaled but not shown.
8073 finish_eval=$lt_finish_eval
8074
8075 # Take the output of nm and produce a listing of raw symbols and C names.
8076 global_symbol_pipe=$lt_global_symbol_pipe
8077
8078 # Transform the output of nm in a proper C declaration
8079 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
8080
8081 # Transform the output of nm in a C name address pair
8082 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
8083
8084 # This is the shared library runtime path variable.
8085 runpath_var=$runpath_var
8086
8087 # This is the shared library path variable.
8088 shlibpath_var=$shlibpath_var
8089
8090 # Is shlibpath searched before the hard-coded library search path?
8091 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
8092
8093 # How to hardcode a shared library path into an executable.
8094 hardcode_action=$hardcode_action
8095
8096 # Whether we should hardcode library paths into libraries.
8097 hardcode_into_libs=$hardcode_into_libs
8098
8099 # Flag to hardcode \$libdir into a binary during linking.
8100 # This must work even if \$libdir does not exist.
8101 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
8102
8103 # Whether we need a single -rpath flag with a separated argument.
8104 hardcode_libdir_separator=$lt_hardcode_libdir_separator
8105
8106 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
8107 # resulting binary.
8108 hardcode_direct=$hardcode_direct
8109
8110 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
8111 # resulting binary.
8112 hardcode_minus_L=$hardcode_minus_L
8113
8114 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
8115 # the resulting binary.
8116 hardcode_shlibpath_var=$hardcode_shlibpath_var
8117
8118 # Variables whose values should be saved in libtool wrapper scripts and
8119 # restored at relink time.
8120 variables_saved_for_relink="$variables_saved_for_relink"
8121
8122 # Whether libtool must link a program against all its dependency libraries.
8123 link_all_deplibs=$link_all_deplibs
8124
8125 # Compile-time system search path for libraries
8126 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
8127
8128 # Run-time system search path for libraries
8129 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
8130
8131 # Fix the shell variable \$srcfile for the compiler.
8132 fix_srcfile_path="$fix_srcfile_path"
8133
8134 # Set to yes if exported symbols are required.
8135 always_export_symbols=$always_export_symbols
8136
8137 # The commands to list exported symbols.
8138 export_symbols_cmds=$lt_export_symbols_cmds
8139
8140 # The commands to extract the exported symbol list from a shared archive.
8141 extract_expsyms_cmds=$lt_extract_expsyms_cmds
8142
8143 # Symbols that should not be listed in the preloaded symbols.
8144 exclude_expsyms=$lt_exclude_expsyms
8145
8146 # Symbols that must always be exported.
8147 include_expsyms=$lt_include_expsyms
8148
8149 # ### END LIBTOOL CONFIG
8150
8151 __EOF__
8152
8153   case $host_os in
8154   aix3*)
8155     cat <<\EOF >> "${ofile}T"
8156
8157 # AIX sometimes has problems with the GCC collect2 program.  For some
8158 # reason, if we set the COLLECT_NAMES environment variable, the problems
8159 # vanish in a puff of smoke.
8160 if test "X${COLLECT_NAMES+set}" != Xset; then
8161   COLLECT_NAMES=
8162   export COLLECT_NAMES
8163 fi
8164 EOF
8165     ;;
8166   esac
8167
8168   case $host_os in
8169   cygwin* | mingw* | pw32* | os2*)
8170     cat <<'EOF' >> "${ofile}T"
8171       # This is a source program that is used to create dlls on Windows
8172       # Don't remove nor modify the starting and closing comments
8173 # /* ltdll.c starts here */
8174 # #define WIN32_LEAN_AND_MEAN
8175 # #include <windows.h>
8176 # #undef WIN32_LEAN_AND_MEAN
8177 # #include <stdio.h>
8178 #
8179 # #ifndef __CYGWIN__
8180 # #  ifdef __CYGWIN32__
8181 # #    define __CYGWIN__ __CYGWIN32__
8182 # #  endif
8183 # #endif
8184 #
8185 # #ifdef __cplusplus
8186 # extern "C" {
8187 # #endif
8188 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8189 # #ifdef __cplusplus
8190 # }
8191 # #endif
8192 #
8193 # #ifdef __CYGWIN__
8194 # #include <cygwin/cygwin_dll.h>
8195 # DECLARE_CYGWIN_DLL( DllMain );
8196 # #endif
8197 # HINSTANCE __hDllInstance_base;
8198 #
8199 # BOOL APIENTRY
8200 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8201 # {
8202 #   __hDllInstance_base = hInst;
8203 #   return TRUE;
8204 # }
8205 # /* ltdll.c ends here */
8206         # This is a source program that is used to create import libraries
8207         # on Windows for dlls which lack them. Don't remove nor modify the
8208         # starting and closing comments
8209 # /* impgen.c starts here */
8210 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
8211 #
8212 #  This file is part of GNU libtool.
8213 #
8214 #  This program is free software; you can redistribute it and/or modify
8215 #  it under the terms of the GNU General Public License as published by
8216 #  the Free Software Foundation; either version 2 of the License, or
8217 #  (at your option) any later version.
8218 #
8219 #  This program is distributed in the hope that it will be useful,
8220 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
8221 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8222 #  GNU General Public License for more details.
8223 #
8224 #  You should have received a copy of the GNU General Public License
8225 #  along with this program; if not, write to the Free Software
8226 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8227 #  */
8228 #
8229 # #include <stdio.h>            /* for printf() */
8230 # #include <unistd.h>           /* for open(), lseek(), read() */
8231 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
8232 # #include <string.h>           /* for strdup() */
8233 #
8234 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
8235 # #ifndef O_BINARY
8236 # #define O_BINARY 0
8237 # #endif
8238 #
8239 # static unsigned int
8240 # pe_get16 (fd, offset)
8241 #      int fd;
8242 #      int offset;
8243 # {
8244 #   unsigned char b[2];
8245 #   lseek (fd, offset, SEEK_SET);
8246 #   read (fd, b, 2);
8247 #   return b[0] + (b[1]<<8);
8248 # }
8249 #
8250 # static unsigned int
8251 # pe_get32 (fd, offset)
8252 #     int fd;
8253 #     int offset;
8254 # {
8255 #   unsigned char b[4];
8256 #   lseek (fd, offset, SEEK_SET);
8257 #   read (fd, b, 4);
8258 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
8259 # }
8260 #
8261 # static unsigned int
8262 # pe_as32 (ptr)
8263 #      void *ptr;
8264 # {
8265 #   unsigned char *b = ptr;
8266 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
8267 # }
8268 #
8269 # int
8270 # main (argc, argv)
8271 #     int argc;
8272 #     char *argv[];
8273 # {
8274 #     int dll;
8275 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
8276 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
8277 #     unsigned long name_rvas, nexp;
8278 #     unsigned char *expdata, *erva;
8279 #     char *filename, *dll_name;
8280 #
8281 #     filename = argv[1];
8282 #
8283 #     dll = open(filename, O_RDONLY|O_BINARY);
8284 #     if (dll < 1)
8285 #       return 1;
8286 #
8287 #     dll_name = filename;
8288 #
8289 #     for (i=0; filename[i]; i++)
8290 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
8291 #           dll_name = filename + i +1;
8292 #
8293 #     pe_header_offset = pe_get32 (dll, 0x3c);
8294 #     opthdr_ofs = pe_header_offset + 4 + 20;
8295 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
8296 #
8297 #     if (num_entries < 1) /* no exports */
8298 #       return 1;
8299 #
8300 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
8301 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
8302 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
8303 #     secptr = (pe_header_offset + 4 + 20 +
8304 #             pe_get16 (dll, pe_header_offset + 4 + 16));
8305 #
8306 #     expptr = 0;
8307 #     for (i = 0; i < nsections; i++)
8308 #     {
8309 #       char sname[8];
8310 #       unsigned long secptr1 = secptr + 40 * i;
8311 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
8312 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
8313 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
8314 #       lseek(dll, secptr1, SEEK_SET);
8315 #       read(dll, sname, 8);
8316 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
8317 #       {
8318 #           expptr = fptr + (export_rva - vaddr);
8319 #           if (export_rva + export_size > vaddr + vsize)
8320 #               export_size = vsize - (export_rva - vaddr);
8321 #           break;
8322 #       }
8323 #     }
8324 #
8325 #     expdata = (unsigned char*)malloc(export_size);
8326 #     lseek (dll, expptr, SEEK_SET);
8327 #     read (dll, expdata, export_size);
8328 #     erva = expdata - export_rva;
8329 #
8330 #     nexp = pe_as32 (expdata+24);
8331 #     name_rvas = pe_as32 (expdata+32);
8332 #
8333 #     printf ("EXPORTS\n");
8334 #     for (i = 0; i<nexp; i++)
8335 #     {
8336 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
8337 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
8338 #     }
8339 #
8340 #     return 0;
8341 # }
8342 # /* impgen.c ends here */
8343
8344 EOF
8345     ;;
8346   esac
8347
8348   # We use sed instead of cat because bash on DJGPP gets confused if
8349   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
8350   # text mode, it properly converts lines to CR/LF.  This bash problem
8351   # is reportedly fixed, but why not run on old versions too?
8352   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
8353
8354   mv -f "${ofile}T" "$ofile" || \
8355     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
8356   chmod +x "$ofile"
8357 fi
8358 ##
8359 ## END FIXME
8360
8361
8362
8363
8364
8365 # This can be used to rebuild libtool when needed
8366 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8367
8368 # Always use our own libtool.
8369 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8370
8371 # Prevent multiple expansion
8372
8373
8374
8375
8376 for ac_prog in flex lex
8377 do
8378   # Extract the first word of "$ac_prog", so it can be a program name with args.
8379 set dummy $ac_prog; ac_word=$2
8380 echo "$as_me:$LINENO: checking for $ac_word" >&5
8381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8382 if test "${ac_cv_prog_LEX+set}" = set; then
8383   echo $ECHO_N "(cached) $ECHO_C" >&6
8384 else
8385   if test -n "$LEX"; then
8386   ac_cv_prog_LEX="$LEX" # Let the user override the test.
8387 else
8388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8389 for as_dir in $PATH
8390 do
8391   IFS=$as_save_IFS
8392   test -z "$as_dir" && as_dir=.
8393   for ac_exec_ext in '' $ac_executable_extensions; do
8394   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8395     ac_cv_prog_LEX="$ac_prog"
8396     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8397     break 2
8398   fi
8399 done
8400 done
8401
8402 fi
8403 fi
8404 LEX=$ac_cv_prog_LEX
8405 if test -n "$LEX"; then
8406   echo "$as_me:$LINENO: result: $LEX" >&5
8407 echo "${ECHO_T}$LEX" >&6
8408 else
8409   echo "$as_me:$LINENO: result: no" >&5
8410 echo "${ECHO_T}no" >&6
8411 fi
8412
8413   test -n "$LEX" && break
8414 done
8415 test -n "$LEX" || LEX=":"
8416
8417 if test -z "$LEXLIB"
8418 then
8419   echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
8420 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
8421 if test "${ac_cv_lib_fl_yywrap+set}" = set; then
8422   echo $ECHO_N "(cached) $ECHO_C" >&6
8423 else
8424   ac_check_lib_save_LIBS=$LIBS
8425 LIBS="-lfl  $LIBS"
8426 cat >conftest.$ac_ext <<_ACEOF
8427 /* confdefs.h.  */
8428 _ACEOF
8429 cat confdefs.h >>conftest.$ac_ext
8430 cat >>conftest.$ac_ext <<_ACEOF
8431 /* end confdefs.h.  */
8432
8433 /* Override any gcc2 internal prototype to avoid an error.  */
8434 #ifdef __cplusplus
8435 extern "C"
8436 #endif
8437 /* We use char because int might match the return type of a gcc2
8438    builtin and then its argument prototype would still apply.  */
8439 char yywrap ();
8440 int
8441 main ()
8442 {
8443 yywrap ();
8444   ;
8445   return 0;
8446 }
8447 _ACEOF
8448 rm -f conftest.$ac_objext conftest$ac_exeext
8449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8450   (eval $ac_link) 2>conftest.er1
8451   ac_status=$?
8452   grep -v '^ *+' conftest.er1 >conftest.err
8453   rm -f conftest.er1
8454   cat conftest.err >&5
8455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8456   (exit $ac_status); } &&
8457          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8459   (eval $ac_try) 2>&5
8460   ac_status=$?
8461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462   (exit $ac_status); }; } &&
8463          { ac_try='test -s conftest$ac_exeext'
8464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8465   (eval $ac_try) 2>&5
8466   ac_status=$?
8467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468   (exit $ac_status); }; }; then
8469   ac_cv_lib_fl_yywrap=yes
8470 else
8471   echo "$as_me: failed program was:" >&5
8472 sed 's/^/| /' conftest.$ac_ext >&5
8473
8474 ac_cv_lib_fl_yywrap=no
8475 fi
8476 rm -f conftest.err conftest.$ac_objext \
8477       conftest$ac_exeext conftest.$ac_ext
8478 LIBS=$ac_check_lib_save_LIBS
8479 fi
8480 echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
8481 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
8482 if test $ac_cv_lib_fl_yywrap = yes; then
8483   LEXLIB="-lfl"
8484 else
8485   echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
8486 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
8487 if test "${ac_cv_lib_l_yywrap+set}" = set; then
8488   echo $ECHO_N "(cached) $ECHO_C" >&6
8489 else
8490   ac_check_lib_save_LIBS=$LIBS
8491 LIBS="-ll  $LIBS"
8492 cat >conftest.$ac_ext <<_ACEOF
8493 /* confdefs.h.  */
8494 _ACEOF
8495 cat confdefs.h >>conftest.$ac_ext
8496 cat >>conftest.$ac_ext <<_ACEOF
8497 /* end confdefs.h.  */
8498
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 #ifdef __cplusplus
8501 extern "C"
8502 #endif
8503 /* We use char because int might match the return type of a gcc2
8504    builtin and then its argument prototype would still apply.  */
8505 char yywrap ();
8506 int
8507 main ()
8508 {
8509 yywrap ();
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 rm -f conftest.$ac_objext conftest$ac_exeext
8515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8516   (eval $ac_link) 2>conftest.er1
8517   ac_status=$?
8518   grep -v '^ *+' conftest.er1 >conftest.err
8519   rm -f conftest.er1
8520   cat conftest.err >&5
8521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522   (exit $ac_status); } &&
8523          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8525   (eval $ac_try) 2>&5
8526   ac_status=$?
8527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528   (exit $ac_status); }; } &&
8529          { ac_try='test -s conftest$ac_exeext'
8530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531   (eval $ac_try) 2>&5
8532   ac_status=$?
8533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534   (exit $ac_status); }; }; then
8535   ac_cv_lib_l_yywrap=yes
8536 else
8537   echo "$as_me: failed program was:" >&5
8538 sed 's/^/| /' conftest.$ac_ext >&5
8539
8540 ac_cv_lib_l_yywrap=no
8541 fi
8542 rm -f conftest.err conftest.$ac_objext \
8543       conftest$ac_exeext conftest.$ac_ext
8544 LIBS=$ac_check_lib_save_LIBS
8545 fi
8546 echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
8547 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
8548 if test $ac_cv_lib_l_yywrap = yes; then
8549   LEXLIB="-ll"
8550 fi
8551
8552 fi
8553
8554 fi
8555
8556 if test "x$LEX" != "x:"; then
8557   echo "$as_me:$LINENO: checking lex output file root" >&5
8558 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
8559 if test "${ac_cv_prog_lex_root+set}" = set; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   # The minimal lex program is just a single line: %%.  But some broken lexes
8563 # (Solaris, I think it was) want two %% lines, so accommodate them.
8564 cat >conftest.l <<_ACEOF
8565 %%
8566 %%
8567 _ACEOF
8568 { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
8569   (eval $LEX conftest.l) 2>&5
8570   ac_status=$?
8571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572   (exit $ac_status); }
8573 if test -f lex.yy.c; then
8574   ac_cv_prog_lex_root=lex.yy
8575 elif test -f lexyy.c; then
8576   ac_cv_prog_lex_root=lexyy
8577 else
8578   { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
8579 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
8580    { (exit 1); exit 1; }; }
8581 fi
8582 fi
8583 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
8584 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
8585 rm -f conftest.l
8586 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8587
8588 echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
8589 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
8590 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 else
8593   # POSIX says lex can declare yytext either as a pointer or an array; the
8594 # default is implementation-dependent. Figure out which it is, since
8595 # not all implementations provide the %pointer and %array declarations.
8596 ac_cv_prog_lex_yytext_pointer=no
8597 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
8598 ac_save_LIBS=$LIBS
8599 LIBS="$LIBS $LEXLIB"
8600 cat >conftest.$ac_ext <<_ACEOF
8601 `cat $LEX_OUTPUT_ROOT.c`
8602 _ACEOF
8603 rm -f conftest.$ac_objext conftest$ac_exeext
8604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8605   (eval $ac_link) 2>conftest.er1
8606   ac_status=$?
8607   grep -v '^ *+' conftest.er1 >conftest.err
8608   rm -f conftest.er1
8609   cat conftest.err >&5
8610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611   (exit $ac_status); } &&
8612          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
8613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614   (eval $ac_try) 2>&5
8615   ac_status=$?
8616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617   (exit $ac_status); }; } &&
8618          { ac_try='test -s conftest$ac_exeext'
8619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8620   (eval $ac_try) 2>&5
8621   ac_status=$?
8622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623   (exit $ac_status); }; }; then
8624   ac_cv_prog_lex_yytext_pointer=yes
8625 else
8626   echo "$as_me: failed program was:" >&5
8627 sed 's/^/| /' conftest.$ac_ext >&5
8628
8629 fi
8630 rm -f conftest.err conftest.$ac_objext \
8631       conftest$ac_exeext conftest.$ac_ext
8632 LIBS=$ac_save_LIBS
8633 rm -f "${LEX_OUTPUT_ROOT}.c"
8634
8635 fi
8636 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
8637 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
8638 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8639
8640 cat >>confdefs.h <<\_ACEOF
8641 #define YYTEXT_POINTER 1
8642 _ACEOF
8643
8644 fi
8645
8646 fi
8647 if test ${LEX} = "flex"; then
8648         cat >>confdefs.h <<\_ACEOF
8649 #define HAVE_FLEX 1
8650 _ACEOF
8651
8652 fi
8653 for ac_prog in 'bison -y' byacc
8654 do
8655   # Extract the first word of "$ac_prog", so it can be a program name with args.
8656 set dummy $ac_prog; ac_word=$2
8657 echo "$as_me:$LINENO: checking for $ac_word" >&5
8658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8659 if test "${ac_cv_prog_YACC+set}" = set; then
8660   echo $ECHO_N "(cached) $ECHO_C" >&6
8661 else
8662   if test -n "$YACC"; then
8663   ac_cv_prog_YACC="$YACC" # Let the user override the test.
8664 else
8665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666 for as_dir in $PATH
8667 do
8668   IFS=$as_save_IFS
8669   test -z "$as_dir" && as_dir=.
8670   for ac_exec_ext in '' $ac_executable_extensions; do
8671   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672     ac_cv_prog_YACC="$ac_prog"
8673     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8674     break 2
8675   fi
8676 done
8677 done
8678
8679 fi
8680 fi
8681 YACC=$ac_cv_prog_YACC
8682 if test -n "$YACC"; then
8683   echo "$as_me:$LINENO: result: $YACC" >&5
8684 echo "${ECHO_T}$YACC" >&6
8685 else
8686   echo "$as_me:$LINENO: result: no" >&5
8687 echo "${ECHO_T}no" >&6
8688 fi
8689
8690   test -n "$YACC" && break
8691 done
8692 test -n "$YACC" || YACC="yacc"
8693
8694 # Extract the first word of "bison++", so it can be a program name with args.
8695 set dummy bison++; ac_word=$2
8696 echo "$as_me:$LINENO: checking for $ac_word" >&5
8697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8698 if test "${ac_cv_prog_BISON_PLUS_PLUS+set}" = set; then
8699   echo $ECHO_N "(cached) $ECHO_C" >&6
8700 else
8701   if test -n "$BISON_PLUS_PLUS"; then
8702   ac_cv_prog_BISON_PLUS_PLUS="$BISON_PLUS_PLUS" # Let the user override the test.
8703 else
8704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705 for as_dir in $PATH
8706 do
8707   IFS=$as_save_IFS
8708   test -z "$as_dir" && as_dir=.
8709   for ac_exec_ext in '' $ac_executable_extensions; do
8710   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711     ac_cv_prog_BISON_PLUS_PLUS="bison++"
8712     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8713     break 2
8714   fi
8715 done
8716 done
8717
8718   test -z "$ac_cv_prog_BISON_PLUS_PLUS" && ac_cv_prog_BISON_PLUS_PLUS=":"
8719 fi
8720 fi
8721 BISON_PLUS_PLUS=$ac_cv_prog_BISON_PLUS_PLUS
8722 if test -n "$BISON_PLUS_PLUS"; then
8723   echo "$as_me:$LINENO: result: $BISON_PLUS_PLUS" >&5
8724 echo "${ECHO_T}$BISON_PLUS_PLUS" >&6
8725 else
8726   echo "$as_me:$LINENO: result: no" >&5
8727 echo "${ECHO_T}no" >&6
8728 fi
8729
8730
8731
8732 ac_ext=cc
8733 ac_cpp='$CXXCPP $CPPFLAGS'
8734 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8735 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8736 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8737
8738
8739 # Checking for header files.
8740 # ===========================================================================
8741
8742 if test -d /stuff/include; then
8743   CPPFLAGS="$CPPFLAGS -I/stuff/include"
8744 fi
8745
8746
8747
8748 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8749 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8750 if test "${ac_cv_header_stdc+set}" = set; then
8751   echo $ECHO_N "(cached) $ECHO_C" >&6
8752 else
8753   cat >conftest.$ac_ext <<_ACEOF
8754 /* confdefs.h.  */
8755 _ACEOF
8756 cat confdefs.h >>conftest.$ac_ext
8757 cat >>conftest.$ac_ext <<_ACEOF
8758 /* end confdefs.h.  */
8759 #include <stdlib.h>
8760 #include <stdarg.h>
8761 #include <string.h>
8762 #include <float.h>
8763
8764 int
8765 main ()
8766 {
8767
8768   ;
8769   return 0;
8770 }
8771 _ACEOF
8772 rm -f conftest.$ac_objext
8773 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8774   (eval $ac_compile) 2>conftest.er1
8775   ac_status=$?
8776   grep -v '^ *+' conftest.er1 >conftest.err
8777   rm -f conftest.er1
8778   cat conftest.err >&5
8779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780   (exit $ac_status); } &&
8781          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
8782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8783   (eval $ac_try) 2>&5
8784   ac_status=$?
8785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8786   (exit $ac_status); }; } &&
8787          { ac_try='test -s conftest.$ac_objext'
8788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8789   (eval $ac_try) 2>&5
8790   ac_status=$?
8791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792   (exit $ac_status); }; }; then
8793   ac_cv_header_stdc=yes
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 sed 's/^/| /' conftest.$ac_ext >&5
8797
8798 ac_cv_header_stdc=no
8799 fi
8800 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8801
8802 if test $ac_cv_header_stdc = yes; then
8803   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8804   cat >conftest.$ac_ext <<_ACEOF
8805 /* confdefs.h.  */
8806 _ACEOF
8807 cat confdefs.h >>conftest.$ac_ext
8808 cat >>conftest.$ac_ext <<_ACEOF
8809 /* end confdefs.h.  */
8810 #include <string.h>
8811
8812 _ACEOF
8813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8814   $EGREP "memchr" >/dev/null 2>&1; then
8815   :
8816 else
8817   ac_cv_header_stdc=no
8818 fi
8819 rm -f conftest*
8820
8821 fi
8822
8823 if test $ac_cv_header_stdc = yes; then
8824   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8825   cat >conftest.$ac_ext <<_ACEOF
8826 /* confdefs.h.  */
8827 _ACEOF
8828 cat confdefs.h >>conftest.$ac_ext
8829 cat >>conftest.$ac_ext <<_ACEOF
8830 /* end confdefs.h.  */
8831 #include <stdlib.h>
8832
8833 _ACEOF
8834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8835   $EGREP "free" >/dev/null 2>&1; then
8836   :
8837 else
8838   ac_cv_header_stdc=no
8839 fi
8840 rm -f conftest*
8841
8842 fi
8843
8844 if test $ac_cv_header_stdc = yes; then
8845   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8846   if test "$cross_compiling" = yes; then
8847   :
8848 else
8849   cat >conftest.$ac_ext <<_ACEOF
8850 /* confdefs.h.  */
8851 _ACEOF
8852 cat confdefs.h >>conftest.$ac_ext
8853 cat >>conftest.$ac_ext <<_ACEOF
8854 /* end confdefs.h.  */
8855 #include <ctype.h>
8856 #if ((' ' & 0x0FF) == 0x020)
8857 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8858 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8859 #else
8860 # define ISLOWER(c) \
8861                    (('a' <= (c) && (c) <= 'i') \
8862                      || ('j' <= (c) && (c) <= 'r') \
8863                      || ('s' <= (c) && (c) <= 'z'))
8864 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8865 #endif
8866
8867 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8868 int
8869 main ()
8870 {
8871   int i;
8872   for (i = 0; i < 256; i++)
8873     if (XOR (islower (i), ISLOWER (i))
8874         || toupper (i) != TOUPPER (i))
8875       exit(2);
8876   exit (0);
8877 }
8878 _ACEOF
8879 rm -f conftest$ac_exeext
8880 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8881   (eval $ac_link) 2>&5
8882   ac_status=$?
8883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8886   (eval $ac_try) 2>&5
8887   ac_status=$?
8888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889   (exit $ac_status); }; }; then
8890   :
8891 else
8892   echo "$as_me: program exited with status $ac_status" >&5
8893 echo "$as_me: failed program was:" >&5
8894 sed 's/^/| /' conftest.$ac_ext >&5
8895
8896 ( exit $ac_status )
8897 ac_cv_header_stdc=no
8898 fi
8899 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8900 fi
8901 fi
8902 fi
8903 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8904 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8905 if test $ac_cv_header_stdc = yes; then
8906
8907 cat >>confdefs.h <<\_ACEOF
8908 #define STDC_HEADERS 1
8909 _ACEOF
8910
8911 fi
8912
8913
8914 for ac_header in getopt.h
8915 do
8916 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8918   echo "$as_me:$LINENO: checking for $ac_header" >&5
8919 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8920 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8921   echo $ECHO_N "(cached) $ECHO_C" >&6
8922 fi
8923 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8925 else
8926   # Is the header compilable?
8927 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8928 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8929 cat >conftest.$ac_ext <<_ACEOF
8930 /* confdefs.h.  */
8931 _ACEOF
8932 cat confdefs.h >>conftest.$ac_ext
8933 cat >>conftest.$ac_ext <<_ACEOF
8934 /* end confdefs.h.  */
8935 $ac_includes_default
8936 #include <$ac_header>
8937 _ACEOF
8938 rm -f conftest.$ac_objext
8939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8940   (eval $ac_compile) 2>conftest.er1
8941   ac_status=$?
8942   grep -v '^ *+' conftest.er1 >conftest.err
8943   rm -f conftest.er1
8944   cat conftest.err >&5
8945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946   (exit $ac_status); } &&
8947          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
8948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8949   (eval $ac_try) 2>&5
8950   ac_status=$?
8951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952   (exit $ac_status); }; } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   ac_header_compiler=yes
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 sed 's/^/| /' conftest.$ac_ext >&5
8963
8964 ac_header_compiler=no
8965 fi
8966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8967 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8968 echo "${ECHO_T}$ac_header_compiler" >&6
8969
8970 # Is the header present?
8971 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8972 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8973 cat >conftest.$ac_ext <<_ACEOF
8974 /* confdefs.h.  */
8975 _ACEOF
8976 cat confdefs.h >>conftest.$ac_ext
8977 cat >>conftest.$ac_ext <<_ACEOF
8978 /* end confdefs.h.  */
8979 #include <$ac_header>
8980 _ACEOF
8981 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8983   ac_status=$?
8984   grep -v '^ *+' conftest.er1 >conftest.err
8985   rm -f conftest.er1
8986   cat conftest.err >&5
8987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8988   (exit $ac_status); } >/dev/null; then
8989   if test -s conftest.err; then
8990     ac_cpp_err=$ac_cxx_preproc_warn_flag
8991     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
8992   else
8993     ac_cpp_err=
8994   fi
8995 else
8996   ac_cpp_err=yes
8997 fi
8998 if test -z "$ac_cpp_err"; then
8999   ac_header_preproc=yes
9000 else
9001   echo "$as_me: failed program was:" >&5
9002 sed 's/^/| /' conftest.$ac_ext >&5
9003
9004   ac_header_preproc=no
9005 fi
9006 rm -f conftest.err conftest.$ac_ext
9007 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9008 echo "${ECHO_T}$ac_header_preproc" >&6
9009
9010 # So?  What about this header?
9011 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9012   yes:no: )
9013     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9014 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9015     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9016 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9017     ac_header_preproc=yes
9018     ;;
9019   no:yes:* )
9020     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9021 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9022     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9023 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9024     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9025 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9026     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9027 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9028     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9029 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9030     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9031 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9032     (
9033       cat <<\_ASBOX
9034 ## ------------------------------------------ ##
9035 ## Report this to the AC_PACKAGE_NAME lists.  ##
9036 ## ------------------------------------------ ##
9037 _ASBOX
9038     ) |
9039       sed "s/^/$as_me: WARNING:     /" >&2
9040     ;;
9041 esac
9042 echo "$as_me:$LINENO: checking for $ac_header" >&5
9043 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9044 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9045   echo $ECHO_N "(cached) $ECHO_C" >&6
9046 else
9047   eval "$as_ac_Header=\$ac_header_preproc"
9048 fi
9049 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9050 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9051
9052 fi
9053 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9054   cat >>confdefs.h <<_ACEOF
9055 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9056 _ACEOF
9057
9058 fi
9059
9060 done
9061
9062
9063 for ac_header in unistd.h
9064 do
9065 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9066 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9067   echo "$as_me:$LINENO: checking for $ac_header" >&5
9068 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9069 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9070   echo $ECHO_N "(cached) $ECHO_C" >&6
9071 fi
9072 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9073 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9074 else
9075   # Is the header compilable?
9076 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9077 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9078 cat >conftest.$ac_ext <<_ACEOF
9079 /* confdefs.h.  */
9080 _ACEOF
9081 cat confdefs.h >>conftest.$ac_ext
9082 cat >>conftest.$ac_ext <<_ACEOF
9083 /* end confdefs.h.  */
9084 $ac_includes_default
9085 #include <$ac_header>
9086 _ACEOF
9087 rm -f conftest.$ac_objext
9088 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9089   (eval $ac_compile) 2>conftest.er1
9090   ac_status=$?
9091   grep -v '^ *+' conftest.er1 >conftest.err
9092   rm -f conftest.er1
9093   cat conftest.err >&5
9094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095   (exit $ac_status); } &&
9096          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9098   (eval $ac_try) 2>&5
9099   ac_status=$?
9100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101   (exit $ac_status); }; } &&
9102          { ac_try='test -s conftest.$ac_objext'
9103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9104   (eval $ac_try) 2>&5
9105   ac_status=$?
9106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107   (exit $ac_status); }; }; then
9108   ac_header_compiler=yes
9109 else
9110   echo "$as_me: failed program was:" >&5
9111 sed 's/^/| /' conftest.$ac_ext >&5
9112
9113 ac_header_compiler=no
9114 fi
9115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9116 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9117 echo "${ECHO_T}$ac_header_compiler" >&6
9118
9119 # Is the header present?
9120 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9121 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9122 cat >conftest.$ac_ext <<_ACEOF
9123 /* confdefs.h.  */
9124 _ACEOF
9125 cat confdefs.h >>conftest.$ac_ext
9126 cat >>conftest.$ac_ext <<_ACEOF
9127 /* end confdefs.h.  */
9128 #include <$ac_header>
9129 _ACEOF
9130 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9132   ac_status=$?
9133   grep -v '^ *+' conftest.er1 >conftest.err
9134   rm -f conftest.er1
9135   cat conftest.err >&5
9136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137   (exit $ac_status); } >/dev/null; then
9138   if test -s conftest.err; then
9139     ac_cpp_err=$ac_cxx_preproc_warn_flag
9140     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9141   else
9142     ac_cpp_err=
9143   fi
9144 else
9145   ac_cpp_err=yes
9146 fi
9147 if test -z "$ac_cpp_err"; then
9148   ac_header_preproc=yes
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 sed 's/^/| /' conftest.$ac_ext >&5
9152
9153   ac_header_preproc=no
9154 fi
9155 rm -f conftest.err conftest.$ac_ext
9156 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9157 echo "${ECHO_T}$ac_header_preproc" >&6
9158
9159 # So?  What about this header?
9160 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9161   yes:no: )
9162     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9163 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9164     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9165 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9166     ac_header_preproc=yes
9167     ;;
9168   no:yes:* )
9169     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9170 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9171     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9172 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9173     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9174 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9175     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9176 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9177     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9178 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9179     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9180 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9181     (
9182       cat <<\_ASBOX
9183 ## ------------------------------------------ ##
9184 ## Report this to the AC_PACKAGE_NAME lists.  ##
9185 ## ------------------------------------------ ##
9186 _ASBOX
9187     ) |
9188       sed "s/^/$as_me: WARNING:     /" >&2
9189     ;;
9190 esac
9191 echo "$as_me:$LINENO: checking for $ac_header" >&5
9192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9194   echo $ECHO_N "(cached) $ECHO_C" >&6
9195 else
9196   eval "$as_ac_Header=\$ac_header_preproc"
9197 fi
9198 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9199 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9200
9201 fi
9202 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9203   cat >>confdefs.h <<_ACEOF
9204 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9205 _ACEOF
9206
9207 fi
9208
9209 done
9210
9211 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9212   echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9213 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9214 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9215   echo $ECHO_N "(cached) $ECHO_C" >&6
9216 fi
9217 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9218 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9219 else
9220   # Is the header compilable?
9221 echo "$as_me:$LINENO: checking sys/socket.h usability" >&5
9222 echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6
9223 cat >conftest.$ac_ext <<_ACEOF
9224 /* confdefs.h.  */
9225 _ACEOF
9226 cat confdefs.h >>conftest.$ac_ext
9227 cat >>conftest.$ac_ext <<_ACEOF
9228 /* end confdefs.h.  */
9229 $ac_includes_default
9230 #include <sys/socket.h>
9231 _ACEOF
9232 rm -f conftest.$ac_objext
9233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9234   (eval $ac_compile) 2>conftest.er1
9235   ac_status=$?
9236   grep -v '^ *+' conftest.er1 >conftest.err
9237   rm -f conftest.er1
9238   cat conftest.err >&5
9239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9240   (exit $ac_status); } &&
9241          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9243   (eval $ac_try) 2>&5
9244   ac_status=$?
9245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9246   (exit $ac_status); }; } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   ac_header_compiler=yes
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 sed 's/^/| /' conftest.$ac_ext >&5
9257
9258 ac_header_compiler=no
9259 fi
9260 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9261 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9262 echo "${ECHO_T}$ac_header_compiler" >&6
9263
9264 # Is the header present?
9265 echo "$as_me:$LINENO: checking sys/socket.h presence" >&5
9266 echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6
9267 cat >conftest.$ac_ext <<_ACEOF
9268 /* confdefs.h.  */
9269 _ACEOF
9270 cat confdefs.h >>conftest.$ac_ext
9271 cat >>conftest.$ac_ext <<_ACEOF
9272 /* end confdefs.h.  */
9273 #include <sys/socket.h>
9274 _ACEOF
9275 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9276   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9277   ac_status=$?
9278   grep -v '^ *+' conftest.er1 >conftest.err
9279   rm -f conftest.er1
9280   cat conftest.err >&5
9281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282   (exit $ac_status); } >/dev/null; then
9283   if test -s conftest.err; then
9284     ac_cpp_err=$ac_cxx_preproc_warn_flag
9285     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9286   else
9287     ac_cpp_err=
9288   fi
9289 else
9290   ac_cpp_err=yes
9291 fi
9292 if test -z "$ac_cpp_err"; then
9293   ac_header_preproc=yes
9294 else
9295   echo "$as_me: failed program was:" >&5
9296 sed 's/^/| /' conftest.$ac_ext >&5
9297
9298   ac_header_preproc=no
9299 fi
9300 rm -f conftest.err conftest.$ac_ext
9301 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9302 echo "${ECHO_T}$ac_header_preproc" >&6
9303
9304 # So?  What about this header?
9305 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9306   yes:no: )
9307     { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
9308 echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9309     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5
9310 echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;}
9311     ac_header_preproc=yes
9312     ;;
9313   no:yes:* )
9314     { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5
9315 echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;}
9316     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&5
9317 echo "$as_me: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&2;}
9318     { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5
9319 echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;}
9320     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&5
9321 echo "$as_me: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9322     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
9323 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
9324     { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5
9325 echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;}
9326     (
9327       cat <<\_ASBOX
9328 ## ------------------------------------------ ##
9329 ## Report this to the AC_PACKAGE_NAME lists.  ##
9330 ## ------------------------------------------ ##
9331 _ASBOX
9332     ) |
9333       sed "s/^/$as_me: WARNING:     /" >&2
9334     ;;
9335 esac
9336 echo "$as_me:$LINENO: checking for sys/socket.h" >&5
9337 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
9338 if test "${ac_cv_header_sys_socket_h+set}" = set; then
9339   echo $ECHO_N "(cached) $ECHO_C" >&6
9340 else
9341   ac_cv_header_sys_socket_h=$ac_header_preproc
9342 fi
9343 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
9344 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
9345
9346 fi
9347 if test $ac_cv_header_sys_socket_h = yes; then
9348   cat >>confdefs.h <<\_ACEOF
9349 #define SOCKET_AVAIL 1
9350 _ACEOF
9351
9352     cat >>confdefs.h <<\_ACEOF
9353 #define HAVE_SYS_SOCKET_H 1
9354 _ACEOF
9355
9356     cat >conftest.$ac_ext <<_ACEOF
9357 /* confdefs.h.  */
9358 _ACEOF
9359 cat confdefs.h >>conftest.$ac_ext
9360 cat >>conftest.$ac_ext <<_ACEOF
9361 /* end confdefs.h.  */
9362 #include <sys/socket.h>
9363
9364 _ACEOF
9365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9366   $EGREP "socklen_t" >/dev/null 2>&1; then
9367   cat >>confdefs.h <<_ACEOF
9368 #define SOCKLEN_T socklen_t
9369 _ACEOF
9370
9371 else
9372   cat >>confdefs.h <<_ACEOF
9373 #define SOCKLEN_T uint
9374 _ACEOF
9375
9376 fi
9377 rm -f conftest*
9378
9379
9380 fi
9381
9382
9383 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9384   echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9385 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
9386 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9387   echo $ECHO_N "(cached) $ECHO_C" >&6
9388 fi
9389 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9390 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
9391 else
9392   # Is the header compilable?
9393 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
9394 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
9395 cat >conftest.$ac_ext <<_ACEOF
9396 /* confdefs.h.  */
9397 _ACEOF
9398 cat confdefs.h >>conftest.$ac_ext
9399 cat >>conftest.$ac_ext <<_ACEOF
9400 /* end confdefs.h.  */
9401 $ac_includes_default
9402 #include <dlfcn.h>
9403 _ACEOF
9404 rm -f conftest.$ac_objext
9405 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9406   (eval $ac_compile) 2>conftest.er1
9407   ac_status=$?
9408   grep -v '^ *+' conftest.er1 >conftest.err
9409   rm -f conftest.er1
9410   cat conftest.err >&5
9411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412   (exit $ac_status); } &&
9413          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9415   (eval $ac_try) 2>&5
9416   ac_status=$?
9417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9418   (exit $ac_status); }; } &&
9419          { ac_try='test -s conftest.$ac_objext'
9420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9421   (eval $ac_try) 2>&5
9422   ac_status=$?
9423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9424   (exit $ac_status); }; }; then
9425   ac_header_compiler=yes
9426 else
9427   echo "$as_me: failed program was:" >&5
9428 sed 's/^/| /' conftest.$ac_ext >&5
9429
9430 ac_header_compiler=no
9431 fi
9432 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9433 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9434 echo "${ECHO_T}$ac_header_compiler" >&6
9435
9436 # Is the header present?
9437 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
9438 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
9439 cat >conftest.$ac_ext <<_ACEOF
9440 /* confdefs.h.  */
9441 _ACEOF
9442 cat confdefs.h >>conftest.$ac_ext
9443 cat >>conftest.$ac_ext <<_ACEOF
9444 /* end confdefs.h.  */
9445 #include <dlfcn.h>
9446 _ACEOF
9447 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9448   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9449   ac_status=$?
9450   grep -v '^ *+' conftest.er1 >conftest.err
9451   rm -f conftest.er1
9452   cat conftest.err >&5
9453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9454   (exit $ac_status); } >/dev/null; then
9455   if test -s conftest.err; then
9456     ac_cpp_err=$ac_cxx_preproc_warn_flag
9457     ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
9458   else
9459     ac_cpp_err=
9460   fi
9461 else
9462   ac_cpp_err=yes
9463 fi
9464 if test -z "$ac_cpp_err"; then
9465   ac_header_preproc=yes
9466 else
9467   echo "$as_me: failed program was:" >&5
9468 sed 's/^/| /' conftest.$ac_ext >&5
9469
9470   ac_header_preproc=no
9471 fi
9472 rm -f conftest.err conftest.$ac_ext
9473 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9474 echo "${ECHO_T}$ac_header_preproc" >&6
9475
9476 # So?  What about this header?
9477 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
9478   yes:no: )
9479     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
9480 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9481     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
9482 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
9483     ac_header_preproc=yes
9484     ;;
9485   no:yes:* )
9486     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
9487 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
9488     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
9489 echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
9490     { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
9491 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
9492     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
9493 echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9494     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
9495 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
9496     { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
9497 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
9498     (
9499       cat <<\_ASBOX
9500 ## ------------------------------------------ ##
9501 ## Report this to the AC_PACKAGE_NAME lists.  ##
9502 ## ------------------------------------------ ##
9503 _ASBOX
9504     ) |
9505       sed "s/^/$as_me: WARNING:     /" >&2
9506     ;;
9507 esac
9508 echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9509 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
9510 if test "${ac_cv_header_dlfcn_h+set}" = set; then
9511   echo $ECHO_N "(cached) $ECHO_C" >&6
9512 else
9513   ac_cv_header_dlfcn_h=$ac_header_preproc
9514 fi
9515 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9516 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
9517
9518 fi
9519
9520
9521
9522
9523
9524
9525
9526 ac_header_dirent=no
9527 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9528   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9529 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
9530 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9531 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9532   echo $ECHO_N "(cached) $ECHO_C" >&6
9533 else
9534   cat >conftest.$ac_ext <<_ACEOF
9535 /* confdefs.h.  */
9536 _ACEOF
9537 cat confdefs.h >>conftest.$ac_ext
9538 cat >>conftest.$ac_ext <<_ACEOF
9539 /* end confdefs.h.  */
9540 #include <sys/types.h>
9541 #include <$ac_hdr>
9542
9543 int
9544 main ()
9545 {
9546 if ((DIR *) 0)
9547 return 0;
9548   ;
9549   return 0;
9550 }
9551 _ACEOF
9552 rm -f conftest.$ac_objext
9553 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9554   (eval $ac_compile) 2>conftest.er1
9555   ac_status=$?
9556   grep -v '^ *+' conftest.er1 >conftest.err
9557   rm -f conftest.er1
9558   cat conftest.err >&5
9559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560   (exit $ac_status); } &&
9561          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9563   (eval $ac_try) 2>&5
9564   ac_status=$?
9565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9566   (exit $ac_status); }; } &&
9567          { ac_try='test -s conftest.$ac_objext'
9568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569   (eval $ac_try) 2>&5
9570   ac_status=$?
9571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572   (exit $ac_status); }; }; then
9573   eval "$as_ac_Header=yes"
9574 else
9575   echo "$as_me: failed program was:" >&5
9576 sed 's/^/| /' conftest.$ac_ext >&5
9577
9578 eval "$as_ac_Header=no"
9579 fi
9580 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9581 fi
9582 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9584 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9585   cat >>confdefs.h <<_ACEOF
9586 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9587 _ACEOF
9588
9589 ac_header_dirent=$ac_hdr; break
9590 fi
9591
9592 done
9593 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9594 if test $ac_header_dirent = dirent.h; then
9595   echo "$as_me:$LINENO: checking for library containing opendir" >&5
9596 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
9597 if test "${ac_cv_search_opendir+set}" = set; then
9598   echo $ECHO_N "(cached) $ECHO_C" >&6
9599 else
9600   ac_func_search_save_LIBS=$LIBS
9601 ac_cv_search_opendir=no
9602 cat >conftest.$ac_ext <<_ACEOF
9603 /* confdefs.h.  */
9604 _ACEOF
9605 cat confdefs.h >>conftest.$ac_ext
9606 cat >>conftest.$ac_ext <<_ACEOF
9607 /* end confdefs.h.  */
9608
9609 /* Override any gcc2 internal prototype to avoid an error.  */
9610 #ifdef __cplusplus
9611 extern "C"
9612 #endif
9613 /* We use char because int might match the return type of a gcc2
9614    builtin and then its argument prototype would still apply.  */
9615 char opendir ();
9616 int
9617 main ()
9618 {
9619 opendir ();
9620   ;
9621   return 0;
9622 }
9623 _ACEOF
9624 rm -f conftest.$ac_objext conftest$ac_exeext
9625 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9626   (eval $ac_link) 2>conftest.er1
9627   ac_status=$?
9628   grep -v '^ *+' conftest.er1 >conftest.err
9629   rm -f conftest.er1
9630   cat conftest.err >&5
9631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632   (exit $ac_status); } &&
9633          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9635   (eval $ac_try) 2>&5
9636   ac_status=$?
9637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9638   (exit $ac_status); }; } &&
9639          { ac_try='test -s conftest$ac_exeext'
9640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9641   (eval $ac_try) 2>&5
9642   ac_status=$?
9643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9644   (exit $ac_status); }; }; then
9645   ac_cv_search_opendir="none required"
9646 else
9647   echo "$as_me: failed program was:" >&5
9648 sed 's/^/| /' conftest.$ac_ext >&5
9649
9650 fi
9651 rm -f conftest.err conftest.$ac_objext \
9652       conftest$ac_exeext conftest.$ac_ext
9653 if test "$ac_cv_search_opendir" = no; then
9654   for ac_lib in dir; do
9655     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9656     cat >conftest.$ac_ext <<_ACEOF
9657 /* confdefs.h.  */
9658 _ACEOF
9659 cat confdefs.h >>conftest.$ac_ext
9660 cat >>conftest.$ac_ext <<_ACEOF
9661 /* end confdefs.h.  */
9662
9663 /* Override any gcc2 internal prototype to avoid an error.  */
9664 #ifdef __cplusplus
9665 extern "C"
9666 #endif
9667 /* We use char because int might match the return type of a gcc2
9668    builtin and then its argument prototype would still apply.  */
9669 char opendir ();
9670 int
9671 main ()
9672 {
9673 opendir ();
9674   ;
9675   return 0;
9676 }
9677 _ACEOF
9678 rm -f conftest.$ac_objext conftest$ac_exeext
9679 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9680   (eval $ac_link) 2>conftest.er1
9681   ac_status=$?
9682   grep -v '^ *+' conftest.er1 >conftest.err
9683   rm -f conftest.er1
9684   cat conftest.err >&5
9685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9686   (exit $ac_status); } &&
9687          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9689   (eval $ac_try) 2>&5
9690   ac_status=$?
9691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9692   (exit $ac_status); }; } &&
9693          { ac_try='test -s conftest$ac_exeext'
9694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9695   (eval $ac_try) 2>&5
9696   ac_status=$?
9697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698   (exit $ac_status); }; }; then
9699   ac_cv_search_opendir="-l$ac_lib"
9700 break
9701 else
9702   echo "$as_me: failed program was:" >&5
9703 sed 's/^/| /' conftest.$ac_ext >&5
9704
9705 fi
9706 rm -f conftest.err conftest.$ac_objext \
9707       conftest$ac_exeext conftest.$ac_ext
9708   done
9709 fi
9710 LIBS=$ac_func_search_save_LIBS
9711 fi
9712 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
9713 echo "${ECHO_T}$ac_cv_search_opendir" >&6
9714 if test "$ac_cv_search_opendir" != no; then
9715   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
9716
9717 fi
9718
9719 else
9720   echo "$as_me:$LINENO: checking for library containing opendir" >&5
9721 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
9722 if test "${ac_cv_search_opendir+set}" = set; then
9723   echo $ECHO_N "(cached) $ECHO_C" >&6
9724 else
9725   ac_func_search_save_LIBS=$LIBS
9726 ac_cv_search_opendir=no
9727 cat >conftest.$ac_ext <<_ACEOF
9728 /* confdefs.h.  */
9729 _ACEOF
9730 cat confdefs.h >>conftest.$ac_ext
9731 cat >>conftest.$ac_ext <<_ACEOF
9732 /* end confdefs.h.  */
9733
9734 /* Override any gcc2 internal prototype to avoid an error.  */
9735 #ifdef __cplusplus
9736 extern "C"
9737 #endif
9738 /* We use char because int might match the return type of a gcc2
9739    builtin and then its argument prototype would still apply.  */
9740 char opendir ();
9741 int
9742 main ()
9743 {
9744 opendir ();
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f conftest.$ac_objext conftest$ac_exeext
9750 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9751   (eval $ac_link) 2>conftest.er1
9752   ac_status=$?
9753   grep -v '^ *+' conftest.er1 >conftest.err
9754   rm -f conftest.er1
9755   cat conftest.err >&5
9756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757   (exit $ac_status); } &&
9758          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9760   (eval $ac_try) 2>&5
9761   ac_status=$?
9762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9763   (exit $ac_status); }; } &&
9764          { ac_try='test -s conftest$ac_exeext'
9765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9766   (eval $ac_try) 2>&5
9767   ac_status=$?
9768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9769   (exit $ac_status); }; }; then
9770   ac_cv_search_opendir="none required"
9771 else
9772   echo "$as_me: failed program was:" >&5
9773 sed 's/^/| /' conftest.$ac_ext >&5
9774
9775 fi
9776 rm -f conftest.err conftest.$ac_objext \
9777       conftest$ac_exeext conftest.$ac_ext
9778 if test "$ac_cv_search_opendir" = no; then
9779   for ac_lib in x; do
9780     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9781     cat >conftest.$ac_ext <<_ACEOF
9782 /* confdefs.h.  */
9783 _ACEOF
9784 cat confdefs.h >>conftest.$ac_ext
9785 cat >>conftest.$ac_ext <<_ACEOF
9786 /* end confdefs.h.  */
9787
9788 /* Override any gcc2 internal prototype to avoid an error.  */
9789 #ifdef __cplusplus
9790 extern "C"
9791 #endif
9792 /* We use char because int might match the return type of a gcc2
9793    builtin and then its argument prototype would still apply.  */
9794 char opendir ();
9795 int
9796 main ()
9797 {
9798 opendir ();
9799   ;
9800   return 0;
9801 }
9802 _ACEOF
9803 rm -f conftest.$ac_objext conftest$ac_exeext
9804 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9805   (eval $ac_link) 2>conftest.er1
9806   ac_status=$?
9807   grep -v '^ *+' conftest.er1 >conftest.err
9808   rm -f conftest.er1
9809   cat conftest.err >&5
9810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811   (exit $ac_status); } &&
9812          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
9813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9814   (eval $ac_try) 2>&5
9815   ac_status=$?
9816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817   (exit $ac_status); }; } &&
9818          { ac_try='test -s conftest$ac_exeext'
9819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9820   (eval $ac_try) 2>&5
9821   ac_status=$?
9822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823   (exit $ac_status); }; }; then
9824   ac_cv_search_opendir="-l$ac_lib"
9825 break
9826 else
9827   echo "$as_me: failed program was:" >&5
9828 sed 's/^/| /' conftest.$ac_ext >&5
9829
9830 fi
9831 rm -f conftest.err conftest.$ac_objext \
9832       conftest$ac_exeext conftest.$ac_ext
9833   done
9834 fi
9835 LIBS=$ac_func_search_save_LIBS
9836 fi
9837 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
9838 echo "${ECHO_T}$ac_cv_search_opendir" >&6
9839 if test "$ac_cv_search_opendir" != no; then
9840   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
9841
9842 fi
9843
9844 fi
9845
9846
9847 # This must be after CXXCPP
9848
9849 echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
9850 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
9851 if test "${ucsim_cv_fd+set}" = set; then
9852   echo $ECHO_N "(cached) $ECHO_C" >&6
9853 else
9854   ucsim_cv_fd="unknown"
9855 cat >conftest.$ac_ext <<_ACEOF
9856 /* confdefs.h.  */
9857 _ACEOF
9858 cat confdefs.h >>conftest.$ac_ext
9859 cat >>conftest.$ac_ext <<_ACEOF
9860 /* end confdefs.h.  */
9861
9862 #include <sys/time.h>
9863 #ifdef FD_ZERO
9864 yes
9865 #endif
9866 _ACEOF
9867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9868   $EGREP "yes" >/dev/null 2>&1; then
9869   ucsim_cv_fd="<sys/time.h>"
9870 fi
9871 rm -f conftest*
9872
9873 cat >conftest.$ac_ext <<_ACEOF
9874 /* confdefs.h.  */
9875 _ACEOF
9876 cat confdefs.h >>conftest.$ac_ext
9877 cat >>conftest.$ac_ext <<_ACEOF
9878 /* end confdefs.h.  */
9879
9880 #include <sys/types.h>
9881 #ifdef FD_ZERO
9882 yes
9883 #endif
9884 _ACEOF
9885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9886   $EGREP "yes" >/dev/null 2>&1; then
9887   ucsim_cv_fd="<sys/types.h>"
9888 fi
9889 rm -f conftest*
9890
9891 cat >conftest.$ac_ext <<_ACEOF
9892 /* confdefs.h.  */
9893 _ACEOF
9894 cat confdefs.h >>conftest.$ac_ext
9895 cat >>conftest.$ac_ext <<_ACEOF
9896 /* end confdefs.h.  */
9897
9898 #include <sys/select.h>
9899 #ifdef FD_ZERO
9900 yes
9901 #endif
9902 _ACEOF
9903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9904   $EGREP "yes" >/dev/null 2>&1; then
9905   ucsim_cv_fd="<sys/types.h>"
9906 fi
9907 rm -f conftest*
9908
9909 fi
9910 echo "$as_me:$LINENO: result: $ucsim_cv_fd" >&5
9911 echo "${ECHO_T}$ucsim_cv_fd" >&6
9912
9913 cat >>confdefs.h <<\_ACEOF
9914 #define FD_HEADER_OK 0
9915 _ACEOF
9916
9917 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
9918 cat >>confdefs.h <<\_ACEOF
9919 #define FD_NEED_TIME_H 1
9920 _ACEOF
9921
9922 cat >>confdefs.h <<\_ACEOF
9923 #define FD_HEADER_OK 1
9924 _ACEOF
9925
9926 else
9927 cat >>confdefs.h <<\_ACEOF
9928 #define FD_NEED_TIME_H 0
9929 _ACEOF
9930
9931 fi
9932 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
9933 cat >>confdefs.h <<\_ACEOF
9934 #define FD_NEED_TYPES_H 1
9935 _ACEOF
9936
9937 cat >>confdefs.h <<\_ACEOF
9938 #define FD_HEADER_OK 1
9939 _ACEOF
9940
9941 else
9942 cat >>confdefs.h <<\_ACEOF
9943 #define FD_NEED_TYPES_H 0
9944 _ACEOF
9945
9946 fi
9947 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
9948 cat >>confdefs.h <<\_ACEOF
9949 #define FD_NEED_SELECT_H 1
9950 _ACEOF
9951
9952 cat >>confdefs.h <<\_ACEOF
9953 #define FD_HEADER_OK 1
9954 _ACEOF
9955
9956 else
9957 cat >>confdefs.h <<\_ACEOF
9958 #define FD_NEED_SELECT_H 0
9959 _ACEOF
9960
9961 fi
9962
9963 cat >>confdefs.h <<_ACEOF
9964 #define HEADER_FD ${ucsim_cv_fd}
9965 _ACEOF
9966
9967
9968
9969 # Checking for functions/libs
9970 # ===========================================================================
9971
9972 echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9973 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9974 if test "${ac_cv_lib_socket_socket+set}" = set; then
9975   echo $ECHO_N "(cached) $ECHO_C" >&6
9976 else
9977   ac_check_lib_save_LIBS=$LIBS
9978 LIBS="-lsocket  $LIBS"
9979 cat >conftest.$ac_ext <<_ACEOF
9980 /* confdefs.h.  */
9981 _ACEOF
9982 cat confdefs.h >>conftest.$ac_ext
9983 cat >>conftest.$ac_ext <<_ACEOF
9984 /* end confdefs.h.  */
9985
9986 /* Override any gcc2 internal prototype to avoid an error.  */
9987 #ifdef __cplusplus
9988 extern "C"
9989 #endif
9990 /* We use char because int might match the return type of a gcc2
9991    builtin and then its argument prototype would still apply.  */
9992 char socket ();
9993 int
9994 main ()
9995 {
9996 socket ();
9997   ;
9998   return 0;
9999 }
10000 _ACEOF
10001 rm -f conftest.$ac_objext conftest$ac_exeext
10002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10003   (eval $ac_link) 2>conftest.er1
10004   ac_status=$?
10005   grep -v '^ *+' conftest.er1 >conftest.err
10006   rm -f conftest.er1
10007   cat conftest.err >&5
10008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10009   (exit $ac_status); } &&
10010          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10012   (eval $ac_try) 2>&5
10013   ac_status=$?
10014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10015   (exit $ac_status); }; } &&
10016          { ac_try='test -s conftest$ac_exeext'
10017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10021   (exit $ac_status); }; }; then
10022   ac_cv_lib_socket_socket=yes
10023 else
10024   echo "$as_me: failed program was:" >&5
10025 sed 's/^/| /' conftest.$ac_ext >&5
10026
10027 ac_cv_lib_socket_socket=no
10028 fi
10029 rm -f conftest.err conftest.$ac_objext \
10030       conftest$ac_exeext conftest.$ac_ext
10031 LIBS=$ac_check_lib_save_LIBS
10032 fi
10033 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10034 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10035 if test $ac_cv_lib_socket_socket = yes; then
10036   cat >>confdefs.h <<_ACEOF
10037 #define HAVE_LIBSOCKET 1
10038 _ACEOF
10039
10040   LIBS="-lsocket $LIBS"
10041
10042 fi
10043
10044
10045 echo "$as_me:$LINENO: checking for xdr_short in -lnsl" >&5
10046 echo $ECHO_N "checking for xdr_short in -lnsl... $ECHO_C" >&6
10047 if test "${ac_cv_lib_nsl_xdr_short+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050   ac_check_lib_save_LIBS=$LIBS
10051 LIBS="-lnsl  $LIBS"
10052 cat >conftest.$ac_ext <<_ACEOF
10053 /* confdefs.h.  */
10054 _ACEOF
10055 cat confdefs.h >>conftest.$ac_ext
10056 cat >>conftest.$ac_ext <<_ACEOF
10057 /* end confdefs.h.  */
10058
10059 /* Override any gcc2 internal prototype to avoid an error.  */
10060 #ifdef __cplusplus
10061 extern "C"
10062 #endif
10063 /* We use char because int might match the return type of a gcc2
10064    builtin and then its argument prototype would still apply.  */
10065 char xdr_short ();
10066 int
10067 main ()
10068 {
10069 xdr_short ();
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext conftest$ac_exeext
10075 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10076   (eval $ac_link) 2>conftest.er1
10077   ac_status=$?
10078   grep -v '^ *+' conftest.er1 >conftest.err
10079   rm -f conftest.er1
10080   cat conftest.err >&5
10081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082   (exit $ac_status); } &&
10083          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085   (eval $ac_try) 2>&5
10086   ac_status=$?
10087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088   (exit $ac_status); }; } &&
10089          { ac_try='test -s conftest$ac_exeext'
10090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091   (eval $ac_try) 2>&5
10092   ac_status=$?
10093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094   (exit $ac_status); }; }; then
10095   ac_cv_lib_nsl_xdr_short=yes
10096 else
10097   echo "$as_me: failed program was:" >&5
10098 sed 's/^/| /' conftest.$ac_ext >&5
10099
10100 ac_cv_lib_nsl_xdr_short=no
10101 fi
10102 rm -f conftest.err conftest.$ac_objext \
10103       conftest$ac_exeext conftest.$ac_ext
10104 LIBS=$ac_check_lib_save_LIBS
10105 fi
10106 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_xdr_short" >&5
10107 echo "${ECHO_T}$ac_cv_lib_nsl_xdr_short" >&6
10108 if test $ac_cv_lib_nsl_xdr_short = yes; then
10109   cat >>confdefs.h <<_ACEOF
10110 #define HAVE_LIBNSL 1
10111 _ACEOF
10112
10113   LIBS="-lnsl $LIBS"
10114
10115 fi
10116
10117 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10118 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10119 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10120   echo $ECHO_N "(cached) $ECHO_C" >&6
10121 else
10122   ac_check_lib_save_LIBS=$LIBS
10123 LIBS="-ldl  $LIBS"
10124 cat >conftest.$ac_ext <<_ACEOF
10125 /* confdefs.h.  */
10126 _ACEOF
10127 cat confdefs.h >>conftest.$ac_ext
10128 cat >>conftest.$ac_ext <<_ACEOF
10129 /* end confdefs.h.  */
10130
10131 /* Override any gcc2 internal prototype to avoid an error.  */
10132 #ifdef __cplusplus
10133 extern "C"
10134 #endif
10135 /* We use char because int might match the return type of a gcc2
10136    builtin and then its argument prototype would still apply.  */
10137 char dlopen ();
10138 int
10139 main ()
10140 {
10141 dlopen ();
10142   ;
10143   return 0;
10144 }
10145 _ACEOF
10146 rm -f conftest.$ac_objext conftest$ac_exeext
10147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10148   (eval $ac_link) 2>conftest.er1
10149   ac_status=$?
10150   grep -v '^ *+' conftest.er1 >conftest.err
10151   rm -f conftest.er1
10152   cat conftest.err >&5
10153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157   (eval $ac_try) 2>&5
10158   ac_status=$?
10159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160   (exit $ac_status); }; } &&
10161          { ac_try='test -s conftest$ac_exeext'
10162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10163   (eval $ac_try) 2>&5
10164   ac_status=$?
10165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166   (exit $ac_status); }; }; then
10167   ac_cv_lib_dl_dlopen=yes
10168 else
10169   echo "$as_me: failed program was:" >&5
10170 sed 's/^/| /' conftest.$ac_ext >&5
10171
10172 ac_cv_lib_dl_dlopen=no
10173 fi
10174 rm -f conftest.err conftest.$ac_objext \
10175       conftest$ac_exeext conftest.$ac_ext
10176 LIBS=$ac_check_lib_save_LIBS
10177 fi
10178 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10179 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10180 if test $ac_cv_lib_dl_dlopen = yes; then
10181   dl_ok="yes"
10182 DL="-ldl"
10183 else
10184   dl_ok="no"
10185 DL=""
10186 fi
10187
10188
10189
10190 echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5
10191 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
10192 if test "${ac_cv_lib_panel_panel_above+set}" = set; then
10193   echo $ECHO_N "(cached) $ECHO_C" >&6
10194 else
10195   ac_check_lib_save_LIBS=$LIBS
10196 LIBS="-lpanel -lcurses $LIBS"
10197 cat >conftest.$ac_ext <<_ACEOF
10198 /* confdefs.h.  */
10199 _ACEOF
10200 cat confdefs.h >>conftest.$ac_ext
10201 cat >>conftest.$ac_ext <<_ACEOF
10202 /* end confdefs.h.  */
10203
10204 /* Override any gcc2 internal prototype to avoid an error.  */
10205 #ifdef __cplusplus
10206 extern "C"
10207 #endif
10208 /* We use char because int might match the return type of a gcc2
10209    builtin and then its argument prototype would still apply.  */
10210 char panel_above ();
10211 int
10212 main ()
10213 {
10214 panel_above ();
10215   ;
10216   return 0;
10217 }
10218 _ACEOF
10219 rm -f conftest.$ac_objext conftest$ac_exeext
10220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10221   (eval $ac_link) 2>conftest.er1
10222   ac_status=$?
10223   grep -v '^ *+' conftest.er1 >conftest.err
10224   rm -f conftest.er1
10225   cat conftest.err >&5
10226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10227   (exit $ac_status); } &&
10228          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10230   (eval $ac_try) 2>&5
10231   ac_status=$?
10232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10233   (exit $ac_status); }; } &&
10234          { ac_try='test -s conftest$ac_exeext'
10235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10236   (eval $ac_try) 2>&5
10237   ac_status=$?
10238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10239   (exit $ac_status); }; }; then
10240   ac_cv_lib_panel_panel_above=yes
10241 else
10242   echo "$as_me: failed program was:" >&5
10243 sed 's/^/| /' conftest.$ac_ext >&5
10244
10245 ac_cv_lib_panel_panel_above=no
10246 fi
10247 rm -f conftest.err conftest.$ac_objext \
10248       conftest$ac_exeext conftest.$ac_ext
10249 LIBS=$ac_check_lib_save_LIBS
10250 fi
10251 echo "$as_me:$LINENO: result: $ac_cv_lib_panel_panel_above" >&5
10252 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6
10253 if test $ac_cv_lib_panel_panel_above = yes; then
10254   panel_ok="yes"
10255 curses_ok="yes"
10256 CURSES_LIBS="-lpanel -lcurses"
10257
10258 else
10259   panel_ok="no"
10260 echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
10261 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
10262 if test "${ac_cv_lib_curses_nl+set}" = set; then
10263   echo $ECHO_N "(cached) $ECHO_C" >&6
10264 else
10265   ac_check_lib_save_LIBS=$LIBS
10266 LIBS="-lcurses  $LIBS"
10267 cat >conftest.$ac_ext <<_ACEOF
10268 /* confdefs.h.  */
10269 _ACEOF
10270 cat confdefs.h >>conftest.$ac_ext
10271 cat >>conftest.$ac_ext <<_ACEOF
10272 /* end confdefs.h.  */
10273
10274 /* Override any gcc2 internal prototype to avoid an error.  */
10275 #ifdef __cplusplus
10276 extern "C"
10277 #endif
10278 /* We use char because int might match the return type of a gcc2
10279    builtin and then its argument prototype would still apply.  */
10280 char nl ();
10281 int
10282 main ()
10283 {
10284 nl ();
10285   ;
10286   return 0;
10287 }
10288 _ACEOF
10289 rm -f conftest.$ac_objext conftest$ac_exeext
10290 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10291   (eval $ac_link) 2>conftest.er1
10292   ac_status=$?
10293   grep -v '^ *+' conftest.er1 >conftest.err
10294   rm -f conftest.er1
10295   cat conftest.err >&5
10296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297   (exit $ac_status); } &&
10298          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10300   (eval $ac_try) 2>&5
10301   ac_status=$?
10302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10303   (exit $ac_status); }; } &&
10304          { ac_try='test -s conftest$ac_exeext'
10305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10306   (eval $ac_try) 2>&5
10307   ac_status=$?
10308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10309   (exit $ac_status); }; }; then
10310   ac_cv_lib_curses_nl=yes
10311 else
10312   echo "$as_me: failed program was:" >&5
10313 sed 's/^/| /' conftest.$ac_ext >&5
10314
10315 ac_cv_lib_curses_nl=no
10316 fi
10317 rm -f conftest.err conftest.$ac_objext \
10318       conftest$ac_exeext conftest.$ac_ext
10319 LIBS=$ac_check_lib_save_LIBS
10320 fi
10321 echo "$as_me:$LINENO: result: $ac_cv_lib_curses_nl" >&5
10322 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
10323 if test $ac_cv_lib_curses_nl = yes; then
10324   curses_ok="yes"
10325 CURSES_LIBS="-lcurses"
10326
10327 else
10328   ncurses_ok="no"
10329 fi
10330
10331
10332 fi
10333
10334
10335
10336
10337
10338
10339 for ac_func in vprintf
10340 do
10341 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10342 echo "$as_me:$LINENO: checking for $ac_func" >&5
10343 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10344 if eval "test \"\${$as_ac_var+set}\" = set"; then
10345   echo $ECHO_N "(cached) $ECHO_C" >&6
10346 else
10347   cat >conftest.$ac_ext <<_ACEOF
10348 /* confdefs.h.  */
10349 _ACEOF
10350 cat confdefs.h >>conftest.$ac_ext
10351 cat >>conftest.$ac_ext <<_ACEOF
10352 /* end confdefs.h.  */
10353 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10354    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10355 #define $ac_func innocuous_$ac_func
10356
10357 /* System header to define __stub macros and hopefully few prototypes,
10358     which can conflict with char $ac_func (); below.
10359     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10360     <limits.h> exists even on freestanding compilers.  */
10361
10362 #ifdef __STDC__
10363 # include <limits.h>
10364 #else
10365 # include <assert.h>
10366 #endif
10367
10368 #undef $ac_func
10369
10370 /* Override any gcc2 internal prototype to avoid an error.  */
10371 #ifdef __cplusplus
10372 extern "C"
10373 {
10374 #endif
10375 /* We use char because int might match the return type of a gcc2
10376    builtin and then its argument prototype would still apply.  */
10377 char $ac_func ();
10378 /* The GNU C library defines this for functions which it implements
10379     to always fail with ENOSYS.  Some functions are actually named
10380     something starting with __ and the normal name is an alias.  */
10381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10382 choke me
10383 #else
10384 char (*f) () = $ac_func;
10385 #endif
10386 #ifdef __cplusplus
10387 }
10388 #endif
10389
10390 int
10391 main ()
10392 {
10393 return f != $ac_func;
10394   ;
10395   return 0;
10396 }
10397 _ACEOF
10398 rm -f conftest.$ac_objext conftest$ac_exeext
10399 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10400   (eval $ac_link) 2>conftest.er1
10401   ac_status=$?
10402   grep -v '^ *+' conftest.er1 >conftest.err
10403   rm -f conftest.er1
10404   cat conftest.err >&5
10405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10406   (exit $ac_status); } &&
10407          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10409   (eval $ac_try) 2>&5
10410   ac_status=$?
10411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412   (exit $ac_status); }; } &&
10413          { ac_try='test -s conftest$ac_exeext'
10414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10415   (eval $ac_try) 2>&5
10416   ac_status=$?
10417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418   (exit $ac_status); }; }; then
10419   eval "$as_ac_var=yes"
10420 else
10421   echo "$as_me: failed program was:" >&5
10422 sed 's/^/| /' conftest.$ac_ext >&5
10423
10424 eval "$as_ac_var=no"
10425 fi
10426 rm -f conftest.err conftest.$ac_objext \
10427       conftest$ac_exeext conftest.$ac_ext
10428 fi
10429 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10430 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10431 if test `eval echo '${'$as_ac_var'}'` = yes; then
10432   cat >>confdefs.h <<_ACEOF
10433 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10434 _ACEOF
10435
10436 echo "$as_me:$LINENO: checking for _doprnt" >&5
10437 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
10438 if test "${ac_cv_func__doprnt+set}" = set; then
10439   echo $ECHO_N "(cached) $ECHO_C" >&6
10440 else
10441   cat >conftest.$ac_ext <<_ACEOF
10442 /* confdefs.h.  */
10443 _ACEOF
10444 cat confdefs.h >>conftest.$ac_ext
10445 cat >>conftest.$ac_ext <<_ACEOF
10446 /* end confdefs.h.  */
10447 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
10448    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10449 #define _doprnt innocuous__doprnt
10450
10451 /* System header to define __stub macros and hopefully few prototypes,
10452     which can conflict with char _doprnt (); below.
10453     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10454     <limits.h> exists even on freestanding compilers.  */
10455
10456 #ifdef __STDC__
10457 # include <limits.h>
10458 #else
10459 # include <assert.h>
10460 #endif
10461
10462 #undef _doprnt
10463
10464 /* Override any gcc2 internal prototype to avoid an error.  */
10465 #ifdef __cplusplus
10466 extern "C"
10467 {
10468 #endif
10469 /* We use char because int might match the return type of a gcc2
10470    builtin and then its argument prototype would still apply.  */
10471 char _doprnt ();
10472 /* The GNU C library defines this for functions which it implements
10473     to always fail with ENOSYS.  Some functions are actually named
10474     something starting with __ and the normal name is an alias.  */
10475 #if defined (__stub__doprnt) || defined (__stub____doprnt)
10476 choke me
10477 #else
10478 char (*f) () = _doprnt;
10479 #endif
10480 #ifdef __cplusplus
10481 }
10482 #endif
10483
10484 int
10485 main ()
10486 {
10487 return f != _doprnt;
10488   ;
10489   return 0;
10490 }
10491 _ACEOF
10492 rm -f conftest.$ac_objext conftest$ac_exeext
10493 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10494   (eval $ac_link) 2>conftest.er1
10495   ac_status=$?
10496   grep -v '^ *+' conftest.er1 >conftest.err
10497   rm -f conftest.er1
10498   cat conftest.err >&5
10499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500   (exit $ac_status); } &&
10501          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10503   (eval $ac_try) 2>&5
10504   ac_status=$?
10505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506   (exit $ac_status); }; } &&
10507          { ac_try='test -s conftest$ac_exeext'
10508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10509   (eval $ac_try) 2>&5
10510   ac_status=$?
10511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10512   (exit $ac_status); }; }; then
10513   ac_cv_func__doprnt=yes
10514 else
10515   echo "$as_me: failed program was:" >&5
10516 sed 's/^/| /' conftest.$ac_ext >&5
10517
10518 ac_cv_func__doprnt=no
10519 fi
10520 rm -f conftest.err conftest.$ac_objext \
10521       conftest$ac_exeext conftest.$ac_ext
10522 fi
10523 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
10524 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
10525 if test $ac_cv_func__doprnt = yes; then
10526
10527 cat >>confdefs.h <<\_ACEOF
10528 #define HAVE_DOPRNT 1
10529 _ACEOF
10530
10531 fi
10532
10533 fi
10534 done
10535
10536
10537
10538 for ac_func in vsnprintf
10539 do
10540 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10541 echo "$as_me:$LINENO: checking for $ac_func" >&5
10542 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10543 if eval "test \"\${$as_ac_var+set}\" = set"; then
10544   echo $ECHO_N "(cached) $ECHO_C" >&6
10545 else
10546   cat >conftest.$ac_ext <<_ACEOF
10547 /* confdefs.h.  */
10548 _ACEOF
10549 cat confdefs.h >>conftest.$ac_ext
10550 cat >>conftest.$ac_ext <<_ACEOF
10551 /* end confdefs.h.  */
10552 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10553    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10554 #define $ac_func innocuous_$ac_func
10555
10556 /* System header to define __stub macros and hopefully few prototypes,
10557     which can conflict with char $ac_func (); below.
10558     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10559     <limits.h> exists even on freestanding compilers.  */
10560
10561 #ifdef __STDC__
10562 # include <limits.h>
10563 #else
10564 # include <assert.h>
10565 #endif
10566
10567 #undef $ac_func
10568
10569 /* Override any gcc2 internal prototype to avoid an error.  */
10570 #ifdef __cplusplus
10571 extern "C"
10572 {
10573 #endif
10574 /* We use char because int might match the return type of a gcc2
10575    builtin and then its argument prototype would still apply.  */
10576 char $ac_func ();
10577 /* The GNU C library defines this for functions which it implements
10578     to always fail with ENOSYS.  Some functions are actually named
10579     something starting with __ and the normal name is an alias.  */
10580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10581 choke me
10582 #else
10583 char (*f) () = $ac_func;
10584 #endif
10585 #ifdef __cplusplus
10586 }
10587 #endif
10588
10589 int
10590 main ()
10591 {
10592 return f != $ac_func;
10593   ;
10594   return 0;
10595 }
10596 _ACEOF
10597 rm -f conftest.$ac_objext conftest$ac_exeext
10598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10599   (eval $ac_link) 2>conftest.er1
10600   ac_status=$?
10601   grep -v '^ *+' conftest.er1 >conftest.err
10602   rm -f conftest.er1
10603   cat conftest.err >&5
10604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10605   (exit $ac_status); } &&
10606          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10608   (eval $ac_try) 2>&5
10609   ac_status=$?
10610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611   (exit $ac_status); }; } &&
10612          { ac_try='test -s conftest$ac_exeext'
10613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10614   (eval $ac_try) 2>&5
10615   ac_status=$?
10616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617   (exit $ac_status); }; }; then
10618   eval "$as_ac_var=yes"
10619 else
10620   echo "$as_me: failed program was:" >&5
10621 sed 's/^/| /' conftest.$ac_ext >&5
10622
10623 eval "$as_ac_var=no"
10624 fi
10625 rm -f conftest.err conftest.$ac_objext \
10626       conftest$ac_exeext conftest.$ac_ext
10627 fi
10628 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10629 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10630 if test `eval echo '${'$as_ac_var'}'` = yes; then
10631   cat >>confdefs.h <<_ACEOF
10632 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10633 _ACEOF
10634
10635 fi
10636 done
10637
10638
10639 for ac_func in vasprintf
10640 do
10641 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10642 echo "$as_me:$LINENO: checking for $ac_func" >&5
10643 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10644 if eval "test \"\${$as_ac_var+set}\" = set"; then
10645   echo $ECHO_N "(cached) $ECHO_C" >&6
10646 else
10647   cat >conftest.$ac_ext <<_ACEOF
10648 /* confdefs.h.  */
10649 _ACEOF
10650 cat confdefs.h >>conftest.$ac_ext
10651 cat >>conftest.$ac_ext <<_ACEOF
10652 /* end confdefs.h.  */
10653 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10654    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10655 #define $ac_func innocuous_$ac_func
10656
10657 /* System header to define __stub macros and hopefully few prototypes,
10658     which can conflict with char $ac_func (); below.
10659     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10660     <limits.h> exists even on freestanding compilers.  */
10661
10662 #ifdef __STDC__
10663 # include <limits.h>
10664 #else
10665 # include <assert.h>
10666 #endif
10667
10668 #undef $ac_func
10669
10670 /* Override any gcc2 internal prototype to avoid an error.  */
10671 #ifdef __cplusplus
10672 extern "C"
10673 {
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 $ac_func ();
10678 /* The GNU C library defines this for functions which it implements
10679     to always fail with ENOSYS.  Some functions are actually named
10680     something starting with __ and the normal name is an alias.  */
10681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10682 choke me
10683 #else
10684 char (*f) () = $ac_func;
10685 #endif
10686 #ifdef __cplusplus
10687 }
10688 #endif
10689
10690 int
10691 main ()
10692 {
10693 return f != $ac_func;
10694   ;
10695   return 0;
10696 }
10697 _ACEOF
10698 rm -f conftest.$ac_objext conftest$ac_exeext
10699 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10700   (eval $ac_link) 2>conftest.er1
10701   ac_status=$?
10702   grep -v '^ *+' conftest.er1 >conftest.err
10703   rm -f conftest.er1
10704   cat conftest.err >&5
10705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10706   (exit $ac_status); } &&
10707          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10709   (eval $ac_try) 2>&5
10710   ac_status=$?
10711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10712   (exit $ac_status); }; } &&
10713          { ac_try='test -s conftest$ac_exeext'
10714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10715   (eval $ac_try) 2>&5
10716   ac_status=$?
10717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718   (exit $ac_status); }; }; then
10719   eval "$as_ac_var=yes"
10720 else
10721   echo "$as_me: failed program was:" >&5
10722 sed 's/^/| /' conftest.$ac_ext >&5
10723
10724 eval "$as_ac_var=no"
10725 fi
10726 rm -f conftest.err conftest.$ac_objext \
10727       conftest$ac_exeext conftest.$ac_ext
10728 fi
10729 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10730 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10731 if test `eval echo '${'$as_ac_var'}'` = yes; then
10732   cat >>confdefs.h <<_ACEOF
10733 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10734 _ACEOF
10735
10736 fi
10737 done
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
10748 do
10749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10750 echo "$as_me:$LINENO: checking for $ac_func" >&5
10751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10752 if eval "test \"\${$as_ac_var+set}\" = set"; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755   cat >conftest.$ac_ext <<_ACEOF
10756 /* confdefs.h.  */
10757 _ACEOF
10758 cat confdefs.h >>conftest.$ac_ext
10759 cat >>conftest.$ac_ext <<_ACEOF
10760 /* end confdefs.h.  */
10761 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10762    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10763 #define $ac_func innocuous_$ac_func
10764
10765 /* System header to define __stub macros and hopefully few prototypes,
10766     which can conflict with char $ac_func (); below.
10767     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10768     <limits.h> exists even on freestanding compilers.  */
10769
10770 #ifdef __STDC__
10771 # include <limits.h>
10772 #else
10773 # include <assert.h>
10774 #endif
10775
10776 #undef $ac_func
10777
10778 /* Override any gcc2 internal prototype to avoid an error.  */
10779 #ifdef __cplusplus
10780 extern "C"
10781 {
10782 #endif
10783 /* We use char because int might match the return type of a gcc2
10784    builtin and then its argument prototype would still apply.  */
10785 char $ac_func ();
10786 /* The GNU C library defines this for functions which it implements
10787     to always fail with ENOSYS.  Some functions are actually named
10788     something starting with __ and the normal name is an alias.  */
10789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10790 choke me
10791 #else
10792 char (*f) () = $ac_func;
10793 #endif
10794 #ifdef __cplusplus
10795 }
10796 #endif
10797
10798 int
10799 main ()
10800 {
10801 return f != $ac_func;
10802   ;
10803   return 0;
10804 }
10805 _ACEOF
10806 rm -f conftest.$ac_objext conftest$ac_exeext
10807 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10808   (eval $ac_link) 2>conftest.er1
10809   ac_status=$?
10810   grep -v '^ *+' conftest.er1 >conftest.err
10811   rm -f conftest.er1
10812   cat conftest.err >&5
10813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814   (exit $ac_status); } &&
10815          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10817   (eval $ac_try) 2>&5
10818   ac_status=$?
10819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10820   (exit $ac_status); }; } &&
10821          { ac_try='test -s conftest$ac_exeext'
10822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10823   (eval $ac_try) 2>&5
10824   ac_status=$?
10825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826   (exit $ac_status); }; }; then
10827   eval "$as_ac_var=yes"
10828 else
10829   echo "$as_me: failed program was:" >&5
10830 sed 's/^/| /' conftest.$ac_ext >&5
10831
10832 eval "$as_ac_var=no"
10833 fi
10834 rm -f conftest.err conftest.$ac_objext \
10835       conftest$ac_exeext conftest.$ac_ext
10836 fi
10837 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10838 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10839 if test `eval echo '${'$as_ac_var'}'` = yes; then
10840   cat >>confdefs.h <<_ACEOF
10841 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10842 _ACEOF
10843
10844 fi
10845 done
10846
10847
10848
10849 for ac_func in strchr memcpy
10850 do
10851 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10852 echo "$as_me:$LINENO: checking for $ac_func" >&5
10853 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10854 if eval "test \"\${$as_ac_var+set}\" = set"; then
10855   echo $ECHO_N "(cached) $ECHO_C" >&6
10856 else
10857   cat >conftest.$ac_ext <<_ACEOF
10858 /* confdefs.h.  */
10859 _ACEOF
10860 cat confdefs.h >>conftest.$ac_ext
10861 cat >>conftest.$ac_ext <<_ACEOF
10862 /* end confdefs.h.  */
10863 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10864    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10865 #define $ac_func innocuous_$ac_func
10866
10867 /* System header to define __stub macros and hopefully few prototypes,
10868     which can conflict with char $ac_func (); below.
10869     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10870     <limits.h> exists even on freestanding compilers.  */
10871
10872 #ifdef __STDC__
10873 # include <limits.h>
10874 #else
10875 # include <assert.h>
10876 #endif
10877
10878 #undef $ac_func
10879
10880 /* Override any gcc2 internal prototype to avoid an error.  */
10881 #ifdef __cplusplus
10882 extern "C"
10883 {
10884 #endif
10885 /* We use char because int might match the return type of a gcc2
10886    builtin and then its argument prototype would still apply.  */
10887 char $ac_func ();
10888 /* The GNU C library defines this for functions which it implements
10889     to always fail with ENOSYS.  Some functions are actually named
10890     something starting with __ and the normal name is an alias.  */
10891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10892 choke me
10893 #else
10894 char (*f) () = $ac_func;
10895 #endif
10896 #ifdef __cplusplus
10897 }
10898 #endif
10899
10900 int
10901 main ()
10902 {
10903 return f != $ac_func;
10904   ;
10905   return 0;
10906 }
10907 _ACEOF
10908 rm -f conftest.$ac_objext conftest$ac_exeext
10909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10910   (eval $ac_link) 2>conftest.er1
10911   ac_status=$?
10912   grep -v '^ *+' conftest.er1 >conftest.err
10913   rm -f conftest.er1
10914   cat conftest.err >&5
10915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916   (exit $ac_status); } &&
10917          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
10918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919   (eval $ac_try) 2>&5
10920   ac_status=$?
10921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922   (exit $ac_status); }; } &&
10923          { ac_try='test -s conftest$ac_exeext'
10924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10925   (eval $ac_try) 2>&5
10926   ac_status=$?
10927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10928   (exit $ac_status); }; }; then
10929   eval "$as_ac_var=yes"
10930 else
10931   echo "$as_me: failed program was:" >&5
10932 sed 's/^/| /' conftest.$ac_ext >&5
10933
10934 eval "$as_ac_var=no"
10935 fi
10936 rm -f conftest.err conftest.$ac_objext \
10937       conftest$ac_exeext conftest.$ac_ext
10938 fi
10939 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10940 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10941 if test `eval echo '${'$as_ac_var'}'` = yes; then
10942   cat >>confdefs.h <<_ACEOF
10943 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10944 _ACEOF
10945
10946 fi
10947 done
10948
10949
10950 for ac_func in fgets
10951 do
10952 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10953 echo "$as_me:$LINENO: checking for $ac_func" >&5
10954 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10955 if eval "test \"\${$as_ac_var+set}\" = set"; then
10956   echo $ECHO_N "(cached) $ECHO_C" >&6
10957 else
10958   cat >conftest.$ac_ext <<_ACEOF
10959 /* confdefs.h.  */
10960 _ACEOF
10961 cat confdefs.h >>conftest.$ac_ext
10962 cat >>conftest.$ac_ext <<_ACEOF
10963 /* end confdefs.h.  */
10964 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10965    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10966 #define $ac_func innocuous_$ac_func
10967
10968 /* System header to define __stub macros and hopefully few prototypes,
10969     which can conflict with char $ac_func (); below.
10970     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10971     <limits.h> exists even on freestanding compilers.  */
10972
10973 #ifdef __STDC__
10974 # include <limits.h>
10975 #else
10976 # include <assert.h>
10977 #endif
10978
10979 #undef $ac_func
10980
10981 /* Override any gcc2 internal prototype to avoid an error.  */
10982 #ifdef __cplusplus
10983 extern "C"
10984 {
10985 #endif
10986 /* We use char because int might match the return type of a gcc2
10987    builtin and then its argument prototype would still apply.  */
10988 char $ac_func ();
10989 /* The GNU C library defines this for functions which it implements
10990     to always fail with ENOSYS.  Some functions are actually named
10991     something starting with __ and the normal name is an alias.  */
10992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10993 choke me
10994 #else
10995 char (*f) () = $ac_func;
10996 #endif
10997 #ifdef __cplusplus
10998 }
10999 #endif
11000
11001 int
11002 main ()
11003 {
11004 return f != $ac_func;
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f conftest.$ac_objext conftest$ac_exeext
11010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11011   (eval $ac_link) 2>conftest.er1
11012   ac_status=$?
11013   grep -v '^ *+' conftest.er1 >conftest.err
11014   rm -f conftest.er1
11015   cat conftest.err >&5
11016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11017   (exit $ac_status); } &&
11018          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11020   (eval $ac_try) 2>&5
11021   ac_status=$?
11022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11023   (exit $ac_status); }; } &&
11024          { ac_try='test -s conftest$ac_exeext'
11025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029   (exit $ac_status); }; }; then
11030   eval "$as_ac_var=yes"
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 sed 's/^/| /' conftest.$ac_ext >&5
11034
11035 eval "$as_ac_var=no"
11036 fi
11037 rm -f conftest.err conftest.$ac_objext \
11038       conftest$ac_exeext conftest.$ac_ext
11039 fi
11040 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11041 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11042 if test `eval echo '${'$as_ac_var'}'` = yes; then
11043   cat >>confdefs.h <<_ACEOF
11044 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11045 _ACEOF
11046
11047 fi
11048 done
11049
11050
11051 for ac_func in yylex
11052 do
11053 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11054 echo "$as_me:$LINENO: checking for $ac_func" >&5
11055 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11056 if eval "test \"\${$as_ac_var+set}\" = set"; then
11057   echo $ECHO_N "(cached) $ECHO_C" >&6
11058 else
11059   cat >conftest.$ac_ext <<_ACEOF
11060 /* confdefs.h.  */
11061 _ACEOF
11062 cat confdefs.h >>conftest.$ac_ext
11063 cat >>conftest.$ac_ext <<_ACEOF
11064 /* end confdefs.h.  */
11065 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11066    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11067 #define $ac_func innocuous_$ac_func
11068
11069 /* System header to define __stub macros and hopefully few prototypes,
11070     which can conflict with char $ac_func (); below.
11071     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11072     <limits.h> exists even on freestanding compilers.  */
11073
11074 #ifdef __STDC__
11075 # include <limits.h>
11076 #else
11077 # include <assert.h>
11078 #endif
11079
11080 #undef $ac_func
11081
11082 /* Override any gcc2 internal prototype to avoid an error.  */
11083 #ifdef __cplusplus
11084 extern "C"
11085 {
11086 #endif
11087 /* We use char because int might match the return type of a gcc2
11088    builtin and then its argument prototype would still apply.  */
11089 char $ac_func ();
11090 /* The GNU C library defines this for functions which it implements
11091     to always fail with ENOSYS.  Some functions are actually named
11092     something starting with __ and the normal name is an alias.  */
11093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11094 choke me
11095 #else
11096 char (*f) () = $ac_func;
11097 #endif
11098 #ifdef __cplusplus
11099 }
11100 #endif
11101
11102 int
11103 main ()
11104 {
11105 return f != $ac_func;
11106   ;
11107   return 0;
11108 }
11109 _ACEOF
11110 rm -f conftest.$ac_objext conftest$ac_exeext
11111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11112   (eval $ac_link) 2>conftest.er1
11113   ac_status=$?
11114   grep -v '^ *+' conftest.er1 >conftest.err
11115   rm -f conftest.er1
11116   cat conftest.err >&5
11117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118   (exit $ac_status); } &&
11119          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11121   (eval $ac_try) 2>&5
11122   ac_status=$?
11123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124   (exit $ac_status); }; } &&
11125          { ac_try='test -s conftest$ac_exeext'
11126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127   (eval $ac_try) 2>&5
11128   ac_status=$?
11129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130   (exit $ac_status); }; }; then
11131   eval "$as_ac_var=yes"
11132 else
11133   echo "$as_me: failed program was:" >&5
11134 sed 's/^/| /' conftest.$ac_ext >&5
11135
11136 eval "$as_ac_var=no"
11137 fi
11138 rm -f conftest.err conftest.$ac_objext \
11139       conftest$ac_exeext conftest.$ac_ext
11140 fi
11141 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11142 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11143 if test `eval echo '${'$as_ac_var'}'` = yes; then
11144   cat >>confdefs.h <<_ACEOF
11145 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11146 _ACEOF
11147
11148 fi
11149 done
11150
11151
11152 echo "$as_me:$LINENO: checking whether scanf knows %a" >&5
11153 echo $ECHO_N "checking whether scanf knows %a... $ECHO_C" >&6
11154 if test "${ucsim_cv_scanf_a+set}" = set; then
11155   echo $ECHO_N "(cached) $ECHO_C" >&6
11156 else
11157   echo "a b" >conftest.data
11158 if test "$cross_compiling" = yes; then
11159   ucsim_cv_scanf_a="unknown"
11160 else
11161   cat >conftest.$ac_ext <<_ACEOF
11162 /* confdefs.h.  */
11163 _ACEOF
11164 cat confdefs.h >>conftest.$ac_ext
11165 cat >>conftest.$ac_ext <<_ACEOF
11166 /* end confdefs.h.  */
11167
11168 #include <stdio.h>
11169 void main(void)
11170 {
11171   FILE *f;
11172   char *a;
11173   int  i;
11174   if ((f= fopen("conftest.data", "r")) == NULL)
11175     exit(1);
11176   i= fscanf(f, " %a[a-z] ", &a);
11177   fclose(f);
11178   if (i == 0)
11179     exit(2);
11180   if (i == 1)
11181     exit(0);
11182   exit(3);
11183 }
11184 _ACEOF
11185 rm -f conftest$ac_exeext
11186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11187   (eval $ac_link) 2>&5
11188   ac_status=$?
11189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11192   (eval $ac_try) 2>&5
11193   ac_status=$?
11194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11195   (exit $ac_status); }; }; then
11196   ucsim_cv_scanf_a="yes"
11197 else
11198   echo "$as_me: program exited with status $ac_status" >&5
11199 echo "$as_me: failed program was:" >&5
11200 sed 's/^/| /' conftest.$ac_ext >&5
11201
11202 ( exit $ac_status )
11203 ucsim_cv_scanf_a="no"
11204 fi
11205 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11206 fi
11207
11208 fi
11209 echo "$as_me:$LINENO: result: $ucsim_cv_scanf_a" >&5
11210 echo "${ECHO_T}$ucsim_cv_scanf_a" >&6
11211 if test "$ucsim_cv_scanf_a" = "yes"; then
11212   cat >>confdefs.h <<\_ACEOF
11213 #define SCANF_A 1
11214 _ACEOF
11215
11216 fi
11217
11218 echo "$as_me:$LINENO: checking whether getcwd is GNUish" >&5
11219 echo $ECHO_N "checking whether getcwd is GNUish... $ECHO_C" >&6
11220 if test "${ucsim_cv_getcwd+set}" = set; then
11221   echo $ECHO_N "(cached) $ECHO_C" >&6
11222 else
11223   if test "$cross_compiling" = yes; then
11224   ucsim_cv_getcwd="unknown"
11225 else
11226   cat >conftest.$ac_ext <<_ACEOF
11227 /* confdefs.h.  */
11228 _ACEOF
11229 cat confdefs.h >>conftest.$ac_ext
11230 cat >>conftest.$ac_ext <<_ACEOF
11231 /* end confdefs.h.  */
11232
11233 #include <unistd.h>
11234 void main(void)
11235 {
11236   if ((getcwd(NULL, 0)) == NULL)
11237     exit(1);
11238   exit(0);
11239 }
11240 _ACEOF
11241 rm -f conftest$ac_exeext
11242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11243   (eval $ac_link) 2>&5
11244   ac_status=$?
11245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11248   (eval $ac_try) 2>&5
11249   ac_status=$?
11250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251   (exit $ac_status); }; }; then
11252   ucsim_cv_getcwd="yes"
11253 else
11254   echo "$as_me: program exited with status $ac_status" >&5
11255 echo "$as_me: failed program was:" >&5
11256 sed 's/^/| /' conftest.$ac_ext >&5
11257
11258 ( exit $ac_status )
11259 ucsim_cv_getcwd="no"
11260 fi
11261 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11262 fi
11263
11264 fi
11265 echo "$as_me:$LINENO: result: $ucsim_cv_getcwd" >&5
11266 echo "${ECHO_T}$ucsim_cv_getcwd" >&6
11267 if test "$ucsim_cv_getcwd" = "yes"; then
11268   cat >>confdefs.h <<\_ACEOF
11269 #define GNU_GETCWD 1
11270 _ACEOF
11271
11272 fi
11273
11274
11275 #'
11276
11277 echo "$as_me:$LINENO: checking for type of length pointer parameter of accept" >&5
11278 echo $ECHO_N "checking for type of length pointer parameter of accept... $ECHO_C" >&6
11279 if test "${ucsim_cv_accept_length_type+set}" = set; then
11280   echo $ECHO_N "(cached) $ECHO_C" >&6
11281 else
11282   ac_save_CPPFLAGS="$CPPFLAGS"
11283     ucsim_cv_accept_length_type=no
11284     for ac_val in int size_t socklen_t; do
11285       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
11286       cat >conftest.$ac_ext <<_ACEOF
11287 /* confdefs.h.  */
11288 _ACEOF
11289 cat confdefs.h >>conftest.$ac_ext
11290 cat >>conftest.$ac_ext <<_ACEOF
11291 /* end confdefs.h.  */
11292 #include <sys/types.h>
11293 #include <sys/socket.h>
11294 int
11295 main ()
11296 {
11297 struct sockaddr a; $ac_val len; accept (0, &a, &len);
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f conftest.$ac_objext
11303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11304   (eval $ac_compile) 2>conftest.er1
11305   ac_status=$?
11306   grep -v '^ *+' conftest.er1 >conftest.err
11307   rm -f conftest.er1
11308   cat conftest.err >&5
11309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11310   (exit $ac_status); } &&
11311          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11313   (eval $ac_try) 2>&5
11314   ac_status=$?
11315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11316   (exit $ac_status); }; } &&
11317          { ac_try='test -s conftest.$ac_objext'
11318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11319   (eval $ac_try) 2>&5
11320   ac_status=$?
11321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11322   (exit $ac_status); }; }; then
11323   ucsim_cv_accept_length_type=$ac_val; break
11324 else
11325   echo "$as_me: failed program was:" >&5
11326 sed 's/^/| /' conftest.$ac_ext >&5
11327
11328 fi
11329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11330     done
11331     CPPFLAGS="$ac_save_CPPFLAGS"
11332 fi
11333 echo "$as_me:$LINENO: result: $ucsim_cv_accept_length_type" >&5
11334 echo "${ECHO_T}$ucsim_cv_accept_length_type" >&6
11335   if test "$ucsim_cv_accept_length_type" != no; then
11336
11337 cat >>confdefs.h <<_ACEOF
11338 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
11339 _ACEOF
11340
11341   fi
11342
11343
11344
11345 # Macro definitions
11346 ###################
11347
11348 # DD_COPT macro checks if the compiler specified as the 1st parameter
11349 # supports option specified as the 2nd parameter
11350 # For example: DD_COPT(CXX, fPIC)
11351
11352
11353
11354
11355 # Checking characteristics of compilers and other programs
11356 # --------------------------------------------------------
11357
11358 # Cross compiling overrides
11359 # FIXME
11360 if test "$CC" = "i586-mingw32msvc-gcc"; then
11361   ac_cv_c_bigendian=no
11362   ac_cv_sizeof_char=1
11363   ac_cv_sizeof_short=2
11364   ac_cv_sizeof_int=4
11365   ac_cv_sizeof_long=4
11366   ac_cv_sizeof_long_long=4
11367 fi
11368
11369 if test "$cross_compiling" = "no"
11370 then
11371     echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
11372 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
11373 if test "${ac_cv_c_bigendian+set}" = set; then
11374   echo $ECHO_N "(cached) $ECHO_C" >&6
11375 else
11376   # See if sys/param.h defines the BYTE_ORDER macro.
11377 cat >conftest.$ac_ext <<_ACEOF
11378 /* confdefs.h.  */
11379 _ACEOF
11380 cat confdefs.h >>conftest.$ac_ext
11381 cat >>conftest.$ac_ext <<_ACEOF
11382 /* end confdefs.h.  */
11383 #include <sys/types.h>
11384 #include <sys/param.h>
11385
11386 int
11387 main ()
11388 {
11389 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
11390  bogus endian macros
11391 #endif
11392
11393   ;
11394   return 0;
11395 }
11396 _ACEOF
11397 rm -f conftest.$ac_objext
11398 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11399   (eval $ac_compile) 2>conftest.er1
11400   ac_status=$?
11401   grep -v '^ *+' conftest.er1 >conftest.err
11402   rm -f conftest.er1
11403   cat conftest.err >&5
11404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11405   (exit $ac_status); } &&
11406          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11408   (eval $ac_try) 2>&5
11409   ac_status=$?
11410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11411   (exit $ac_status); }; } &&
11412          { ac_try='test -s conftest.$ac_objext'
11413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   # It does; now see whether it defined to BIG_ENDIAN or not.
11419 cat >conftest.$ac_ext <<_ACEOF
11420 /* confdefs.h.  */
11421 _ACEOF
11422 cat confdefs.h >>conftest.$ac_ext
11423 cat >>conftest.$ac_ext <<_ACEOF
11424 /* end confdefs.h.  */
11425 #include <sys/types.h>
11426 #include <sys/param.h>
11427
11428 int
11429 main ()
11430 {
11431 #if BYTE_ORDER != BIG_ENDIAN
11432  not big endian
11433 #endif
11434
11435   ;
11436   return 0;
11437 }
11438 _ACEOF
11439 rm -f conftest.$ac_objext
11440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11441   (eval $ac_compile) 2>conftest.er1
11442   ac_status=$?
11443   grep -v '^ *+' conftest.er1 >conftest.err
11444   rm -f conftest.er1
11445   cat conftest.err >&5
11446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11447   (exit $ac_status); } &&
11448          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11450   (eval $ac_try) 2>&5
11451   ac_status=$?
11452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11453   (exit $ac_status); }; } &&
11454          { ac_try='test -s conftest.$ac_objext'
11455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11456   (eval $ac_try) 2>&5
11457   ac_status=$?
11458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11459   (exit $ac_status); }; }; then
11460   ac_cv_c_bigendian=yes
11461 else
11462   echo "$as_me: failed program was:" >&5
11463 sed 's/^/| /' conftest.$ac_ext >&5
11464
11465 ac_cv_c_bigendian=no
11466 fi
11467 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11468 else
11469   echo "$as_me: failed program was:" >&5
11470 sed 's/^/| /' conftest.$ac_ext >&5
11471
11472 # It does not; compile a test program.
11473 if test "$cross_compiling" = yes; then
11474   # try to guess the endianness by grepping values into an object file
11475   ac_cv_c_bigendian=unknown
11476   cat >conftest.$ac_ext <<_ACEOF
11477 /* confdefs.h.  */
11478 _ACEOF
11479 cat confdefs.h >>conftest.$ac_ext
11480 cat >>conftest.$ac_ext <<_ACEOF
11481 /* end confdefs.h.  */
11482 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11483 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11484 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
11485 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11486 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11487 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
11488 int
11489 main ()
11490 {
11491  _ascii (); _ebcdic ();
11492   ;
11493   return 0;
11494 }
11495 _ACEOF
11496 rm -f conftest.$ac_objext
11497 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11498   (eval $ac_compile) 2>conftest.er1
11499   ac_status=$?
11500   grep -v '^ *+' conftest.er1 >conftest.err
11501   rm -f conftest.er1
11502   cat conftest.err >&5
11503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11504   (exit $ac_status); } &&
11505          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11507   (eval $ac_try) 2>&5
11508   ac_status=$?
11509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510   (exit $ac_status); }; } &&
11511          { ac_try='test -s conftest.$ac_objext'
11512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11513   (eval $ac_try) 2>&5
11514   ac_status=$?
11515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516   (exit $ac_status); }; }; then
11517   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
11518   ac_cv_c_bigendian=yes
11519 fi
11520 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11521   if test "$ac_cv_c_bigendian" = unknown; then
11522     ac_cv_c_bigendian=no
11523   else
11524     # finding both strings is unlikely to happen, but who knows?
11525     ac_cv_c_bigendian=unknown
11526   fi
11527 fi
11528 else
11529   echo "$as_me: failed program was:" >&5
11530 sed 's/^/| /' conftest.$ac_ext >&5
11531
11532 fi
11533 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11534 else
11535   cat >conftest.$ac_ext <<_ACEOF
11536 /* confdefs.h.  */
11537 _ACEOF
11538 cat confdefs.h >>conftest.$ac_ext
11539 cat >>conftest.$ac_ext <<_ACEOF
11540 /* end confdefs.h.  */
11541 int
11542 main ()
11543 {
11544   /* Are we little or big endian?  From Harbison&Steele.  */
11545   union
11546   {
11547     long l;
11548     char c[sizeof (long)];
11549   } u;
11550   u.l = 1;
11551   exit (u.c[sizeof (long) - 1] == 1);
11552 }
11553 _ACEOF
11554 rm -f conftest$ac_exeext
11555 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11556   (eval $ac_link) 2>&5
11557   ac_status=$?
11558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11561   (eval $ac_try) 2>&5
11562   ac_status=$?
11563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11564   (exit $ac_status); }; }; then
11565   ac_cv_c_bigendian=no
11566 else
11567   echo "$as_me: program exited with status $ac_status" >&5
11568 echo "$as_me: failed program was:" >&5
11569 sed 's/^/| /' conftest.$ac_ext >&5
11570
11571 ( exit $ac_status )
11572 ac_cv_c_bigendian=yes
11573 fi
11574 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11575 fi
11576 fi
11577 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11578 fi
11579 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
11580 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
11581 case $ac_cv_c_bigendian in
11582   yes)
11583
11584 cat >>confdefs.h <<\_ACEOF
11585 #define WORDS_BIGENDIAN 1
11586 _ACEOF
11587  ;;
11588   no)
11589      ;;
11590   *)
11591     { { echo "$as_me:$LINENO: error: unknown endianness
11592 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
11593 echo "$as_me: error: unknown endianness
11594 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
11595    { (exit 1); exit 1; }; } ;;
11596 esac
11597
11598 else
11599 #echo "CROSS ENDIAN"
11600     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
11601         ac_cv_c_bigendian=no
11602     else
11603         : # FIXME
11604     fi
11605 #echo "CROSS ENDIAN DONE"
11606 fi
11607
11608 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
11609 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
11610 if test "${ucsim_cv_MM+set}" = set; then
11611   echo $ECHO_N "(cached) $ECHO_C" >&6
11612 else
11613   echo "#include <stdio.h>" >_test_.c
11614 echo "" >>_test_.c
11615 $CXXCPP -v -MM _test_.c 1>&5 2>&5
11616 if test "$?" = "0"; then
11617   ucsim_cv_MM="-MM"
11618 else
11619   ucsim_cv_MM="-M"
11620 fi
11621 rm -f _test_.*
11622 fi
11623 echo "$as_me:$LINENO: result: $ucsim_cv_MM" >&5
11624 echo "${ECHO_T}$ucsim_cv_MM" >&6
11625 M_OR_MM=$ucsim_cv_MM
11626
11627
11628 # This is the first time when CFLAGS are set/modified!!
11629
11630
11631 echo "$as_me:$LINENO: checking whether $CXX accepts -ggdb" >&5
11632 echo $ECHO_N "checking whether $CXX accepts -ggdb... $ECHO_C" >&6
11633 if test "${ucsim_cv_CXXggdb+set}" = set; then
11634   echo $ECHO_N "(cached) $ECHO_C" >&6
11635 else
11636   cat >_test_.c <<EOF
11637 #include <stdio.h>
11638 void main(void) {}
11639 EOF
11640 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
11641 if test "$?" = "0"; then
11642   ucsim_cv_CXXggdb="yes"
11643 else
11644   ucsim_cv_CXXggdb="no"
11645 fi
11646 rm -f _test_.* a.out
11647 fi
11648 echo "$as_me:$LINENO: result: $ucsim_cv_CXXggdb" >&5
11649 echo "${ECHO_T}$ucsim_cv_CXXggdb" >&6
11650
11651 if test "$ucsim_cv_CXXggdb" = "yes"; then
11652         gopt="-ggdb"
11653 else
11654         gopt="-g"
11655 fi
11656 if test "$CXXFLAGS"x = x ;then
11657         CXXFLAGS="$gopt"
11658 else
11659         CXXFLAGS="$CXXFLAGS $gopt"
11660 fi
11661
11662
11663 echo "$as_me:$LINENO: checking whether $CXX accepts -pipe" >&5
11664 echo $ECHO_N "checking whether $CXX accepts -pipe... $ECHO_C" >&6
11665 if test "${ucsim_cv_CXXpipe+set}" = set; then
11666   echo $ECHO_N "(cached) $ECHO_C" >&6
11667 else
11668   cat >_test_.c <<EOF
11669 #include <stdio.h>
11670 void main(void) {}
11671 EOF
11672 $CXX -v -pipe -c _test_.c 1>&5 2>&5
11673 if test "$?" = "0"; then
11674   ucsim_cv_CXXpipe="yes"
11675 else
11676   ucsim_cv_CXXpipe="no"
11677 fi
11678 rm -f _test_.* a.out
11679 fi
11680 echo "$as_me:$LINENO: result: $ucsim_cv_CXXpipe" >&5
11681 echo "${ECHO_T}$ucsim_cv_CXXpipe" >&6
11682
11683 if test "$ucsim_cv_CXXpipe" = "yes"; then
11684   CXXFLAGS="$CXXFLAGS -pipe"
11685 fi
11686
11687 PICOPT=""
11688 SHAREDLIB="no"
11689
11690 echo "$as_me:$LINENO: checking whether $CXX accepts -fPIC" >&5
11691 echo $ECHO_N "checking whether $CXX accepts -fPIC... $ECHO_C" >&6
11692 if test "${ucsim_cv_CXXfPIC+set}" = set; then
11693   echo $ECHO_N "(cached) $ECHO_C" >&6
11694 else
11695   cat >_test_.c <<EOF
11696 #include <stdio.h>
11697 void main(void) {}
11698 EOF
11699 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
11700 if test "$?" = "0"; then
11701   ucsim_cv_CXXfPIC="yes"
11702 else
11703   ucsim_cv_CXXfPIC="no"
11704 fi
11705 rm -f _test_.* a.out
11706 fi
11707 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfPIC" >&5
11708 echo "${ECHO_T}$ucsim_cv_CXXfPIC" >&6
11709
11710 if test "$ucsim_cv_CXXfPIC" = "yes"; then
11711     PICOPT="-fPIC"
11712 else
11713
11714 echo "$as_me:$LINENO: checking whether $CXX accepts -fpic" >&5
11715 echo $ECHO_N "checking whether $CXX accepts -fpic... $ECHO_C" >&6
11716 if test "${ucsim_cv_CXXfpic+set}" = set; then
11717   echo $ECHO_N "(cached) $ECHO_C" >&6
11718 else
11719   cat >_test_.c <<EOF
11720 #include <stdio.h>
11721 void main(void) {}
11722 EOF
11723 $CXX -v -fpic -c _test_.c 1>&5 2>&5
11724 if test "$?" = "0"; then
11725   ucsim_cv_CXXfpic="yes"
11726 else
11727   ucsim_cv_CXXfpic="no"
11728 fi
11729 rm -f _test_.* a.out
11730 fi
11731 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfpic" >&5
11732 echo "${ECHO_T}$ucsim_cv_CXXfpic" >&6
11733
11734     if test "$ucsim_cv_CXXfpic" = "yes"; then
11735         PICOPT="-fpic"
11736     fi
11737 fi
11738 if test "$PICOPT"x != "x"; then
11739     SHAREDLIB="yes"
11740 fi
11741 # If this is Cygwin neither use Position Independant Code
11742 # nor build .so
11743 # Quick + dirty by Bernhard
11744 # FIXME
11745 if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then
11746     PICOPT=""
11747     SHAREDLIB="no"
11748 fi
11749
11750
11751
11752 dlso_ok="no"
11753 if test $SHAREDLIB = "yes" -a $dl_ok = "yes" -a $enable_dlso = "yes"; then
11754     dlso_ok="yes"
11755 fi
11756
11757
11758 # Checks for typedefs, structures, and compiler characteristics.
11759 # ===========================================================================
11760
11761 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
11762 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11763 if test "${ac_cv_type_signal+set}" = set; then
11764   echo $ECHO_N "(cached) $ECHO_C" >&6
11765 else
11766   cat >conftest.$ac_ext <<_ACEOF
11767 /* confdefs.h.  */
11768 _ACEOF
11769 cat confdefs.h >>conftest.$ac_ext
11770 cat >>conftest.$ac_ext <<_ACEOF
11771 /* end confdefs.h.  */
11772 #include <sys/types.h>
11773 #include <signal.h>
11774 #ifdef signal
11775 # undef signal
11776 #endif
11777 #ifdef __cplusplus
11778 extern "C" void (*signal (int, void (*)(int)))(int);
11779 #else
11780 void (*signal ()) ();
11781 #endif
11782
11783 int
11784 main ()
11785 {
11786 int i;
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f conftest.$ac_objext
11792 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11793   (eval $ac_compile) 2>conftest.er1
11794   ac_status=$?
11795   grep -v '^ *+' conftest.er1 >conftest.err
11796   rm -f conftest.er1
11797   cat conftest.err >&5
11798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799   (exit $ac_status); } &&
11800          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11802   (eval $ac_try) 2>&5
11803   ac_status=$?
11804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11805   (exit $ac_status); }; } &&
11806          { ac_try='test -s conftest.$ac_objext'
11807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11808   (eval $ac_try) 2>&5
11809   ac_status=$?
11810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11811   (exit $ac_status); }; }; then
11812   ac_cv_type_signal=void
11813 else
11814   echo "$as_me: failed program was:" >&5
11815 sed 's/^/| /' conftest.$ac_ext >&5
11816
11817 ac_cv_type_signal=int
11818 fi
11819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11820 fi
11821 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
11822 echo "${ECHO_T}$ac_cv_type_signal" >&6
11823
11824 cat >>confdefs.h <<_ACEOF
11825 #define RETSIGTYPE $ac_cv_type_signal
11826 _ACEOF
11827
11828
11829 if test "$cross_compiling" = "no"; then
11830 echo "$as_me:$LINENO: checking for char" >&5
11831 echo $ECHO_N "checking for char... $ECHO_C" >&6
11832 if test "${ac_cv_type_char+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   cat >conftest.$ac_ext <<_ACEOF
11836 /* confdefs.h.  */
11837 _ACEOF
11838 cat confdefs.h >>conftest.$ac_ext
11839 cat >>conftest.$ac_ext <<_ACEOF
11840 /* end confdefs.h.  */
11841 $ac_includes_default
11842 int
11843 main ()
11844 {
11845 if ((char *) 0)
11846   return 0;
11847 if (sizeof (char))
11848   return 0;
11849   ;
11850   return 0;
11851 }
11852 _ACEOF
11853 rm -f conftest.$ac_objext
11854 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11855   (eval $ac_compile) 2>conftest.er1
11856   ac_status=$?
11857   grep -v '^ *+' conftest.er1 >conftest.err
11858   rm -f conftest.er1
11859   cat conftest.err >&5
11860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11861   (exit $ac_status); } &&
11862          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867   (exit $ac_status); }; } &&
11868          { ac_try='test -s conftest.$ac_objext'
11869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11870   (eval $ac_try) 2>&5
11871   ac_status=$?
11872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873   (exit $ac_status); }; }; then
11874   ac_cv_type_char=yes
11875 else
11876   echo "$as_me: failed program was:" >&5
11877 sed 's/^/| /' conftest.$ac_ext >&5
11878
11879 ac_cv_type_char=no
11880 fi
11881 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11882 fi
11883 echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
11884 echo "${ECHO_T}$ac_cv_type_char" >&6
11885
11886 echo "$as_me:$LINENO: checking size of char" >&5
11887 echo $ECHO_N "checking size of char... $ECHO_C" >&6
11888 if test "${ac_cv_sizeof_char+set}" = set; then
11889   echo $ECHO_N "(cached) $ECHO_C" >&6
11890 else
11891   if test "$ac_cv_type_char" = yes; then
11892   # The cast to unsigned long works around a bug in the HP C Compiler
11893   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11894   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11895   # This bug is HP SR number 8606223364.
11896   if test "$cross_compiling" = yes; then
11897   # Depending upon the size, compute the lo and hi bounds.
11898 cat >conftest.$ac_ext <<_ACEOF
11899 /* confdefs.h.  */
11900 _ACEOF
11901 cat confdefs.h >>conftest.$ac_ext
11902 cat >>conftest.$ac_ext <<_ACEOF
11903 /* end confdefs.h.  */
11904 $ac_includes_default
11905 int
11906 main ()
11907 {
11908 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
11909 test_array [0] = 0
11910
11911   ;
11912   return 0;
11913 }
11914 _ACEOF
11915 rm -f conftest.$ac_objext
11916 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11917   (eval $ac_compile) 2>conftest.er1
11918   ac_status=$?
11919   grep -v '^ *+' conftest.er1 >conftest.err
11920   rm -f conftest.er1
11921   cat conftest.err >&5
11922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11923   (exit $ac_status); } &&
11924          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11926   (eval $ac_try) 2>&5
11927   ac_status=$?
11928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11929   (exit $ac_status); }; } &&
11930          { ac_try='test -s conftest.$ac_objext'
11931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11932   (eval $ac_try) 2>&5
11933   ac_status=$?
11934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935   (exit $ac_status); }; }; then
11936   ac_lo=0 ac_mid=0
11937   while :; do
11938     cat >conftest.$ac_ext <<_ACEOF
11939 /* confdefs.h.  */
11940 _ACEOF
11941 cat confdefs.h >>conftest.$ac_ext
11942 cat >>conftest.$ac_ext <<_ACEOF
11943 /* end confdefs.h.  */
11944 $ac_includes_default
11945 int
11946 main ()
11947 {
11948 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
11949 test_array [0] = 0
11950
11951   ;
11952   return 0;
11953 }
11954 _ACEOF
11955 rm -f conftest.$ac_objext
11956 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11957   (eval $ac_compile) 2>conftest.er1
11958   ac_status=$?
11959   grep -v '^ *+' conftest.er1 >conftest.err
11960   rm -f conftest.er1
11961   cat conftest.err >&5
11962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11963   (exit $ac_status); } &&
11964          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
11965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11966   (eval $ac_try) 2>&5
11967   ac_status=$?
11968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969   (exit $ac_status); }; } &&
11970          { ac_try='test -s conftest.$ac_objext'
11971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11972   (eval $ac_try) 2>&5
11973   ac_status=$?
11974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11975   (exit $ac_status); }; }; then
11976   ac_hi=$ac_mid; break
11977 else
11978   echo "$as_me: failed program was:" >&5
11979 sed 's/^/| /' conftest.$ac_ext >&5
11980
11981 ac_lo=`expr $ac_mid + 1`
11982                     if test $ac_lo -le $ac_mid; then
11983                       ac_lo= ac_hi=
11984                       break
11985                     fi
11986                     ac_mid=`expr 2 '*' $ac_mid + 1`
11987 fi
11988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11989   done
11990 else
11991   echo "$as_me: failed program was:" >&5
11992 sed 's/^/| /' conftest.$ac_ext >&5
11993
11994 cat >conftest.$ac_ext <<_ACEOF
11995 /* confdefs.h.  */
11996 _ACEOF
11997 cat confdefs.h >>conftest.$ac_ext
11998 cat >>conftest.$ac_ext <<_ACEOF
11999 /* end confdefs.h.  */
12000 $ac_includes_default
12001 int
12002 main ()
12003 {
12004 static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
12005 test_array [0] = 0
12006
12007   ;
12008   return 0;
12009 }
12010 _ACEOF
12011 rm -f conftest.$ac_objext
12012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12013   (eval $ac_compile) 2>conftest.er1
12014   ac_status=$?
12015   grep -v '^ *+' conftest.er1 >conftest.err
12016   rm -f conftest.er1
12017   cat conftest.err >&5
12018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019   (exit $ac_status); } &&
12020          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12022   (eval $ac_try) 2>&5
12023   ac_status=$?
12024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025   (exit $ac_status); }; } &&
12026          { ac_try='test -s conftest.$ac_objext'
12027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12028   (eval $ac_try) 2>&5
12029   ac_status=$?
12030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031   (exit $ac_status); }; }; then
12032   ac_hi=-1 ac_mid=-1
12033   while :; do
12034     cat >conftest.$ac_ext <<_ACEOF
12035 /* confdefs.h.  */
12036 _ACEOF
12037 cat confdefs.h >>conftest.$ac_ext
12038 cat >>conftest.$ac_ext <<_ACEOF
12039 /* end confdefs.h.  */
12040 $ac_includes_default
12041 int
12042 main ()
12043 {
12044 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
12045 test_array [0] = 0
12046
12047   ;
12048   return 0;
12049 }
12050 _ACEOF
12051 rm -f conftest.$ac_objext
12052 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12053   (eval $ac_compile) 2>conftest.er1
12054   ac_status=$?
12055   grep -v '^ *+' conftest.er1 >conftest.err
12056   rm -f conftest.er1
12057   cat conftest.err >&5
12058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12059   (exit $ac_status); } &&
12060          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12062   (eval $ac_try) 2>&5
12063   ac_status=$?
12064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12065   (exit $ac_status); }; } &&
12066          { ac_try='test -s conftest.$ac_objext'
12067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12068   (eval $ac_try) 2>&5
12069   ac_status=$?
12070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12071   (exit $ac_status); }; }; then
12072   ac_lo=$ac_mid; break
12073 else
12074   echo "$as_me: failed program was:" >&5
12075 sed 's/^/| /' conftest.$ac_ext >&5
12076
12077 ac_hi=`expr '(' $ac_mid ')' - 1`
12078                        if test $ac_mid -le $ac_hi; then
12079                          ac_lo= ac_hi=
12080                          break
12081                        fi
12082                        ac_mid=`expr 2 '*' $ac_mid`
12083 fi
12084 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12085   done
12086 else
12087   echo "$as_me: failed program was:" >&5
12088 sed 's/^/| /' conftest.$ac_ext >&5
12089
12090 ac_lo= ac_hi=
12091 fi
12092 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12093 fi
12094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12095 # Binary search between lo and hi bounds.
12096 while test "x$ac_lo" != "x$ac_hi"; do
12097   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12098   cat >conftest.$ac_ext <<_ACEOF
12099 /* confdefs.h.  */
12100 _ACEOF
12101 cat confdefs.h >>conftest.$ac_ext
12102 cat >>conftest.$ac_ext <<_ACEOF
12103 /* end confdefs.h.  */
12104 $ac_includes_default
12105 int
12106 main ()
12107 {
12108 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
12109 test_array [0] = 0
12110
12111   ;
12112   return 0;
12113 }
12114 _ACEOF
12115 rm -f conftest.$ac_objext
12116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12117   (eval $ac_compile) 2>conftest.er1
12118   ac_status=$?
12119   grep -v '^ *+' conftest.er1 >conftest.err
12120   rm -f conftest.er1
12121   cat conftest.err >&5
12122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123   (exit $ac_status); } &&
12124          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12126   (eval $ac_try) 2>&5
12127   ac_status=$?
12128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129   (exit $ac_status); }; } &&
12130          { ac_try='test -s conftest.$ac_objext'
12131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12132   (eval $ac_try) 2>&5
12133   ac_status=$?
12134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135   (exit $ac_status); }; }; then
12136   ac_hi=$ac_mid
12137 else
12138   echo "$as_me: failed program was:" >&5
12139 sed 's/^/| /' conftest.$ac_ext >&5
12140
12141 ac_lo=`expr '(' $ac_mid ')' + 1`
12142 fi
12143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12144 done
12145 case $ac_lo in
12146 ?*) ac_cv_sizeof_char=$ac_lo;;
12147 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12148 See \`config.log' for more details." >&5
12149 echo "$as_me: error: cannot compute sizeof (char), 77
12150 See \`config.log' for more details." >&2;}
12151    { (exit 1); exit 1; }; } ;;
12152 esac
12153 else
12154   if test "$cross_compiling" = yes; then
12155   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
12156 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
12157    { (exit 1); exit 1; }; }
12158 else
12159   cat >conftest.$ac_ext <<_ACEOF
12160 /* confdefs.h.  */
12161 _ACEOF
12162 cat confdefs.h >>conftest.$ac_ext
12163 cat >>conftest.$ac_ext <<_ACEOF
12164 /* end confdefs.h.  */
12165 $ac_includes_default
12166 long longval () { return (long) (sizeof (char)); }
12167 unsigned long ulongval () { return (long) (sizeof (char)); }
12168 #include <stdio.h>
12169 #include <stdlib.h>
12170 int
12171 main ()
12172 {
12173
12174   FILE *f = fopen ("conftest.val", "w");
12175   if (! f)
12176     exit (1);
12177   if (((long) (sizeof (char))) < 0)
12178     {
12179       long i = longval ();
12180       if (i != ((long) (sizeof (char))))
12181         exit (1);
12182       fprintf (f, "%ld\n", i);
12183     }
12184   else
12185     {
12186       unsigned long i = ulongval ();
12187       if (i != ((long) (sizeof (char))))
12188         exit (1);
12189       fprintf (f, "%lu\n", i);
12190     }
12191   exit (ferror (f) || fclose (f) != 0);
12192
12193   ;
12194   return 0;
12195 }
12196 _ACEOF
12197 rm -f conftest$ac_exeext
12198 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12199   (eval $ac_link) 2>&5
12200   ac_status=$?
12201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12204   (eval $ac_try) 2>&5
12205   ac_status=$?
12206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12207   (exit $ac_status); }; }; then
12208   ac_cv_sizeof_char=`cat conftest.val`
12209 else
12210   echo "$as_me: program exited with status $ac_status" >&5
12211 echo "$as_me: failed program was:" >&5
12212 sed 's/^/| /' conftest.$ac_ext >&5
12213
12214 ( exit $ac_status )
12215 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
12216 See \`config.log' for more details." >&5
12217 echo "$as_me: error: cannot compute sizeof (char), 77
12218 See \`config.log' for more details." >&2;}
12219    { (exit 1); exit 1; }; }
12220 fi
12221 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12222 fi
12223 fi
12224 rm -f conftest.val
12225 else
12226   ac_cv_sizeof_char=0
12227 fi
12228 fi
12229 echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
12230 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
12231 cat >>confdefs.h <<_ACEOF
12232 #define SIZEOF_CHAR $ac_cv_sizeof_char
12233 _ACEOF
12234
12235
12236 echo "$as_me:$LINENO: checking for short" >&5
12237 echo $ECHO_N "checking for short... $ECHO_C" >&6
12238 if test "${ac_cv_type_short+set}" = set; then
12239   echo $ECHO_N "(cached) $ECHO_C" >&6
12240 else
12241   cat >conftest.$ac_ext <<_ACEOF
12242 /* confdefs.h.  */
12243 _ACEOF
12244 cat confdefs.h >>conftest.$ac_ext
12245 cat >>conftest.$ac_ext <<_ACEOF
12246 /* end confdefs.h.  */
12247 $ac_includes_default
12248 int
12249 main ()
12250 {
12251 if ((short *) 0)
12252   return 0;
12253 if (sizeof (short))
12254   return 0;
12255   ;
12256   return 0;
12257 }
12258 _ACEOF
12259 rm -f conftest.$ac_objext
12260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12261   (eval $ac_compile) 2>conftest.er1
12262   ac_status=$?
12263   grep -v '^ *+' conftest.er1 >conftest.err
12264   rm -f conftest.er1
12265   cat conftest.err >&5
12266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12270   (eval $ac_try) 2>&5
12271   ac_status=$?
12272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12273   (exit $ac_status); }; } &&
12274          { ac_try='test -s conftest.$ac_objext'
12275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12276   (eval $ac_try) 2>&5
12277   ac_status=$?
12278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12279   (exit $ac_status); }; }; then
12280   ac_cv_type_short=yes
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 sed 's/^/| /' conftest.$ac_ext >&5
12284
12285 ac_cv_type_short=no
12286 fi
12287 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12288 fi
12289 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
12290 echo "${ECHO_T}$ac_cv_type_short" >&6
12291
12292 echo "$as_me:$LINENO: checking size of short" >&5
12293 echo $ECHO_N "checking size of short... $ECHO_C" >&6
12294 if test "${ac_cv_sizeof_short+set}" = set; then
12295   echo $ECHO_N "(cached) $ECHO_C" >&6
12296 else
12297   if test "$ac_cv_type_short" = yes; then
12298   # The cast to unsigned long works around a bug in the HP C Compiler
12299   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12300   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12301   # This bug is HP SR number 8606223364.
12302   if test "$cross_compiling" = yes; then
12303   # Depending upon the size, compute the lo and hi bounds.
12304 cat >conftest.$ac_ext <<_ACEOF
12305 /* confdefs.h.  */
12306 _ACEOF
12307 cat confdefs.h >>conftest.$ac_ext
12308 cat >>conftest.$ac_ext <<_ACEOF
12309 /* end confdefs.h.  */
12310 $ac_includes_default
12311 int
12312 main ()
12313 {
12314 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
12315 test_array [0] = 0
12316
12317   ;
12318   return 0;
12319 }
12320 _ACEOF
12321 rm -f conftest.$ac_objext
12322 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12323   (eval $ac_compile) 2>conftest.er1
12324   ac_status=$?
12325   grep -v '^ *+' conftest.er1 >conftest.err
12326   rm -f conftest.er1
12327   cat conftest.err >&5
12328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329   (exit $ac_status); } &&
12330          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12332   (eval $ac_try) 2>&5
12333   ac_status=$?
12334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12335   (exit $ac_status); }; } &&
12336          { ac_try='test -s conftest.$ac_objext'
12337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12338   (eval $ac_try) 2>&5
12339   ac_status=$?
12340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12341   (exit $ac_status); }; }; then
12342   ac_lo=0 ac_mid=0
12343   while :; do
12344     cat >conftest.$ac_ext <<_ACEOF
12345 /* confdefs.h.  */
12346 _ACEOF
12347 cat confdefs.h >>conftest.$ac_ext
12348 cat >>conftest.$ac_ext <<_ACEOF
12349 /* end confdefs.h.  */
12350 $ac_includes_default
12351 int
12352 main ()
12353 {
12354 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
12355 test_array [0] = 0
12356
12357   ;
12358   return 0;
12359 }
12360 _ACEOF
12361 rm -f conftest.$ac_objext
12362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12363   (eval $ac_compile) 2>conftest.er1
12364   ac_status=$?
12365   grep -v '^ *+' conftest.er1 >conftest.err
12366   rm -f conftest.er1
12367   cat conftest.err >&5
12368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369   (exit $ac_status); } &&
12370          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372   (eval $ac_try) 2>&5
12373   ac_status=$?
12374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375   (exit $ac_status); }; } &&
12376          { ac_try='test -s conftest.$ac_objext'
12377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12378   (eval $ac_try) 2>&5
12379   ac_status=$?
12380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12381   (exit $ac_status); }; }; then
12382   ac_hi=$ac_mid; break
12383 else
12384   echo "$as_me: failed program was:" >&5
12385 sed 's/^/| /' conftest.$ac_ext >&5
12386
12387 ac_lo=`expr $ac_mid + 1`
12388                     if test $ac_lo -le $ac_mid; then
12389                       ac_lo= ac_hi=
12390                       break
12391                     fi
12392                     ac_mid=`expr 2 '*' $ac_mid + 1`
12393 fi
12394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12395   done
12396 else
12397   echo "$as_me: failed program was:" >&5
12398 sed 's/^/| /' conftest.$ac_ext >&5
12399
12400 cat >conftest.$ac_ext <<_ACEOF
12401 /* confdefs.h.  */
12402 _ACEOF
12403 cat confdefs.h >>conftest.$ac_ext
12404 cat >>conftest.$ac_ext <<_ACEOF
12405 /* end confdefs.h.  */
12406 $ac_includes_default
12407 int
12408 main ()
12409 {
12410 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
12411 test_array [0] = 0
12412
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 rm -f conftest.$ac_objext
12418 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12419   (eval $ac_compile) 2>conftest.er1
12420   ac_status=$?
12421   grep -v '^ *+' conftest.er1 >conftest.err
12422   rm -f conftest.er1
12423   cat conftest.err >&5
12424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12425   (exit $ac_status); } &&
12426          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12431   (exit $ac_status); }; } &&
12432          { ac_try='test -s conftest.$ac_objext'
12433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12434   (eval $ac_try) 2>&5
12435   ac_status=$?
12436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12437   (exit $ac_status); }; }; then
12438   ac_hi=-1 ac_mid=-1
12439   while :; do
12440     cat >conftest.$ac_ext <<_ACEOF
12441 /* confdefs.h.  */
12442 _ACEOF
12443 cat confdefs.h >>conftest.$ac_ext
12444 cat >>conftest.$ac_ext <<_ACEOF
12445 /* end confdefs.h.  */
12446 $ac_includes_default
12447 int
12448 main ()
12449 {
12450 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
12451 test_array [0] = 0
12452
12453   ;
12454   return 0;
12455 }
12456 _ACEOF
12457 rm -f conftest.$ac_objext
12458 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12459   (eval $ac_compile) 2>conftest.er1
12460   ac_status=$?
12461   grep -v '^ *+' conftest.er1 >conftest.err
12462   rm -f conftest.er1
12463   cat conftest.err >&5
12464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12465   (exit $ac_status); } &&
12466          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12468   (eval $ac_try) 2>&5
12469   ac_status=$?
12470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12471   (exit $ac_status); }; } &&
12472          { ac_try='test -s conftest.$ac_objext'
12473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12474   (eval $ac_try) 2>&5
12475   ac_status=$?
12476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477   (exit $ac_status); }; }; then
12478   ac_lo=$ac_mid; break
12479 else
12480   echo "$as_me: failed program was:" >&5
12481 sed 's/^/| /' conftest.$ac_ext >&5
12482
12483 ac_hi=`expr '(' $ac_mid ')' - 1`
12484                        if test $ac_mid -le $ac_hi; then
12485                          ac_lo= ac_hi=
12486                          break
12487                        fi
12488                        ac_mid=`expr 2 '*' $ac_mid`
12489 fi
12490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12491   done
12492 else
12493   echo "$as_me: failed program was:" >&5
12494 sed 's/^/| /' conftest.$ac_ext >&5
12495
12496 ac_lo= ac_hi=
12497 fi
12498 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12499 fi
12500 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12501 # Binary search between lo and hi bounds.
12502 while test "x$ac_lo" != "x$ac_hi"; do
12503   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12504   cat >conftest.$ac_ext <<_ACEOF
12505 /* confdefs.h.  */
12506 _ACEOF
12507 cat confdefs.h >>conftest.$ac_ext
12508 cat >>conftest.$ac_ext <<_ACEOF
12509 /* end confdefs.h.  */
12510 $ac_includes_default
12511 int
12512 main ()
12513 {
12514 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
12515 test_array [0] = 0
12516
12517   ;
12518   return 0;
12519 }
12520 _ACEOF
12521 rm -f conftest.$ac_objext
12522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12523   (eval $ac_compile) 2>conftest.er1
12524   ac_status=$?
12525   grep -v '^ *+' conftest.er1 >conftest.err
12526   rm -f conftest.er1
12527   cat conftest.err >&5
12528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12529   (exit $ac_status); } &&
12530          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12532   (eval $ac_try) 2>&5
12533   ac_status=$?
12534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12535   (exit $ac_status); }; } &&
12536          { ac_try='test -s conftest.$ac_objext'
12537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12538   (eval $ac_try) 2>&5
12539   ac_status=$?
12540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541   (exit $ac_status); }; }; then
12542   ac_hi=$ac_mid
12543 else
12544   echo "$as_me: failed program was:" >&5
12545 sed 's/^/| /' conftest.$ac_ext >&5
12546
12547 ac_lo=`expr '(' $ac_mid ')' + 1`
12548 fi
12549 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12550 done
12551 case $ac_lo in
12552 ?*) ac_cv_sizeof_short=$ac_lo;;
12553 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
12554 See \`config.log' for more details." >&5
12555 echo "$as_me: error: cannot compute sizeof (short), 77
12556 See \`config.log' for more details." >&2;}
12557    { (exit 1); exit 1; }; } ;;
12558 esac
12559 else
12560   if test "$cross_compiling" = yes; then
12561   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
12562 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
12563    { (exit 1); exit 1; }; }
12564 else
12565   cat >conftest.$ac_ext <<_ACEOF
12566 /* confdefs.h.  */
12567 _ACEOF
12568 cat confdefs.h >>conftest.$ac_ext
12569 cat >>conftest.$ac_ext <<_ACEOF
12570 /* end confdefs.h.  */
12571 $ac_includes_default
12572 long longval () { return (long) (sizeof (short)); }
12573 unsigned long ulongval () { return (long) (sizeof (short)); }
12574 #include <stdio.h>
12575 #include <stdlib.h>
12576 int
12577 main ()
12578 {
12579
12580   FILE *f = fopen ("conftest.val", "w");
12581   if (! f)
12582     exit (1);
12583   if (((long) (sizeof (short))) < 0)
12584     {
12585       long i = longval ();
12586       if (i != ((long) (sizeof (short))))
12587         exit (1);
12588       fprintf (f, "%ld\n", i);
12589     }
12590   else
12591     {
12592       unsigned long i = ulongval ();
12593       if (i != ((long) (sizeof (short))))
12594         exit (1);
12595       fprintf (f, "%lu\n", i);
12596     }
12597   exit (ferror (f) || fclose (f) != 0);
12598
12599   ;
12600   return 0;
12601 }
12602 _ACEOF
12603 rm -f conftest$ac_exeext
12604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12605   (eval $ac_link) 2>&5
12606   ac_status=$?
12607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_cv_sizeof_short=`cat conftest.val`
12615 else
12616   echo "$as_me: program exited with status $ac_status" >&5
12617 echo "$as_me: failed program was:" >&5
12618 sed 's/^/| /' conftest.$ac_ext >&5
12619
12620 ( exit $ac_status )
12621 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
12622 See \`config.log' for more details." >&5
12623 echo "$as_me: error: cannot compute sizeof (short), 77
12624 See \`config.log' for more details." >&2;}
12625    { (exit 1); exit 1; }; }
12626 fi
12627 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12628 fi
12629 fi
12630 rm -f conftest.val
12631 else
12632   ac_cv_sizeof_short=0
12633 fi
12634 fi
12635 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
12636 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
12637 cat >>confdefs.h <<_ACEOF
12638 #define SIZEOF_SHORT $ac_cv_sizeof_short
12639 _ACEOF
12640
12641
12642 echo "$as_me:$LINENO: checking for int" >&5
12643 echo $ECHO_N "checking for int... $ECHO_C" >&6
12644 if test "${ac_cv_type_int+set}" = set; then
12645   echo $ECHO_N "(cached) $ECHO_C" >&6
12646 else
12647   cat >conftest.$ac_ext <<_ACEOF
12648 /* confdefs.h.  */
12649 _ACEOF
12650 cat confdefs.h >>conftest.$ac_ext
12651 cat >>conftest.$ac_ext <<_ACEOF
12652 /* end confdefs.h.  */
12653 $ac_includes_default
12654 int
12655 main ()
12656 {
12657 if ((int *) 0)
12658   return 0;
12659 if (sizeof (int))
12660   return 0;
12661   ;
12662   return 0;
12663 }
12664 _ACEOF
12665 rm -f conftest.$ac_objext
12666 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12667   (eval $ac_compile) 2>conftest.er1
12668   ac_status=$?
12669   grep -v '^ *+' conftest.er1 >conftest.err
12670   rm -f conftest.er1
12671   cat conftest.err >&5
12672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673   (exit $ac_status); } &&
12674          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12676   (eval $ac_try) 2>&5
12677   ac_status=$?
12678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679   (exit $ac_status); }; } &&
12680          { ac_try='test -s conftest.$ac_objext'
12681   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12682   (eval $ac_try) 2>&5
12683   ac_status=$?
12684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685   (exit $ac_status); }; }; then
12686   ac_cv_type_int=yes
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 sed 's/^/| /' conftest.$ac_ext >&5
12690
12691 ac_cv_type_int=no
12692 fi
12693 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12694 fi
12695 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
12696 echo "${ECHO_T}$ac_cv_type_int" >&6
12697
12698 echo "$as_me:$LINENO: checking size of int" >&5
12699 echo $ECHO_N "checking size of int... $ECHO_C" >&6
12700 if test "${ac_cv_sizeof_int+set}" = set; then
12701   echo $ECHO_N "(cached) $ECHO_C" >&6
12702 else
12703   if test "$ac_cv_type_int" = yes; then
12704   # The cast to unsigned long works around a bug in the HP C Compiler
12705   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12706   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12707   # This bug is HP SR number 8606223364.
12708   if test "$cross_compiling" = yes; then
12709   # Depending upon the size, compute the lo and hi bounds.
12710 cat >conftest.$ac_ext <<_ACEOF
12711 /* confdefs.h.  */
12712 _ACEOF
12713 cat confdefs.h >>conftest.$ac_ext
12714 cat >>conftest.$ac_ext <<_ACEOF
12715 /* end confdefs.h.  */
12716 $ac_includes_default
12717 int
12718 main ()
12719 {
12720 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
12721 test_array [0] = 0
12722
12723   ;
12724   return 0;
12725 }
12726 _ACEOF
12727 rm -f conftest.$ac_objext
12728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12729   (eval $ac_compile) 2>conftest.er1
12730   ac_status=$?
12731   grep -v '^ *+' conftest.er1 >conftest.err
12732   rm -f conftest.er1
12733   cat conftest.err >&5
12734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735   (exit $ac_status); } &&
12736          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12741   (exit $ac_status); }; } &&
12742          { ac_try='test -s conftest.$ac_objext'
12743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12744   (eval $ac_try) 2>&5
12745   ac_status=$?
12746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747   (exit $ac_status); }; }; then
12748   ac_lo=0 ac_mid=0
12749   while :; do
12750     cat >conftest.$ac_ext <<_ACEOF
12751 /* confdefs.h.  */
12752 _ACEOF
12753 cat confdefs.h >>conftest.$ac_ext
12754 cat >>conftest.$ac_ext <<_ACEOF
12755 /* end confdefs.h.  */
12756 $ac_includes_default
12757 int
12758 main ()
12759 {
12760 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
12761 test_array [0] = 0
12762
12763   ;
12764   return 0;
12765 }
12766 _ACEOF
12767 rm -f conftest.$ac_objext
12768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12769   (eval $ac_compile) 2>conftest.er1
12770   ac_status=$?
12771   grep -v '^ *+' conftest.er1 >conftest.err
12772   rm -f conftest.er1
12773   cat conftest.err >&5
12774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12775   (exit $ac_status); } &&
12776          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12778   (eval $ac_try) 2>&5
12779   ac_status=$?
12780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781   (exit $ac_status); }; } &&
12782          { ac_try='test -s conftest.$ac_objext'
12783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12784   (eval $ac_try) 2>&5
12785   ac_status=$?
12786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787   (exit $ac_status); }; }; then
12788   ac_hi=$ac_mid; break
12789 else
12790   echo "$as_me: failed program was:" >&5
12791 sed 's/^/| /' conftest.$ac_ext >&5
12792
12793 ac_lo=`expr $ac_mid + 1`
12794                     if test $ac_lo -le $ac_mid; then
12795                       ac_lo= ac_hi=
12796                       break
12797                     fi
12798                     ac_mid=`expr 2 '*' $ac_mid + 1`
12799 fi
12800 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12801   done
12802 else
12803   echo "$as_me: failed program was:" >&5
12804 sed 's/^/| /' conftest.$ac_ext >&5
12805
12806 cat >conftest.$ac_ext <<_ACEOF
12807 /* confdefs.h.  */
12808 _ACEOF
12809 cat confdefs.h >>conftest.$ac_ext
12810 cat >>conftest.$ac_ext <<_ACEOF
12811 /* end confdefs.h.  */
12812 $ac_includes_default
12813 int
12814 main ()
12815 {
12816 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
12817 test_array [0] = 0
12818
12819   ;
12820   return 0;
12821 }
12822 _ACEOF
12823 rm -f conftest.$ac_objext
12824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12825   (eval $ac_compile) 2>conftest.er1
12826   ac_status=$?
12827   grep -v '^ *+' conftest.er1 >conftest.err
12828   rm -f conftest.er1
12829   cat conftest.err >&5
12830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12831   (exit $ac_status); } &&
12832          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12834   (eval $ac_try) 2>&5
12835   ac_status=$?
12836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837   (exit $ac_status); }; } &&
12838          { ac_try='test -s conftest.$ac_objext'
12839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12840   (eval $ac_try) 2>&5
12841   ac_status=$?
12842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843   (exit $ac_status); }; }; then
12844   ac_hi=-1 ac_mid=-1
12845   while :; do
12846     cat >conftest.$ac_ext <<_ACEOF
12847 /* confdefs.h.  */
12848 _ACEOF
12849 cat confdefs.h >>conftest.$ac_ext
12850 cat >>conftest.$ac_ext <<_ACEOF
12851 /* end confdefs.h.  */
12852 $ac_includes_default
12853 int
12854 main ()
12855 {
12856 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
12857 test_array [0] = 0
12858
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext
12864 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12865   (eval $ac_compile) 2>conftest.er1
12866   ac_status=$?
12867   grep -v '^ *+' conftest.er1 >conftest.err
12868   rm -f conftest.er1
12869   cat conftest.err >&5
12870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12871   (exit $ac_status); } &&
12872          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12874   (eval $ac_try) 2>&5
12875   ac_status=$?
12876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12877   (exit $ac_status); }; } &&
12878          { ac_try='test -s conftest.$ac_objext'
12879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12880   (eval $ac_try) 2>&5
12881   ac_status=$?
12882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12883   (exit $ac_status); }; }; then
12884   ac_lo=$ac_mid; break
12885 else
12886   echo "$as_me: failed program was:" >&5
12887 sed 's/^/| /' conftest.$ac_ext >&5
12888
12889 ac_hi=`expr '(' $ac_mid ')' - 1`
12890                        if test $ac_mid -le $ac_hi; then
12891                          ac_lo= ac_hi=
12892                          break
12893                        fi
12894                        ac_mid=`expr 2 '*' $ac_mid`
12895 fi
12896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12897   done
12898 else
12899   echo "$as_me: failed program was:" >&5
12900 sed 's/^/| /' conftest.$ac_ext >&5
12901
12902 ac_lo= ac_hi=
12903 fi
12904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12905 fi
12906 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12907 # Binary search between lo and hi bounds.
12908 while test "x$ac_lo" != "x$ac_hi"; do
12909   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12910   cat >conftest.$ac_ext <<_ACEOF
12911 /* confdefs.h.  */
12912 _ACEOF
12913 cat confdefs.h >>conftest.$ac_ext
12914 cat >>conftest.$ac_ext <<_ACEOF
12915 /* end confdefs.h.  */
12916 $ac_includes_default
12917 int
12918 main ()
12919 {
12920 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
12921 test_array [0] = 0
12922
12923   ;
12924   return 0;
12925 }
12926 _ACEOF
12927 rm -f conftest.$ac_objext
12928 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12929   (eval $ac_compile) 2>conftest.er1
12930   ac_status=$?
12931   grep -v '^ *+' conftest.er1 >conftest.err
12932   rm -f conftest.er1
12933   cat conftest.err >&5
12934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935   (exit $ac_status); } &&
12936          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
12937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941   (exit $ac_status); }; } &&
12942          { ac_try='test -s conftest.$ac_objext'
12943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12944   (eval $ac_try) 2>&5
12945   ac_status=$?
12946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12947   (exit $ac_status); }; }; then
12948   ac_hi=$ac_mid
12949 else
12950   echo "$as_me: failed program was:" >&5
12951 sed 's/^/| /' conftest.$ac_ext >&5
12952
12953 ac_lo=`expr '(' $ac_mid ')' + 1`
12954 fi
12955 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12956 done
12957 case $ac_lo in
12958 ?*) ac_cv_sizeof_int=$ac_lo;;
12959 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
12960 See \`config.log' for more details." >&5
12961 echo "$as_me: error: cannot compute sizeof (int), 77
12962 See \`config.log' for more details." >&2;}
12963    { (exit 1); exit 1; }; } ;;
12964 esac
12965 else
12966   if test "$cross_compiling" = yes; then
12967   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
12968 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
12969    { (exit 1); exit 1; }; }
12970 else
12971   cat >conftest.$ac_ext <<_ACEOF
12972 /* confdefs.h.  */
12973 _ACEOF
12974 cat confdefs.h >>conftest.$ac_ext
12975 cat >>conftest.$ac_ext <<_ACEOF
12976 /* end confdefs.h.  */
12977 $ac_includes_default
12978 long longval () { return (long) (sizeof (int)); }
12979 unsigned long ulongval () { return (long) (sizeof (int)); }
12980 #include <stdio.h>
12981 #include <stdlib.h>
12982 int
12983 main ()
12984 {
12985
12986   FILE *f = fopen ("conftest.val", "w");
12987   if (! f)
12988     exit (1);
12989   if (((long) (sizeof (int))) < 0)
12990     {
12991       long i = longval ();
12992       if (i != ((long) (sizeof (int))))
12993         exit (1);
12994       fprintf (f, "%ld\n", i);
12995     }
12996   else
12997     {
12998       unsigned long i = ulongval ();
12999       if (i != ((long) (sizeof (int))))
13000         exit (1);
13001       fprintf (f, "%lu\n", i);
13002     }
13003   exit (ferror (f) || fclose (f) != 0);
13004
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 rm -f conftest$ac_exeext
13010 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13011   (eval $ac_link) 2>&5
13012   ac_status=$?
13013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13016   (eval $ac_try) 2>&5
13017   ac_status=$?
13018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13019   (exit $ac_status); }; }; then
13020   ac_cv_sizeof_int=`cat conftest.val`
13021 else
13022   echo "$as_me: program exited with status $ac_status" >&5
13023 echo "$as_me: failed program was:" >&5
13024 sed 's/^/| /' conftest.$ac_ext >&5
13025
13026 ( exit $ac_status )
13027 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
13028 See \`config.log' for more details." >&5
13029 echo "$as_me: error: cannot compute sizeof (int), 77
13030 See \`config.log' for more details." >&2;}
13031    { (exit 1); exit 1; }; }
13032 fi
13033 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13034 fi
13035 fi
13036 rm -f conftest.val
13037 else
13038   ac_cv_sizeof_int=0
13039 fi
13040 fi
13041 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
13042 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
13043 cat >>confdefs.h <<_ACEOF
13044 #define SIZEOF_INT $ac_cv_sizeof_int
13045 _ACEOF
13046
13047
13048 echo "$as_me:$LINENO: checking for long" >&5
13049 echo $ECHO_N "checking for long... $ECHO_C" >&6
13050 if test "${ac_cv_type_long+set}" = set; then
13051   echo $ECHO_N "(cached) $ECHO_C" >&6
13052 else
13053   cat >conftest.$ac_ext <<_ACEOF
13054 /* confdefs.h.  */
13055 _ACEOF
13056 cat confdefs.h >>conftest.$ac_ext
13057 cat >>conftest.$ac_ext <<_ACEOF
13058 /* end confdefs.h.  */
13059 $ac_includes_default
13060 int
13061 main ()
13062 {
13063 if ((long *) 0)
13064   return 0;
13065 if (sizeof (long))
13066   return 0;
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 rm -f conftest.$ac_objext
13072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13073   (eval $ac_compile) 2>conftest.er1
13074   ac_status=$?
13075   grep -v '^ *+' conftest.er1 >conftest.err
13076   rm -f conftest.er1
13077   cat conftest.err >&5
13078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079   (exit $ac_status); } &&
13080          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082   (eval $ac_try) 2>&5
13083   ac_status=$?
13084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085   (exit $ac_status); }; } &&
13086          { ac_try='test -s conftest.$ac_objext'
13087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13088   (eval $ac_try) 2>&5
13089   ac_status=$?
13090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13091   (exit $ac_status); }; }; then
13092   ac_cv_type_long=yes
13093 else
13094   echo "$as_me: failed program was:" >&5
13095 sed 's/^/| /' conftest.$ac_ext >&5
13096
13097 ac_cv_type_long=no
13098 fi
13099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13100 fi
13101 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
13102 echo "${ECHO_T}$ac_cv_type_long" >&6
13103
13104 echo "$as_me:$LINENO: checking size of long" >&5
13105 echo $ECHO_N "checking size of long... $ECHO_C" >&6
13106 if test "${ac_cv_sizeof_long+set}" = set; then
13107   echo $ECHO_N "(cached) $ECHO_C" >&6
13108 else
13109   if test "$ac_cv_type_long" = yes; then
13110   # The cast to unsigned long works around a bug in the HP C Compiler
13111   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13112   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13113   # This bug is HP SR number 8606223364.
13114   if test "$cross_compiling" = yes; then
13115   # Depending upon the size, compute the lo and hi bounds.
13116 cat >conftest.$ac_ext <<_ACEOF
13117 /* confdefs.h.  */
13118 _ACEOF
13119 cat confdefs.h >>conftest.$ac_ext
13120 cat >>conftest.$ac_ext <<_ACEOF
13121 /* end confdefs.h.  */
13122 $ac_includes_default
13123 int
13124 main ()
13125 {
13126 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
13127 test_array [0] = 0
13128
13129   ;
13130   return 0;
13131 }
13132 _ACEOF
13133 rm -f conftest.$ac_objext
13134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13135   (eval $ac_compile) 2>conftest.er1
13136   ac_status=$?
13137   grep -v '^ *+' conftest.er1 >conftest.err
13138   rm -f conftest.er1
13139   cat conftest.err >&5
13140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141   (exit $ac_status); } &&
13142          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13144   (eval $ac_try) 2>&5
13145   ac_status=$?
13146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147   (exit $ac_status); }; } &&
13148          { ac_try='test -s conftest.$ac_objext'
13149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150   (eval $ac_try) 2>&5
13151   ac_status=$?
13152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153   (exit $ac_status); }; }; then
13154   ac_lo=0 ac_mid=0
13155   while :; do
13156     cat >conftest.$ac_ext <<_ACEOF
13157 /* confdefs.h.  */
13158 _ACEOF
13159 cat confdefs.h >>conftest.$ac_ext
13160 cat >>conftest.$ac_ext <<_ACEOF
13161 /* end confdefs.h.  */
13162 $ac_includes_default
13163 int
13164 main ()
13165 {
13166 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
13167 test_array [0] = 0
13168
13169   ;
13170   return 0;
13171 }
13172 _ACEOF
13173 rm -f conftest.$ac_objext
13174 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13175   (eval $ac_compile) 2>conftest.er1
13176   ac_status=$?
13177   grep -v '^ *+' conftest.er1 >conftest.err
13178   rm -f conftest.er1
13179   cat conftest.err >&5
13180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181   (exit $ac_status); } &&
13182          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13184   (eval $ac_try) 2>&5
13185   ac_status=$?
13186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187   (exit $ac_status); }; } &&
13188          { ac_try='test -s conftest.$ac_objext'
13189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13190   (eval $ac_try) 2>&5
13191   ac_status=$?
13192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193   (exit $ac_status); }; }; then
13194   ac_hi=$ac_mid; break
13195 else
13196   echo "$as_me: failed program was:" >&5
13197 sed 's/^/| /' conftest.$ac_ext >&5
13198
13199 ac_lo=`expr $ac_mid + 1`
13200                     if test $ac_lo -le $ac_mid; then
13201                       ac_lo= ac_hi=
13202                       break
13203                     fi
13204                     ac_mid=`expr 2 '*' $ac_mid + 1`
13205 fi
13206 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13207   done
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 sed 's/^/| /' conftest.$ac_ext >&5
13211
13212 cat >conftest.$ac_ext <<_ACEOF
13213 /* confdefs.h.  */
13214 _ACEOF
13215 cat confdefs.h >>conftest.$ac_ext
13216 cat >>conftest.$ac_ext <<_ACEOF
13217 /* end confdefs.h.  */
13218 $ac_includes_default
13219 int
13220 main ()
13221 {
13222 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
13223 test_array [0] = 0
13224
13225   ;
13226   return 0;
13227 }
13228 _ACEOF
13229 rm -f conftest.$ac_objext
13230 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13231   (eval $ac_compile) 2>conftest.er1
13232   ac_status=$?
13233   grep -v '^ *+' conftest.er1 >conftest.err
13234   rm -f conftest.er1
13235   cat conftest.err >&5
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); } &&
13238          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13240   (eval $ac_try) 2>&5
13241   ac_status=$?
13242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243   (exit $ac_status); }; } &&
13244          { ac_try='test -s conftest.$ac_objext'
13245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13246   (eval $ac_try) 2>&5
13247   ac_status=$?
13248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13249   (exit $ac_status); }; }; then
13250   ac_hi=-1 ac_mid=-1
13251   while :; do
13252     cat >conftest.$ac_ext <<_ACEOF
13253 /* confdefs.h.  */
13254 _ACEOF
13255 cat confdefs.h >>conftest.$ac_ext
13256 cat >>conftest.$ac_ext <<_ACEOF
13257 /* end confdefs.h.  */
13258 $ac_includes_default
13259 int
13260 main ()
13261 {
13262 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
13263 test_array [0] = 0
13264
13265   ;
13266   return 0;
13267 }
13268 _ACEOF
13269 rm -f conftest.$ac_objext
13270 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13271   (eval $ac_compile) 2>conftest.er1
13272   ac_status=$?
13273   grep -v '^ *+' conftest.er1 >conftest.err
13274   rm -f conftest.er1
13275   cat conftest.err >&5
13276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277   (exit $ac_status); } &&
13278          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13280   (eval $ac_try) 2>&5
13281   ac_status=$?
13282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283   (exit $ac_status); }; } &&
13284          { ac_try='test -s conftest.$ac_objext'
13285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13286   (eval $ac_try) 2>&5
13287   ac_status=$?
13288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13289   (exit $ac_status); }; }; then
13290   ac_lo=$ac_mid; break
13291 else
13292   echo "$as_me: failed program was:" >&5
13293 sed 's/^/| /' conftest.$ac_ext >&5
13294
13295 ac_hi=`expr '(' $ac_mid ')' - 1`
13296                        if test $ac_mid -le $ac_hi; then
13297                          ac_lo= ac_hi=
13298                          break
13299                        fi
13300                        ac_mid=`expr 2 '*' $ac_mid`
13301 fi
13302 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13303   done
13304 else
13305   echo "$as_me: failed program was:" >&5
13306 sed 's/^/| /' conftest.$ac_ext >&5
13307
13308 ac_lo= ac_hi=
13309 fi
13310 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13311 fi
13312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13313 # Binary search between lo and hi bounds.
13314 while test "x$ac_lo" != "x$ac_hi"; do
13315   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13316   cat >conftest.$ac_ext <<_ACEOF
13317 /* confdefs.h.  */
13318 _ACEOF
13319 cat confdefs.h >>conftest.$ac_ext
13320 cat >>conftest.$ac_ext <<_ACEOF
13321 /* end confdefs.h.  */
13322 $ac_includes_default
13323 int
13324 main ()
13325 {
13326 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
13327 test_array [0] = 0
13328
13329   ;
13330   return 0;
13331 }
13332 _ACEOF
13333 rm -f conftest.$ac_objext
13334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13335   (eval $ac_compile) 2>conftest.er1
13336   ac_status=$?
13337   grep -v '^ *+' conftest.er1 >conftest.err
13338   rm -f conftest.er1
13339   cat conftest.err >&5
13340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341   (exit $ac_status); } &&
13342          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344   (eval $ac_try) 2>&5
13345   ac_status=$?
13346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347   (exit $ac_status); }; } &&
13348          { ac_try='test -s conftest.$ac_objext'
13349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13350   (eval $ac_try) 2>&5
13351   ac_status=$?
13352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353   (exit $ac_status); }; }; then
13354   ac_hi=$ac_mid
13355 else
13356   echo "$as_me: failed program was:" >&5
13357 sed 's/^/| /' conftest.$ac_ext >&5
13358
13359 ac_lo=`expr '(' $ac_mid ')' + 1`
13360 fi
13361 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13362 done
13363 case $ac_lo in
13364 ?*) ac_cv_sizeof_long=$ac_lo;;
13365 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
13366 See \`config.log' for more details." >&5
13367 echo "$as_me: error: cannot compute sizeof (long), 77
13368 See \`config.log' for more details." >&2;}
13369    { (exit 1); exit 1; }; } ;;
13370 esac
13371 else
13372   if test "$cross_compiling" = yes; then
13373   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
13374 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
13375    { (exit 1); exit 1; }; }
13376 else
13377   cat >conftest.$ac_ext <<_ACEOF
13378 /* confdefs.h.  */
13379 _ACEOF
13380 cat confdefs.h >>conftest.$ac_ext
13381 cat >>conftest.$ac_ext <<_ACEOF
13382 /* end confdefs.h.  */
13383 $ac_includes_default
13384 long longval () { return (long) (sizeof (long)); }
13385 unsigned long ulongval () { return (long) (sizeof (long)); }
13386 #include <stdio.h>
13387 #include <stdlib.h>
13388 int
13389 main ()
13390 {
13391
13392   FILE *f = fopen ("conftest.val", "w");
13393   if (! f)
13394     exit (1);
13395   if (((long) (sizeof (long))) < 0)
13396     {
13397       long i = longval ();
13398       if (i != ((long) (sizeof (long))))
13399         exit (1);
13400       fprintf (f, "%ld\n", i);
13401     }
13402   else
13403     {
13404       unsigned long i = ulongval ();
13405       if (i != ((long) (sizeof (long))))
13406         exit (1);
13407       fprintf (f, "%lu\n", i);
13408     }
13409   exit (ferror (f) || fclose (f) != 0);
13410
13411   ;
13412   return 0;
13413 }
13414 _ACEOF
13415 rm -f conftest$ac_exeext
13416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13417   (eval $ac_link) 2>&5
13418   ac_status=$?
13419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13420   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422   (eval $ac_try) 2>&5
13423   ac_status=$?
13424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425   (exit $ac_status); }; }; then
13426   ac_cv_sizeof_long=`cat conftest.val`
13427 else
13428   echo "$as_me: program exited with status $ac_status" >&5
13429 echo "$as_me: failed program was:" >&5
13430 sed 's/^/| /' conftest.$ac_ext >&5
13431
13432 ( exit $ac_status )
13433 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
13434 See \`config.log' for more details." >&5
13435 echo "$as_me: error: cannot compute sizeof (long), 77
13436 See \`config.log' for more details." >&2;}
13437    { (exit 1); exit 1; }; }
13438 fi
13439 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13440 fi
13441 fi
13442 rm -f conftest.val
13443 else
13444   ac_cv_sizeof_long=0
13445 fi
13446 fi
13447 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
13448 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
13449 cat >>confdefs.h <<_ACEOF
13450 #define SIZEOF_LONG $ac_cv_sizeof_long
13451 _ACEOF
13452
13453
13454 echo "$as_me:$LINENO: checking for long long" >&5
13455 echo $ECHO_N "checking for long long... $ECHO_C" >&6
13456 if test "${ac_cv_type_long_long+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   cat >conftest.$ac_ext <<_ACEOF
13460 /* confdefs.h.  */
13461 _ACEOF
13462 cat confdefs.h >>conftest.$ac_ext
13463 cat >>conftest.$ac_ext <<_ACEOF
13464 /* end confdefs.h.  */
13465 $ac_includes_default
13466 int
13467 main ()
13468 {
13469 if ((long long *) 0)
13470   return 0;
13471 if (sizeof (long long))
13472   return 0;
13473   ;
13474   return 0;
13475 }
13476 _ACEOF
13477 rm -f conftest.$ac_objext
13478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13479   (eval $ac_compile) 2>conftest.er1
13480   ac_status=$?
13481   grep -v '^ *+' conftest.er1 >conftest.err
13482   rm -f conftest.er1
13483   cat conftest.err >&5
13484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13485   (exit $ac_status); } &&
13486          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13488   (eval $ac_try) 2>&5
13489   ac_status=$?
13490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13491   (exit $ac_status); }; } &&
13492          { ac_try='test -s conftest.$ac_objext'
13493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13494   (eval $ac_try) 2>&5
13495   ac_status=$?
13496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13497   (exit $ac_status); }; }; then
13498   ac_cv_type_long_long=yes
13499 else
13500   echo "$as_me: failed program was:" >&5
13501 sed 's/^/| /' conftest.$ac_ext >&5
13502
13503 ac_cv_type_long_long=no
13504 fi
13505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13506 fi
13507 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
13508 echo "${ECHO_T}$ac_cv_type_long_long" >&6
13509
13510 echo "$as_me:$LINENO: checking size of long long" >&5
13511 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
13512 if test "${ac_cv_sizeof_long_long+set}" = set; then
13513   echo $ECHO_N "(cached) $ECHO_C" >&6
13514 else
13515   if test "$ac_cv_type_long_long" = yes; then
13516   # The cast to unsigned long works around a bug in the HP C Compiler
13517   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13518   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13519   # This bug is HP SR number 8606223364.
13520   if test "$cross_compiling" = yes; then
13521   # Depending upon the size, compute the lo and hi bounds.
13522 cat >conftest.$ac_ext <<_ACEOF
13523 /* confdefs.h.  */
13524 _ACEOF
13525 cat confdefs.h >>conftest.$ac_ext
13526 cat >>conftest.$ac_ext <<_ACEOF
13527 /* end confdefs.h.  */
13528 $ac_includes_default
13529 int
13530 main ()
13531 {
13532 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
13533 test_array [0] = 0
13534
13535   ;
13536   return 0;
13537 }
13538 _ACEOF
13539 rm -f conftest.$ac_objext
13540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13541   (eval $ac_compile) 2>conftest.er1
13542   ac_status=$?
13543   grep -v '^ *+' conftest.er1 >conftest.err
13544   rm -f conftest.er1
13545   cat conftest.err >&5
13546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547   (exit $ac_status); } &&
13548          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13553   (exit $ac_status); }; } &&
13554          { ac_try='test -s conftest.$ac_objext'
13555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13556   (eval $ac_try) 2>&5
13557   ac_status=$?
13558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559   (exit $ac_status); }; }; then
13560   ac_lo=0 ac_mid=0
13561   while :; do
13562     cat >conftest.$ac_ext <<_ACEOF
13563 /* confdefs.h.  */
13564 _ACEOF
13565 cat confdefs.h >>conftest.$ac_ext
13566 cat >>conftest.$ac_ext <<_ACEOF
13567 /* end confdefs.h.  */
13568 $ac_includes_default
13569 int
13570 main ()
13571 {
13572 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
13573 test_array [0] = 0
13574
13575   ;
13576   return 0;
13577 }
13578 _ACEOF
13579 rm -f conftest.$ac_objext
13580 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13581   (eval $ac_compile) 2>conftest.er1
13582   ac_status=$?
13583   grep -v '^ *+' conftest.er1 >conftest.err
13584   rm -f conftest.er1
13585   cat conftest.err >&5
13586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13587   (exit $ac_status); } &&
13588          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13593   (exit $ac_status); }; } &&
13594          { ac_try='test -s conftest.$ac_objext'
13595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13596   (eval $ac_try) 2>&5
13597   ac_status=$?
13598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13599   (exit $ac_status); }; }; then
13600   ac_hi=$ac_mid; break
13601 else
13602   echo "$as_me: failed program was:" >&5
13603 sed 's/^/| /' conftest.$ac_ext >&5
13604
13605 ac_lo=`expr $ac_mid + 1`
13606                     if test $ac_lo -le $ac_mid; then
13607                       ac_lo= ac_hi=
13608                       break
13609                     fi
13610                     ac_mid=`expr 2 '*' $ac_mid + 1`
13611 fi
13612 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13613   done
13614 else
13615   echo "$as_me: failed program was:" >&5
13616 sed 's/^/| /' conftest.$ac_ext >&5
13617
13618 cat >conftest.$ac_ext <<_ACEOF
13619 /* confdefs.h.  */
13620 _ACEOF
13621 cat confdefs.h >>conftest.$ac_ext
13622 cat >>conftest.$ac_ext <<_ACEOF
13623 /* end confdefs.h.  */
13624 $ac_includes_default
13625 int
13626 main ()
13627 {
13628 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
13629 test_array [0] = 0
13630
13631   ;
13632   return 0;
13633 }
13634 _ACEOF
13635 rm -f conftest.$ac_objext
13636 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13637   (eval $ac_compile) 2>conftest.er1
13638   ac_status=$?
13639   grep -v '^ *+' conftest.er1 >conftest.err
13640   rm -f conftest.er1
13641   cat conftest.err >&5
13642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643   (exit $ac_status); } &&
13644          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649   (exit $ac_status); }; } &&
13650          { ac_try='test -s conftest.$ac_objext'
13651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13655   (exit $ac_status); }; }; then
13656   ac_hi=-1 ac_mid=-1
13657   while :; do
13658     cat >conftest.$ac_ext <<_ACEOF
13659 /* confdefs.h.  */
13660 _ACEOF
13661 cat confdefs.h >>conftest.$ac_ext
13662 cat >>conftest.$ac_ext <<_ACEOF
13663 /* end confdefs.h.  */
13664 $ac_includes_default
13665 int
13666 main ()
13667 {
13668 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
13669 test_array [0] = 0
13670
13671   ;
13672   return 0;
13673 }
13674 _ACEOF
13675 rm -f conftest.$ac_objext
13676 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13677   (eval $ac_compile) 2>conftest.er1
13678   ac_status=$?
13679   grep -v '^ *+' conftest.er1 >conftest.err
13680   rm -f conftest.er1
13681   cat conftest.err >&5
13682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683   (exit $ac_status); } &&
13684          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); }; } &&
13690          { ac_try='test -s conftest.$ac_objext'
13691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13692   (eval $ac_try) 2>&5
13693   ac_status=$?
13694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13695   (exit $ac_status); }; }; then
13696   ac_lo=$ac_mid; break
13697 else
13698   echo "$as_me: failed program was:" >&5
13699 sed 's/^/| /' conftest.$ac_ext >&5
13700
13701 ac_hi=`expr '(' $ac_mid ')' - 1`
13702                        if test $ac_mid -le $ac_hi; then
13703                          ac_lo= ac_hi=
13704                          break
13705                        fi
13706                        ac_mid=`expr 2 '*' $ac_mid`
13707 fi
13708 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13709   done
13710 else
13711   echo "$as_me: failed program was:" >&5
13712 sed 's/^/| /' conftest.$ac_ext >&5
13713
13714 ac_lo= ac_hi=
13715 fi
13716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13717 fi
13718 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13719 # Binary search between lo and hi bounds.
13720 while test "x$ac_lo" != "x$ac_hi"; do
13721   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13722   cat >conftest.$ac_ext <<_ACEOF
13723 /* confdefs.h.  */
13724 _ACEOF
13725 cat confdefs.h >>conftest.$ac_ext
13726 cat >>conftest.$ac_ext <<_ACEOF
13727 /* end confdefs.h.  */
13728 $ac_includes_default
13729 int
13730 main ()
13731 {
13732 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
13733 test_array [0] = 0
13734
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f conftest.$ac_objext
13740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13741   (eval $ac_compile) 2>conftest.er1
13742   ac_status=$?
13743   grep -v '^ *+' conftest.er1 >conftest.err
13744   rm -f conftest.er1
13745   cat conftest.err >&5
13746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747   (exit $ac_status); } &&
13748          { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
13749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753   (exit $ac_status); }; } &&
13754          { ac_try='test -s conftest.$ac_objext'
13755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756   (eval $ac_try) 2>&5
13757   ac_status=$?
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); }; }; then
13760   ac_hi=$ac_mid
13761 else
13762   echo "$as_me: failed program was:" >&5
13763 sed 's/^/| /' conftest.$ac_ext >&5
13764
13765 ac_lo=`expr '(' $ac_mid ')' + 1`
13766 fi
13767 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13768 done
13769 case $ac_lo in
13770 ?*) ac_cv_sizeof_long_long=$ac_lo;;
13771 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
13772 See \`config.log' for more details." >&5
13773 echo "$as_me: error: cannot compute sizeof (long long), 77
13774 See \`config.log' for more details." >&2;}
13775    { (exit 1); exit 1; }; } ;;
13776 esac
13777 else
13778   if test "$cross_compiling" = yes; then
13779   { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
13780 echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
13781    { (exit 1); exit 1; }; }
13782 else
13783   cat >conftest.$ac_ext <<_ACEOF
13784 /* confdefs.h.  */
13785 _ACEOF
13786 cat confdefs.h >>conftest.$ac_ext
13787 cat >>conftest.$ac_ext <<_ACEOF
13788 /* end confdefs.h.  */
13789 $ac_includes_default
13790 long longval () { return (long) (sizeof (long long)); }
13791 unsigned long ulongval () { return (long) (sizeof (long long)); }
13792 #include <stdio.h>
13793 #include <stdlib.h>
13794 int
13795 main ()
13796 {
13797
13798   FILE *f = fopen ("conftest.val", "w");
13799   if (! f)
13800     exit (1);
13801   if (((long) (sizeof (long long))) < 0)
13802     {
13803       long i = longval ();
13804       if (i != ((long) (sizeof (long long))))
13805         exit (1);
13806       fprintf (f, "%ld\n", i);
13807     }
13808   else
13809     {
13810       unsigned long i = ulongval ();
13811       if (i != ((long) (sizeof (long long))))
13812         exit (1);
13813       fprintf (f, "%lu\n", i);
13814     }
13815   exit (ferror (f) || fclose (f) != 0);
13816
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 rm -f conftest$ac_exeext
13822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13823   (eval $ac_link) 2>&5
13824   ac_status=$?
13825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_sizeof_long_long=`cat conftest.val`
13833 else
13834   echo "$as_me: program exited with status $ac_status" >&5
13835 echo "$as_me: failed program was:" >&5
13836 sed 's/^/| /' conftest.$ac_ext >&5
13837
13838 ( exit $ac_status )
13839 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
13840 See \`config.log' for more details." >&5
13841 echo "$as_me: error: cannot compute sizeof (long long), 77
13842 See \`config.log' for more details." >&2;}
13843    { (exit 1); exit 1; }; }
13844 fi
13845 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13846 fi
13847 fi
13848 rm -f conftest.val
13849 else
13850   ac_cv_sizeof_long_long=0
13851 fi
13852 fi
13853 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
13854 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
13855 cat >>confdefs.h <<_ACEOF
13856 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
13857 _ACEOF
13858
13859
13860 else
13861     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
13862         ac_cv_sizeof_char=1
13863         ac_cv_sizeof_short=2
13864         ac_cv_sizeof_int=4
13865         ac_cv_sizeof_long=4
13866         ac_cv_sizeof_long_long=4
13867     else
13868         : # FIXME
13869     fi
13870 #echo
13871 fi
13872
13873 type_name()
13874 {
13875     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
13876         echo "char"
13877         exit
13878     fi
13879     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
13880         echo "short"
13881         exit
13882     fi
13883     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
13884         echo "int"
13885         exit
13886     fi
13887     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
13888         echo "long"
13889         exit
13890     fi
13891     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
13892         echo "long long"
13893         exit
13894     fi
13895     echo "long long"
13896 }
13897
13898 echo "$as_me:$LINENO: checking type name for byte" >&5
13899 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
13900 TYPE_BYTE=`type_name 1`
13901 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
13902 echo "${ECHO_T}$TYPE_BYTE" >&6
13903 echo "$as_me:$LINENO: checking type name for word" >&5
13904 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
13905 TYPE_WORD=`type_name 2`
13906 echo "$as_me:$LINENO: result: $TYPE_WORD" >&5
13907 echo "${ECHO_T}$TYPE_WORD" >&6
13908 echo "$as_me:$LINENO: checking type name for dword" >&5
13909 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
13910 TYPE_DWORD=`type_name 4`
13911 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
13912 echo "${ECHO_T}$TYPE_DWORD" >&6
13913 cat >>confdefs.h <<_ACEOF
13914 #define TYPE_BYTE $TYPE_BYTE
13915 _ACEOF
13916
13917 cat >>confdefs.h <<_ACEOF
13918 #define TYPE_WORD $TYPE_WORD
13919 _ACEOF
13920
13921 cat >>confdefs.h <<_ACEOF
13922 #define TYPE_DWORD $TYPE_DWORD
13923 _ACEOF
13924
13925
13926 if echo $TYPE_DWORD|grep short >/dev/null; then
13927     A="h"
13928 elif echo $TYPE_DWORD|grep long >/dev/null; then
13929     A="l"
13930 else
13931     A=""
13932 fi
13933
13934 if echo $TYPE_WORD|grep short >/dev/null; then M="h"
13935 elif echo $TYPE_WORD|grep long >/dev/null; then M="l"
13936 else M=""
13937 fi
13938
13939 cat >>confdefs.h <<_ACEOF
13940 #define _A_ "${A}"
13941 _ACEOF
13942
13943 cat >>confdefs.h <<_ACEOF
13944 #define _M_ "${M}"
13945 _ACEOF
13946
13947
13948 # Generating output files
13949 # ===========================================================================
13950
13951                                                                                                                         ac_config_files="$ac_config_files 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"
13952 cat >confcache <<\_ACEOF
13953 # This file is a shell script that caches the results of configure
13954 # tests run on this system so they can be shared between configure
13955 # scripts and configure runs, see configure's option --config-cache.
13956 # It is not useful on other systems.  If it contains results you don't
13957 # want to keep, you may remove or edit it.
13958 #
13959 # config.status only pays attention to the cache file if you give it
13960 # the --recheck option to rerun configure.
13961 #
13962 # `ac_cv_env_foo' variables (set or unset) will be overridden when
13963 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13964 # following values.
13965
13966 _ACEOF
13967
13968 # The following way of writing the cache mishandles newlines in values,
13969 # but we know of no workaround that is simple, portable, and efficient.
13970 # So, don't put newlines in cache variables' values.
13971 # Ultrix sh set writes to stderr and can't be redirected directly,
13972 # and sets the high bit in the cache file unless we assign to the vars.
13973 {
13974   (set) 2>&1 |
13975     case `(ac_space=' '; set | grep ac_space) 2>&1` in
13976     *ac_space=\ *)
13977       # `set' does not quote correctly, so add quotes (double-quote
13978       # substitution turns \\\\ into \\, and sed turns \\ into \).
13979       sed -n \
13980         "s/'/'\\\\''/g;
13981           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13982       ;;
13983     *)
13984       # `set' quotes correctly as required by POSIX, so do not add quotes.
13985       sed -n \
13986         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13987       ;;
13988     esac;
13989 } |
13990   sed '
13991      t clear
13992      : clear
13993      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13994      t end
13995      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13996      : end' >>confcache
13997 if diff $cache_file confcache >/dev/null 2>&1; then :; else
13998   if test -w $cache_file; then
13999     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14000     cat confcache >$cache_file
14001   else
14002     echo "not updating unwritable cache $cache_file"
14003   fi
14004 fi
14005 rm -f confcache
14006
14007 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14008 # Let make expand exec_prefix.
14009 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14010
14011 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14012 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14013 # trailing colons and then remove the whole line if VPATH becomes empty
14014 # (actually we leave an empty line to preserve line numbers).
14015 if test "x$srcdir" = x.; then
14016   ac_vpsub='/^[  ]*VPATH[        ]*=/{
14017 s/:*\$(srcdir):*/:/;
14018 s/:*\${srcdir}:*/:/;
14019 s/:*@srcdir@:*/:/;
14020 s/^\([^=]*=[     ]*\):*/\1/;
14021 s/:*$//;
14022 s/^[^=]*=[       ]*$//;
14023 }'
14024 fi
14025
14026 DEFS=-DHAVE_CONFIG_H
14027
14028 ac_libobjs=
14029 ac_ltlibobjs=
14030 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14031   # 1. Remove the extension, and $U if already installed.
14032   ac_i=`echo "$ac_i" |
14033          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
14034   # 2. Add them.
14035   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
14036   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
14037 done
14038 LIBOBJS=$ac_libobjs
14039
14040 LTLIBOBJS=$ac_ltlibobjs
14041
14042
14043
14044 : ${CONFIG_STATUS=./config.status}
14045 ac_clean_files_save=$ac_clean_files
14046 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14047 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
14048 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14049 cat >$CONFIG_STATUS <<_ACEOF
14050 #! $SHELL
14051 # Generated by $as_me.
14052 # Run this file to recreate the current configuration.
14053 # Compiler output produced by configure, useful for debugging
14054 # configure, is in config.log if it exists.
14055
14056 debug=false
14057 ac_cs_recheck=false
14058 ac_cs_silent=false
14059 SHELL=\${CONFIG_SHELL-$SHELL}
14060 _ACEOF
14061
14062 cat >>$CONFIG_STATUS <<\_ACEOF
14063 ## --------------------- ##
14064 ## M4sh Initialization.  ##
14065 ## --------------------- ##
14066
14067 # Be Bourne compatible
14068 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14069   emulate sh
14070   NULLCMD=:
14071   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
14072   # is contrary to our usage.  Disable this feature.
14073   alias -g '${1+"$@"}'='"$@"'
14074 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14075   set -o posix
14076 fi
14077 DUALCASE=1; export DUALCASE # for MKS sh
14078
14079 # Support unset when possible.
14080 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14081   as_unset=unset
14082 else
14083   as_unset=false
14084 fi
14085
14086
14087 # Work around bugs in pre-3.0 UWIN ksh.
14088 $as_unset ENV MAIL MAILPATH
14089 PS1='$ '
14090 PS2='> '
14091 PS4='+ '
14092
14093 # NLS nuisances.
14094 for as_var in \
14095   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
14096   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
14097   LC_TELEPHONE LC_TIME
14098 do
14099   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
14100     eval $as_var=C; export $as_var
14101   else
14102     $as_unset $as_var
14103   fi
14104 done
14105
14106 # Required to use basename.
14107 if expr a : '\(a\)' >/dev/null 2>&1; then
14108   as_expr=expr
14109 else
14110   as_expr=false
14111 fi
14112
14113 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
14114   as_basename=basename
14115 else
14116   as_basename=false
14117 fi
14118
14119
14120 # Name of the executable.
14121 as_me=`$as_basename "$0" ||
14122 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14123          X"$0" : 'X\(//\)$' \| \
14124          X"$0" : 'X\(/\)$' \| \
14125          .     : '\(.\)' 2>/dev/null ||
14126 echo X/"$0" |
14127     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
14128           /^X\/\(\/\/\)$/{ s//\1/; q; }
14129           /^X\/\(\/\).*/{ s//\1/; q; }
14130           s/.*/./; q'`
14131
14132
14133 # PATH needs CR, and LINENO needs CR and PATH.
14134 # Avoid depending upon Character Ranges.
14135 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14136 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14137 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14138 as_cr_digits='0123456789'
14139 as_cr_alnum=$as_cr_Letters$as_cr_digits
14140
14141 # The user is always right.
14142 if test "${PATH_SEPARATOR+set}" != set; then
14143   echo "#! /bin/sh" >conf$$.sh
14144   echo  "exit 0"   >>conf$$.sh
14145   chmod +x conf$$.sh
14146   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
14147     PATH_SEPARATOR=';'
14148   else
14149     PATH_SEPARATOR=:
14150   fi
14151   rm -f conf$$.sh
14152 fi
14153
14154
14155   as_lineno_1=$LINENO
14156   as_lineno_2=$LINENO
14157   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14158   test "x$as_lineno_1" != "x$as_lineno_2" &&
14159   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
14160   # Find who we are.  Look in the path if we contain no path at all
14161   # relative or not.
14162   case $0 in
14163     *[\\/]* ) as_myself=$0 ;;
14164     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14165 for as_dir in $PATH
14166 do
14167   IFS=$as_save_IFS
14168   test -z "$as_dir" && as_dir=.
14169   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14170 done
14171
14172        ;;
14173   esac
14174   # We did not find ourselves, most probably we were run as `sh COMMAND'
14175   # in which case we are not to be found in the path.
14176   if test "x$as_myself" = x; then
14177     as_myself=$0
14178   fi
14179   if test ! -f "$as_myself"; then
14180     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
14181 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
14182    { (exit 1); exit 1; }; }
14183   fi
14184   case $CONFIG_SHELL in
14185   '')
14186     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
14188 do
14189   IFS=$as_save_IFS
14190   test -z "$as_dir" && as_dir=.
14191   for as_base in sh bash ksh sh5; do
14192          case $as_dir in
14193          /*)
14194            if ("$as_dir/$as_base" -c '
14195   as_lineno_1=$LINENO
14196   as_lineno_2=$LINENO
14197   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
14198   test "x$as_lineno_1" != "x$as_lineno_2" &&
14199   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
14200              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
14201              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
14202              CONFIG_SHELL=$as_dir/$as_base
14203              export CONFIG_SHELL
14204              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
14205            fi;;
14206          esac
14207        done
14208 done
14209 ;;
14210   esac
14211
14212   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
14213   # uniformly replaced by the line number.  The first 'sed' inserts a
14214   # line-number line before each line; the second 'sed' does the real
14215   # work.  The second script uses 'N' to pair each line-number line
14216   # with the numbered line, and appends trailing '-' during
14217   # substitution so that $LINENO is not a special case at line end.
14218   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
14219   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
14220   sed '=' <$as_myself |
14221     sed '
14222       N
14223       s,$,-,
14224       : loop
14225       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
14226       t loop
14227       s,-$,,
14228       s,^['$as_cr_digits']*\n,,
14229     ' >$as_me.lineno &&
14230   chmod +x $as_me.lineno ||
14231     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
14232 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
14233    { (exit 1); exit 1; }; }
14234
14235   # Don't try to exec as it changes $[0], causing all sort of problems
14236   # (the dirname of $[0] is not the place where we might find the
14237   # original and so on.  Autoconf is especially sensible to this).
14238   . ./$as_me.lineno
14239   # Exit status is that of the last command.
14240   exit
14241 }
14242
14243
14244 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
14245   *c*,-n*) ECHO_N= ECHO_C='
14246 ' ECHO_T='      ' ;;
14247   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
14248   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
14249 esac
14250
14251 if expr a : '\(a\)' >/dev/null 2>&1; then
14252   as_expr=expr
14253 else
14254   as_expr=false
14255 fi
14256
14257 rm -f conf$$ conf$$.exe conf$$.file
14258 echo >conf$$.file
14259 if ln -s conf$$.file conf$$ 2>/dev/null; then
14260   # We could just check for DJGPP; but this test a) works b) is more generic
14261   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14262   if test -f conf$$.exe; then
14263     # Don't use ln at all; we don't have any links
14264     as_ln_s='cp -p'
14265   else
14266     as_ln_s='ln -s'
14267   fi
14268 elif ln conf$$.file conf$$ 2>/dev/null; then
14269   as_ln_s=ln
14270 else
14271   as_ln_s='cp -p'
14272 fi
14273 rm -f conf$$ conf$$.exe conf$$.file
14274
14275 if mkdir -p . 2>/dev/null; then
14276   as_mkdir_p=:
14277 else
14278   test -d ./-p && rmdir ./-p
14279   as_mkdir_p=false
14280 fi
14281
14282 as_executable_p="test -f"
14283
14284 # Sed expression to map a string onto a valid CPP name.
14285 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14286
14287 # Sed expression to map a string onto a valid variable name.
14288 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14289
14290
14291 # IFS
14292 # We need space, tab and new line, in precisely that order.
14293 as_nl='
14294 '
14295 IFS="   $as_nl"
14296
14297 # CDPATH.
14298 $as_unset CDPATH
14299
14300 exec 6>&1
14301
14302 # Open the log real soon, to keep \$[0] and so on meaningful, and to
14303 # report actual input values of CONFIG_FILES etc. instead of their
14304 # values after options handling.  Logging --version etc. is OK.
14305 exec 5>>config.log
14306 {
14307   echo
14308   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14309 ## Running $as_me. ##
14310 _ASBOX
14311 } >&5
14312 cat >&5 <<_CSEOF
14313
14314 This file was extended by $as_me, which was
14315 generated by GNU Autoconf 2.59.  Invocation command line was
14316
14317   CONFIG_FILES    = $CONFIG_FILES
14318   CONFIG_HEADERS  = $CONFIG_HEADERS
14319   CONFIG_LINKS    = $CONFIG_LINKS
14320   CONFIG_COMMANDS = $CONFIG_COMMANDS
14321   $ $0 $@
14322
14323 _CSEOF
14324 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
14325 echo >&5
14326 _ACEOF
14327
14328 # Files that config.status was made for.
14329 if test -n "$ac_config_files"; then
14330   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14331 fi
14332
14333 if test -n "$ac_config_headers"; then
14334   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14335 fi
14336
14337 if test -n "$ac_config_links"; then
14338   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14339 fi
14340
14341 if test -n "$ac_config_commands"; then
14342   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14343 fi
14344
14345 cat >>$CONFIG_STATUS <<\_ACEOF
14346
14347 ac_cs_usage="\
14348 \`$as_me' instantiates files from templates according to the
14349 current configuration.
14350
14351 Usage: $0 [OPTIONS] [FILE]...
14352
14353   -h, --help       print this help, then exit
14354   -V, --version    print version number, then exit
14355   -q, --quiet      do not print progress messages
14356   -d, --debug      don't remove temporary files
14357       --recheck    update $as_me by reconfiguring in the same conditions
14358   --file=FILE[:TEMPLATE]
14359                    instantiate the configuration file FILE
14360   --header=FILE[:TEMPLATE]
14361                    instantiate the configuration header FILE
14362
14363 Configuration files:
14364 $config_files
14365
14366 Configuration headers:
14367 $config_headers
14368
14369 Report bugs to <bug-autoconf@gnu.org>."
14370 _ACEOF
14371
14372 cat >>$CONFIG_STATUS <<_ACEOF
14373 ac_cs_version="\\
14374 config.status
14375 configured by $0, generated by GNU Autoconf 2.59,
14376   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14377
14378 Copyright (C) 2003 Free Software Foundation, Inc.
14379 This config.status script is free software; the Free Software Foundation
14380 gives unlimited permission to copy, distribute and modify it."
14381 srcdir=$srcdir
14382 INSTALL="$INSTALL"
14383 _ACEOF
14384
14385 cat >>$CONFIG_STATUS <<\_ACEOF
14386 # If no file are specified by the user, then we need to provide default
14387 # value.  By we need to know if files were specified by the user.
14388 ac_need_defaults=:
14389 while test $# != 0
14390 do
14391   case $1 in
14392   --*=*)
14393     ac_option=`expr "x$1" : 'x\([^=]*\)='`
14394     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14395     ac_shift=:
14396     ;;
14397   -*)
14398     ac_option=$1
14399     ac_optarg=$2
14400     ac_shift=shift
14401     ;;
14402   *) # This is not an option, so the user has probably given explicit
14403      # arguments.
14404      ac_option=$1
14405      ac_need_defaults=false;;
14406   esac
14407
14408   case $ac_option in
14409   # Handling of the options.
14410 _ACEOF
14411 cat >>$CONFIG_STATUS <<\_ACEOF
14412   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14413     ac_cs_recheck=: ;;
14414   --version | --vers* | -V )
14415     echo "$ac_cs_version"; exit 0 ;;
14416   --he | --h)
14417     # Conflict between --help and --header
14418     { { echo "$as_me:$LINENO: error: ambiguous option: $1
14419 Try \`$0 --help' for more information." >&5
14420 echo "$as_me: error: ambiguous option: $1
14421 Try \`$0 --help' for more information." >&2;}
14422    { (exit 1); exit 1; }; };;
14423   --help | --hel | -h )
14424     echo "$ac_cs_usage"; exit 0 ;;
14425   --debug | --d* | -d )
14426     debug=: ;;
14427   --file | --fil | --fi | --f )
14428     $ac_shift
14429     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
14430     ac_need_defaults=false;;
14431   --header | --heade | --head | --hea )
14432     $ac_shift
14433     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
14434     ac_need_defaults=false;;
14435   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14436   | -silent | --silent | --silen | --sile | --sil | --si | --s)
14437     ac_cs_silent=: ;;
14438
14439   # This is an error.
14440   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
14441 Try \`$0 --help' for more information." >&5
14442 echo "$as_me: error: unrecognized option: $1
14443 Try \`$0 --help' for more information." >&2;}
14444    { (exit 1); exit 1; }; } ;;
14445
14446   *) ac_config_targets="$ac_config_targets $1" ;;
14447
14448   esac
14449   shift
14450 done
14451
14452 ac_configure_extra_args=
14453
14454 if $ac_cs_silent; then
14455   exec 6>/dev/null
14456   ac_configure_extra_args="$ac_configure_extra_args --silent"
14457 fi
14458
14459 _ACEOF
14460 cat >>$CONFIG_STATUS <<_ACEOF
14461 if \$ac_cs_recheck; then
14462   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
14463   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14464 fi
14465
14466 _ACEOF
14467
14468
14469
14470
14471
14472 cat >>$CONFIG_STATUS <<\_ACEOF
14473 for ac_config_target in $ac_config_targets
14474 do
14475   case "$ac_config_target" in
14476   # Handling of arguments.
14477   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
14478   "packages.mk" ) CONFIG_FILES="$CONFIG_FILES packages.mk:packages_in.mk" ;;
14479   "sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
14480   "cmd.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd.src/Makefile" ;;
14481   "s51.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES s51.src/Makefile" ;;
14482   "avr.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES avr.src/Makefile" ;;
14483   "z80.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES z80.src/Makefile" ;;
14484   "hc08.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hc08.src/Makefile" ;;
14485   "xa.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES xa.src/Makefile" ;;
14486   "gui.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/Makefile" ;;
14487   "gui.src/serio.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/serio.src/Makefile" ;;
14488   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
14489   "ddconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ddconfig.h:ddconfig_in.h" ;;
14490   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
14491 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14492    { (exit 1); exit 1; }; };;
14493   esac
14494 done
14495
14496 # If the user did not use the arguments to specify the items to instantiate,
14497 # then the envvar interface is used.  Set only those that are not.
14498 # We use the long form for the default assignment because of an extremely
14499 # bizarre bug on SunOS 4.1.3.
14500 if $ac_need_defaults; then
14501   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14502   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14503 fi
14504
14505 # Have a temporary directory for convenience.  Make it in the build tree
14506 # simply because there is no reason to put it here, and in addition,
14507 # creating and moving files from /tmp can sometimes cause problems.
14508 # Create a temporary directory, and hook for its removal unless debugging.
14509 $debug ||
14510 {
14511   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14512   trap '{ (exit 1); exit 1; }' 1 2 13 15
14513 }
14514
14515 # Create a (secure) tmp directory for tmp files.
14516
14517 {
14518   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
14519   test -n "$tmp" && test -d "$tmp"
14520 }  ||
14521 {
14522   tmp=./confstat$$-$RANDOM
14523   (umask 077 && mkdir $tmp)
14524 } ||
14525 {
14526    echo "$me: cannot create a temporary directory in ." >&2
14527    { (exit 1); exit 1; }
14528 }
14529
14530 _ACEOF
14531
14532 cat >>$CONFIG_STATUS <<_ACEOF
14533
14534 #
14535 # CONFIG_FILES section.
14536 #
14537
14538 # No need to generate the scripts if there are no CONFIG_FILES.
14539 # This happens for instance when ./config.status config.h
14540 if test -n "\$CONFIG_FILES"; then
14541   # Protect against being on the right side of a sed subst in config.status.
14542   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14543    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14544 s,@SHELL@,$SHELL,;t t
14545 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14546 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14547 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14548 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14549 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14550 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14551 s,@exec_prefix@,$exec_prefix,;t t
14552 s,@prefix@,$prefix,;t t
14553 s,@program_transform_name@,$program_transform_name,;t t
14554 s,@bindir@,$bindir,;t t
14555 s,@sbindir@,$sbindir,;t t
14556 s,@libexecdir@,$libexecdir,;t t
14557 s,@datadir@,$datadir,;t t
14558 s,@sysconfdir@,$sysconfdir,;t t
14559 s,@sharedstatedir@,$sharedstatedir,;t t
14560 s,@localstatedir@,$localstatedir,;t t
14561 s,@libdir@,$libdir,;t t
14562 s,@includedir@,$includedir,;t t
14563 s,@oldincludedir@,$oldincludedir,;t t
14564 s,@infodir@,$infodir,;t t
14565 s,@mandir@,$mandir,;t t
14566 s,@build_alias@,$build_alias,;t t
14567 s,@host_alias@,$host_alias,;t t
14568 s,@target_alias@,$target_alias,;t t
14569 s,@DEFS@,$DEFS,;t t
14570 s,@ECHO_C@,$ECHO_C,;t t
14571 s,@ECHO_N@,$ECHO_N,;t t
14572 s,@ECHO_T@,$ECHO_T,;t t
14573 s,@LIBS@,$LIBS,;t t
14574 s,@AWK@,$AWK,;t t
14575 s,@VERSION@,$VERSION,;t t
14576 s,@VERSIONHI@,$VERSIONHI,;t t
14577 s,@VERSIONLO@,$VERSIONLO,;t t
14578 s,@VERSIONP@,$VERSIONP,;t t
14579 s,@docdir@,$docdir,;t t
14580 s,@enable_ucsim@,$enable_ucsim,;t t
14581 s,@enable_dlso@,$enable_dlso,;t t
14582 s,@enable_51@,$enable_51,;t t
14583 s,@enable_avr@,$enable_avr,;t t
14584 s,@enable_z80@,$enable_z80,;t t
14585 s,@enable_hc08@,$enable_hc08,;t t
14586 s,@enable_xa@,$enable_xa,;t t
14587 s,@enable_serio@,$enable_serio,;t t
14588 s,@CXX@,$CXX,;t t
14589 s,@CXXFLAGS@,$CXXFLAGS,;t t
14590 s,@LDFLAGS@,$LDFLAGS,;t t
14591 s,@CPPFLAGS@,$CPPFLAGS,;t t
14592 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
14593 s,@EXEEXT@,$EXEEXT,;t t
14594 s,@OBJEXT@,$OBJEXT,;t t
14595 s,@CXXCPP@,$CXXCPP,;t t
14596 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14597 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14598 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14599 s,@RANLIB@,$RANLIB,;t t
14600 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14601 s,@STRIP@,$STRIP,;t t
14602 s,@build@,$build,;t t
14603 s,@build_cpu@,$build_cpu,;t t
14604 s,@build_vendor@,$build_vendor,;t t
14605 s,@build_os@,$build_os,;t t
14606 s,@host@,$host,;t t
14607 s,@host_cpu@,$host_cpu,;t t
14608 s,@host_vendor@,$host_vendor,;t t
14609 s,@host_os@,$host_os,;t t
14610 s,@CC@,$CC,;t t
14611 s,@CFLAGS@,$CFLAGS,;t t
14612 s,@ac_ct_CC@,$ac_ct_CC,;t t
14613 s,@LN_S@,$LN_S,;t t
14614 s,@ECHO@,$ECHO,;t t
14615 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
14616 s,@CPP@,$CPP,;t t
14617 s,@EGREP@,$EGREP,;t t
14618 s,@LIBTOOL@,$LIBTOOL,;t t
14619 s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
14620 s,@LEX@,$LEX,;t t
14621 s,@LEXLIB@,$LEXLIB,;t t
14622 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
14623 s,@YACC@,$YACC,;t t
14624 s,@BISON_PLUS_PLUS@,$BISON_PLUS_PLUS,;t t
14625 s,@dl_ok@,$dl_ok,;t t
14626 s,@DL@,$DL,;t t
14627 s,@panel_ok@,$panel_ok,;t t
14628 s,@curses_ok@,$curses_ok,;t t
14629 s,@CURSES_LIBS@,$CURSES_LIBS,;t t
14630 s,@M_OR_MM@,$M_OR_MM,;t t
14631 s,@SHAREDLIB@,$SHAREDLIB,;t t
14632 s,@PICOPT@,$PICOPT,;t t
14633 s,@dlso_ok@,$dlso_ok,;t t
14634 s,@LIBOBJS@,$LIBOBJS,;t t
14635 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
14636 CEOF
14637
14638 _ACEOF
14639
14640   cat >>$CONFIG_STATUS <<\_ACEOF
14641   # Split the substitutions into bite-sized pieces for seds with
14642   # small command number limits, like on Digital OSF/1 and HP-UX.
14643   ac_max_sed_lines=48
14644   ac_sed_frag=1 # Number of current file.
14645   ac_beg=1 # First line for current file.
14646   ac_end=$ac_max_sed_lines # Line after last line for current file.
14647   ac_more_lines=:
14648   ac_sed_cmds=
14649   while $ac_more_lines; do
14650     if test $ac_beg -gt 1; then
14651       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14652     else
14653       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14654     fi
14655     if test ! -s $tmp/subs.frag; then
14656       ac_more_lines=false
14657     else
14658       # The purpose of the label and of the branching condition is to
14659       # speed up the sed processing (if there are no `@' at all, there
14660       # is no need to browse any of the substitutions).
14661       # These are the two extra sed commands mentioned above.
14662       (echo ':t
14663   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14664       if test -z "$ac_sed_cmds"; then
14665         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14666       else
14667         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14668       fi
14669       ac_sed_frag=`expr $ac_sed_frag + 1`
14670       ac_beg=$ac_end
14671       ac_end=`expr $ac_end + $ac_max_sed_lines`
14672     fi
14673   done
14674   if test -z "$ac_sed_cmds"; then
14675     ac_sed_cmds=cat
14676   fi
14677 fi # test -n "$CONFIG_FILES"
14678
14679 _ACEOF
14680 cat >>$CONFIG_STATUS <<\_ACEOF
14681 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14682   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14683   case $ac_file in
14684   - | *:- | *:-:* ) # input from stdin
14685         cat >$tmp/stdin
14686         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14687         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14688   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14689         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14690   * )   ac_file_in=$ac_file.in ;;
14691   esac
14692
14693   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14694   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
14695 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14696          X"$ac_file" : 'X\(//\)[^/]' \| \
14697          X"$ac_file" : 'X\(//\)$' \| \
14698          X"$ac_file" : 'X\(/\)' \| \
14699          .     : '\(.\)' 2>/dev/null ||
14700 echo X"$ac_file" |
14701     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14702           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14703           /^X\(\/\/\)$/{ s//\1/; q; }
14704           /^X\(\/\).*/{ s//\1/; q; }
14705           s/.*/./; q'`
14706   { if $as_mkdir_p; then
14707     mkdir -p "$ac_dir"
14708   else
14709     as_dir="$ac_dir"
14710     as_dirs=
14711     while test ! -d "$as_dir"; do
14712       as_dirs="$as_dir $as_dirs"
14713       as_dir=`(dirname "$as_dir") 2>/dev/null ||
14714 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14715          X"$as_dir" : 'X\(//\)[^/]' \| \
14716          X"$as_dir" : 'X\(//\)$' \| \
14717          X"$as_dir" : 'X\(/\)' \| \
14718          .     : '\(.\)' 2>/dev/null ||
14719 echo X"$as_dir" |
14720     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14721           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14722           /^X\(\/\/\)$/{ s//\1/; q; }
14723           /^X\(\/\).*/{ s//\1/; q; }
14724           s/.*/./; q'`
14725     done
14726     test ! -n "$as_dirs" || mkdir $as_dirs
14727   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
14728 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
14729    { (exit 1); exit 1; }; }; }
14730
14731   ac_builddir=.
14732
14733 if test "$ac_dir" != .; then
14734   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
14735   # A "../" for each directory in $ac_dir_suffix.
14736   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
14737 else
14738   ac_dir_suffix= ac_top_builddir=
14739 fi
14740
14741 case $srcdir in
14742   .)  # No --srcdir option.  We are building in place.
14743     ac_srcdir=.
14744     if test -z "$ac_top_builddir"; then
14745        ac_top_srcdir=.
14746     else
14747        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
14748     fi ;;
14749   [\\/]* | ?:[\\/]* )  # Absolute path.
14750     ac_srcdir=$srcdir$ac_dir_suffix;
14751     ac_top_srcdir=$srcdir ;;
14752   *) # Relative path.
14753     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
14754     ac_top_srcdir=$ac_top_builddir$srcdir ;;
14755 esac
14756
14757 # Do not use `cd foo && pwd` to compute absolute paths, because
14758 # the directories may not exist.
14759 case `pwd` in
14760 .) ac_abs_builddir="$ac_dir";;
14761 *)
14762   case "$ac_dir" in
14763   .) ac_abs_builddir=`pwd`;;
14764   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
14765   *) ac_abs_builddir=`pwd`/"$ac_dir";;
14766   esac;;
14767 esac
14768 case $ac_abs_builddir in
14769 .) ac_abs_top_builddir=${ac_top_builddir}.;;
14770 *)
14771   case ${ac_top_builddir}. in
14772   .) ac_abs_top_builddir=$ac_abs_builddir;;
14773   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
14774   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
14775   esac;;
14776 esac
14777 case $ac_abs_builddir in
14778 .) ac_abs_srcdir=$ac_srcdir;;
14779 *)
14780   case $ac_srcdir in
14781   .) ac_abs_srcdir=$ac_abs_builddir;;
14782   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
14783   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
14784   esac;;
14785 esac
14786 case $ac_abs_builddir in
14787 .) ac_abs_top_srcdir=$ac_top_srcdir;;
14788 *)
14789   case $ac_top_srcdir in
14790   .) ac_abs_top_srcdir=$ac_abs_builddir;;
14791   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
14792   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
14793   esac;;
14794 esac
14795
14796
14797   case $INSTALL in
14798   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14799   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
14800   esac
14801
14802   # Let's still pretend it is `configure' which instantiates (i.e., don't
14803   # use $as_me), people would be surprised to read:
14804   #    /* config.h.  Generated by config.status.  */
14805   if test x"$ac_file" = x-; then
14806     configure_input=
14807   else
14808     configure_input="$ac_file.  "
14809   fi
14810   configure_input=$configure_input"Generated from `echo $ac_file_in |
14811                                      sed 's,.*/,,'` by configure."
14812
14813   # First look for the input files in the build tree, otherwise in the
14814   # src tree.
14815   ac_file_inputs=`IFS=:
14816     for f in $ac_file_in; do
14817       case $f in
14818       -) echo $tmp/stdin ;;
14819       [\\/$]*)
14820          # Absolute (can't be DOS-style, as IFS=:)
14821          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
14822 echo "$as_me: error: cannot find input file: $f" >&2;}
14823    { (exit 1); exit 1; }; }
14824          echo "$f";;
14825       *) # Relative
14826          if test -f "$f"; then
14827            # Build tree
14828            echo "$f"
14829          elif test -f "$srcdir/$f"; then
14830            # Source tree
14831            echo "$srcdir/$f"
14832          else
14833            # /dev/null tree
14834            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
14835 echo "$as_me: error: cannot find input file: $f" >&2;}
14836    { (exit 1); exit 1; }; }
14837          fi;;
14838       esac
14839     done` || { (exit 1); exit 1; }
14840
14841   if test x"$ac_file" != x-; then
14842     { echo "$as_me:$LINENO: creating $ac_file" >&5
14843 echo "$as_me: creating $ac_file" >&6;}
14844     rm -f "$ac_file"
14845   fi
14846 _ACEOF
14847 cat >>$CONFIG_STATUS <<_ACEOF
14848   sed "$ac_vpsub
14849 $extrasub
14850 _ACEOF
14851 cat >>$CONFIG_STATUS <<\_ACEOF
14852 :t
14853 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14854 s,@configure_input@,$configure_input,;t t
14855 s,@srcdir@,$ac_srcdir,;t t
14856 s,@abs_srcdir@,$ac_abs_srcdir,;t t
14857 s,@top_srcdir@,$ac_top_srcdir,;t t
14858 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
14859 s,@builddir@,$ac_builddir,;t t
14860 s,@abs_builddir@,$ac_abs_builddir,;t t
14861 s,@top_builddir@,$ac_top_builddir,;t t
14862 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
14863 s,@INSTALL@,$ac_INSTALL,;t t
14864 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14865   rm -f $tmp/stdin
14866   if test x"$ac_file" != x-; then
14867     mv $tmp/out $ac_file
14868   else
14869     cat $tmp/out
14870     rm -f $tmp/out
14871   fi
14872
14873 done
14874 _ACEOF
14875 cat >>$CONFIG_STATUS <<\_ACEOF
14876
14877 #
14878 # CONFIG_HEADER section.
14879 #
14880
14881 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14882 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14883 #
14884 # ac_d sets the value in "#define NAME VALUE" lines.
14885 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
14886 ac_dB='[         ].*$,\1#\2'
14887 ac_dC=' '
14888 ac_dD=',;t'
14889 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14890 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14891 ac_uB='$,\1#\2define\3'
14892 ac_uC=' '
14893 ac_uD=',;t'
14894
14895 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14896   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14897   case $ac_file in
14898   - | *:- | *:-:* ) # input from stdin
14899         cat >$tmp/stdin
14900         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14901         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14902   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14903         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14904   * )   ac_file_in=$ac_file.in ;;
14905   esac
14906
14907   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
14908 echo "$as_me: creating $ac_file" >&6;}
14909
14910   # First look for the input files in the build tree, otherwise in the
14911   # src tree.
14912   ac_file_inputs=`IFS=:
14913     for f in $ac_file_in; do
14914       case $f in
14915       -) echo $tmp/stdin ;;
14916       [\\/$]*)
14917          # Absolute (can't be DOS-style, as IFS=:)
14918          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
14919 echo "$as_me: error: cannot find input file: $f" >&2;}
14920    { (exit 1); exit 1; }; }
14921          # Do quote $f, to prevent DOS paths from being IFS'd.
14922          echo "$f";;
14923       *) # Relative
14924          if test -f "$f"; then
14925            # Build tree
14926            echo "$f"
14927          elif test -f "$srcdir/$f"; then
14928            # Source tree
14929            echo "$srcdir/$f"
14930          else
14931            # /dev/null tree
14932            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
14933 echo "$as_me: error: cannot find input file: $f" >&2;}
14934    { (exit 1); exit 1; }; }
14935          fi;;
14936       esac
14937     done` || { (exit 1); exit 1; }
14938   # Remove the trailing spaces.
14939   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
14940
14941 _ACEOF
14942
14943 # Transform confdefs.h into two sed scripts, `conftest.defines' and
14944 # `conftest.undefs', that substitutes the proper values into
14945 # config.h.in to produce config.h.  The first handles `#define'
14946 # templates, and the second `#undef' templates.
14947 # And first: Protect against being on the right side of a sed subst in
14948 # config.status.  Protect against being in an unquoted here document
14949 # in config.status.
14950 rm -f conftest.defines conftest.undefs
14951 # Using a here document instead of a string reduces the quoting nightmare.
14952 # Putting comments in sed scripts is not portable.
14953 #
14954 # `end' is used to avoid that the second main sed command (meant for
14955 # 0-ary CPP macros) applies to n-ary macro definitions.
14956 # See the Autoconf documentation for `clear'.
14957 cat >confdef2sed.sed <<\_ACEOF
14958 s/[\\&,]/\\&/g
14959 s,[\\$`],\\&,g
14960 t clear
14961 : clear
14962 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
14963 t end
14964 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
14965 : end
14966 _ACEOF
14967 # If some macros were called several times there might be several times
14968 # the same #defines, which is useless.  Nevertheless, we may not want to
14969 # sort them, since we want the *last* AC-DEFINE to be honored.
14970 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
14971 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
14972 rm -f confdef2sed.sed
14973
14974 # This sed command replaces #undef with comments.  This is necessary, for
14975 # example, in the case of _POSIX_SOURCE, which is predefined and required
14976 # on some systems where configure will not decide to define it.
14977 cat >>conftest.undefs <<\_ACEOF
14978 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
14979 _ACEOF
14980
14981 # Break up conftest.defines because some shells have a limit on the size
14982 # of here documents, and old seds have small limits too (100 cmds).
14983 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
14984 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
14985 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
14986 echo '  :' >>$CONFIG_STATUS
14987 rm -f conftest.tail
14988 while grep . conftest.defines >/dev/null
14989 do
14990   # Write a limited-size here document to $tmp/defines.sed.
14991   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
14992   # Speed up: don't consider the non `#define' lines.
14993   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
14994   # Work around the forget-to-reset-the-flag bug.
14995   echo 't clr' >>$CONFIG_STATUS
14996   echo ': clr' >>$CONFIG_STATUS
14997   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
14998   echo 'CEOF
14999   sed -f $tmp/defines.sed $tmp/in >$tmp/out
15000   rm -f $tmp/in
15001   mv $tmp/out $tmp/in
15002 ' >>$CONFIG_STATUS
15003   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
15004   rm -f conftest.defines
15005   mv conftest.tail conftest.defines
15006 done
15007 rm -f conftest.defines
15008 echo '  fi # grep' >>$CONFIG_STATUS
15009 echo >>$CONFIG_STATUS
15010
15011 # Break up conftest.undefs because some shells have a limit on the size
15012 # of here documents, and old seds have small limits too (100 cmds).
15013 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
15014 rm -f conftest.tail
15015 while grep . conftest.undefs >/dev/null
15016 do
15017   # Write a limited-size here document to $tmp/undefs.sed.
15018   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
15019   # Speed up: don't consider the non `#undef'
15020   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
15021   # Work around the forget-to-reset-the-flag bug.
15022   echo 't clr' >>$CONFIG_STATUS
15023   echo ': clr' >>$CONFIG_STATUS
15024   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
15025   echo 'CEOF
15026   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
15027   rm -f $tmp/in
15028   mv $tmp/out $tmp/in
15029 ' >>$CONFIG_STATUS
15030   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
15031   rm -f conftest.undefs
15032   mv conftest.tail conftest.undefs
15033 done
15034 rm -f conftest.undefs
15035
15036 cat >>$CONFIG_STATUS <<\_ACEOF
15037   # Let's still pretend it is `configure' which instantiates (i.e., don't
15038   # use $as_me), people would be surprised to read:
15039   #    /* config.h.  Generated by config.status.  */
15040   if test x"$ac_file" = x-; then
15041     echo "/* Generated by configure.  */" >$tmp/config.h
15042   else
15043     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
15044   fi
15045   cat $tmp/in >>$tmp/config.h
15046   rm -f $tmp/in
15047   if test x"$ac_file" != x-; then
15048     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
15049       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
15050 echo "$as_me: $ac_file is unchanged" >&6;}
15051     else
15052       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
15053 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15054          X"$ac_file" : 'X\(//\)[^/]' \| \
15055          X"$ac_file" : 'X\(//\)$' \| \
15056          X"$ac_file" : 'X\(/\)' \| \
15057          .     : '\(.\)' 2>/dev/null ||
15058 echo X"$ac_file" |
15059     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15060           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15061           /^X\(\/\/\)$/{ s//\1/; q; }
15062           /^X\(\/\).*/{ s//\1/; q; }
15063           s/.*/./; q'`
15064       { if $as_mkdir_p; then
15065     mkdir -p "$ac_dir"
15066   else
15067     as_dir="$ac_dir"
15068     as_dirs=
15069     while test ! -d "$as_dir"; do
15070       as_dirs="$as_dir $as_dirs"
15071       as_dir=`(dirname "$as_dir") 2>/dev/null ||
15072 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15073          X"$as_dir" : 'X\(//\)[^/]' \| \
15074          X"$as_dir" : 'X\(//\)$' \| \
15075          X"$as_dir" : 'X\(/\)' \| \
15076          .     : '\(.\)' 2>/dev/null ||
15077 echo X"$as_dir" |
15078     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15079           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15080           /^X\(\/\/\)$/{ s//\1/; q; }
15081           /^X\(\/\).*/{ s//\1/; q; }
15082           s/.*/./; q'`
15083     done
15084     test ! -n "$as_dirs" || mkdir $as_dirs
15085   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
15086 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
15087    { (exit 1); exit 1; }; }; }
15088
15089       rm -f $ac_file
15090       mv $tmp/config.h $ac_file
15091     fi
15092   else
15093     cat $tmp/config.h
15094     rm -f $tmp/config.h
15095   fi
15096 done
15097 _ACEOF
15098
15099 cat >>$CONFIG_STATUS <<\_ACEOF
15100
15101 { (exit 0); exit 0; }
15102 _ACEOF
15103 chmod +x $CONFIG_STATUS
15104 ac_clean_files=$ac_clean_files_save
15105
15106
15107 # configure is writing to config.log, and then calls config.status.
15108 # config.status does its own redirection, appending to config.log.
15109 # Unfortunately, on DOS this fails, as config.log is still kept open
15110 # by configure, so config.status won't be able to write to it; its
15111 # output is simply discarded.  So we exec the FD to /dev/null,
15112 # effectively closing config.log, so it can be properly (re)opened and
15113 # appended to by config.status.  When coming back to configure, we
15114 # need to make the FD available again.
15115 if test "$no_create" != yes; then
15116   ac_cs_success=:
15117   ac_config_status_args=
15118   test "$silent" = yes &&
15119     ac_config_status_args="$ac_config_status_args --quiet"
15120   exec 5>/dev/null
15121   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15122   exec 5>>config.log
15123   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15124   # would make configure fail if this is the last instruction.
15125   $ac_cs_success || { (exit 1); exit 1; }
15126 fi
15127
15128
15129 #gui.src/portmon.src/Makefile
15130
15131
15132 # End of configure/configure.in