New target "hc08" for the Motorola 68hc08 family of micros
[fw/sdcc] / sim / ucsim / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.57.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21   set -o posix
22 fi
23
24 # Support unset when possible.
25 if (FOO=FOO; unset FOO) >/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 -n "`(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   as_mkdir_p=false
222 fi
223
224 as_executable_p="test -f"
225
226 # Sed expression to map a string onto a valid CPP name.
227 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229 # Sed expression to map a string onto a valid variable name.
230 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
231
232
233 # IFS
234 # We need space, tab and new line, in precisely that order.
235 as_nl='
236 '
237 IFS="   $as_nl"
238
239 # CDPATH.
240 $as_unset CDPATH
241
242
243 # Find the correct PATH separator.  Usually this is `:', but
244 # DJGPP uses `;' like DOS.
245 if test "X${PATH_SEPARATOR+set}" != Xset; then
246   UNAME=${UNAME-`uname 2>/dev/null`}
247   case X$UNAME in
248     *-DOS) lt_cv_sys_path_separator=';' ;;
249     *)     lt_cv_sys_path_separator=':' ;;
250   esac
251   PATH_SEPARATOR=$lt_cv_sys_path_separator
252 fi
253
254
255 # Check that we are running under the correct shell.
256 SHELL=${CONFIG_SHELL-/bin/sh}
257
258 case X$ECHO in
259 X*--fallback-echo)
260   # Remove one level of quotation (which was required for Make).
261   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
262   ;;
263 esac
264
265 echo=${ECHO-echo}
266 if test "X$1" = X--no-reexec; then
267   # Discard the --no-reexec flag, and continue.
268   shift
269 elif test "X$1" = X--fallback-echo; then
270   # Avoid inline document here, it may be left over
271   :
272 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
273   # Yippee, $echo works!
274   :
275 else
276   # Restart under the correct shell.
277   exec $SHELL "$0" --no-reexec ${1+"$@"}
278 fi
279
280 if test "X$1" = X--fallback-echo; then
281   # used as fallback echo
282   shift
283   cat <<EOF
284
285 EOF
286   exit 0
287 fi
288
289 # The HP-UX ksh and POSIX shell print the target directory to stdout
290 # if CDPATH is set.
291 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
292
293 if test -z "$ECHO"; then
294 if test "X${echo_test_string+set}" != Xset; then
295 # find a string as large as possible, as long as the shell can cope with it
296   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
297     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
298     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
299        echo_test_string="`eval $cmd`" &&
300        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
301     then
302       break
303     fi
304   done
305 fi
306
307 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
308    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
309    test "X$echo_testing_string" = "X$echo_test_string"; then
310   :
311 else
312   # The Solaris, AIX, and Digital Unix default echo programs unquote
313   # backslashes.  This makes it impossible to quote backslashes using
314   #   echo "$something" | sed 's/\\/\\\\/g'
315   #
316   # So, first we look for a working echo in the user's PATH.
317
318   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
319   for dir in $PATH /usr/ucb; do
320     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
321        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
322        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
323        test "X$echo_testing_string" = "X$echo_test_string"; then
324       echo="$dir/echo"
325       break
326     fi
327   done
328   IFS="$save_ifs"
329
330   if test "X$echo" = Xecho; then
331     # We didn't find a better echo, so look for alternatives.
332     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
333        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
334        test "X$echo_testing_string" = "X$echo_test_string"; then
335       # This shell has a builtin print -r that does the trick.
336       echo='print -r'
337     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
338          test "X$CONFIG_SHELL" != X/bin/ksh; then
339       # If we have ksh, try running configure again with it.
340       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
341       export ORIGINAL_CONFIG_SHELL
342       CONFIG_SHELL=/bin/ksh
343       export CONFIG_SHELL
344       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
345     else
346       # Try using printf.
347       echo='printf %s\n'
348       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
349          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
350          test "X$echo_testing_string" = "X$echo_test_string"; then
351         # Cool, printf works
352         :
353       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
354            test "X$echo_testing_string" = 'X\t' &&
355            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
356            test "X$echo_testing_string" = "X$echo_test_string"; then
357         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
358         export CONFIG_SHELL
359         SHELL="$CONFIG_SHELL"
360         export SHELL
361         echo="$CONFIG_SHELL $0 --fallback-echo"
362       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
363            test "X$echo_testing_string" = 'X\t' &&
364            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
365            test "X$echo_testing_string" = "X$echo_test_string"; then
366         echo="$CONFIG_SHELL $0 --fallback-echo"
367       else
368         # maybe with a smaller string...
369         prev=:
370
371         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
372           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
373           then
374             break
375           fi
376           prev="$cmd"
377         done
378
379         if test "$prev" != 'sed 50q "$0"'; then
380           echo_test_string=`eval $prev`
381           export echo_test_string
382           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
383         else
384           # Oops.  We lost completely, so just stick with echo.
385           echo=echo
386         fi
387       fi
388     fi
389   fi
390 fi
391 fi
392
393 # Copy echo and quote the copy suitably for passing to libtool from
394 # the Makefile, instead of quoting the original, which is used later.
395 ECHO=$echo
396 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
397    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
398 fi
399
400
401
402 # Name of the host.
403 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
404 # so uname gets run too.
405 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
406
407 exec 6>&1
408
409 #
410 # Initializations.
411 #
412 ac_default_prefix=/usr/local
413 ac_config_libobj_dir=.
414 cross_compiling=no
415 subdirs=
416 MFLAGS=
417 MAKEFLAGS=
418 SHELL=${CONFIG_SHELL-/bin/sh}
419
420 # Maximum number of lines to put in a shell here document.
421 # This variable seems obsolete.  It should probably be removed, and
422 # only ac_max_sed_lines should be used.
423 : ${ac_max_here_lines=38}
424
425 # Identity of this package.
426 PACKAGE_NAME=
427 PACKAGE_TARNAME=
428 PACKAGE_VERSION=
429 PACKAGE_STRING=
430 PACKAGE_BUGREPORT=
431
432 ac_unique_file=".version"
433 # Factoring default headers for most tests.
434 ac_includes_default="\
435 #include <stdio.h>
436 #if HAVE_SYS_TYPES_H
437 # include <sys/types.h>
438 #endif
439 #if HAVE_SYS_STAT_H
440 # include <sys/stat.h>
441 #endif
442 #if STDC_HEADERS
443 # include <stdlib.h>
444 # include <stddef.h>
445 #else
446 # if HAVE_STDLIB_H
447 #  include <stdlib.h>
448 # endif
449 #endif
450 #if HAVE_STRING_H
451 # if !STDC_HEADERS && HAVE_MEMORY_H
452 #  include <memory.h>
453 # endif
454 # include <string.h>
455 #endif
456 #if HAVE_STRINGS_H
457 # include <strings.h>
458 #endif
459 #if HAVE_INTTYPES_H
460 # include <inttypes.h>
461 #else
462 # if HAVE_STDINT_H
463 #  include <stdint.h>
464 # endif
465 #endif
466 #if HAVE_UNISTD_H
467 # include <unistd.h>
468 #endif"
469
470 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 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 dl_ok DL panel_ok curses_ok CURSES_LIBS M_OR_MM SHAREDLIB PICOPT dlso_ok LIBOBJS LTLIBOBJS'
471 ac_subst_files=''
472
473 # Initialize some variables set by options.
474 ac_init_help=
475 ac_init_version=false
476 # The variables have the same names as the options, with
477 # dashes changed to underlines.
478 cache_file=/dev/null
479 exec_prefix=NONE
480 no_create=
481 no_recursion=
482 prefix=NONE
483 program_prefix=NONE
484 program_suffix=NONE
485 program_transform_name=s,x,x,
486 silent=
487 site=
488 srcdir=
489 verbose=
490 x_includes=NONE
491 x_libraries=NONE
492
493 # Installation directory options.
494 # These are left unexpanded so users can "make install exec_prefix=/foo"
495 # and all the variables that are supposed to be based on exec_prefix
496 # by default will actually change.
497 # Use braces instead of parens because sh, perl, etc. also accept them.
498 bindir='${exec_prefix}/bin'
499 sbindir='${exec_prefix}/sbin'
500 libexecdir='${exec_prefix}/libexec'
501 datadir='${prefix}/share'
502 sysconfdir='${prefix}/etc'
503 sharedstatedir='${prefix}/com'
504 localstatedir='${prefix}/var'
505 libdir='${exec_prefix}/lib'
506 includedir='${prefix}/include'
507 oldincludedir='/usr/include'
508 infodir='${prefix}/info'
509 mandir='${prefix}/man'
510
511 ac_prev=
512 for ac_option
513 do
514   # If the previous option needs an argument, assign it.
515   if test -n "$ac_prev"; then
516     eval "$ac_prev=\$ac_option"
517     ac_prev=
518     continue
519   fi
520
521   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
522
523   # Accept the important Cygnus configure options, so we can diagnose typos.
524
525   case $ac_option in
526
527   -bindir | --bindir | --bindi | --bind | --bin | --bi)
528     ac_prev=bindir ;;
529   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
530     bindir=$ac_optarg ;;
531
532   -build | --build | --buil | --bui | --bu)
533     ac_prev=build_alias ;;
534   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
535     build_alias=$ac_optarg ;;
536
537   -cache-file | --cache-file | --cache-fil | --cache-fi \
538   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
539     ac_prev=cache_file ;;
540   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
541   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
542     cache_file=$ac_optarg ;;
543
544   --config-cache | -C)
545     cache_file=config.cache ;;
546
547   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
548     ac_prev=datadir ;;
549   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
550   | --da=*)
551     datadir=$ac_optarg ;;
552
553   -disable-* | --disable-*)
554     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
555     # Reject names that are not valid shell variable names.
556     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
557       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
558    { (exit 1); exit 1; }; }
559     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
560     eval "enable_$ac_feature=no" ;;
561
562   -enable-* | --enable-*)
563     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
564     # Reject names that are not valid shell variable names.
565     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
566       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
567    { (exit 1); exit 1; }; }
568     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
569     case $ac_option in
570       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
571       *) ac_optarg=yes ;;
572     esac
573     eval "enable_$ac_feature='$ac_optarg'" ;;
574
575   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
576   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
577   | --exec | --exe | --ex)
578     ac_prev=exec_prefix ;;
579   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
580   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
581   | --exec=* | --exe=* | --ex=*)
582     exec_prefix=$ac_optarg ;;
583
584   -gas | --gas | --ga | --g)
585     # Obsolete; use --with-gas.
586     with_gas=yes ;;
587
588   -help | --help | --hel | --he | -h)
589     ac_init_help=long ;;
590   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
591     ac_init_help=recursive ;;
592   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
593     ac_init_help=short ;;
594
595   -host | --host | --hos | --ho)
596     ac_prev=host_alias ;;
597   -host=* | --host=* | --hos=* | --ho=*)
598     host_alias=$ac_optarg ;;
599
600   -includedir | --includedir | --includedi | --included | --include \
601   | --includ | --inclu | --incl | --inc)
602     ac_prev=includedir ;;
603   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
604   | --includ=* | --inclu=* | --incl=* | --inc=*)
605     includedir=$ac_optarg ;;
606
607   -infodir | --infodir | --infodi | --infod | --info | --inf)
608     ac_prev=infodir ;;
609   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
610     infodir=$ac_optarg ;;
611
612   -libdir | --libdir | --libdi | --libd)
613     ac_prev=libdir ;;
614   -libdir=* | --libdir=* | --libdi=* | --libd=*)
615     libdir=$ac_optarg ;;
616
617   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
618   | --libexe | --libex | --libe)
619     ac_prev=libexecdir ;;
620   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
621   | --libexe=* | --libex=* | --libe=*)
622     libexecdir=$ac_optarg ;;
623
624   -localstatedir | --localstatedir | --localstatedi | --localstated \
625   | --localstate | --localstat | --localsta | --localst \
626   | --locals | --local | --loca | --loc | --lo)
627     ac_prev=localstatedir ;;
628   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
629   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
630   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
631     localstatedir=$ac_optarg ;;
632
633   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
634     ac_prev=mandir ;;
635   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
636     mandir=$ac_optarg ;;
637
638   -nfp | --nfp | --nf)
639     # Obsolete; use --without-fp.
640     with_fp=no ;;
641
642   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
643   | --no-cr | --no-c | -n)
644     no_create=yes ;;
645
646   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
647   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
648     no_recursion=yes ;;
649
650   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
651   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
652   | --oldin | --oldi | --old | --ol | --o)
653     ac_prev=oldincludedir ;;
654   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
655   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
656   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
657     oldincludedir=$ac_optarg ;;
658
659   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
660     ac_prev=prefix ;;
661   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
662     prefix=$ac_optarg ;;
663
664   -program-prefix | --program-prefix | --program-prefi | --program-pref \
665   | --program-pre | --program-pr | --program-p)
666     ac_prev=program_prefix ;;
667   -program-prefix=* | --program-prefix=* | --program-prefi=* \
668   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
669     program_prefix=$ac_optarg ;;
670
671   -program-suffix | --program-suffix | --program-suffi | --program-suff \
672   | --program-suf | --program-su | --program-s)
673     ac_prev=program_suffix ;;
674   -program-suffix=* | --program-suffix=* | --program-suffi=* \
675   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
676     program_suffix=$ac_optarg ;;
677
678   -program-transform-name | --program-transform-name \
679   | --program-transform-nam | --program-transform-na \
680   | --program-transform-n | --program-transform- \
681   | --program-transform | --program-transfor \
682   | --program-transfo | --program-transf \
683   | --program-trans | --program-tran \
684   | --progr-tra | --program-tr | --program-t)
685     ac_prev=program_transform_name ;;
686   -program-transform-name=* | --program-transform-name=* \
687   | --program-transform-nam=* | --program-transform-na=* \
688   | --program-transform-n=* | --program-transform-=* \
689   | --program-transform=* | --program-transfor=* \
690   | --program-transfo=* | --program-transf=* \
691   | --program-trans=* | --program-tran=* \
692   | --progr-tra=* | --program-tr=* | --program-t=*)
693     program_transform_name=$ac_optarg ;;
694
695   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
696   | -silent | --silent | --silen | --sile | --sil)
697     silent=yes ;;
698
699   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
700     ac_prev=sbindir ;;
701   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
702   | --sbi=* | --sb=*)
703     sbindir=$ac_optarg ;;
704
705   -sharedstatedir | --sharedstatedir | --sharedstatedi \
706   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
707   | --sharedst | --shareds | --shared | --share | --shar \
708   | --sha | --sh)
709     ac_prev=sharedstatedir ;;
710   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
711   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
712   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
713   | --sha=* | --sh=*)
714     sharedstatedir=$ac_optarg ;;
715
716   -site | --site | --sit)
717     ac_prev=site ;;
718   -site=* | --site=* | --sit=*)
719     site=$ac_optarg ;;
720
721   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
722     ac_prev=srcdir ;;
723   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
724     srcdir=$ac_optarg ;;
725
726   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
727   | --syscon | --sysco | --sysc | --sys | --sy)
728     ac_prev=sysconfdir ;;
729   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
730   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
731     sysconfdir=$ac_optarg ;;
732
733   -target | --target | --targe | --targ | --tar | --ta | --t)
734     ac_prev=target_alias ;;
735   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
736     target_alias=$ac_optarg ;;
737
738   -v | -verbose | --verbose | --verbos | --verbo | --verb)
739     verbose=yes ;;
740
741   -version | --version | --versio | --versi | --vers | -V)
742     ac_init_version=: ;;
743
744   -with-* | --with-*)
745     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
746     # Reject names that are not valid shell variable names.
747     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
748       { echo "$as_me: error: invalid package name: $ac_package" >&2
749    { (exit 1); exit 1; }; }
750     ac_package=`echo $ac_package| sed 's/-/_/g'`
751     case $ac_option in
752       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
753       *) ac_optarg=yes ;;
754     esac
755     eval "with_$ac_package='$ac_optarg'" ;;
756
757   -without-* | --without-*)
758     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
759     # Reject names that are not valid shell variable names.
760     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
761       { echo "$as_me: error: invalid package name: $ac_package" >&2
762    { (exit 1); exit 1; }; }
763     ac_package=`echo $ac_package | sed 's/-/_/g'`
764     eval "with_$ac_package=no" ;;
765
766   --x)
767     # Obsolete; use --with-x.
768     with_x=yes ;;
769
770   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
771   | --x-incl | --x-inc | --x-in | --x-i)
772     ac_prev=x_includes ;;
773   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
774   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
775     x_includes=$ac_optarg ;;
776
777   -x-libraries | --x-libraries | --x-librarie | --x-librari \
778   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
779     ac_prev=x_libraries ;;
780   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
781   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
782     x_libraries=$ac_optarg ;;
783
784   -*) { echo "$as_me: error: unrecognized option: $ac_option
785 Try \`$0 --help' for more information." >&2
786    { (exit 1); exit 1; }; }
787     ;;
788
789   *=*)
790     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
791     # Reject names that are not valid shell variable names.
792     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
793       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
794    { (exit 1); exit 1; }; }
795     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
796     eval "$ac_envvar='$ac_optarg'"
797     export $ac_envvar ;;
798
799   *)
800     # FIXME: should be removed in autoconf 3.0.
801     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
802     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
803       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
804     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
805     ;;
806
807   esac
808 done
809
810 if test -n "$ac_prev"; then
811   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
812   { echo "$as_me: error: missing argument to $ac_option" >&2
813    { (exit 1); exit 1; }; }
814 fi
815
816 # Be sure to have absolute paths.
817 for ac_var in exec_prefix prefix
818 do
819   eval ac_val=$`echo $ac_var`
820   case $ac_val in
821     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
822     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
823    { (exit 1); exit 1; }; };;
824   esac
825 done
826
827 # Be sure to have absolute paths.
828 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
829               localstatedir libdir includedir oldincludedir infodir mandir
830 do
831   eval ac_val=$`echo $ac_var`
832   case $ac_val in
833     [\\/$]* | ?:[\\/]* ) ;;
834     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
835    { (exit 1); exit 1; }; };;
836   esac
837 done
838
839 # There might be people who depend on the old broken behavior: `$host'
840 # used to hold the argument of --host etc.
841 # FIXME: To remove some day.
842 build=$build_alias
843 host=$host_alias
844 target=$target_alias
845
846 # FIXME: To remove some day.
847 if test "x$host_alias" != x; then
848   if test "x$build_alias" = x; then
849     cross_compiling=maybe
850     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
851     If a cross compiler is detected then cross compile mode will be used." >&2
852   elif test "x$build_alias" != "x$host_alias"; then
853     cross_compiling=yes
854   fi
855 fi
856
857 ac_tool_prefix=
858 test -n "$host_alias" && ac_tool_prefix=$host_alias-
859
860 test "$silent" = yes && exec 6>/dev/null
861
862
863 # Find the source files, if location was not specified.
864 if test -z "$srcdir"; then
865   ac_srcdir_defaulted=yes
866   # Try the directory containing this script, then its parent.
867   ac_confdir=`(dirname "$0") 2>/dev/null ||
868 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
869          X"$0" : 'X\(//\)[^/]' \| \
870          X"$0" : 'X\(//\)$' \| \
871          X"$0" : 'X\(/\)' \| \
872          .     : '\(.\)' 2>/dev/null ||
873 echo X"$0" |
874     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
875           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
876           /^X\(\/\/\)$/{ s//\1/; q; }
877           /^X\(\/\).*/{ s//\1/; q; }
878           s/.*/./; q'`
879   srcdir=$ac_confdir
880   if test ! -r $srcdir/$ac_unique_file; then
881     srcdir=..
882   fi
883 else
884   ac_srcdir_defaulted=no
885 fi
886 if test ! -r $srcdir/$ac_unique_file; then
887   if test "$ac_srcdir_defaulted" = yes; then
888     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
889    { (exit 1); exit 1; }; }
890   else
891     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
892    { (exit 1); exit 1; }; }
893   fi
894 fi
895 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
896   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
897    { (exit 1); exit 1; }; }
898 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
899 ac_env_build_alias_set=${build_alias+set}
900 ac_env_build_alias_value=$build_alias
901 ac_cv_env_build_alias_set=${build_alias+set}
902 ac_cv_env_build_alias_value=$build_alias
903 ac_env_host_alias_set=${host_alias+set}
904 ac_env_host_alias_value=$host_alias
905 ac_cv_env_host_alias_set=${host_alias+set}
906 ac_cv_env_host_alias_value=$host_alias
907 ac_env_target_alias_set=${target_alias+set}
908 ac_env_target_alias_value=$target_alias
909 ac_cv_env_target_alias_set=${target_alias+set}
910 ac_cv_env_target_alias_value=$target_alias
911 ac_env_CXX_set=${CXX+set}
912 ac_env_CXX_value=$CXX
913 ac_cv_env_CXX_set=${CXX+set}
914 ac_cv_env_CXX_value=$CXX
915 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
916 ac_env_CXXFLAGS_value=$CXXFLAGS
917 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
918 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
919 ac_env_LDFLAGS_set=${LDFLAGS+set}
920 ac_env_LDFLAGS_value=$LDFLAGS
921 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
922 ac_cv_env_LDFLAGS_value=$LDFLAGS
923 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
924 ac_env_CPPFLAGS_value=$CPPFLAGS
925 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
926 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
927 ac_env_CXXCPP_set=${CXXCPP+set}
928 ac_env_CXXCPP_value=$CXXCPP
929 ac_cv_env_CXXCPP_set=${CXXCPP+set}
930 ac_cv_env_CXXCPP_value=$CXXCPP
931 ac_env_CC_set=${CC+set}
932 ac_env_CC_value=$CC
933 ac_cv_env_CC_set=${CC+set}
934 ac_cv_env_CC_value=$CC
935 ac_env_CFLAGS_set=${CFLAGS+set}
936 ac_env_CFLAGS_value=$CFLAGS
937 ac_cv_env_CFLAGS_set=${CFLAGS+set}
938 ac_cv_env_CFLAGS_value=$CFLAGS
939 ac_env_CPP_set=${CPP+set}
940 ac_env_CPP_value=$CPP
941 ac_cv_env_CPP_set=${CPP+set}
942 ac_cv_env_CPP_value=$CPP
943
944 #
945 # Report the --help message.
946 #
947 if test "$ac_init_help" = "long"; then
948   # Omit some internal or obsolete options to make the list less imposing.
949   # This message is too long to be a string in the A/UX 3.1 sh.
950   cat <<_ACEOF
951 \`configure' configures this package to adapt to many kinds of systems.
952
953 Usage: $0 [OPTION]... [VAR=VALUE]...
954
955 To assign environment variables (e.g., CC, CFLAGS...), specify them as
956 VAR=VALUE.  See below for descriptions of some of the useful variables.
957
958 Defaults for the options are specified in brackets.
959
960 Configuration:
961   -h, --help              display this help and exit
962       --help=short        display options specific to this package
963       --help=recursive    display the short help of all the included packages
964   -V, --version           display version information and exit
965   -q, --quiet, --silent   do not print \`checking...' messages
966       --cache-file=FILE   cache test results in FILE [disabled]
967   -C, --config-cache      alias for \`--cache-file=config.cache'
968   -n, --no-create         do not create output files
969       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
970
971 _ACEOF
972
973   cat <<_ACEOF
974 Installation directories:
975   --prefix=PREFIX         install architecture-independent files in PREFIX
976                           [$ac_default_prefix]
977   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
978                           [PREFIX]
979
980 By default, \`make install' will install all the files in
981 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
982 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
983 for instance \`--prefix=\$HOME'.
984
985 For better control, use the options below.
986
987 Fine tuning of the installation directories:
988   --bindir=DIR           user executables [EPREFIX/bin]
989   --sbindir=DIR          system admin executables [EPREFIX/sbin]
990   --libexecdir=DIR       program executables [EPREFIX/libexec]
991   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
992   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
993   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
994   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
995   --libdir=DIR           object code libraries [EPREFIX/lib]
996   --includedir=DIR       C header files [PREFIX/include]
997   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
998   --infodir=DIR          info documentation [PREFIX/info]
999   --mandir=DIR           man documentation [PREFIX/man]
1000 _ACEOF
1001
1002   cat <<\_ACEOF
1003
1004 System types:
1005   --build=BUILD     configure for building on BUILD [guessed]
1006   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1007 _ACEOF
1008 fi
1009
1010 if test -n "$ac_init_help"; then
1011
1012   cat <<\_ACEOF
1013
1014 Optional Features:
1015   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1016   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1017   --enable-ucsim          compile ucsim frontend
1018   --enable-dlso           compile dynamically loadable shared libraries
1019   --disable-51            do not compile simulator for MCS51
1020   --disable-avr           do not compile simulator for AVR
1021   --enable-z80            compile simulator for Z80
1022   --enable-hc08            compile simulator for hc08
1023   --enable-xa             compile simulator for XA
1024   --enable-serio          compile serio GUI tool (needs curses)
1025   --enable-statistic      compile statistical features (slower simulation)
1026   --enable-shared=PKGS  build shared libraries default=yes
1027   --enable-static=PKGS  build static libraries default=yes
1028   --enable-fast-install=PKGS  optimize for fast installation default=yes
1029   --disable-libtool-lock  avoid locking (might break parallel builds)
1030
1031 Optional Packages:
1032   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1033   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1034   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1035   --with-pic              try to use only PIC/non-PIC objects default=use both
1036
1037 Some influential environment variables:
1038   CXX         C++ compiler command
1039   CXXFLAGS    C++ compiler flags
1040   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1041               nonstandard directory <lib dir>
1042   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1043               headers in a nonstandard directory <include dir>
1044   CXXCPP      C++ preprocessor
1045   CC          C compiler command
1046   CFLAGS      C compiler flags
1047   CPP         C preprocessor
1048
1049 Use these variables to override the choices made by `configure' or to help
1050 it to find libraries and programs with nonstandard names/locations.
1051
1052 _ACEOF
1053 fi
1054
1055 if test "$ac_init_help" = "recursive"; then
1056   # If there are subdirs, report their specific --help.
1057   ac_popdir=`pwd`
1058   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1059     test -d $ac_dir || continue
1060     ac_builddir=.
1061
1062 if test "$ac_dir" != .; then
1063   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1064   # A "../" for each directory in $ac_dir_suffix.
1065   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1066 else
1067   ac_dir_suffix= ac_top_builddir=
1068 fi
1069
1070 case $srcdir in
1071   .)  # No --srcdir option.  We are building in place.
1072     ac_srcdir=.
1073     if test -z "$ac_top_builddir"; then
1074        ac_top_srcdir=.
1075     else
1076        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1077     fi ;;
1078   [\\/]* | ?:[\\/]* )  # Absolute path.
1079     ac_srcdir=$srcdir$ac_dir_suffix;
1080     ac_top_srcdir=$srcdir ;;
1081   *) # Relative path.
1082     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1083     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1084 esac
1085 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
1086 # absolute.
1087 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
1088 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
1089 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
1090 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
1091
1092     cd $ac_dir
1093     # Check for guested configure; otherwise get Cygnus style configure.
1094     if test -f $ac_srcdir/configure.gnu; then
1095       echo
1096       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1097     elif test -f $ac_srcdir/configure; then
1098       echo
1099       $SHELL $ac_srcdir/configure  --help=recursive
1100     elif test -f $ac_srcdir/configure.ac ||
1101            test -f $ac_srcdir/configure.in; then
1102       echo
1103       $ac_configure --help
1104     else
1105       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1106     fi
1107     cd $ac_popdir
1108   done
1109 fi
1110
1111 test -n "$ac_init_help" && exit 0
1112 if $ac_init_version; then
1113   cat <<\_ACEOF
1114
1115 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1116 Free Software Foundation, Inc.
1117 This configure script is free software; the Free Software Foundation
1118 gives unlimited permission to copy, distribute and modify it.
1119 _ACEOF
1120   exit 0
1121 fi
1122 exec 5>config.log
1123 cat >&5 <<_ACEOF
1124 This file contains any messages produced by compilers while
1125 running configure, to aid debugging if configure makes a mistake.
1126
1127 It was created by $as_me, which was
1128 generated by GNU Autoconf 2.57.  Invocation command line was
1129
1130   $ $0 $@
1131
1132 _ACEOF
1133 {
1134 cat <<_ASUNAME
1135 ## --------- ##
1136 ## Platform. ##
1137 ## --------- ##
1138
1139 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1140 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1141 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1142 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1143 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1144
1145 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1146 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1147
1148 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1149 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1150 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1151 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1152 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1153 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1154 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1155
1156 _ASUNAME
1157
1158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1159 for as_dir in $PATH
1160 do
1161   IFS=$as_save_IFS
1162   test -z "$as_dir" && as_dir=.
1163   echo "PATH: $as_dir"
1164 done
1165
1166 } >&5
1167
1168 cat >&5 <<_ACEOF
1169
1170
1171 ## ----------- ##
1172 ## Core tests. ##
1173 ## ----------- ##
1174
1175 _ACEOF
1176
1177
1178 # Keep a trace of the command line.
1179 # Strip out --no-create and --no-recursion so they do not pile up.
1180 # Strip out --silent because we don't want to record it for future runs.
1181 # Also quote any args containing shell meta-characters.
1182 # Make two passes to allow for proper duplicate-argument suppression.
1183 ac_configure_args=
1184 ac_configure_args0=
1185 ac_configure_args1=
1186 ac_sep=
1187 ac_must_keep_next=false
1188 for ac_pass in 1 2
1189 do
1190   for ac_arg
1191   do
1192     case $ac_arg in
1193     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1194     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1195     | -silent | --silent | --silen | --sile | --sil)
1196       continue ;;
1197     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1198       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1199     esac
1200     case $ac_pass in
1201     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1202     2)
1203       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1204       if test $ac_must_keep_next = true; then
1205         ac_must_keep_next=false # Got value, back to normal.
1206       else
1207         case $ac_arg in
1208           *=* | --config-cache | -C | -disable-* | --disable-* \
1209           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1210           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1211           | -with-* | --with-* | -without-* | --without-* | --x)
1212             case "$ac_configure_args0 " in
1213               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1214             esac
1215             ;;
1216           -* ) ac_must_keep_next=true ;;
1217         esac
1218       fi
1219       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1220       # Get rid of the leading space.
1221       ac_sep=" "
1222       ;;
1223     esac
1224   done
1225 done
1226 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1227 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1228
1229 # When interrupted or exit'd, cleanup temporary files, and complete
1230 # config.log.  We remove comments because anyway the quotes in there
1231 # would cause problems or look ugly.
1232 # WARNING: Be sure not to use single quotes in there, as some shells,
1233 # such as our DU 5.0 friend, will then `close' the trap.
1234 trap 'exit_status=$?
1235   # Save into config.log some information that might help in debugging.
1236   {
1237     echo
1238
1239     cat <<\_ASBOX
1240 ## ---------------- ##
1241 ## Cache variables. ##
1242 ## ---------------- ##
1243 _ASBOX
1244     echo
1245     # The following way of writing the cache mishandles newlines in values,
1246 {
1247   (set) 2>&1 |
1248     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1249     *ac_space=\ *)
1250       sed -n \
1251         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1252           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1253       ;;
1254     *)
1255       sed -n \
1256         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1257       ;;
1258     esac;
1259 }
1260     echo
1261
1262     cat <<\_ASBOX
1263 ## ----------------- ##
1264 ## Output variables. ##
1265 ## ----------------- ##
1266 _ASBOX
1267     echo
1268     for ac_var in $ac_subst_vars
1269     do
1270       eval ac_val=$`echo $ac_var`
1271       echo "$ac_var='"'"'$ac_val'"'"'"
1272     done | sort
1273     echo
1274
1275     if test -n "$ac_subst_files"; then
1276       cat <<\_ASBOX
1277 ## ------------- ##
1278 ## Output files. ##
1279 ## ------------- ##
1280 _ASBOX
1281       echo
1282       for ac_var in $ac_subst_files
1283       do
1284         eval ac_val=$`echo $ac_var`
1285         echo "$ac_var='"'"'$ac_val'"'"'"
1286       done | sort
1287       echo
1288     fi
1289
1290     if test -s confdefs.h; then
1291       cat <<\_ASBOX
1292 ## ----------- ##
1293 ## confdefs.h. ##
1294 ## ----------- ##
1295 _ASBOX
1296       echo
1297       sed "/^$/d" confdefs.h | sort
1298       echo
1299     fi
1300     test "$ac_signal" != 0 &&
1301       echo "$as_me: caught signal $ac_signal"
1302     echo "$as_me: exit $exit_status"
1303   } >&5
1304   rm -f core core.* *.core &&
1305   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1306     exit $exit_status
1307      ' 0
1308 for ac_signal in 1 2 13 15; do
1309   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1310 done
1311 ac_signal=0
1312
1313 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1314 rm -rf conftest* confdefs.h
1315 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1316 echo >confdefs.h
1317
1318 # Predefined preprocessor variables.
1319
1320 cat >>confdefs.h <<_ACEOF
1321 #define PACKAGE_NAME "$PACKAGE_NAME"
1322 _ACEOF
1323
1324
1325 cat >>confdefs.h <<_ACEOF
1326 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1327 _ACEOF
1328
1329
1330 cat >>confdefs.h <<_ACEOF
1331 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1332 _ACEOF
1333
1334
1335 cat >>confdefs.h <<_ACEOF
1336 #define PACKAGE_STRING "$PACKAGE_STRING"
1337 _ACEOF
1338
1339
1340 cat >>confdefs.h <<_ACEOF
1341 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1342 _ACEOF
1343
1344
1345 # Let the site file select an alternate cache file if it wants to.
1346 # Prefer explicitly selected file to automatically selected ones.
1347 if test -z "$CONFIG_SITE"; then
1348   if test "x$prefix" != xNONE; then
1349     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1350   else
1351     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1352   fi
1353 fi
1354 for ac_site_file in $CONFIG_SITE; do
1355   if test -r "$ac_site_file"; then
1356     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1357 echo "$as_me: loading site script $ac_site_file" >&6;}
1358     sed 's/^/| /' "$ac_site_file" >&5
1359     . "$ac_site_file"
1360   fi
1361 done
1362
1363 if test -r "$cache_file"; then
1364   # Some versions of bash will fail to source /dev/null (special
1365   # files actually), so we avoid doing that.
1366   if test -f "$cache_file"; then
1367     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1368 echo "$as_me: loading cache $cache_file" >&6;}
1369     case $cache_file in
1370       [\\/]* | ?:[\\/]* ) . $cache_file;;
1371       *)                      . ./$cache_file;;
1372     esac
1373   fi
1374 else
1375   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1376 echo "$as_me: creating cache $cache_file" >&6;}
1377   >$cache_file
1378 fi
1379
1380 # Check that the precious variables saved in the cache have kept the same
1381 # value.
1382 ac_cache_corrupted=false
1383 for ac_var in `(set) 2>&1 |
1384                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1385   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1386   eval ac_new_set=\$ac_env_${ac_var}_set
1387   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1388   eval ac_new_val="\$ac_env_${ac_var}_value"
1389   case $ac_old_set,$ac_new_set in
1390     set,)
1391       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1392 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1393       ac_cache_corrupted=: ;;
1394     ,set)
1395       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1396 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1397       ac_cache_corrupted=: ;;
1398     ,);;
1399     *)
1400       if test "x$ac_old_val" != "x$ac_new_val"; then
1401         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1402 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1403         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1404 echo "$as_me:   former value:  $ac_old_val" >&2;}
1405         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1406 echo "$as_me:   current value: $ac_new_val" >&2;}
1407         ac_cache_corrupted=:
1408       fi;;
1409   esac
1410   # Pass precious variables to config.status.
1411   if test "$ac_new_set" = set; then
1412     case $ac_new_val in
1413     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1414       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1415     *) ac_arg=$ac_var=$ac_new_val ;;
1416     esac
1417     case " $ac_configure_args " in
1418       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1419       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1420     esac
1421   fi
1422 done
1423 if $ac_cache_corrupted; then
1424   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1425 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1426   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1427 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1428    { (exit 1); exit 1; }; }
1429 fi
1430
1431 ac_ext=c
1432 ac_cpp='$CPP $CPPFLAGS'
1433 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1434 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1435 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455           ac_config_headers="$ac_config_headers ddconfig.h:ddconfig_in.h"
1456
1457
1458 for ac_prog in gawk mawk nawk awk
1459 do
1460   # Extract the first word of "$ac_prog", so it can be a program name with args.
1461 set dummy $ac_prog; ac_word=$2
1462 echo "$as_me:$LINENO: checking for $ac_word" >&5
1463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1464 if test "${ac_cv_prog_AWK+set}" = set; then
1465   echo $ECHO_N "(cached) $ECHO_C" >&6
1466 else
1467   if test -n "$AWK"; then
1468   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1469 else
1470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1471 for as_dir in $PATH
1472 do
1473   IFS=$as_save_IFS
1474   test -z "$as_dir" && as_dir=.
1475   for ac_exec_ext in '' $ac_executable_extensions; do
1476   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1477     ac_cv_prog_AWK="$ac_prog"
1478     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1479     break 2
1480   fi
1481 done
1482 done
1483
1484 fi
1485 fi
1486 AWK=$ac_cv_prog_AWK
1487 if test -n "$AWK"; then
1488   echo "$as_me:$LINENO: result: $AWK" >&5
1489 echo "${ECHO_T}$AWK" >&6
1490 else
1491   echo "$as_me:$LINENO: result: no" >&5
1492 echo "${ECHO_T}no" >&6
1493 fi
1494
1495   test -n "$AWK" && break
1496 done
1497
1498
1499 echo "$as_me:$LINENO: checking version of the package" >&5
1500 echo $ECHO_N "checking version of the package... $ECHO_C" >&6
1501 if test -f .version; then
1502   VERSION=`cat .version`
1503   echo "$as_me:$LINENO: result: $VERSION" >&5
1504 echo "${ECHO_T}$VERSION" >&6
1505 else
1506   VERSION="0.0.0"
1507   echo "$as_me:$LINENO: result: unknown using 0.0.0" >&5
1508 echo "${ECHO_T}unknown using 0.0.0" >&6
1509 fi
1510 VERSIONHI=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $1}'`
1511 VERSIONLO=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $2}'`
1512 VERSIONP=`echo $VERSION|$AWK 'BEGIN {FS="."} {print $3}'`
1513
1514
1515
1516
1517 cat >>confdefs.h <<_ACEOF
1518 #define VERSIONSTR "${VERSION}"
1519 _ACEOF
1520
1521 cat >>confdefs.h <<_ACEOF
1522 #define VERSIONHI $VERSIONHI
1523 _ACEOF
1524
1525 cat >>confdefs.h <<_ACEOF
1526 #define VERSIONLO $VERSIONLO
1527 _ACEOF
1528
1529 cat >>confdefs.h <<_ACEOF
1530 #define VERSIONP $VERSIONP
1531 _ACEOF
1532
1533
1534 # Some options
1535 #==============
1536 # Check whether --enable-ucsim or --disable-ucsim was given.
1537 if test "${enable_ucsim+set}" = set; then
1538   enableval="$enable_ucsim"
1539   if test $enable_ucsim != "no"; then
1540     enable_ucsim="yes"
1541 fi
1542 else
1543   #default
1544 enable_ucsim="no"
1545 fi;
1546 # Check whether --enable-dlso or --disable-dlso was given.
1547 if test "${enable_dlso+set}" = set; then
1548   enableval="$enable_dlso"
1549   if test $enable_dlso != "no"; then
1550     enable_dlso="yes"
1551 fi
1552 else
1553   enable_dlso="no"
1554 fi;
1555 # Check whether --enable-51 or --disable-51 was given.
1556 if test "${enable_51+set}" = set; then
1557   enableval="$enable_51"
1558   if test $enable_51 != "no"; then
1559     enable_51="yes"
1560 fi
1561 else
1562   enable_51="yes"
1563 fi;
1564 # Check whether --enable-avr or --disable-avr was given.
1565 if test "${enable_avr+set}" = set; then
1566   enableval="$enable_avr"
1567   if test $enable_avr != "no"; then
1568     enable_avr="yes"
1569 fi
1570 else
1571   enable_avr="yes"
1572 fi;
1573 # Check whether --enable-z80 or --disable-z80 was given.
1574 if test "${enable_z80+set}" = set; then
1575   enableval="$enable_z80"
1576   if test $enable_z80 != "no"; then
1577     enable_z80="yes"
1578 fi
1579 else
1580   enable_z80="no"
1581 fi;
1582 # Check whether --enable-hc08 or --disable-hc08 was given.
1583 if test "${enable_hc08+set}" = set; then
1584   enableval="$enable_hc08"
1585   if test $enable_hc08 != "no"; then
1586     enable_hc08="yes"
1587 fi
1588 else
1589   enable_hc08="yes"
1590 fi;
1591 # Check whether --enable-xa or --disable-xa was given.
1592 if test "${enable_xa+set}" = set; then
1593   enableval="$enable_xa"
1594   if test $enable_xa != "no"; then
1595     enable_xa="yes"
1596 fi
1597 else
1598   enable_xa="no"
1599 fi;
1600 # Check whether --enable-portmon or --disable-portmon was given.
1601 if test "${enable_portmon+set}" = set; then
1602   enableval="$enable_portmon"
1603   if test $enable_serio != "no"; then
1604     enable_serio="yes"
1605 fi
1606 else
1607   enable_serio="yes"
1608 fi;
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618 # Check whether --enable-statistic or --disable-statistic was given.
1619 if test "${enable_statistic+set}" = set; then
1620   enableval="$enable_statistic"
1621   if test $enable_statistic != "no"; then
1622    enable_statistic="yes"
1623 fi
1624 else
1625   enable_statistic="no"
1626 fi;
1627 cat >>confdefs.h <<_ACEOF
1628 #define STATISTIC $enable_statistic
1629 _ACEOF
1630
1631
1632
1633 # Required programs
1634 #-------------------
1635 ac_ext=cc
1636 ac_cpp='$CXXCPP $CPPFLAGS'
1637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1640 if test -n "$ac_tool_prefix"; then
1641   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1642   do
1643     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1644 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1645 echo "$as_me:$LINENO: checking for $ac_word" >&5
1646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1647 if test "${ac_cv_prog_CXX+set}" = set; then
1648   echo $ECHO_N "(cached) $ECHO_C" >&6
1649 else
1650   if test -n "$CXX"; then
1651   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1652 else
1653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1654 for as_dir in $PATH
1655 do
1656   IFS=$as_save_IFS
1657   test -z "$as_dir" && as_dir=.
1658   for ac_exec_ext in '' $ac_executable_extensions; do
1659   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1660     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1661     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1662     break 2
1663   fi
1664 done
1665 done
1666
1667 fi
1668 fi
1669 CXX=$ac_cv_prog_CXX
1670 if test -n "$CXX"; then
1671   echo "$as_me:$LINENO: result: $CXX" >&5
1672 echo "${ECHO_T}$CXX" >&6
1673 else
1674   echo "$as_me:$LINENO: result: no" >&5
1675 echo "${ECHO_T}no" >&6
1676 fi
1677
1678     test -n "$CXX" && break
1679   done
1680 fi
1681 if test -z "$CXX"; then
1682   ac_ct_CXX=$CXX
1683   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1684 do
1685   # Extract the first word of "$ac_prog", so it can be a program name with args.
1686 set dummy $ac_prog; ac_word=$2
1687 echo "$as_me:$LINENO: checking for $ac_word" >&5
1688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1689 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1690   echo $ECHO_N "(cached) $ECHO_C" >&6
1691 else
1692   if test -n "$ac_ct_CXX"; then
1693   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1694 else
1695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1696 for as_dir in $PATH
1697 do
1698   IFS=$as_save_IFS
1699   test -z "$as_dir" && as_dir=.
1700   for ac_exec_ext in '' $ac_executable_extensions; do
1701   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1702     ac_cv_prog_ac_ct_CXX="$ac_prog"
1703     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1704     break 2
1705   fi
1706 done
1707 done
1708
1709 fi
1710 fi
1711 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1712 if test -n "$ac_ct_CXX"; then
1713   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
1714 echo "${ECHO_T}$ac_ct_CXX" >&6
1715 else
1716   echo "$as_me:$LINENO: result: no" >&5
1717 echo "${ECHO_T}no" >&6
1718 fi
1719
1720   test -n "$ac_ct_CXX" && break
1721 done
1722 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1723
1724   CXX=$ac_ct_CXX
1725 fi
1726
1727
1728 # Provide some information about the compiler.
1729 echo "$as_me:$LINENO:" \
1730      "checking for C++ compiler version" >&5
1731 ac_compiler=`set X $ac_compile; echo $2`
1732 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1733   (eval $ac_compiler --version </dev/null >&5) 2>&5
1734   ac_status=$?
1735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1736   (exit $ac_status); }
1737 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1738   (eval $ac_compiler -v </dev/null >&5) 2>&5
1739   ac_status=$?
1740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1741   (exit $ac_status); }
1742 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1743   (eval $ac_compiler -V </dev/null >&5) 2>&5
1744   ac_status=$?
1745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1746   (exit $ac_status); }
1747
1748 cat >conftest.$ac_ext <<_ACEOF
1749 #line $LINENO "configure"
1750 /* confdefs.h.  */
1751 _ACEOF
1752 cat confdefs.h >>conftest.$ac_ext
1753 cat >>conftest.$ac_ext <<_ACEOF
1754 /* end confdefs.h.  */
1755
1756 int
1757 main ()
1758 {
1759
1760   ;
1761   return 0;
1762 }
1763 _ACEOF
1764 ac_clean_files_save=$ac_clean_files
1765 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1766 # Try to create an executable without -o first, disregard a.out.
1767 # It will help us diagnose broken compilers, and finding out an intuition
1768 # of exeext.
1769 echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1770 echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1771 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1772 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1773   (eval $ac_link_default) 2>&5
1774   ac_status=$?
1775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1776   (exit $ac_status); }; then
1777   # Find the output, starting from the most likely.  This scheme is
1778 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1779 # resort.
1780
1781 # Be careful to initialize this variable, since it used to be cached.
1782 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1783 ac_cv_exeext=
1784 # b.out is created by i960 compilers.
1785 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1786 do
1787   test -f "$ac_file" || continue
1788   case $ac_file in
1789     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1790         ;;
1791     conftest.$ac_ext )
1792         # This is the source file.
1793         ;;
1794     [ab].out )
1795         # We found the default executable, but exeext='' is most
1796         # certainly right.
1797         break;;
1798     *.* )
1799         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1800         # FIXME: I believe we export ac_cv_exeext for Libtool,
1801         # but it would be cool to find out if it's true.  Does anybody
1802         # maintain Libtool? --akim.
1803         export ac_cv_exeext
1804         break;;
1805     * )
1806         break;;
1807   esac
1808 done
1809 else
1810   echo "$as_me: failed program was:" >&5
1811 sed 's/^/| /' conftest.$ac_ext >&5
1812
1813 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1814 See \`config.log' for more details." >&5
1815 echo "$as_me: error: C++ compiler cannot create executables
1816 See \`config.log' for more details." >&2;}
1817    { (exit 77); exit 77; }; }
1818 fi
1819
1820 ac_exeext=$ac_cv_exeext
1821 echo "$as_me:$LINENO: result: $ac_file" >&5
1822 echo "${ECHO_T}$ac_file" >&6
1823
1824 # Check the compiler produces executables we can run.  If not, either
1825 # the compiler is broken, or we cross compile.
1826 echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1827 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1828 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1829 # If not cross compiling, check that we can run a simple program.
1830 if test "$cross_compiling" != yes; then
1831   if { ac_try='./$ac_file'
1832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1833   (eval $ac_try) 2>&5
1834   ac_status=$?
1835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1836   (exit $ac_status); }; }; then
1837     cross_compiling=no
1838   else
1839     if test "$cross_compiling" = maybe; then
1840         cross_compiling=yes
1841     else
1842         { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1843 If you meant to cross compile, use \`--host'.
1844 See \`config.log' for more details." >&5
1845 echo "$as_me: error: cannot run C++ compiled programs.
1846 If you meant to cross compile, use \`--host'.
1847 See \`config.log' for more details." >&2;}
1848    { (exit 1); exit 1; }; }
1849     fi
1850   fi
1851 fi
1852 echo "$as_me:$LINENO: result: yes" >&5
1853 echo "${ECHO_T}yes" >&6
1854
1855 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1856 ac_clean_files=$ac_clean_files_save
1857 # Check the compiler produces executables we can run.  If not, either
1858 # the compiler is broken, or we cross compile.
1859 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1860 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1861 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1862 echo "${ECHO_T}$cross_compiling" >&6
1863
1864 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1865 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1866 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1867   (eval $ac_link) 2>&5
1868   ac_status=$?
1869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1870   (exit $ac_status); }; then
1871   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1872 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1873 # work properly (i.e., refer to `conftest.exe'), while it won't with
1874 # `rm'.
1875 for ac_file in conftest.exe conftest conftest.*; do
1876   test -f "$ac_file" || continue
1877   case $ac_file in
1878     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1879     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1880           export ac_cv_exeext
1881           break;;
1882     * ) break;;
1883   esac
1884 done
1885 else
1886   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1887 See \`config.log' for more details." >&5
1888 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1889 See \`config.log' for more details." >&2;}
1890    { (exit 1); exit 1; }; }
1891 fi
1892
1893 rm -f conftest$ac_cv_exeext
1894 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1895 echo "${ECHO_T}$ac_cv_exeext" >&6
1896
1897 rm -f conftest.$ac_ext
1898 EXEEXT=$ac_cv_exeext
1899 ac_exeext=$EXEEXT
1900 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1901 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1902 if test "${ac_cv_objext+set}" = set; then
1903   echo $ECHO_N "(cached) $ECHO_C" >&6
1904 else
1905   cat >conftest.$ac_ext <<_ACEOF
1906 #line $LINENO "configure"
1907 /* confdefs.h.  */
1908 _ACEOF
1909 cat confdefs.h >>conftest.$ac_ext
1910 cat >>conftest.$ac_ext <<_ACEOF
1911 /* end confdefs.h.  */
1912
1913 int
1914 main ()
1915 {
1916
1917   ;
1918   return 0;
1919 }
1920 _ACEOF
1921 rm -f conftest.o conftest.obj
1922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1923   (eval $ac_compile) 2>&5
1924   ac_status=$?
1925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1926   (exit $ac_status); }; then
1927   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1928   case $ac_file in
1929     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1930     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1931        break;;
1932   esac
1933 done
1934 else
1935   echo "$as_me: failed program was:" >&5
1936 sed 's/^/| /' conftest.$ac_ext >&5
1937
1938 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1939 See \`config.log' for more details." >&5
1940 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1941 See \`config.log' for more details." >&2;}
1942    { (exit 1); exit 1; }; }
1943 fi
1944
1945 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1946 fi
1947 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1948 echo "${ECHO_T}$ac_cv_objext" >&6
1949 OBJEXT=$ac_cv_objext
1950 ac_objext=$OBJEXT
1951 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
1952 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1953 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1954   echo $ECHO_N "(cached) $ECHO_C" >&6
1955 else
1956   cat >conftest.$ac_ext <<_ACEOF
1957 #line $LINENO "configure"
1958 /* confdefs.h.  */
1959 _ACEOF
1960 cat confdefs.h >>conftest.$ac_ext
1961 cat >>conftest.$ac_ext <<_ACEOF
1962 /* end confdefs.h.  */
1963
1964 int
1965 main ()
1966 {
1967 #ifndef __GNUC__
1968        choke me
1969 #endif
1970
1971   ;
1972   return 0;
1973 }
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   ac_compiler_gnu=yes
1988 else
1989   echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1991
1992 ac_compiler_gnu=no
1993 fi
1994 rm -f conftest.$ac_objext conftest.$ac_ext
1995 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
1996
1997 fi
1998 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
1999 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2000 GXX=`test $ac_compiler_gnu = yes && echo yes`
2001 ac_test_CXXFLAGS=${CXXFLAGS+set}
2002 ac_save_CXXFLAGS=$CXXFLAGS
2003 CXXFLAGS="-g"
2004 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2005 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2006 if test "${ac_cv_prog_cxx_g+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   cat >conftest.$ac_ext <<_ACEOF
2010 #line $LINENO "configure"
2011 /* confdefs.h.  */
2012 _ACEOF
2013 cat confdefs.h >>conftest.$ac_ext
2014 cat >>conftest.$ac_ext <<_ACEOF
2015 /* end confdefs.h.  */
2016
2017 int
2018 main ()
2019 {
2020
2021   ;
2022   return 0;
2023 }
2024 _ACEOF
2025 rm -f conftest.$ac_objext
2026 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2027   (eval $ac_compile) 2>&5
2028   ac_status=$?
2029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030   (exit $ac_status); } &&
2031          { ac_try='test -s conftest.$ac_objext'
2032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2033   (eval $ac_try) 2>&5
2034   ac_status=$?
2035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2036   (exit $ac_status); }; }; then
2037   ac_cv_prog_cxx_g=yes
2038 else
2039   echo "$as_me: failed program was:" >&5
2040 sed 's/^/| /' conftest.$ac_ext >&5
2041
2042 ac_cv_prog_cxx_g=no
2043 fi
2044 rm -f conftest.$ac_objext conftest.$ac_ext
2045 fi
2046 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2047 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2048 if test "$ac_test_CXXFLAGS" = set; then
2049   CXXFLAGS=$ac_save_CXXFLAGS
2050 elif test $ac_cv_prog_cxx_g = yes; then
2051   if test "$GXX" = yes; then
2052     CXXFLAGS="-g -O2"
2053   else
2054     CXXFLAGS="-g"
2055   fi
2056 else
2057   if test "$GXX" = yes; then
2058     CXXFLAGS="-O2"
2059   else
2060     CXXFLAGS=
2061   fi
2062 fi
2063 for ac_declaration in \
2064    ''\
2065    '#include <stdlib.h>' \
2066    'extern "C" void std::exit (int) throw (); using std::exit;' \
2067    'extern "C" void std::exit (int); using std::exit;' \
2068    'extern "C" void exit (int) throw ();' \
2069    'extern "C" void exit (int);' \
2070    'void exit (int);'
2071 do
2072   cat >conftest.$ac_ext <<_ACEOF
2073 #line $LINENO "configure"
2074 /* confdefs.h.  */
2075 _ACEOF
2076 cat confdefs.h >>conftest.$ac_ext
2077 cat >>conftest.$ac_ext <<_ACEOF
2078 /* end confdefs.h.  */
2079 #include <stdlib.h>
2080 $ac_declaration
2081 int
2082 main ()
2083 {
2084 exit (42);
2085   ;
2086   return 0;
2087 }
2088 _ACEOF
2089 rm -f conftest.$ac_objext
2090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2091   (eval $ac_compile) 2>&5
2092   ac_status=$?
2093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2094   (exit $ac_status); } &&
2095          { ac_try='test -s conftest.$ac_objext'
2096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2097   (eval $ac_try) 2>&5
2098   ac_status=$?
2099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2100   (exit $ac_status); }; }; then
2101   :
2102 else
2103   echo "$as_me: failed program was:" >&5
2104 sed 's/^/| /' conftest.$ac_ext >&5
2105
2106 continue
2107 fi
2108 rm -f conftest.$ac_objext conftest.$ac_ext
2109   cat >conftest.$ac_ext <<_ACEOF
2110 #line $LINENO "configure"
2111 /* confdefs.h.  */
2112 _ACEOF
2113 cat confdefs.h >>conftest.$ac_ext
2114 cat >>conftest.$ac_ext <<_ACEOF
2115 /* end confdefs.h.  */
2116 $ac_declaration
2117 int
2118 main ()
2119 {
2120 exit (42);
2121   ;
2122   return 0;
2123 }
2124 _ACEOF
2125 rm -f conftest.$ac_objext
2126 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2127   (eval $ac_compile) 2>&5
2128   ac_status=$?
2129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2130   (exit $ac_status); } &&
2131          { ac_try='test -s conftest.$ac_objext'
2132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2133   (eval $ac_try) 2>&5
2134   ac_status=$?
2135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2136   (exit $ac_status); }; }; then
2137   break
2138 else
2139   echo "$as_me: failed program was:" >&5
2140 sed 's/^/| /' conftest.$ac_ext >&5
2141
2142 fi
2143 rm -f conftest.$ac_objext conftest.$ac_ext
2144 done
2145 rm -f conftest*
2146 if test -n "$ac_declaration"; then
2147   echo '#ifdef __cplusplus' >>confdefs.h
2148   echo $ac_declaration      >>confdefs.h
2149   echo '#endif'             >>confdefs.h
2150 fi
2151
2152 ac_ext=c
2153 ac_cpp='$CPP $CPPFLAGS'
2154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2157
2158 ac_ext=cc
2159 ac_cpp='$CXXCPP $CPPFLAGS'
2160 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2161 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2162 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2163 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
2164 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
2165 if test -z "$CXXCPP"; then
2166   if test "${ac_cv_prog_CXXCPP+set}" = set; then
2167   echo $ECHO_N "(cached) $ECHO_C" >&6
2168 else
2169       # Double quotes because CXXCPP needs to be expanded
2170     for CXXCPP in "$CXX -E" "/lib/cpp"
2171     do
2172       ac_preproc_ok=false
2173 for ac_cxx_preproc_warn_flag in '' yes
2174 do
2175   # Use a header file that comes with gcc, so configuring glibc
2176   # with a fresh cross-compiler works.
2177   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2178   # <limits.h> exists even on freestanding compilers.
2179   # On the NeXT, cc -E runs the code through the compiler's parser,
2180   # not just through cpp. "Syntax error" is here to catch this case.
2181   cat >conftest.$ac_ext <<_ACEOF
2182 #line $LINENO "configure"
2183 /* confdefs.h.  */
2184 _ACEOF
2185 cat confdefs.h >>conftest.$ac_ext
2186 cat >>conftest.$ac_ext <<_ACEOF
2187 /* end confdefs.h.  */
2188 #ifdef __STDC__
2189 # include <limits.h>
2190 #else
2191 # include <assert.h>
2192 #endif
2193                      Syntax error
2194 _ACEOF
2195 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2196   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2197   ac_status=$?
2198   grep -v '^ *+' conftest.er1 >conftest.err
2199   rm -f conftest.er1
2200   cat conftest.err >&5
2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2202   (exit $ac_status); } >/dev/null; then
2203   if test -s conftest.err; then
2204     ac_cpp_err=$ac_cxx_preproc_warn_flag
2205   else
2206     ac_cpp_err=
2207   fi
2208 else
2209   ac_cpp_err=yes
2210 fi
2211 if test -z "$ac_cpp_err"; then
2212   :
2213 else
2214   echo "$as_me: failed program was:" >&5
2215 sed 's/^/| /' conftest.$ac_ext >&5
2216
2217   # Broken: fails on valid input.
2218 continue
2219 fi
2220 rm -f conftest.err conftest.$ac_ext
2221
2222   # OK, works on sane cases.  Now check whether non-existent headers
2223   # can be detected and how.
2224   cat >conftest.$ac_ext <<_ACEOF
2225 #line $LINENO "configure"
2226 /* confdefs.h.  */
2227 _ACEOF
2228 cat confdefs.h >>conftest.$ac_ext
2229 cat >>conftest.$ac_ext <<_ACEOF
2230 /* end confdefs.h.  */
2231 #include <ac_nonexistent.h>
2232 _ACEOF
2233 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2235   ac_status=$?
2236   grep -v '^ *+' conftest.er1 >conftest.err
2237   rm -f conftest.er1
2238   cat conftest.err >&5
2239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2240   (exit $ac_status); } >/dev/null; then
2241   if test -s conftest.err; then
2242     ac_cpp_err=$ac_cxx_preproc_warn_flag
2243   else
2244     ac_cpp_err=
2245   fi
2246 else
2247   ac_cpp_err=yes
2248 fi
2249 if test -z "$ac_cpp_err"; then
2250   # Broken: success on invalid input.
2251 continue
2252 else
2253   echo "$as_me: failed program was:" >&5
2254 sed 's/^/| /' conftest.$ac_ext >&5
2255
2256   # Passes both tests.
2257 ac_preproc_ok=:
2258 break
2259 fi
2260 rm -f conftest.err conftest.$ac_ext
2261
2262 done
2263 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2264 rm -f conftest.err conftest.$ac_ext
2265 if $ac_preproc_ok; then
2266   break
2267 fi
2268
2269     done
2270     ac_cv_prog_CXXCPP=$CXXCPP
2271
2272 fi
2273   CXXCPP=$ac_cv_prog_CXXCPP
2274 else
2275   ac_cv_prog_CXXCPP=$CXXCPP
2276 fi
2277 echo "$as_me:$LINENO: result: $CXXCPP" >&5
2278 echo "${ECHO_T}$CXXCPP" >&6
2279 ac_preproc_ok=false
2280 for ac_cxx_preproc_warn_flag in '' yes
2281 do
2282   # Use a header file that comes with gcc, so configuring glibc
2283   # with a fresh cross-compiler works.
2284   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2285   # <limits.h> exists even on freestanding compilers.
2286   # On the NeXT, cc -E runs the code through the compiler's parser,
2287   # not just through cpp. "Syntax error" is here to catch this case.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line $LINENO "configure"
2290 /* confdefs.h.  */
2291 _ACEOF
2292 cat confdefs.h >>conftest.$ac_ext
2293 cat >>conftest.$ac_ext <<_ACEOF
2294 /* end confdefs.h.  */
2295 #ifdef __STDC__
2296 # include <limits.h>
2297 #else
2298 # include <assert.h>
2299 #endif
2300                      Syntax error
2301 _ACEOF
2302 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2304   ac_status=$?
2305   grep -v '^ *+' conftest.er1 >conftest.err
2306   rm -f conftest.er1
2307   cat conftest.err >&5
2308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309   (exit $ac_status); } >/dev/null; then
2310   if test -s conftest.err; then
2311     ac_cpp_err=$ac_cxx_preproc_warn_flag
2312   else
2313     ac_cpp_err=
2314   fi
2315 else
2316   ac_cpp_err=yes
2317 fi
2318 if test -z "$ac_cpp_err"; then
2319   :
2320 else
2321   echo "$as_me: failed program was:" >&5
2322 sed 's/^/| /' conftest.$ac_ext >&5
2323
2324   # Broken: fails on valid input.
2325 continue
2326 fi
2327 rm -f conftest.err conftest.$ac_ext
2328
2329   # OK, works on sane cases.  Now check whether non-existent headers
2330   # can be detected and how.
2331   cat >conftest.$ac_ext <<_ACEOF
2332 #line $LINENO "configure"
2333 /* confdefs.h.  */
2334 _ACEOF
2335 cat confdefs.h >>conftest.$ac_ext
2336 cat >>conftest.$ac_ext <<_ACEOF
2337 /* end confdefs.h.  */
2338 #include <ac_nonexistent.h>
2339 _ACEOF
2340 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2342   ac_status=$?
2343   grep -v '^ *+' conftest.er1 >conftest.err
2344   rm -f conftest.er1
2345   cat conftest.err >&5
2346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2347   (exit $ac_status); } >/dev/null; then
2348   if test -s conftest.err; then
2349     ac_cpp_err=$ac_cxx_preproc_warn_flag
2350   else
2351     ac_cpp_err=
2352   fi
2353 else
2354   ac_cpp_err=yes
2355 fi
2356 if test -z "$ac_cpp_err"; then
2357   # Broken: success on invalid input.
2358 continue
2359 else
2360   echo "$as_me: failed program was:" >&5
2361 sed 's/^/| /' conftest.$ac_ext >&5
2362
2363   # Passes both tests.
2364 ac_preproc_ok=:
2365 break
2366 fi
2367 rm -f conftest.err conftest.$ac_ext
2368
2369 done
2370 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2371 rm -f conftest.err conftest.$ac_ext
2372 if $ac_preproc_ok; then
2373   :
2374 else
2375   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2376 See \`config.log' for more details." >&5
2377 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
2378 See \`config.log' for more details." >&2;}
2379    { (exit 1); exit 1; }; }
2380 fi
2381
2382 ac_ext=c
2383 ac_cpp='$CPP $CPPFLAGS'
2384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2387
2388 ac_aux_dir=
2389 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2390   if test -f $ac_dir/install-sh; then
2391     ac_aux_dir=$ac_dir
2392     ac_install_sh="$ac_aux_dir/install-sh -c"
2393     break
2394   elif test -f $ac_dir/install.sh; then
2395     ac_aux_dir=$ac_dir
2396     ac_install_sh="$ac_aux_dir/install.sh -c"
2397     break
2398   elif test -f $ac_dir/shtool; then
2399     ac_aux_dir=$ac_dir
2400     ac_install_sh="$ac_aux_dir/shtool install -c"
2401     break
2402   fi
2403 done
2404 if test -z "$ac_aux_dir"; then
2405   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2406 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2407    { (exit 1); exit 1; }; }
2408 fi
2409 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2410 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2411 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2412
2413 # Find a good install program.  We prefer a C program (faster),
2414 # so one script is as good as another.  But avoid the broken or
2415 # incompatible versions:
2416 # SysV /etc/install, /usr/sbin/install
2417 # SunOS /usr/etc/install
2418 # IRIX /sbin/install
2419 # AIX /bin/install
2420 # AmigaOS /C/install, which installs bootblocks on floppy discs
2421 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2422 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2423 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2424 # ./install, which can be erroneously created by make from ./install.sh.
2425 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2426 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2427 if test -z "$INSTALL"; then
2428 if test "${ac_cv_path_install+set}" = set; then
2429   echo $ECHO_N "(cached) $ECHO_C" >&6
2430 else
2431   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2432 for as_dir in $PATH
2433 do
2434   IFS=$as_save_IFS
2435   test -z "$as_dir" && as_dir=.
2436   # Account for people who put trailing slashes in PATH elements.
2437 case $as_dir/ in
2438   ./ | .// | /cC/* | \
2439   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2440   /usr/ucb/* ) ;;
2441   *)
2442     # OSF1 and SCO ODT 3.0 have their own names for install.
2443     # Don't use installbsd from OSF since it installs stuff as root
2444     # by default.
2445     for ac_prog in ginstall scoinst install; do
2446       for ac_exec_ext in '' $ac_executable_extensions; do
2447         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2448           if test $ac_prog = install &&
2449             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2450             # AIX install.  It has an incompatible calling convention.
2451             :
2452           elif test $ac_prog = install &&
2453             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2454             # program-specific install script used by HP pwplus--don't use.
2455             :
2456           else
2457             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2458             break 3
2459           fi
2460         fi
2461       done
2462     done
2463     ;;
2464 esac
2465 done
2466
2467
2468 fi
2469   if test "${ac_cv_path_install+set}" = set; then
2470     INSTALL=$ac_cv_path_install
2471   else
2472     # As a last resort, use the slow shell script.  We don't cache a
2473     # path for INSTALL within a source directory, because that will
2474     # break other packages using the cache if that directory is
2475     # removed, or if the path is relative.
2476     INSTALL=$ac_install_sh
2477   fi
2478 fi
2479 echo "$as_me:$LINENO: result: $INSTALL" >&5
2480 echo "${ECHO_T}$INSTALL" >&6
2481
2482 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2483 # It thinks the first close brace ends the variable substitution.
2484 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2485
2486 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2487
2488 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2489
2490 if test -n "$ac_tool_prefix"; then
2491   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2492 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2493 echo "$as_me:$LINENO: checking for $ac_word" >&5
2494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2495 if test "${ac_cv_prog_RANLIB+set}" = set; then
2496   echo $ECHO_N "(cached) $ECHO_C" >&6
2497 else
2498   if test -n "$RANLIB"; then
2499   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2500 else
2501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2502 for as_dir in $PATH
2503 do
2504   IFS=$as_save_IFS
2505   test -z "$as_dir" && as_dir=.
2506   for ac_exec_ext in '' $ac_executable_extensions; do
2507   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2508     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2509     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2510     break 2
2511   fi
2512 done
2513 done
2514
2515 fi
2516 fi
2517 RANLIB=$ac_cv_prog_RANLIB
2518 if test -n "$RANLIB"; then
2519   echo "$as_me:$LINENO: result: $RANLIB" >&5
2520 echo "${ECHO_T}$RANLIB" >&6
2521 else
2522   echo "$as_me:$LINENO: result: no" >&5
2523 echo "${ECHO_T}no" >&6
2524 fi
2525
2526 fi
2527 if test -z "$ac_cv_prog_RANLIB"; then
2528   ac_ct_RANLIB=$RANLIB
2529   # Extract the first word of "ranlib", so it can be a program name with args.
2530 set dummy ranlib; ac_word=$2
2531 echo "$as_me:$LINENO: checking for $ac_word" >&5
2532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2533 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2534   echo $ECHO_N "(cached) $ECHO_C" >&6
2535 else
2536   if test -n "$ac_ct_RANLIB"; then
2537   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2538 else
2539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2540 for as_dir in $PATH
2541 do
2542   IFS=$as_save_IFS
2543   test -z "$as_dir" && as_dir=.
2544   for ac_exec_ext in '' $ac_executable_extensions; do
2545   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2546     ac_cv_prog_ac_ct_RANLIB="ranlib"
2547     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2548     break 2
2549   fi
2550 done
2551 done
2552
2553   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2554 fi
2555 fi
2556 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2557 if test -n "$ac_ct_RANLIB"; then
2558   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2559 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2560 else
2561   echo "$as_me:$LINENO: result: no" >&5
2562 echo "${ECHO_T}no" >&6
2563 fi
2564
2565   RANLIB=$ac_ct_RANLIB
2566 else
2567   RANLIB="$ac_cv_prog_RANLIB"
2568 fi
2569
2570
2571 # Extract the first word of "strip", so it can be a program name with args.
2572 set dummy strip; ac_word=$2
2573 echo "$as_me:$LINENO: checking for $ac_word" >&5
2574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2575 if test "${ac_cv_prog_STRIP+set}" = set; then
2576   echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578   if test -n "$STRIP"; then
2579   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2580 else
2581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582 for as_dir in $PATH
2583 do
2584   IFS=$as_save_IFS
2585   test -z "$as_dir" && as_dir=.
2586   for ac_exec_ext in '' $ac_executable_extensions; do
2587   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2588     ac_cv_prog_STRIP="strip"
2589     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2590     break 2
2591   fi
2592 done
2593 done
2594
2595   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2596 fi
2597 fi
2598 STRIP=$ac_cv_prog_STRIP
2599 if test -n "$STRIP"; then
2600   echo "$as_me:$LINENO: result: $STRIP" >&5
2601 echo "${ECHO_T}$STRIP" >&6
2602 else
2603   echo "$as_me:$LINENO: result: no" >&5
2604 echo "${ECHO_T}no" >&6
2605 fi
2606
2607
2608
2609 # Check whether --enable-shared or --disable-shared was given.
2610 if test "${enable_shared+set}" = set; then
2611   enableval="$enable_shared"
2612   p=${PACKAGE-default}
2613 case $enableval in
2614 yes) enable_shared=yes ;;
2615 no) enable_shared=no ;;
2616 *)
2617   enable_shared=no
2618   # Look at the argument we got.  We use all the common list separators.
2619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2620   for pkg in $enableval; do
2621     if test "X$pkg" = "X$p"; then
2622       enable_shared=yes
2623     fi
2624   done
2625   IFS="$ac_save_ifs"
2626   ;;
2627 esac
2628 else
2629   enable_shared=yes
2630 fi;
2631 # Check whether --enable-static or --disable-static was given.
2632 if test "${enable_static+set}" = set; then
2633   enableval="$enable_static"
2634   p=${PACKAGE-default}
2635 case $enableval in
2636 yes) enable_static=yes ;;
2637 no) enable_static=no ;;
2638 *)
2639   enable_static=no
2640   # Look at the argument we got.  We use all the common list separators.
2641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2642   for pkg in $enableval; do
2643     if test "X$pkg" = "X$p"; then
2644       enable_static=yes
2645     fi
2646   done
2647   IFS="$ac_save_ifs"
2648   ;;
2649 esac
2650 else
2651   enable_static=yes
2652 fi;
2653 # Check whether --enable-fast-install or --disable-fast-install was given.
2654 if test "${enable_fast_install+set}" = set; then
2655   enableval="$enable_fast_install"
2656   p=${PACKAGE-default}
2657 case $enableval in
2658 yes) enable_fast_install=yes ;;
2659 no) enable_fast_install=no ;;
2660 *)
2661   enable_fast_install=no
2662   # Look at the argument we got.  We use all the common list separators.
2663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2664   for pkg in $enableval; do
2665     if test "X$pkg" = "X$p"; then
2666       enable_fast_install=yes
2667     fi
2668   done
2669   IFS="$ac_save_ifs"
2670   ;;
2671 esac
2672 else
2673   enable_fast_install=yes
2674 fi;
2675 # Make sure we can run config.sub.
2676 $ac_config_sub sun4 >/dev/null 2>&1 ||
2677   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2678 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2679    { (exit 1); exit 1; }; }
2680
2681 echo "$as_me:$LINENO: checking build system type" >&5
2682 echo $ECHO_N "checking build system type... $ECHO_C" >&6
2683 if test "${ac_cv_build+set}" = set; then
2684   echo $ECHO_N "(cached) $ECHO_C" >&6
2685 else
2686   ac_cv_build_alias=$build_alias
2687 test -z "$ac_cv_build_alias" &&
2688   ac_cv_build_alias=`$ac_config_guess`
2689 test -z "$ac_cv_build_alias" &&
2690   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2691 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2692    { (exit 1); exit 1; }; }
2693 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2694   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2695 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2696    { (exit 1); exit 1; }; }
2697
2698 fi
2699 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2700 echo "${ECHO_T}$ac_cv_build" >&6
2701 build=$ac_cv_build
2702 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2703 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2704 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2705
2706
2707 echo "$as_me:$LINENO: checking host system type" >&5
2708 echo $ECHO_N "checking host system type... $ECHO_C" >&6
2709 if test "${ac_cv_host+set}" = set; then
2710   echo $ECHO_N "(cached) $ECHO_C" >&6
2711 else
2712   ac_cv_host_alias=$host_alias
2713 test -z "$ac_cv_host_alias" &&
2714   ac_cv_host_alias=$ac_cv_build_alias
2715 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2716   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2717 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2718    { (exit 1); exit 1; }; }
2719
2720 fi
2721 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2722 echo "${ECHO_T}$ac_cv_host" >&6
2723 host=$ac_cv_host
2724 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2725 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2726 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2727
2728
2729 ac_ext=c
2730 ac_cpp='$CPP $CPPFLAGS'
2731 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2732 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2733 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2734 if test -n "$ac_tool_prefix"; then
2735   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2736 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2737 echo "$as_me:$LINENO: checking for $ac_word" >&5
2738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2739 if test "${ac_cv_prog_CC+set}" = set; then
2740   echo $ECHO_N "(cached) $ECHO_C" >&6
2741 else
2742   if test -n "$CC"; then
2743   ac_cv_prog_CC="$CC" # Let the user override the test.
2744 else
2745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2746 for as_dir in $PATH
2747 do
2748   IFS=$as_save_IFS
2749   test -z "$as_dir" && as_dir=.
2750   for ac_exec_ext in '' $ac_executable_extensions; do
2751   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2752     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2753     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2754     break 2
2755   fi
2756 done
2757 done
2758
2759 fi
2760 fi
2761 CC=$ac_cv_prog_CC
2762 if test -n "$CC"; then
2763   echo "$as_me:$LINENO: result: $CC" >&5
2764 echo "${ECHO_T}$CC" >&6
2765 else
2766   echo "$as_me:$LINENO: result: no" >&5
2767 echo "${ECHO_T}no" >&6
2768 fi
2769
2770 fi
2771 if test -z "$ac_cv_prog_CC"; then
2772   ac_ct_CC=$CC
2773   # Extract the first word of "gcc", so it can be a program name with args.
2774 set dummy gcc; ac_word=$2
2775 echo "$as_me:$LINENO: checking for $ac_word" >&5
2776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2777 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2778   echo $ECHO_N "(cached) $ECHO_C" >&6
2779 else
2780   if test -n "$ac_ct_CC"; then
2781   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2782 else
2783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2784 for as_dir in $PATH
2785 do
2786   IFS=$as_save_IFS
2787   test -z "$as_dir" && as_dir=.
2788   for ac_exec_ext in '' $ac_executable_extensions; do
2789   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2790     ac_cv_prog_ac_ct_CC="gcc"
2791     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2792     break 2
2793   fi
2794 done
2795 done
2796
2797 fi
2798 fi
2799 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2800 if test -n "$ac_ct_CC"; then
2801   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2802 echo "${ECHO_T}$ac_ct_CC" >&6
2803 else
2804   echo "$as_me:$LINENO: result: no" >&5
2805 echo "${ECHO_T}no" >&6
2806 fi
2807
2808   CC=$ac_ct_CC
2809 else
2810   CC="$ac_cv_prog_CC"
2811 fi
2812
2813 if test -z "$CC"; then
2814   if test -n "$ac_tool_prefix"; then
2815   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2816 set dummy ${ac_tool_prefix}cc; ac_word=$2
2817 echo "$as_me:$LINENO: checking for $ac_word" >&5
2818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2819 if test "${ac_cv_prog_CC+set}" = set; then
2820   echo $ECHO_N "(cached) $ECHO_C" >&6
2821 else
2822   if test -n "$CC"; then
2823   ac_cv_prog_CC="$CC" # Let the user override the test.
2824 else
2825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2826 for as_dir in $PATH
2827 do
2828   IFS=$as_save_IFS
2829   test -z "$as_dir" && as_dir=.
2830   for ac_exec_ext in '' $ac_executable_extensions; do
2831   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2832     ac_cv_prog_CC="${ac_tool_prefix}cc"
2833     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2834     break 2
2835   fi
2836 done
2837 done
2838
2839 fi
2840 fi
2841 CC=$ac_cv_prog_CC
2842 if test -n "$CC"; then
2843   echo "$as_me:$LINENO: result: $CC" >&5
2844 echo "${ECHO_T}$CC" >&6
2845 else
2846   echo "$as_me:$LINENO: result: no" >&5
2847 echo "${ECHO_T}no" >&6
2848 fi
2849
2850 fi
2851 if test -z "$ac_cv_prog_CC"; then
2852   ac_ct_CC=$CC
2853   # Extract the first word of "cc", so it can be a program name with args.
2854 set dummy cc; ac_word=$2
2855 echo "$as_me:$LINENO: checking for $ac_word" >&5
2856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2857 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2858   echo $ECHO_N "(cached) $ECHO_C" >&6
2859 else
2860   if test -n "$ac_ct_CC"; then
2861   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2862 else
2863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864 for as_dir in $PATH
2865 do
2866   IFS=$as_save_IFS
2867   test -z "$as_dir" && as_dir=.
2868   for ac_exec_ext in '' $ac_executable_extensions; do
2869   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2870     ac_cv_prog_ac_ct_CC="cc"
2871     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2872     break 2
2873   fi
2874 done
2875 done
2876
2877 fi
2878 fi
2879 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2880 if test -n "$ac_ct_CC"; then
2881   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2882 echo "${ECHO_T}$ac_ct_CC" >&6
2883 else
2884   echo "$as_me:$LINENO: result: no" >&5
2885 echo "${ECHO_T}no" >&6
2886 fi
2887
2888   CC=$ac_ct_CC
2889 else
2890   CC="$ac_cv_prog_CC"
2891 fi
2892
2893 fi
2894 if test -z "$CC"; then
2895   # Extract the first word of "cc", so it can be a program name with args.
2896 set dummy cc; ac_word=$2
2897 echo "$as_me:$LINENO: checking for $ac_word" >&5
2898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2899 if test "${ac_cv_prog_CC+set}" = set; then
2900   echo $ECHO_N "(cached) $ECHO_C" >&6
2901 else
2902   if test -n "$CC"; then
2903   ac_cv_prog_CC="$CC" # Let the user override the test.
2904 else
2905   ac_prog_rejected=no
2906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2907 for as_dir in $PATH
2908 do
2909   IFS=$as_save_IFS
2910   test -z "$as_dir" && as_dir=.
2911   for ac_exec_ext in '' $ac_executable_extensions; do
2912   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2913     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2914        ac_prog_rejected=yes
2915        continue
2916      fi
2917     ac_cv_prog_CC="cc"
2918     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2919     break 2
2920   fi
2921 done
2922 done
2923
2924 if test $ac_prog_rejected = yes; then
2925   # We found a bogon in the path, so make sure we never use it.
2926   set dummy $ac_cv_prog_CC
2927   shift
2928   if test $# != 0; then
2929     # We chose a different compiler from the bogus one.
2930     # However, it has the same basename, so the bogon will be chosen
2931     # first if we set CC to just the basename; use the full file name.
2932     shift
2933     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2934   fi
2935 fi
2936 fi
2937 fi
2938 CC=$ac_cv_prog_CC
2939 if test -n "$CC"; then
2940   echo "$as_me:$LINENO: result: $CC" >&5
2941 echo "${ECHO_T}$CC" >&6
2942 else
2943   echo "$as_me:$LINENO: result: no" >&5
2944 echo "${ECHO_T}no" >&6
2945 fi
2946
2947 fi
2948 if test -z "$CC"; then
2949   if test -n "$ac_tool_prefix"; then
2950   for ac_prog in cl
2951   do
2952     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2953 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2954 echo "$as_me:$LINENO: checking for $ac_word" >&5
2955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2956 if test "${ac_cv_prog_CC+set}" = set; then
2957   echo $ECHO_N "(cached) $ECHO_C" >&6
2958 else
2959   if test -n "$CC"; then
2960   ac_cv_prog_CC="$CC" # Let the user override the test.
2961 else
2962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2963 for as_dir in $PATH
2964 do
2965   IFS=$as_save_IFS
2966   test -z "$as_dir" && as_dir=.
2967   for ac_exec_ext in '' $ac_executable_extensions; do
2968   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2969     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2970     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2971     break 2
2972   fi
2973 done
2974 done
2975
2976 fi
2977 fi
2978 CC=$ac_cv_prog_CC
2979 if test -n "$CC"; then
2980   echo "$as_me:$LINENO: result: $CC" >&5
2981 echo "${ECHO_T}$CC" >&6
2982 else
2983   echo "$as_me:$LINENO: result: no" >&5
2984 echo "${ECHO_T}no" >&6
2985 fi
2986
2987     test -n "$CC" && break
2988   done
2989 fi
2990 if test -z "$CC"; then
2991   ac_ct_CC=$CC
2992   for ac_prog in cl
2993 do
2994   # Extract the first word of "$ac_prog", so it can be a program name with args.
2995 set dummy $ac_prog; ac_word=$2
2996 echo "$as_me:$LINENO: checking for $ac_word" >&5
2997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2998 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if test -n "$ac_ct_CC"; then
3002   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3003 else
3004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3005 for as_dir in $PATH
3006 do
3007   IFS=$as_save_IFS
3008   test -z "$as_dir" && as_dir=.
3009   for ac_exec_ext in '' $ac_executable_extensions; do
3010   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3011     ac_cv_prog_ac_ct_CC="$ac_prog"
3012     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3013     break 2
3014   fi
3015 done
3016 done
3017
3018 fi
3019 fi
3020 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3021 if test -n "$ac_ct_CC"; then
3022   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3023 echo "${ECHO_T}$ac_ct_CC" >&6
3024 else
3025   echo "$as_me:$LINENO: result: no" >&5
3026 echo "${ECHO_T}no" >&6
3027 fi
3028
3029   test -n "$ac_ct_CC" && break
3030 done
3031
3032   CC=$ac_ct_CC
3033 fi
3034
3035 fi
3036
3037
3038 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3039 See \`config.log' for more details." >&5
3040 echo "$as_me: error: no acceptable C compiler found in \$PATH
3041 See \`config.log' for more details." >&2;}
3042    { (exit 1); exit 1; }; }
3043
3044 # Provide some information about the compiler.
3045 echo "$as_me:$LINENO:" \
3046      "checking for C compiler version" >&5
3047 ac_compiler=`set X $ac_compile; echo $2`
3048 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3049   (eval $ac_compiler --version </dev/null >&5) 2>&5
3050   ac_status=$?
3051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052   (exit $ac_status); }
3053 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3054   (eval $ac_compiler -v </dev/null >&5) 2>&5
3055   ac_status=$?
3056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3057   (exit $ac_status); }
3058 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3059   (eval $ac_compiler -V </dev/null >&5) 2>&5
3060   ac_status=$?
3061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3062   (exit $ac_status); }
3063
3064 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3065 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3066 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3067   echo $ECHO_N "(cached) $ECHO_C" >&6
3068 else
3069   cat >conftest.$ac_ext <<_ACEOF
3070 #line $LINENO "configure"
3071 /* confdefs.h.  */
3072 _ACEOF
3073 cat confdefs.h >>conftest.$ac_ext
3074 cat >>conftest.$ac_ext <<_ACEOF
3075 /* end confdefs.h.  */
3076
3077 int
3078 main ()
3079 {
3080 #ifndef __GNUC__
3081        choke me
3082 #endif
3083
3084   ;
3085   return 0;
3086 }
3087 _ACEOF
3088 rm -f conftest.$ac_objext
3089 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3090   (eval $ac_compile) 2>&5
3091   ac_status=$?
3092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3093   (exit $ac_status); } &&
3094          { ac_try='test -s conftest.$ac_objext'
3095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3096   (eval $ac_try) 2>&5
3097   ac_status=$?
3098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3099   (exit $ac_status); }; }; then
3100   ac_compiler_gnu=yes
3101 else
3102   echo "$as_me: failed program was:" >&5
3103 sed 's/^/| /' conftest.$ac_ext >&5
3104
3105 ac_compiler_gnu=no
3106 fi
3107 rm -f conftest.$ac_objext conftest.$ac_ext
3108 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3109
3110 fi
3111 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3112 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3113 GCC=`test $ac_compiler_gnu = yes && echo yes`
3114 ac_test_CFLAGS=${CFLAGS+set}
3115 ac_save_CFLAGS=$CFLAGS
3116 CFLAGS="-g"
3117 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3118 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
3119 if test "${ac_cv_prog_cc_g+set}" = set; then
3120   echo $ECHO_N "(cached) $ECHO_C" >&6
3121 else
3122   cat >conftest.$ac_ext <<_ACEOF
3123 #line $LINENO "configure"
3124 /* confdefs.h.  */
3125 _ACEOF
3126 cat confdefs.h >>conftest.$ac_ext
3127 cat >>conftest.$ac_ext <<_ACEOF
3128 /* end confdefs.h.  */
3129
3130 int
3131 main ()
3132 {
3133
3134   ;
3135   return 0;
3136 }
3137 _ACEOF
3138 rm -f conftest.$ac_objext
3139 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3140   (eval $ac_compile) 2>&5
3141   ac_status=$?
3142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3143   (exit $ac_status); } &&
3144          { ac_try='test -s conftest.$ac_objext'
3145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3146   (eval $ac_try) 2>&5
3147   ac_status=$?
3148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3149   (exit $ac_status); }; }; then
3150   ac_cv_prog_cc_g=yes
3151 else
3152   echo "$as_me: failed program was:" >&5
3153 sed 's/^/| /' conftest.$ac_ext >&5
3154
3155 ac_cv_prog_cc_g=no
3156 fi
3157 rm -f conftest.$ac_objext conftest.$ac_ext
3158 fi
3159 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3160 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
3161 if test "$ac_test_CFLAGS" = set; then
3162   CFLAGS=$ac_save_CFLAGS
3163 elif test $ac_cv_prog_cc_g = yes; then
3164   if test "$GCC" = yes; then
3165     CFLAGS="-g -O2"
3166   else
3167     CFLAGS="-g"
3168   fi
3169 else
3170   if test "$GCC" = yes; then
3171     CFLAGS="-O2"
3172   else
3173     CFLAGS=
3174   fi
3175 fi
3176 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
3177 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3178 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3179   echo $ECHO_N "(cached) $ECHO_C" >&6
3180 else
3181   ac_cv_prog_cc_stdc=no
3182 ac_save_CC=$CC
3183 cat >conftest.$ac_ext <<_ACEOF
3184 #line $LINENO "configure"
3185 /* confdefs.h.  */
3186 _ACEOF
3187 cat confdefs.h >>conftest.$ac_ext
3188 cat >>conftest.$ac_ext <<_ACEOF
3189 /* end confdefs.h.  */
3190 #include <stdarg.h>
3191 #include <stdio.h>
3192 #include <sys/types.h>
3193 #include <sys/stat.h>
3194 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3195 struct buf { int x; };
3196 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3197 static char *e (p, i)
3198      char **p;
3199      int i;
3200 {
3201   return p[i];
3202 }
3203 static char *f (char * (*g) (char **, int), char **p, ...)
3204 {
3205   char *s;
3206   va_list v;
3207   va_start (v,p);
3208   s = g (p, va_arg (v,int));
3209   va_end (v);
3210   return s;
3211 }
3212 int test (int i, double x);
3213 struct s1 {int (*f) (int a);};
3214 struct s2 {int (*f) (double a);};
3215 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3216 int argc;
3217 char **argv;
3218 int
3219 main ()
3220 {
3221 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3222   ;
3223   return 0;
3224 }
3225 _ACEOF
3226 # Don't try gcc -ansi; that turns off useful extensions and
3227 # breaks some systems' header files.
3228 # AIX                   -qlanglvl=ansi
3229 # Ultrix and OSF/1      -std1
3230 # HP-UX 10.20 and later -Ae
3231 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3232 # SVR4                  -Xc -D__EXTENSIONS__
3233 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3234 do
3235   CC="$ac_save_CC $ac_arg"
3236   rm -f conftest.$ac_objext
3237 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3238   (eval $ac_compile) 2>&5
3239   ac_status=$?
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); } &&
3242          { ac_try='test -s conftest.$ac_objext'
3243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3244   (eval $ac_try) 2>&5
3245   ac_status=$?
3246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247   (exit $ac_status); }; }; then
3248   ac_cv_prog_cc_stdc=$ac_arg
3249 break
3250 else
3251   echo "$as_me: failed program was:" >&5
3252 sed 's/^/| /' conftest.$ac_ext >&5
3253
3254 fi
3255 rm -f conftest.$ac_objext
3256 done
3257 rm -f conftest.$ac_ext conftest.$ac_objext
3258 CC=$ac_save_CC
3259
3260 fi
3261
3262 case "x$ac_cv_prog_cc_stdc" in
3263   x|xno)
3264     echo "$as_me:$LINENO: result: none needed" >&5
3265 echo "${ECHO_T}none needed" >&6 ;;
3266   *)
3267     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
3268 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3269     CC="$CC $ac_cv_prog_cc_stdc" ;;
3270 esac
3271
3272 # Some people use a C++ compiler to compile C.  Since we use `exit',
3273 # in C++ we need to declare it.  In case someone uses the same compiler
3274 # for both compiling C and C++ we need to have the C++ compiler decide
3275 # the declaration of exit, since it's the most demanding environment.
3276 cat >conftest.$ac_ext <<_ACEOF
3277 #ifndef __cplusplus
3278   choke me
3279 #endif
3280 _ACEOF
3281 rm -f conftest.$ac_objext
3282 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3286   (exit $ac_status); } &&
3287          { ac_try='test -s conftest.$ac_objext'
3288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3292   (exit $ac_status); }; }; then
3293   for ac_declaration in \
3294    ''\
3295    '#include <stdlib.h>' \
3296    'extern "C" void std::exit (int) throw (); using std::exit;' \
3297    'extern "C" void std::exit (int); using std::exit;' \
3298    'extern "C" void exit (int) throw ();' \
3299    'extern "C" void exit (int);' \
3300    'void exit (int);'
3301 do
3302   cat >conftest.$ac_ext <<_ACEOF
3303 #line $LINENO "configure"
3304 /* confdefs.h.  */
3305 _ACEOF
3306 cat confdefs.h >>conftest.$ac_ext
3307 cat >>conftest.$ac_ext <<_ACEOF
3308 /* end confdefs.h.  */
3309 #include <stdlib.h>
3310 $ac_declaration
3311 int
3312 main ()
3313 {
3314 exit (42);
3315   ;
3316   return 0;
3317 }
3318 _ACEOF
3319 rm -f conftest.$ac_objext
3320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3321   (eval $ac_compile) 2>&5
3322   ac_status=$?
3323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3324   (exit $ac_status); } &&
3325          { ac_try='test -s conftest.$ac_objext'
3326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3327   (eval $ac_try) 2>&5
3328   ac_status=$?
3329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3330   (exit $ac_status); }; }; then
3331   :
3332 else
3333   echo "$as_me: failed program was:" >&5
3334 sed 's/^/| /' conftest.$ac_ext >&5
3335
3336 continue
3337 fi
3338 rm -f conftest.$ac_objext conftest.$ac_ext
3339   cat >conftest.$ac_ext <<_ACEOF
3340 #line $LINENO "configure"
3341 /* confdefs.h.  */
3342 _ACEOF
3343 cat confdefs.h >>conftest.$ac_ext
3344 cat >>conftest.$ac_ext <<_ACEOF
3345 /* end confdefs.h.  */
3346 $ac_declaration
3347 int
3348 main ()
3349 {
3350 exit (42);
3351   ;
3352   return 0;
3353 }
3354 _ACEOF
3355 rm -f conftest.$ac_objext
3356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3357   (eval $ac_compile) 2>&5
3358   ac_status=$?
3359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3360   (exit $ac_status); } &&
3361          { ac_try='test -s conftest.$ac_objext'
3362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3363   (eval $ac_try) 2>&5
3364   ac_status=$?
3365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3366   (exit $ac_status); }; }; then
3367   break
3368 else
3369   echo "$as_me: failed program was:" >&5
3370 sed 's/^/| /' conftest.$ac_ext >&5
3371
3372 fi
3373 rm -f conftest.$ac_objext conftest.$ac_ext
3374 done
3375 rm -f conftest*
3376 if test -n "$ac_declaration"; then
3377   echo '#ifdef __cplusplus' >>confdefs.h
3378   echo $ac_declaration      >>confdefs.h
3379   echo '#endif'             >>confdefs.h
3380 fi
3381
3382 else
3383   echo "$as_me: failed program was:" >&5
3384 sed 's/^/| /' conftest.$ac_ext >&5
3385
3386 fi
3387 rm -f conftest.$ac_objext conftest.$ac_ext
3388 ac_ext=c
3389 ac_cpp='$CPP $CPPFLAGS'
3390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3393
3394 # Find the correct PATH separator.  Usually this is `:', but
3395 # DJGPP uses `;' like DOS.
3396 if test "X${PATH_SEPARATOR+set}" != Xset; then
3397   UNAME=${UNAME-`uname 2>/dev/null`}
3398   case X$UNAME in
3399     *-DOS) lt_cv_sys_path_separator=';' ;;
3400     *)     lt_cv_sys_path_separator=':' ;;
3401   esac
3402   PATH_SEPARATOR=$lt_cv_sys_path_separator
3403 fi
3404
3405
3406 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3407 if test "${with_gnu_ld+set}" = set; then
3408   withval="$with_gnu_ld"
3409   test "$withval" = no || with_gnu_ld=yes
3410 else
3411   with_gnu_ld=no
3412 fi;
3413 ac_prog=ld
3414 if test "$GCC" = yes; then
3415   # Check if gcc -print-prog-name=ld gives a path.
3416   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3417 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3418   case $host in
3419   *-*-mingw*)
3420     # gcc leaves a trailing carriage return which upsets mingw
3421     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3422   *)
3423     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3424   esac
3425   case $ac_prog in
3426     # Accept absolute paths.
3427     [\\/]* | [A-Za-z]:[\\/]*)
3428       re_direlt='/[^/][^/]*/\.\./'
3429       # Canonicalize the path of ld
3430       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3431       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3432         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3433       done
3434       test -z "$LD" && LD="$ac_prog"
3435       ;;
3436   "")
3437     # If it fails, then pretend we aren't using GCC.
3438     ac_prog=ld
3439     ;;
3440   *)
3441     # If it is relative, then search for the first ld in PATH.
3442     with_gnu_ld=unknown
3443     ;;
3444   esac
3445 elif test "$with_gnu_ld" = yes; then
3446   echo "$as_me:$LINENO: checking for GNU ld" >&5
3447 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3448 else
3449   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3450 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3451 fi
3452 if test "${lt_cv_path_LD+set}" = set; then
3453   echo $ECHO_N "(cached) $ECHO_C" >&6
3454 else
3455   if test -z "$LD"; then
3456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3457   for ac_dir in $PATH; do
3458     test -z "$ac_dir" && ac_dir=.
3459     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3460       lt_cv_path_LD="$ac_dir/$ac_prog"
3461       # Check to see if the program is GNU ld.  I'd rather use --version,
3462       # but apparently some GNU ld's only accept -v.
3463       # Break only if it was the GNU/non-GNU ld that we prefer.
3464       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3465         test "$with_gnu_ld" != no && break
3466       else
3467         test "$with_gnu_ld" != yes && break
3468       fi
3469     fi
3470   done
3471   IFS="$ac_save_ifs"
3472 else
3473   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3474 fi
3475 fi
3476
3477 LD="$lt_cv_path_LD"
3478 if test -n "$LD"; then
3479   echo "$as_me:$LINENO: result: $LD" >&5
3480 echo "${ECHO_T}$LD" >&6
3481 else
3482   echo "$as_me:$LINENO: result: no" >&5
3483 echo "${ECHO_T}no" >&6
3484 fi
3485 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3486 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3487    { (exit 1); exit 1; }; }
3488 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3489 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3490 if test "${lt_cv_prog_gnu_ld+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3494 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3495   lt_cv_prog_gnu_ld=yes
3496 else
3497   lt_cv_prog_gnu_ld=no
3498 fi
3499 fi
3500 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
3501 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
3502 with_gnu_ld=$lt_cv_prog_gnu_ld
3503
3504
3505 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
3506 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
3507 if test "${lt_cv_ld_reload_flag+set}" = set; then
3508   echo $ECHO_N "(cached) $ECHO_C" >&6
3509 else
3510   lt_cv_ld_reload_flag='-r'
3511 fi
3512 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
3513 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
3514 reload_flag=$lt_cv_ld_reload_flag
3515 test -n "$reload_flag" && reload_flag=" $reload_flag"
3516
3517 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
3518 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
3519 if test "${lt_cv_path_NM+set}" = set; then
3520   echo $ECHO_N "(cached) $ECHO_C" >&6
3521 else
3522   if test -n "$NM"; then
3523   # Let the user override the test.
3524   lt_cv_path_NM="$NM"
3525 else
3526   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3527   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3528     test -z "$ac_dir" && ac_dir=.
3529     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3530     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3531       # Check to see if the nm accepts a BSD-compat flag.
3532       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3533       #   nm: unknown option "B" ignored
3534       # Tru64's nm complains that /dev/null is an invalid object file
3535       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3536         lt_cv_path_NM="$tmp_nm -B"
3537         break
3538       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3539         lt_cv_path_NM="$tmp_nm -p"
3540         break
3541       else
3542         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3543         continue # so that we can try to find one that supports BSD flags
3544       fi
3545     fi
3546   done
3547   IFS="$ac_save_ifs"
3548   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3549 fi
3550 fi
3551
3552 NM="$lt_cv_path_NM"
3553 echo "$as_me:$LINENO: result: $NM" >&5
3554 echo "${ECHO_T}$NM" >&6
3555
3556 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3557 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3558 LN_S=$as_ln_s
3559 if test "$LN_S" = "ln -s"; then
3560   echo "$as_me:$LINENO: result: yes" >&5
3561 echo "${ECHO_T}yes" >&6
3562 else
3563   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3564 echo "${ECHO_T}no, using $LN_S" >&6
3565 fi
3566
3567 echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
3568 echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
3569 if test "${lt_cv_deplibs_check_method+set}" = set; then
3570   echo $ECHO_N "(cached) $ECHO_C" >&6
3571 else
3572   lt_cv_file_magic_cmd='$MAGIC_CMD'
3573 lt_cv_file_magic_test_file=
3574 lt_cv_deplibs_check_method='unknown'
3575 # Need to set the preceding variable on all platforms that support
3576 # interlibrary dependencies.
3577 # 'none' -- dependencies not supported.
3578 # `unknown' -- same as none, but documents that we really don't know.
3579 # 'pass_all' -- all dependencies passed with no checks.
3580 # 'test_compile' -- check by making test program.
3581 # 'file_magic [[regex]]' -- check by looking for files in library path
3582 # which responds to the $file_magic_cmd with a given egrep regex.
3583 # If you have `file' or equivalent on your system and you're not sure
3584 # whether `pass_all' will *always* work, you probably want this one.
3585
3586 case $host_os in
3587 aix4* | aix5*)
3588   lt_cv_deplibs_check_method=pass_all
3589   ;;
3590
3591 beos*)
3592   lt_cv_deplibs_check_method=pass_all
3593   ;;
3594
3595 bsdi4*)
3596   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3597   lt_cv_file_magic_cmd='/usr/bin/file -L'
3598   lt_cv_file_magic_test_file=/shlib/libc.so
3599   ;;
3600
3601 cygwin* | mingw* | pw32*)
3602   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3603   lt_cv_file_magic_cmd='$OBJDUMP -f'
3604   ;;
3605
3606 darwin* | rhapsody*)
3607   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3608   lt_cv_file_magic_cmd='/usr/bin/file -L'
3609   case "$host_os" in
3610   rhapsody* | darwin1.[012])
3611     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3612     ;;
3613   *) # Darwin 1.3 on
3614     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3615     ;;
3616   esac
3617   ;;
3618
3619 freebsd*)
3620   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3621     case $host_cpu in
3622     i*86 )
3623       # Not sure whether the presence of OpenBSD here was a mistake.
3624       # Let's accept both of them until this is cleared up.
3625       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3626       lt_cv_file_magic_cmd=/usr/bin/file
3627       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3628       ;;
3629     esac
3630   else
3631     lt_cv_deplibs_check_method=pass_all
3632   fi
3633   ;;
3634
3635 gnu*)
3636   lt_cv_deplibs_check_method=pass_all
3637   ;;
3638
3639 hpux10.20*|hpux11*)
3640   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3641   lt_cv_file_magic_cmd=/usr/bin/file
3642   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3643   ;;
3644
3645 irix5* | irix6* | nonstopux*)
3646   case $host_os in
3647   irix5* | nonstopux*)
3648     # this will be overridden with pass_all, but let us keep it just in case
3649     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3650     ;;
3651   *)
3652     case $LD in
3653     *-32|*"-32 ") libmagic=32-bit;;
3654     *-n32|*"-n32 ") libmagic=N32;;
3655     *-64|*"-64 ") libmagic=64-bit;;
3656     *) libmagic=never-match;;
3657     esac
3658     # this will be overridden with pass_all, but let us keep it just in case
3659     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3660     ;;
3661   esac
3662   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3663   lt_cv_deplibs_check_method=pass_all
3664   ;;
3665
3666 # This must be Linux ELF.
3667 linux-gnu*)
3668   case $host_cpu in
3669   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3670     lt_cv_deplibs_check_method=pass_all ;;
3671   *)
3672     # glibc up to 2.1.1 does not perform some relocations on ARM
3673     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3674   esac
3675   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3676   ;;
3677
3678 netbsd*)
3679   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3680     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3681   else
3682     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3683   fi
3684   ;;
3685
3686 newos6*)
3687   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3688   lt_cv_file_magic_cmd=/usr/bin/file
3689   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3690   ;;
3691
3692 openbsd*)
3693   lt_cv_file_magic_cmd=/usr/bin/file
3694   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3695   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3696     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3697   else
3698     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3699   fi
3700   ;;
3701
3702 osf3* | osf4* | osf5*)
3703   # this will be overridden with pass_all, but let us keep it just in case
3704   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3705   lt_cv_file_magic_test_file=/shlib/libc.so
3706   lt_cv_deplibs_check_method=pass_all
3707   ;;
3708
3709 sco3.2v5*)
3710   lt_cv_deplibs_check_method=pass_all
3711   ;;
3712
3713 solaris*)
3714   lt_cv_deplibs_check_method=pass_all
3715   lt_cv_file_magic_test_file=/lib/libc.so
3716   ;;
3717
3718 sysv5uw[78]* | sysv4*uw2*)
3719   lt_cv_deplibs_check_method=pass_all
3720   ;;
3721
3722 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3723   case $host_vendor in
3724   motorola)
3725     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]'
3726     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3727     ;;
3728   ncr)
3729     lt_cv_deplibs_check_method=pass_all
3730     ;;
3731   sequent)
3732     lt_cv_file_magic_cmd='/bin/file'
3733     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3734     ;;
3735   sni)
3736     lt_cv_file_magic_cmd='/bin/file'
3737     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3738     lt_cv_file_magic_test_file=/lib/libc.so
3739     ;;
3740   esac
3741   ;;
3742 esac
3743
3744 fi
3745 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
3746 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
3747 file_magic_cmd=$lt_cv_file_magic_cmd
3748 deplibs_check_method=$lt_cv_deplibs_check_method
3749
3750
3751
3752
3753
3754
3755
3756
3757 # Check for command to grab the raw symbol name followed by C symbol from nm.
3758 echo "$as_me:$LINENO: checking command to parse $NM output" >&5
3759 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
3760 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
3761   echo $ECHO_N "(cached) $ECHO_C" >&6
3762 else
3763
3764 # These are sane defaults that work on at least a few old systems.
3765 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3766
3767 # Character class describing NM global symbol codes.
3768 symcode='[BCDEGRST]'
3769
3770 # Regexp to match symbols that can be accessed directly from C.
3771 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3772
3773 # Transform the above into a raw symbol and a C symbol.
3774 symxfrm='\1 \2\3 \3'
3775
3776 # Transform an extracted symbol line into a proper C declaration
3777 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3778
3779 # Transform an extracted symbol line into symbol name and symbol address
3780 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'"
3781
3782 # Define system-specific variables.
3783 case $host_os in
3784 aix*)
3785   symcode='[BCDT]'
3786   ;;
3787 cygwin* | mingw* | pw32*)
3788   symcode='[ABCDGISTW]'
3789   ;;
3790 hpux*) # Its linker distinguishes data from code symbols
3791   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3792   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'"
3793   ;;
3794 irix* | nonstopux*)
3795   symcode='[BCDEGRST]'
3796   ;;
3797 solaris* | sysv5*)
3798   symcode='[BDT]'
3799   ;;
3800 sysv4)
3801   symcode='[DFNSTU]'
3802   ;;
3803 esac
3804
3805 # Handle CRLF in mingw tool chain
3806 opt_cr=
3807 case $host_os in
3808 mingw*)
3809   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3810   ;;
3811 esac
3812
3813 # If we're using GNU nm, then use its standard symbol codes.
3814 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3815   symcode='[ABCDGISTW]'
3816 fi
3817
3818 # Try without a prefix undercore, then with it.
3819 for ac_symprfx in "" "_"; do
3820
3821   # Write the raw and C identifiers.
3822 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3823
3824   # Check to see that the pipe works correctly.
3825   pipe_works=no
3826   rm -f conftest*
3827   cat > conftest.$ac_ext <<EOF
3828 #ifdef __cplusplus
3829 extern "C" {
3830 #endif
3831 char nm_test_var;
3832 void nm_test_func(){}
3833 #ifdef __cplusplus
3834 }
3835 #endif
3836 int main(){nm_test_var='a';nm_test_func();return(0);}
3837 EOF
3838
3839   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3840   (eval $ac_compile) 2>&5
3841   ac_status=$?
3842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3843   (exit $ac_status); }; then
3844     # Now try to grab the symbols.
3845     nlist=conftest.nm
3846     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
3847   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
3848   ac_status=$?
3849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3850   (exit $ac_status); } && test -s "$nlist"; then
3851       # Try sorting and uniquifying the output.
3852       if sort "$nlist" | uniq > "$nlist"T; then
3853         mv -f "$nlist"T "$nlist"
3854       else
3855         rm -f "$nlist"T
3856       fi
3857
3858       # Make sure that we snagged all the symbols we need.
3859       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3860         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3861           cat <<EOF > conftest.$ac_ext
3862 #ifdef __cplusplus
3863 extern "C" {
3864 #endif
3865
3866 EOF
3867           # Now generate the symbol file.
3868           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3869
3870           cat <<EOF >> conftest.$ac_ext
3871 #if defined (__STDC__) && __STDC__
3872 # define lt_ptr void *
3873 #else
3874 # define lt_ptr char *
3875 # define const
3876 #endif
3877
3878 /* The mapping between symbol names and symbols. */
3879 const struct {
3880   const char *name;
3881   lt_ptr address;
3882 }
3883 lt_preloaded_symbols[] =
3884 {
3885 EOF
3886           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3887           cat <<\EOF >> conftest.$ac_ext
3888   {0, (lt_ptr) 0}
3889 };
3890
3891 #ifdef __cplusplus
3892 }
3893 #endif
3894 EOF
3895           # Now try linking the two files.
3896           mv conftest.$ac_objext conftstm.$ac_objext
3897           save_LIBS="$LIBS"
3898           save_CFLAGS="$CFLAGS"
3899           LIBS="conftstm.$ac_objext"
3900           CFLAGS="$CFLAGS$no_builtin_flag"
3901           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3902   (eval $ac_link) 2>&5
3903   ac_status=$?
3904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3905   (exit $ac_status); } && test -s conftest; then
3906             pipe_works=yes
3907           fi
3908           LIBS="$save_LIBS"
3909           CFLAGS="$save_CFLAGS"
3910         else
3911           echo "cannot find nm_test_func in $nlist" >&5
3912         fi
3913       else
3914         echo "cannot find nm_test_var in $nlist" >&5
3915       fi
3916     else
3917       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3918     fi
3919   else
3920     echo "$progname: failed program was:" >&5
3921     cat conftest.$ac_ext >&5
3922   fi
3923   rm -f conftest* conftst*
3924
3925   # Do not use the global_symbol_pipe unless it works.
3926   if test "$pipe_works" = yes; then
3927     break
3928   else
3929     lt_cv_sys_global_symbol_pipe=
3930   fi
3931 done
3932
3933 fi
3934
3935 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3936 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3937   global_symbol_to_cdecl=
3938   global_symbol_to_c_name_address=
3939 else
3940   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3941   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3942 fi
3943 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3944 then
3945   echo "$as_me:$LINENO: result: failed" >&5
3946 echo "${ECHO_T}failed" >&6
3947 else
3948   echo "$as_me:$LINENO: result: ok" >&5
3949 echo "${ECHO_T}ok" >&6
3950 fi
3951
3952 ac_ext=c
3953 ac_cpp='$CPP $CPPFLAGS'
3954 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3955 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3957 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3958 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3959 # On Suns, sometimes $CPP names a directory.
3960 if test -n "$CPP" && test -d "$CPP"; then
3961   CPP=
3962 fi
3963 if test -z "$CPP"; then
3964   if test "${ac_cv_prog_CPP+set}" = set; then
3965   echo $ECHO_N "(cached) $ECHO_C" >&6
3966 else
3967       # Double quotes because CPP needs to be expanded
3968     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3969     do
3970       ac_preproc_ok=false
3971 for ac_c_preproc_warn_flag in '' yes
3972 do
3973   # Use a header file that comes with gcc, so configuring glibc
3974   # with a fresh cross-compiler works.
3975   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3976   # <limits.h> exists even on freestanding compilers.
3977   # On the NeXT, cc -E runs the code through the compiler's parser,
3978   # not just through cpp. "Syntax error" is here to catch this case.
3979   cat >conftest.$ac_ext <<_ACEOF
3980 #line $LINENO "configure"
3981 /* confdefs.h.  */
3982 _ACEOF
3983 cat confdefs.h >>conftest.$ac_ext
3984 cat >>conftest.$ac_ext <<_ACEOF
3985 /* end confdefs.h.  */
3986 #ifdef __STDC__
3987 # include <limits.h>
3988 #else
3989 # include <assert.h>
3990 #endif
3991                      Syntax error
3992 _ACEOF
3993 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3995   ac_status=$?
3996   grep -v '^ *+' conftest.er1 >conftest.err
3997   rm -f conftest.er1
3998   cat conftest.err >&5
3999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000   (exit $ac_status); } >/dev/null; then
4001   if test -s conftest.err; then
4002     ac_cpp_err=$ac_c_preproc_warn_flag
4003   else
4004     ac_cpp_err=
4005   fi
4006 else
4007   ac_cpp_err=yes
4008 fi
4009 if test -z "$ac_cpp_err"; then
4010   :
4011 else
4012   echo "$as_me: failed program was:" >&5
4013 sed 's/^/| /' conftest.$ac_ext >&5
4014
4015   # Broken: fails on valid input.
4016 continue
4017 fi
4018 rm -f conftest.err conftest.$ac_ext
4019
4020   # OK, works on sane cases.  Now check whether non-existent headers
4021   # can be detected and how.
4022   cat >conftest.$ac_ext <<_ACEOF
4023 #line $LINENO "configure"
4024 /* confdefs.h.  */
4025 _ACEOF
4026 cat confdefs.h >>conftest.$ac_ext
4027 cat >>conftest.$ac_ext <<_ACEOF
4028 /* end confdefs.h.  */
4029 #include <ac_nonexistent.h>
4030 _ACEOF
4031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4033   ac_status=$?
4034   grep -v '^ *+' conftest.er1 >conftest.err
4035   rm -f conftest.er1
4036   cat conftest.err >&5
4037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4038   (exit $ac_status); } >/dev/null; then
4039   if test -s conftest.err; then
4040     ac_cpp_err=$ac_c_preproc_warn_flag
4041   else
4042     ac_cpp_err=
4043   fi
4044 else
4045   ac_cpp_err=yes
4046 fi
4047 if test -z "$ac_cpp_err"; then
4048   # Broken: success on invalid input.
4049 continue
4050 else
4051   echo "$as_me: failed program was:" >&5
4052 sed 's/^/| /' conftest.$ac_ext >&5
4053
4054   # Passes both tests.
4055 ac_preproc_ok=:
4056 break
4057 fi
4058 rm -f conftest.err conftest.$ac_ext
4059
4060 done
4061 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4062 rm -f conftest.err conftest.$ac_ext
4063 if $ac_preproc_ok; then
4064   break
4065 fi
4066
4067     done
4068     ac_cv_prog_CPP=$CPP
4069
4070 fi
4071   CPP=$ac_cv_prog_CPP
4072 else
4073   ac_cv_prog_CPP=$CPP
4074 fi
4075 echo "$as_me:$LINENO: result: $CPP" >&5
4076 echo "${ECHO_T}$CPP" >&6
4077 ac_preproc_ok=false
4078 for ac_c_preproc_warn_flag in '' yes
4079 do
4080   # Use a header file that comes with gcc, so configuring glibc
4081   # with a fresh cross-compiler works.
4082   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4083   # <limits.h> exists even on freestanding compilers.
4084   # On the NeXT, cc -E runs the code through the compiler's parser,
4085   # not just through cpp. "Syntax error" is here to catch this case.
4086   cat >conftest.$ac_ext <<_ACEOF
4087 #line $LINENO "configure"
4088 /* confdefs.h.  */
4089 _ACEOF
4090 cat confdefs.h >>conftest.$ac_ext
4091 cat >>conftest.$ac_ext <<_ACEOF
4092 /* end confdefs.h.  */
4093 #ifdef __STDC__
4094 # include <limits.h>
4095 #else
4096 # include <assert.h>
4097 #endif
4098                      Syntax error
4099 _ACEOF
4100 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4102   ac_status=$?
4103   grep -v '^ *+' conftest.er1 >conftest.err
4104   rm -f conftest.er1
4105   cat conftest.err >&5
4106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4107   (exit $ac_status); } >/dev/null; then
4108   if test -s conftest.err; then
4109     ac_cpp_err=$ac_c_preproc_warn_flag
4110   else
4111     ac_cpp_err=
4112   fi
4113 else
4114   ac_cpp_err=yes
4115 fi
4116 if test -z "$ac_cpp_err"; then
4117   :
4118 else
4119   echo "$as_me: failed program was:" >&5
4120 sed 's/^/| /' conftest.$ac_ext >&5
4121
4122   # Broken: fails on valid input.
4123 continue
4124 fi
4125 rm -f conftest.err conftest.$ac_ext
4126
4127   # OK, works on sane cases.  Now check whether non-existent headers
4128   # can be detected and how.
4129   cat >conftest.$ac_ext <<_ACEOF
4130 #line $LINENO "configure"
4131 /* confdefs.h.  */
4132 _ACEOF
4133 cat confdefs.h >>conftest.$ac_ext
4134 cat >>conftest.$ac_ext <<_ACEOF
4135 /* end confdefs.h.  */
4136 #include <ac_nonexistent.h>
4137 _ACEOF
4138 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4140   ac_status=$?
4141   grep -v '^ *+' conftest.er1 >conftest.err
4142   rm -f conftest.er1
4143   cat conftest.err >&5
4144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145   (exit $ac_status); } >/dev/null; then
4146   if test -s conftest.err; then
4147     ac_cpp_err=$ac_c_preproc_warn_flag
4148   else
4149     ac_cpp_err=
4150   fi
4151 else
4152   ac_cpp_err=yes
4153 fi
4154 if test -z "$ac_cpp_err"; then
4155   # Broken: success on invalid input.
4156 continue
4157 else
4158   echo "$as_me: failed program was:" >&5
4159 sed 's/^/| /' conftest.$ac_ext >&5
4160
4161   # Passes both tests.
4162 ac_preproc_ok=:
4163 break
4164 fi
4165 rm -f conftest.err conftest.$ac_ext
4166
4167 done
4168 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4169 rm -f conftest.err conftest.$ac_ext
4170 if $ac_preproc_ok; then
4171   :
4172 else
4173   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4174 See \`config.log' for more details." >&5
4175 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4176 See \`config.log' for more details." >&2;}
4177    { (exit 1); exit 1; }; }
4178 fi
4179
4180 ac_ext=c
4181 ac_cpp='$CPP $CPPFLAGS'
4182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4185
4186
4187 echo "$as_me:$LINENO: checking for egrep" >&5
4188 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4189 if test "${ac_cv_prog_egrep+set}" = set; then
4190   echo $ECHO_N "(cached) $ECHO_C" >&6
4191 else
4192   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4193     then ac_cv_prog_egrep='grep -E'
4194     else ac_cv_prog_egrep='egrep'
4195     fi
4196 fi
4197 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4198 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4199  EGREP=$ac_cv_prog_egrep
4200
4201
4202 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4203 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4204 if test "${ac_cv_header_stdc+set}" = set; then
4205   echo $ECHO_N "(cached) $ECHO_C" >&6
4206 else
4207   cat >conftest.$ac_ext <<_ACEOF
4208 #line $LINENO "configure"
4209 /* confdefs.h.  */
4210 _ACEOF
4211 cat confdefs.h >>conftest.$ac_ext
4212 cat >>conftest.$ac_ext <<_ACEOF
4213 /* end confdefs.h.  */
4214 #include <stdlib.h>
4215 #include <stdarg.h>
4216 #include <string.h>
4217 #include <float.h>
4218
4219 int
4220 main ()
4221 {
4222
4223   ;
4224   return 0;
4225 }
4226 _ACEOF
4227 rm -f conftest.$ac_objext
4228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4229   (eval $ac_compile) 2>&5
4230   ac_status=$?
4231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4232   (exit $ac_status); } &&
4233          { ac_try='test -s conftest.$ac_objext'
4234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4235   (eval $ac_try) 2>&5
4236   ac_status=$?
4237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4238   (exit $ac_status); }; }; then
4239   ac_cv_header_stdc=yes
4240 else
4241   echo "$as_me: failed program was:" >&5
4242 sed 's/^/| /' conftest.$ac_ext >&5
4243
4244 ac_cv_header_stdc=no
4245 fi
4246 rm -f conftest.$ac_objext conftest.$ac_ext
4247
4248 if test $ac_cv_header_stdc = yes; then
4249   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4250   cat >conftest.$ac_ext <<_ACEOF
4251 #line $LINENO "configure"
4252 /* confdefs.h.  */
4253 _ACEOF
4254 cat confdefs.h >>conftest.$ac_ext
4255 cat >>conftest.$ac_ext <<_ACEOF
4256 /* end confdefs.h.  */
4257 #include <string.h>
4258
4259 _ACEOF
4260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4261   $EGREP "memchr" >/dev/null 2>&1; then
4262   :
4263 else
4264   ac_cv_header_stdc=no
4265 fi
4266 rm -f conftest*
4267
4268 fi
4269
4270 if test $ac_cv_header_stdc = yes; then
4271   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4272   cat >conftest.$ac_ext <<_ACEOF
4273 #line $LINENO "configure"
4274 /* confdefs.h.  */
4275 _ACEOF
4276 cat confdefs.h >>conftest.$ac_ext
4277 cat >>conftest.$ac_ext <<_ACEOF
4278 /* end confdefs.h.  */
4279 #include <stdlib.h>
4280
4281 _ACEOF
4282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4283   $EGREP "free" >/dev/null 2>&1; then
4284   :
4285 else
4286   ac_cv_header_stdc=no
4287 fi
4288 rm -f conftest*
4289
4290 fi
4291
4292 if test $ac_cv_header_stdc = yes; then
4293   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4294   if test "$cross_compiling" = yes; then
4295   :
4296 else
4297   cat >conftest.$ac_ext <<_ACEOF
4298 #line $LINENO "configure"
4299 /* confdefs.h.  */
4300 _ACEOF
4301 cat confdefs.h >>conftest.$ac_ext
4302 cat >>conftest.$ac_ext <<_ACEOF
4303 /* end confdefs.h.  */
4304 #include <ctype.h>
4305 #if ((' ' & 0x0FF) == 0x020)
4306 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4307 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4308 #else
4309 # define ISLOWER(c) \
4310                    (('a' <= (c) && (c) <= 'i') \
4311                      || ('j' <= (c) && (c) <= 'r') \
4312                      || ('s' <= (c) && (c) <= 'z'))
4313 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4314 #endif
4315
4316 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4317 int
4318 main ()
4319 {
4320   int i;
4321   for (i = 0; i < 256; i++)
4322     if (XOR (islower (i), ISLOWER (i))
4323         || toupper (i) != TOUPPER (i))
4324       exit(2);
4325   exit (0);
4326 }
4327 _ACEOF
4328 rm -f conftest$ac_exeext
4329 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4330   (eval $ac_link) 2>&5
4331   ac_status=$?
4332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4335   (eval $ac_try) 2>&5
4336   ac_status=$?
4337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4338   (exit $ac_status); }; }; then
4339   :
4340 else
4341   echo "$as_me: program exited with status $ac_status" >&5
4342 echo "$as_me: failed program was:" >&5
4343 sed 's/^/| /' conftest.$ac_ext >&5
4344
4345 ( exit $ac_status )
4346 ac_cv_header_stdc=no
4347 fi
4348 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4349 fi
4350 fi
4351 fi
4352 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4353 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4354 if test $ac_cv_header_stdc = yes; then
4355
4356 cat >>confdefs.h <<\_ACEOF
4357 #define STDC_HEADERS 1
4358 _ACEOF
4359
4360 fi
4361
4362 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4373                   inttypes.h stdint.h unistd.h
4374 do
4375 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4376 echo "$as_me:$LINENO: checking for $ac_header" >&5
4377 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4378 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4379   echo $ECHO_N "(cached) $ECHO_C" >&6
4380 else
4381   cat >conftest.$ac_ext <<_ACEOF
4382 #line $LINENO "configure"
4383 /* confdefs.h.  */
4384 _ACEOF
4385 cat confdefs.h >>conftest.$ac_ext
4386 cat >>conftest.$ac_ext <<_ACEOF
4387 /* end confdefs.h.  */
4388 $ac_includes_default
4389
4390 #include <$ac_header>
4391 _ACEOF
4392 rm -f conftest.$ac_objext
4393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397   (exit $ac_status); } &&
4398          { ac_try='test -s conftest.$ac_objext'
4399   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4400   (eval $ac_try) 2>&5
4401   ac_status=$?
4402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403   (exit $ac_status); }; }; then
4404   eval "$as_ac_Header=yes"
4405 else
4406   echo "$as_me: failed program was:" >&5
4407 sed 's/^/| /' conftest.$ac_ext >&5
4408
4409 eval "$as_ac_Header=no"
4410 fi
4411 rm -f conftest.$ac_objext conftest.$ac_ext
4412 fi
4413 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4414 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4415 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4416   cat >>confdefs.h <<_ACEOF
4417 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4418 _ACEOF
4419
4420 fi
4421
4422 done
4423
4424
4425
4426 for ac_header in dlfcn.h
4427 do
4428 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4429 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4430   echo "$as_me:$LINENO: checking for $ac_header" >&5
4431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4433   echo $ECHO_N "(cached) $ECHO_C" >&6
4434 fi
4435 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4436 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4437 else
4438   # Is the header compilable?
4439 echo "$as_me:$LINENO: checking $ac_header usability" >&5
4440 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4441 cat >conftest.$ac_ext <<_ACEOF
4442 #line $LINENO "configure"
4443 /* confdefs.h.  */
4444 _ACEOF
4445 cat confdefs.h >>conftest.$ac_ext
4446 cat >>conftest.$ac_ext <<_ACEOF
4447 /* end confdefs.h.  */
4448 $ac_includes_default
4449 #include <$ac_header>
4450 _ACEOF
4451 rm -f conftest.$ac_objext
4452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4453   (eval $ac_compile) 2>&5
4454   ac_status=$?
4455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456   (exit $ac_status); } &&
4457          { ac_try='test -s conftest.$ac_objext'
4458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4459   (eval $ac_try) 2>&5
4460   ac_status=$?
4461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4462   (exit $ac_status); }; }; then
4463   ac_header_compiler=yes
4464 else
4465   echo "$as_me: failed program was:" >&5
4466 sed 's/^/| /' conftest.$ac_ext >&5
4467
4468 ac_header_compiler=no
4469 fi
4470 rm -f conftest.$ac_objext conftest.$ac_ext
4471 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4472 echo "${ECHO_T}$ac_header_compiler" >&6
4473
4474 # Is the header present?
4475 echo "$as_me:$LINENO: checking $ac_header presence" >&5
4476 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4477 cat >conftest.$ac_ext <<_ACEOF
4478 #line $LINENO "configure"
4479 /* confdefs.h.  */
4480 _ACEOF
4481 cat confdefs.h >>conftest.$ac_ext
4482 cat >>conftest.$ac_ext <<_ACEOF
4483 /* end confdefs.h.  */
4484 #include <$ac_header>
4485 _ACEOF
4486 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4488   ac_status=$?
4489   grep -v '^ *+' conftest.er1 >conftest.err
4490   rm -f conftest.er1
4491   cat conftest.err >&5
4492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493   (exit $ac_status); } >/dev/null; then
4494   if test -s conftest.err; then
4495     ac_cpp_err=$ac_c_preproc_warn_flag
4496   else
4497     ac_cpp_err=
4498   fi
4499 else
4500   ac_cpp_err=yes
4501 fi
4502 if test -z "$ac_cpp_err"; then
4503   ac_header_preproc=yes
4504 else
4505   echo "$as_me: failed program was:" >&5
4506 sed 's/^/| /' conftest.$ac_ext >&5
4507
4508   ac_header_preproc=no
4509 fi
4510 rm -f conftest.err conftest.$ac_ext
4511 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4512 echo "${ECHO_T}$ac_header_preproc" >&6
4513
4514 # So?  What about this header?
4515 case $ac_header_compiler:$ac_header_preproc in
4516   yes:no )
4517     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4518 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4519     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4520 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4521     (
4522       cat <<\_ASBOX
4523 ## ------------------------------------ ##
4524 ## Report this to bug-autoconf@gnu.org. ##
4525 ## ------------------------------------ ##
4526 _ASBOX
4527     ) |
4528       sed "s/^/$as_me: WARNING:     /" >&2
4529     ;;
4530   no:yes )
4531     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4532 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4533     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4534 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4535     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4536 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4537     (
4538       cat <<\_ASBOX
4539 ## ------------------------------------ ##
4540 ## Report this to bug-autoconf@gnu.org. ##
4541 ## ------------------------------------ ##
4542 _ASBOX
4543     ) |
4544       sed "s/^/$as_me: WARNING:     /" >&2
4545     ;;
4546 esac
4547 echo "$as_me:$LINENO: checking for $ac_header" >&5
4548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   eval "$as_ac_Header=$ac_header_preproc"
4553 fi
4554 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4555 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4556
4557 fi
4558 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4559   cat >>confdefs.h <<_ACEOF
4560 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4561 _ACEOF
4562
4563 fi
4564
4565 done
4566
4567
4568
4569
4570
4571 # Only perform the check for file, if the check method requires it
4572 case $deplibs_check_method in
4573 file_magic*)
4574   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4575     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
4576 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
4577 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4578   echo $ECHO_N "(cached) $ECHO_C" >&6
4579 else
4580   case $MAGIC_CMD in
4581   /*)
4582   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4583   ;;
4584   ?:/*)
4585   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4586   ;;
4587   *)
4588   ac_save_MAGIC_CMD="$MAGIC_CMD"
4589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4590   ac_dummy="/usr/bin:$PATH"
4591   for ac_dir in $ac_dummy; do
4592     test -z "$ac_dir" && ac_dir=.
4593     if test -f $ac_dir/${ac_tool_prefix}file; then
4594       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4595       if test -n "$file_magic_test_file"; then
4596         case $deplibs_check_method in
4597         "file_magic "*)
4598           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4599           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4600           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4601             egrep "$file_magic_regex" > /dev/null; then
4602             :
4603           else
4604             cat <<EOF 1>&2
4605
4606 *** Warning: the command libtool uses to detect shared libraries,
4607 *** $file_magic_cmd, produces output that libtool cannot recognize.
4608 *** The result is that libtool may fail to recognize shared libraries
4609 *** as such.  This will affect the creation of libtool libraries that
4610 *** depend on shared libraries, but programs linked with such libtool
4611 *** libraries will work regardless of this problem.  Nevertheless, you
4612 *** may want to report the problem to your system manager and/or to
4613 *** bug-libtool@gnu.org
4614
4615 EOF
4616           fi ;;
4617         esac
4618       fi
4619       break
4620     fi
4621   done
4622   IFS="$ac_save_ifs"
4623   MAGIC_CMD="$ac_save_MAGIC_CMD"
4624   ;;
4625 esac
4626 fi
4627
4628 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4629 if test -n "$MAGIC_CMD"; then
4630   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4631 echo "${ECHO_T}$MAGIC_CMD" >&6
4632 else
4633   echo "$as_me:$LINENO: result: no" >&5
4634 echo "${ECHO_T}no" >&6
4635 fi
4636
4637 if test -z "$lt_cv_path_MAGIC_CMD"; then
4638   if test -n "$ac_tool_prefix"; then
4639     echo "$as_me:$LINENO: checking for file" >&5
4640 echo $ECHO_N "checking for file... $ECHO_C" >&6
4641 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
4642   echo $ECHO_N "(cached) $ECHO_C" >&6
4643 else
4644   case $MAGIC_CMD in
4645   /*)
4646   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4647   ;;
4648   ?:/*)
4649   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4650   ;;
4651   *)
4652   ac_save_MAGIC_CMD="$MAGIC_CMD"
4653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4654   ac_dummy="/usr/bin:$PATH"
4655   for ac_dir in $ac_dummy; do
4656     test -z "$ac_dir" && ac_dir=.
4657     if test -f $ac_dir/file; then
4658       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4659       if test -n "$file_magic_test_file"; then
4660         case $deplibs_check_method in
4661         "file_magic "*)
4662           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4663           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4664           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4665             egrep "$file_magic_regex" > /dev/null; then
4666             :
4667           else
4668             cat <<EOF 1>&2
4669
4670 *** Warning: the command libtool uses to detect shared libraries,
4671 *** $file_magic_cmd, produces output that libtool cannot recognize.
4672 *** The result is that libtool may fail to recognize shared libraries
4673 *** as such.  This will affect the creation of libtool libraries that
4674 *** depend on shared libraries, but programs linked with such libtool
4675 *** libraries will work regardless of this problem.  Nevertheless, you
4676 *** may want to report the problem to your system manager and/or to
4677 *** bug-libtool@gnu.org
4678
4679 EOF
4680           fi ;;
4681         esac
4682       fi
4683       break
4684     fi
4685   done
4686   IFS="$ac_save_ifs"
4687   MAGIC_CMD="$ac_save_MAGIC_CMD"
4688   ;;
4689 esac
4690 fi
4691
4692 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4693 if test -n "$MAGIC_CMD"; then
4694   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
4695 echo "${ECHO_T}$MAGIC_CMD" >&6
4696 else
4697   echo "$as_me:$LINENO: result: no" >&5
4698 echo "${ECHO_T}no" >&6
4699 fi
4700
4701   else
4702     MAGIC_CMD=:
4703   fi
4704 fi
4705
4706   fi
4707   ;;
4708 esac
4709
4710 if test -n "$ac_tool_prefix"; then
4711   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4712 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4713 echo "$as_me:$LINENO: checking for $ac_word" >&5
4714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4715 if test "${ac_cv_prog_RANLIB+set}" = set; then
4716   echo $ECHO_N "(cached) $ECHO_C" >&6
4717 else
4718   if test -n "$RANLIB"; then
4719   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4720 else
4721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722 for as_dir in $PATH
4723 do
4724   IFS=$as_save_IFS
4725   test -z "$as_dir" && as_dir=.
4726   for ac_exec_ext in '' $ac_executable_extensions; do
4727   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4728     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4729     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4730     break 2
4731   fi
4732 done
4733 done
4734
4735 fi
4736 fi
4737 RANLIB=$ac_cv_prog_RANLIB
4738 if test -n "$RANLIB"; then
4739   echo "$as_me:$LINENO: result: $RANLIB" >&5
4740 echo "${ECHO_T}$RANLIB" >&6
4741 else
4742   echo "$as_me:$LINENO: result: no" >&5
4743 echo "${ECHO_T}no" >&6
4744 fi
4745
4746 fi
4747 if test -z "$ac_cv_prog_RANLIB"; then
4748   ac_ct_RANLIB=$RANLIB
4749   # Extract the first word of "ranlib", so it can be a program name with args.
4750 set dummy ranlib; ac_word=$2
4751 echo "$as_me:$LINENO: checking for $ac_word" >&5
4752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4753 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4754   echo $ECHO_N "(cached) $ECHO_C" >&6
4755 else
4756   if test -n "$ac_ct_RANLIB"; then
4757   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4758 else
4759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4760 for as_dir in $PATH
4761 do
4762   IFS=$as_save_IFS
4763   test -z "$as_dir" && as_dir=.
4764   for ac_exec_ext in '' $ac_executable_extensions; do
4765   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4766     ac_cv_prog_ac_ct_RANLIB="ranlib"
4767     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4768     break 2
4769   fi
4770 done
4771 done
4772
4773   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4774 fi
4775 fi
4776 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4777 if test -n "$ac_ct_RANLIB"; then
4778   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4779 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4780 else
4781   echo "$as_me:$LINENO: result: no" >&5
4782 echo "${ECHO_T}no" >&6
4783 fi
4784
4785   RANLIB=$ac_ct_RANLIB
4786 else
4787   RANLIB="$ac_cv_prog_RANLIB"
4788 fi
4789
4790 if test -n "$ac_tool_prefix"; then
4791   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4792 set dummy ${ac_tool_prefix}strip; ac_word=$2
4793 echo "$as_me:$LINENO: checking for $ac_word" >&5
4794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4795 if test "${ac_cv_prog_STRIP+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798   if test -n "$STRIP"; then
4799   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4800 else
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802 for as_dir in $PATH
4803 do
4804   IFS=$as_save_IFS
4805   test -z "$as_dir" && as_dir=.
4806   for ac_exec_ext in '' $ac_executable_extensions; do
4807   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4808     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4809     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4810     break 2
4811   fi
4812 done
4813 done
4814
4815 fi
4816 fi
4817 STRIP=$ac_cv_prog_STRIP
4818 if test -n "$STRIP"; then
4819   echo "$as_me:$LINENO: result: $STRIP" >&5
4820 echo "${ECHO_T}$STRIP" >&6
4821 else
4822   echo "$as_me:$LINENO: result: no" >&5
4823 echo "${ECHO_T}no" >&6
4824 fi
4825
4826 fi
4827 if test -z "$ac_cv_prog_STRIP"; then
4828   ac_ct_STRIP=$STRIP
4829   # Extract the first word of "strip", so it can be a program name with args.
4830 set dummy strip; ac_word=$2
4831 echo "$as_me:$LINENO: checking for $ac_word" >&5
4832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4833 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4834   echo $ECHO_N "(cached) $ECHO_C" >&6
4835 else
4836   if test -n "$ac_ct_STRIP"; then
4837   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4838 else
4839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840 for as_dir in $PATH
4841 do
4842   IFS=$as_save_IFS
4843   test -z "$as_dir" && as_dir=.
4844   for ac_exec_ext in '' $ac_executable_extensions; do
4845   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4846     ac_cv_prog_ac_ct_STRIP="strip"
4847     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4848     break 2
4849   fi
4850 done
4851 done
4852
4853   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4854 fi
4855 fi
4856 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4857 if test -n "$ac_ct_STRIP"; then
4858   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4859 echo "${ECHO_T}$ac_ct_STRIP" >&6
4860 else
4861   echo "$as_me:$LINENO: result: no" >&5
4862 echo "${ECHO_T}no" >&6
4863 fi
4864
4865   STRIP=$ac_ct_STRIP
4866 else
4867   STRIP="$ac_cv_prog_STRIP"
4868 fi
4869
4870
4871 enable_dlopen=no
4872 enable_win32_dll=no
4873
4874 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4875 if test "${enable_libtool_lock+set}" = set; then
4876   enableval="$enable_libtool_lock"
4877
4878 fi;
4879 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4880
4881 # Some flags need to be propagated to the compiler or linker for good
4882 # libtool support.
4883 case $host in
4884 *-*-irix6*)
4885   # Find out which ABI we are using.
4886   echo '#line 4886 "configure"' > conftest.$ac_ext
4887   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4888   (eval $ac_compile) 2>&5
4889   ac_status=$?
4890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891   (exit $ac_status); }; then
4892     case `/usr/bin/file conftest.$ac_objext` in
4893     *32-bit*)
4894       LD="${LD-ld} -32"
4895       ;;
4896     *N32*)
4897       LD="${LD-ld} -n32"
4898       ;;
4899     *64-bit*)
4900       LD="${LD-ld} -64"
4901       ;;
4902     esac
4903   fi
4904   rm -rf conftest*
4905   ;;
4906
4907 *-*-sco3.2v5*)
4908   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4909   SAVE_CFLAGS="$CFLAGS"
4910   CFLAGS="$CFLAGS -belf"
4911   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4912 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
4913 if test "${lt_cv_cc_needs_belf+set}" = set; then
4914   echo $ECHO_N "(cached) $ECHO_C" >&6
4915 else
4916
4917
4918      ac_ext=c
4919 ac_cpp='$CPP $CPPFLAGS'
4920 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4921 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4922 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4923
4924      cat >conftest.$ac_ext <<_ACEOF
4925 #line $LINENO "configure"
4926 /* confdefs.h.  */
4927 _ACEOF
4928 cat confdefs.h >>conftest.$ac_ext
4929 cat >>conftest.$ac_ext <<_ACEOF
4930 /* end confdefs.h.  */
4931
4932 int
4933 main ()
4934 {
4935
4936   ;
4937   return 0;
4938 }
4939 _ACEOF
4940 rm -f conftest.$ac_objext conftest$ac_exeext
4941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4942   (eval $ac_link) 2>&5
4943   ac_status=$?
4944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945   (exit $ac_status); } &&
4946          { ac_try='test -s conftest$ac_exeext'
4947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4948   (eval $ac_try) 2>&5
4949   ac_status=$?
4950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951   (exit $ac_status); }; }; then
4952   lt_cv_cc_needs_belf=yes
4953 else
4954   echo "$as_me: failed program was:" >&5
4955 sed 's/^/| /' conftest.$ac_ext >&5
4956
4957 lt_cv_cc_needs_belf=no
4958 fi
4959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4960      ac_ext=c
4961 ac_cpp='$CPP $CPPFLAGS'
4962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4965
4966 fi
4967 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4968 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
4969   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4970     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4971     CFLAGS="$SAVE_CFLAGS"
4972   fi
4973   ;;
4974
4975
4976 esac
4977
4978 # Sed substitution that helps us do robust quoting.  It backslashifies
4979 # metacharacters that are still active within double-quoted strings.
4980 Xsed='sed -e s/^X//'
4981 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4982
4983 # Same as above, but do not quote variable references.
4984 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4985
4986 # Sed substitution to delay expansion of an escaped shell variable in a
4987 # double_quote_subst'ed string.
4988 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4989
4990 # Constants:
4991 rm="rm -f"
4992
4993 # Global variables:
4994 default_ofile=libtool
4995 can_build_shared=yes
4996
4997 # All known linkers require a `.a' archive for static linking (except M$VC,
4998 # which needs '.lib').
4999 libext=a
5000 ltmain="$ac_aux_dir/ltmain.sh"
5001 ofile="$default_ofile"
5002 with_gnu_ld="$lt_cv_prog_gnu_ld"
5003 need_locks="$enable_libtool_lock"
5004
5005 old_CC="$CC"
5006 old_CFLAGS="$CFLAGS"
5007
5008 # Set sane defaults for various variables
5009 test -z "$AR" && AR=ar
5010 test -z "$AR_FLAGS" && AR_FLAGS=cru
5011 test -z "$AS" && AS=as
5012 test -z "$CC" && CC=cc
5013 test -z "$DLLTOOL" && DLLTOOL=dlltool
5014 test -z "$LD" && LD=ld
5015 test -z "$LN_S" && LN_S="ln -s"
5016 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5017 test -z "$NM" && NM=nm
5018 test -z "$OBJDUMP" && OBJDUMP=objdump
5019 test -z "$RANLIB" && RANLIB=:
5020 test -z "$STRIP" && STRIP=:
5021 test -z "$ac_objext" && ac_objext=o
5022
5023 if test x"$host" != x"$build"; then
5024   ac_tool_prefix=${host_alias}-
5025 else
5026   ac_tool_prefix=
5027 fi
5028
5029 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5030 case $host_os in
5031 linux-gnu*) ;;
5032 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5033 esac
5034
5035 case $host_os in
5036 aix3*)
5037   # AIX sometimes has problems with the GCC collect2 program.  For some
5038   # reason, if we set the COLLECT_NAMES environment variable, the problems
5039   # vanish in a puff of smoke.
5040   if test "X${COLLECT_NAMES+set}" != Xset; then
5041     COLLECT_NAMES=
5042     export COLLECT_NAMES
5043   fi
5044   ;;
5045 esac
5046
5047 # Determine commands to create old-style static archives.
5048 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5049 old_postinstall_cmds='chmod 644 $oldlib'
5050 old_postuninstall_cmds=
5051
5052 if test -n "$RANLIB"; then
5053   case $host_os in
5054   openbsd*)
5055     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5056     ;;
5057   *)
5058     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5059     ;;
5060   esac
5061   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5062 fi
5063
5064 # Allow CC to be a program name with arguments.
5065 set dummy $CC
5066 compiler="$2"
5067
5068 ## FIXME: this should be a separate macro
5069 ##
5070 echo "$as_me:$LINENO: checking for objdir" >&5
5071 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
5072 rm -f .libs 2>/dev/null
5073 mkdir .libs 2>/dev/null
5074 if test -d .libs; then
5075   objdir=.libs
5076 else
5077   # MS-DOS does not allow filenames that begin with a dot.
5078   objdir=_libs
5079 fi
5080 rmdir .libs 2>/dev/null
5081 echo "$as_me:$LINENO: result: $objdir" >&5
5082 echo "${ECHO_T}$objdir" >&6
5083 ##
5084 ## END FIXME
5085
5086
5087 ## FIXME: this should be a separate macro
5088 ##
5089
5090 # Check whether --with-pic or --without-pic was given.
5091 if test "${with_pic+set}" = set; then
5092   withval="$with_pic"
5093   pic_mode="$withval"
5094 else
5095   pic_mode=default
5096 fi;
5097 test -z "$pic_mode" && pic_mode=default
5098
5099 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5100 # in isolation, and that seeing it set (from the cache) indicates that
5101 # the associated values are set (in the cache) correctly too.
5102 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
5103 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
5104 if test "${lt_cv_prog_cc_pic+set}" = set; then
5105   echo $ECHO_N "(cached) $ECHO_C" >&6
5106 else
5107    lt_cv_prog_cc_pic=
5108   lt_cv_prog_cc_shlib=
5109   lt_cv_prog_cc_wl=
5110   lt_cv_prog_cc_static=
5111   lt_cv_prog_cc_no_builtin=
5112   lt_cv_prog_cc_can_build_shared=$can_build_shared
5113
5114   if test "$GCC" = yes; then
5115     lt_cv_prog_cc_wl='-Wl,'
5116     lt_cv_prog_cc_static='-static'
5117
5118     case $host_os in
5119     aix*)
5120       # Below there is a dirty hack to force normal static linking with -ldl
5121       # The problem is because libdl dynamically linked with both libc and
5122       # libC (AIX C++ library), which obviously doesn't included in libraries
5123       # list by gcc. This cause undefined symbols with -static flags.
5124       # This hack allows C programs to be linked with "-static -ldl", but
5125       # not sure about C++ programs.
5126       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5127       ;;
5128     amigaos*)
5129       # FIXME: we need at least 68020 code to build shared libraries, but
5130       # adding the `-m68020' flag to GCC prevents building anything better,
5131       # like `-m68040'.
5132       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5133       ;;
5134     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5135       # PIC is the default for these OSes.
5136       ;;
5137     darwin* | rhapsody*)
5138       # PIC is the default on this platform
5139       # Common symbols not allowed in MH_DYLIB files
5140       lt_cv_prog_cc_pic='-fno-common'
5141       ;;
5142     cygwin* | mingw* | pw32* | os2*)
5143       # This hack is so that the source file can tell whether it is being
5144       # built for inclusion in a dll (and should export symbols for example).
5145       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5146       ;;
5147     sysv4*MP*)
5148       if test -d /usr/nec; then
5149          lt_cv_prog_cc_pic=-Kconform_pic
5150       fi
5151       ;;
5152     *)
5153       lt_cv_prog_cc_pic='-fPIC'
5154       ;;
5155     esac
5156   else
5157     # PORTME Check for PIC flags for the system compiler.
5158     case $host_os in
5159     aix3* | aix4* | aix5*)
5160       lt_cv_prog_cc_wl='-Wl,'
5161       # All AIX code is PIC.
5162       if test "$host_cpu" = ia64; then
5163         # AIX 5 now supports IA64 processor
5164         lt_cv_prog_cc_static='-Bstatic'
5165       else
5166         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5167       fi
5168       ;;
5169
5170     hpux9* | hpux10* | hpux11*)
5171       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5172       lt_cv_prog_cc_wl='-Wl,'
5173       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5174       lt_cv_prog_cc_pic='+Z'
5175       ;;
5176
5177     irix5* | irix6* | nonstopux*)
5178       lt_cv_prog_cc_wl='-Wl,'
5179       lt_cv_prog_cc_static='-non_shared'
5180       # PIC (with -KPIC) is the default.
5181       ;;
5182
5183     cygwin* | mingw* | pw32* | os2*)
5184       # This hack is so that the source file can tell whether it is being
5185       # built for inclusion in a dll (and should export symbols for example).
5186       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5187       ;;
5188
5189     newsos6)
5190       lt_cv_prog_cc_pic='-KPIC'
5191       lt_cv_prog_cc_static='-Bstatic'
5192       ;;
5193
5194     osf3* | osf4* | osf5*)
5195       # All OSF/1 code is PIC.
5196       lt_cv_prog_cc_wl='-Wl,'
5197       lt_cv_prog_cc_static='-non_shared'
5198       ;;
5199
5200     sco3.2v5*)
5201       lt_cv_prog_cc_pic='-Kpic'
5202       lt_cv_prog_cc_static='-dn'
5203       lt_cv_prog_cc_shlib='-belf'
5204       ;;
5205
5206     solaris*)
5207       lt_cv_prog_cc_pic='-KPIC'
5208       lt_cv_prog_cc_static='-Bstatic'
5209       lt_cv_prog_cc_wl='-Wl,'
5210       ;;
5211
5212     sunos4*)
5213       lt_cv_prog_cc_pic='-PIC'
5214       lt_cv_prog_cc_static='-Bstatic'
5215       lt_cv_prog_cc_wl='-Qoption ld '
5216       ;;
5217
5218     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5219       lt_cv_prog_cc_pic='-KPIC'
5220       lt_cv_prog_cc_static='-Bstatic'
5221       if test "x$host_vendor" = xsni; then
5222         lt_cv_prog_cc_wl='-LD'
5223       else
5224         lt_cv_prog_cc_wl='-Wl,'
5225       fi
5226       ;;
5227
5228     uts4*)
5229       lt_cv_prog_cc_pic='-pic'
5230       lt_cv_prog_cc_static='-Bstatic'
5231       ;;
5232
5233     sysv4*MP*)
5234       if test -d /usr/nec ;then
5235         lt_cv_prog_cc_pic='-Kconform_pic'
5236         lt_cv_prog_cc_static='-Bstatic'
5237       fi
5238       ;;
5239
5240     *)
5241       lt_cv_prog_cc_can_build_shared=no
5242       ;;
5243     esac
5244   fi
5245
5246 fi
5247
5248 if test -z "$lt_cv_prog_cc_pic"; then
5249   echo "$as_me:$LINENO: result: none" >&5
5250 echo "${ECHO_T}none" >&6
5251 else
5252   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
5253 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
5254
5255   # Check to make sure the pic_flag actually works.
5256   echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5257 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
5258   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
5259   echo $ECHO_N "(cached) $ECHO_C" >&6
5260 else
5261       save_CFLAGS="$CFLAGS"
5262     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5263     cat >conftest.$ac_ext <<_ACEOF
5264 #line $LINENO "configure"
5265 /* confdefs.h.  */
5266 _ACEOF
5267 cat confdefs.h >>conftest.$ac_ext
5268 cat >>conftest.$ac_ext <<_ACEOF
5269 /* end confdefs.h.  */
5270
5271 int
5272 main ()
5273 {
5274
5275   ;
5276   return 0;
5277 }
5278 _ACEOF
5279 rm -f conftest.$ac_objext
5280 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5281   (eval $ac_compile) 2>&5
5282   ac_status=$?
5283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284   (exit $ac_status); } &&
5285          { ac_try='test -s conftest.$ac_objext'
5286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5287   (eval $ac_try) 2>&5
5288   ac_status=$?
5289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290   (exit $ac_status); }; }; then
5291         case $host_os in
5292       hpux9* | hpux10* | hpux11*)
5293         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5294         # they create non-PIC objects.  So, if there were any warnings, we
5295         # assume that PIC is not supported.
5296         if test -s conftest.err; then
5297           lt_cv_prog_cc_pic_works=no
5298         else
5299           lt_cv_prog_cc_pic_works=yes
5300         fi
5301         ;;
5302       *)
5303         lt_cv_prog_cc_pic_works=yes
5304         ;;
5305       esac
5306
5307 else
5308   echo "$as_me: failed program was:" >&5
5309 sed 's/^/| /' conftest.$ac_ext >&5
5310
5311       lt_cv_prog_cc_pic_works=no
5312
5313 fi
5314 rm -f conftest.$ac_objext conftest.$ac_ext
5315     CFLAGS="$save_CFLAGS"
5316
5317 fi
5318
5319
5320   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5321     lt_cv_prog_cc_pic=
5322     lt_cv_prog_cc_can_build_shared=no
5323   else
5324     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5325   fi
5326
5327   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
5328 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
5329 fi
5330 ##
5331 ## END FIXME
5332
5333 # Check for any special shared library compilation flags.
5334 if test -n "$lt_cv_prog_cc_shlib"; then
5335   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
5336 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
5337   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5338   else
5339    { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
5340 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
5341     lt_cv_prog_cc_can_build_shared=no
5342   fi
5343 fi
5344
5345 ## FIXME: this should be a separate macro
5346 ##
5347 echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5348 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
5349 if test "${lt_cv_prog_cc_static_works+set}" = set; then
5350   echo $ECHO_N "(cached) $ECHO_C" >&6
5351 else
5352     lt_cv_prog_cc_static_works=no
5353   save_LDFLAGS="$LDFLAGS"
5354   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5355   cat >conftest.$ac_ext <<_ACEOF
5356 #line $LINENO "configure"
5357 /* confdefs.h.  */
5358 _ACEOF
5359 cat confdefs.h >>conftest.$ac_ext
5360 cat >>conftest.$ac_ext <<_ACEOF
5361 /* end confdefs.h.  */
5362
5363 int
5364 main ()
5365 {
5366
5367   ;
5368   return 0;
5369 }
5370 _ACEOF
5371 rm -f conftest.$ac_objext conftest$ac_exeext
5372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5373   (eval $ac_link) 2>&5
5374   ac_status=$?
5375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5376   (exit $ac_status); } &&
5377          { ac_try='test -s conftest$ac_exeext'
5378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5379   (eval $ac_try) 2>&5
5380   ac_status=$?
5381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5382   (exit $ac_status); }; }; then
5383   lt_cv_prog_cc_static_works=yes
5384 else
5385   echo "$as_me: failed program was:" >&5
5386 sed 's/^/| /' conftest.$ac_ext >&5
5387
5388 fi
5389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5390   LDFLAGS="$save_LDFLAGS"
5391
5392 fi
5393
5394
5395 # Belt *and* braces to stop my trousers falling down:
5396 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5397 echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
5398 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
5399
5400 pic_flag="$lt_cv_prog_cc_pic"
5401 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5402 wl="$lt_cv_prog_cc_wl"
5403 link_static_flag="$lt_cv_prog_cc_static"
5404 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5405 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5406 ##
5407 ## END FIXME
5408
5409
5410 ## FIXME: this should be a separate macro
5411 ##
5412 # Check to see if options -o and -c are simultaneously supported by compiler
5413 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
5414 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
5415 if test "${lt_cv_compiler_c_o+set}" = set; then
5416   echo $ECHO_N "(cached) $ECHO_C" >&6
5417 else
5418
5419 $rm -r conftest 2>/dev/null
5420 mkdir conftest
5421 cd conftest
5422 echo "int some_variable = 0;" > conftest.$ac_ext
5423 mkdir out
5424 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5425 # that will create temporary files in the current directory regardless of
5426 # the output directory.  Thus, making CWD read-only will cause this test
5427 # to fail, enabling locking or at least warning the user not to do parallel
5428 # builds.
5429 chmod -w .
5430 save_CFLAGS="$CFLAGS"
5431 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5432 compiler_c_o=no
5433 if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5434   # The compiler can only warn and ignore the option if not recognized
5435   # So say no if there are warnings
5436   if test -s out/conftest.err; then
5437     lt_cv_compiler_c_o=no
5438   else
5439     lt_cv_compiler_c_o=yes
5440   fi
5441 else
5442   # Append any errors to the config.log.
5443   cat out/conftest.err 1>&5
5444   lt_cv_compiler_c_o=no
5445 fi
5446 CFLAGS="$save_CFLAGS"
5447 chmod u+w .
5448 $rm conftest* out/*
5449 rmdir out
5450 cd ..
5451 rmdir conftest
5452 $rm -r conftest 2>/dev/null
5453
5454 fi
5455
5456 compiler_c_o=$lt_cv_compiler_c_o
5457 echo "$as_me:$LINENO: result: $compiler_c_o" >&5
5458 echo "${ECHO_T}$compiler_c_o" >&6
5459
5460 if test x"$compiler_c_o" = x"yes"; then
5461   # Check to see if we can write to a .lo
5462   echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
5463 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
5464   if test "${lt_cv_compiler_o_lo+set}" = set; then
5465   echo $ECHO_N "(cached) $ECHO_C" >&6
5466 else
5467
5468   lt_cv_compiler_o_lo=no
5469   save_CFLAGS="$CFLAGS"
5470   CFLAGS="$CFLAGS -c -o conftest.lo"
5471   save_objext="$ac_objext"
5472   ac_objext=lo
5473   cat >conftest.$ac_ext <<_ACEOF
5474 #line $LINENO "configure"
5475 /* confdefs.h.  */
5476 _ACEOF
5477 cat confdefs.h >>conftest.$ac_ext
5478 cat >>conftest.$ac_ext <<_ACEOF
5479 /* end confdefs.h.  */
5480
5481 int
5482 main ()
5483 {
5484 int some_variable = 0;
5485   ;
5486   return 0;
5487 }
5488 _ACEOF
5489 rm -f conftest.$ac_objext
5490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5491   (eval $ac_compile) 2>&5
5492   ac_status=$?
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -s conftest.$ac_objext'
5496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497   (eval $ac_try) 2>&5
5498   ac_status=$?
5499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500   (exit $ac_status); }; }; then
5501       # The compiler can only warn and ignore the option if not recognized
5502     # So say no if there are warnings
5503     if test -s conftest.err; then
5504       lt_cv_compiler_o_lo=no
5505     else
5506       lt_cv_compiler_o_lo=yes
5507     fi
5508
5509 else
5510   echo "$as_me: failed program was:" >&5
5511 sed 's/^/| /' conftest.$ac_ext >&5
5512
5513 fi
5514 rm -f conftest.$ac_objext conftest.$ac_ext
5515   ac_objext="$save_objext"
5516   CFLAGS="$save_CFLAGS"
5517
5518 fi
5519
5520   compiler_o_lo=$lt_cv_compiler_o_lo
5521   echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
5522 echo "${ECHO_T}$compiler_o_lo" >&6
5523 else
5524   compiler_o_lo=no
5525 fi
5526 ##
5527 ## END FIXME
5528
5529 ## FIXME: this should be a separate macro
5530 ##
5531 # Check to see if we can do hard links to lock some files if needed
5532 hard_links="nottested"
5533 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5534   # do not overwrite the value of need_locks provided by the user
5535   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
5536 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
5537   hard_links=yes
5538   $rm conftest*
5539   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5540   touch conftest.a
5541   ln conftest.a conftest.b 2>&5 || hard_links=no
5542   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5543   echo "$as_me:$LINENO: result: $hard_links" >&5
5544 echo "${ECHO_T}$hard_links" >&6
5545   if test "$hard_links" = no; then
5546     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
5547 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
5548     need_locks=warn
5549   fi
5550 else
5551   need_locks=no
5552 fi
5553 ##
5554 ## END FIXME
5555
5556 ## FIXME: this should be a separate macro
5557 ##
5558 if test "$GCC" = yes; then
5559   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5560   echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5561 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
5562   echo "int some_variable = 0;" > conftest.$ac_ext
5563   save_CFLAGS="$CFLAGS"
5564   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5565   compiler_rtti_exceptions=no
5566   cat >conftest.$ac_ext <<_ACEOF
5567 #line $LINENO "configure"
5568 /* confdefs.h.  */
5569 _ACEOF
5570 cat confdefs.h >>conftest.$ac_ext
5571 cat >>conftest.$ac_ext <<_ACEOF
5572 /* end confdefs.h.  */
5573
5574 int
5575 main ()
5576 {
5577 int some_variable = 0;
5578   ;
5579   return 0;
5580 }
5581 _ACEOF
5582 rm -f conftest.$ac_objext
5583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5584   (eval $ac_compile) 2>&5
5585   ac_status=$?
5586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587   (exit $ac_status); } &&
5588          { ac_try='test -s conftest.$ac_objext'
5589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5590   (eval $ac_try) 2>&5
5591   ac_status=$?
5592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593   (exit $ac_status); }; }; then
5594       # The compiler can only warn and ignore the option if not recognized
5595     # So say no if there are warnings
5596     if test -s conftest.err; then
5597       compiler_rtti_exceptions=no
5598     else
5599       compiler_rtti_exceptions=yes
5600     fi
5601
5602 else
5603   echo "$as_me: failed program was:" >&5
5604 sed 's/^/| /' conftest.$ac_ext >&5
5605
5606 fi
5607 rm -f conftest.$ac_objext conftest.$ac_ext
5608   CFLAGS="$save_CFLAGS"
5609   echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
5610 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
5611
5612   if test "$compiler_rtti_exceptions" = "yes"; then
5613     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5614   else
5615     no_builtin_flag=' -fno-builtin'
5616   fi
5617 fi
5618 ##
5619 ## END FIXME
5620
5621 ## FIXME: this should be a separate macro
5622 ##
5623 # See if the linker supports building shared libraries.
5624 echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
5625 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
5626
5627 allow_undefined_flag=
5628 no_undefined_flag=
5629 need_lib_prefix=unknown
5630 need_version=unknown
5631 # when you set need_version to no, make sure it does not cause -set_version
5632 # flags to be left without arguments
5633 archive_cmds=
5634 archive_expsym_cmds=
5635 old_archive_from_new_cmds=
5636 old_archive_from_expsyms_cmds=
5637 export_dynamic_flag_spec=
5638 whole_archive_flag_spec=
5639 thread_safe_flag_spec=
5640 hardcode_into_libs=no
5641 hardcode_libdir_flag_spec=
5642 hardcode_libdir_separator=
5643 hardcode_direct=no
5644 hardcode_minus_L=no
5645 hardcode_shlibpath_var=unsupported
5646 runpath_var=
5647 link_all_deplibs=unknown
5648 always_export_symbols=no
5649 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5650 # include_expsyms should be a list of space-separated symbols to be *always*
5651 # included in the symbol list
5652 include_expsyms=
5653 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5654 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5655 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5656 # as well as any symbol that contains `d'.
5657 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5658 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5659 # platforms (ab)use it in PIC code, but their linkers get confused if
5660 # the symbol is explicitly referenced.  Since portable code cannot
5661 # rely on this symbol name, it's probably fine to never include it in
5662 # preloaded symbol tables.
5663 extract_expsyms_cmds=
5664
5665 case $host_os in
5666 cygwin* | mingw* | pw32*)
5667   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5668   # When not using gcc, we currently assume that we are using
5669   # Microsoft Visual C++.
5670   if test "$GCC" != yes; then
5671     with_gnu_ld=no
5672   fi
5673   ;;
5674 openbsd*)
5675   with_gnu_ld=no
5676   ;;
5677 esac
5678
5679 ld_shlibs=yes
5680 if test "$with_gnu_ld" = yes; then
5681   # If archive_cmds runs LD, not CC, wlarc should be empty
5682   wlarc='${wl}'
5683
5684   # See if GNU ld supports shared libraries.
5685   case $host_os in
5686   aix3* | aix4* | aix5*)
5687     # On AIX, the GNU linker is very broken
5688     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5689     ld_shlibs=no
5690     cat <<EOF 1>&2
5691
5692 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5693 *** to be unable to reliably create shared libraries on AIX.
5694 *** Therefore, libtool is disabling shared libraries support.  If you
5695 *** really care for shared libraries, you may want to modify your PATH
5696 *** so that a non-GNU linker is found, and then restart.
5697
5698 EOF
5699     ;;
5700
5701   amigaos*)
5702     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)'
5703     hardcode_libdir_flag_spec='-L$libdir'
5704     hardcode_minus_L=yes
5705
5706     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5707     # that the semantics of dynamic libraries on AmigaOS, at least up
5708     # to version 4, is to share data among multiple programs linked
5709     # with the same dynamic library.  Since this doesn't match the
5710     # behavior of shared libraries on other platforms, we can use
5711     # them.
5712     ld_shlibs=no
5713     ;;
5714
5715   beos*)
5716     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5717       allow_undefined_flag=unsupported
5718       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5719       # support --undefined.  This deserves some investigation.  FIXME
5720       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5721     else
5722       ld_shlibs=no
5723     fi
5724     ;;
5725
5726   cygwin* | mingw* | pw32*)
5727     # hardcode_libdir_flag_spec is actually meaningless, as there is
5728     # no search path for DLLs.
5729     hardcode_libdir_flag_spec='-L$libdir'
5730     allow_undefined_flag=unsupported
5731     always_export_symbols=yes
5732
5733     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5734       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5735       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5736       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5737       else $CC -o impgen impgen.c ; fi)~
5738       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5739
5740     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5741
5742     # cygwin and mingw dlls have different entry points and sets of symbols
5743     # to exclude.
5744     # FIXME: what about values for MSVC?
5745     dll_entry=__cygwin_dll_entry@12
5746     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5747     case $host_os in
5748     mingw*)
5749       # mingw values
5750       dll_entry=_DllMainCRTStartup@12
5751       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5752       ;;
5753     esac
5754
5755     # mingw and cygwin differ, and it's simplest to just exclude the union
5756     # of the two symbol sets.
5757     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5758
5759     # recent cygwin and mingw systems supply a stub DllMain which the user
5760     # can override, but on older systems we have to supply one (in ltdll.c)
5761     if test "x$lt_cv_need_dllmain" = "xyes"; then
5762       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5763       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~
5764         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5765     else
5766       ltdll_obj=
5767       ltdll_cmds=
5768     fi
5769
5770     # Extract the symbol export list from an `--export-all' def file,
5771     # then regenerate the def file from the symbol export list, so that
5772     # the compiled dll only exports the symbol export list.
5773     # Be careful not to strip the DATA tag left be newer dlltools.
5774     export_symbols_cmds="$ltdll_cmds"'
5775       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5776       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5777
5778     # If the export-symbols file already is a .def file (1st line
5779     # is EXPORTS), use it as is.
5780     # If DATA tags from a recent dlltool are present, honour them!
5781     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5782         cp $export_symbols $output_objdir/$soname-def;
5783       else
5784         echo EXPORTS > $output_objdir/$soname-def;
5785         _lt_hint=1;
5786         cat $export_symbols | while read symbol; do
5787          set dummy \$symbol;
5788          case \$# in
5789            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5790            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5791          esac;
5792          _lt_hint=`expr 1 + \$_lt_hint`;
5793         done;
5794       fi~
5795       '"$ltdll_cmds"'
5796       $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~
5797       $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~
5798       $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~
5799       $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~
5800       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5801     ;;
5802
5803   netbsd*)
5804     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5805       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5806       wlarc=
5807     else
5808       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5809       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5810     fi
5811     ;;
5812
5813   solaris* | sysv5*)
5814     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5815       ld_shlibs=no
5816       cat <<EOF 1>&2
5817
5818 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5819 *** create shared libraries on Solaris systems.  Therefore, libtool
5820 *** is disabling shared libraries support.  We urge you to upgrade GNU
5821 *** binutils to release 2.9.1 or newer.  Another option is to modify
5822 *** your PATH or compiler configuration so that the native linker is
5823 *** used, and then restart.
5824
5825 EOF
5826     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5827       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5828       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5829     else
5830       ld_shlibs=no
5831     fi
5832     ;;
5833
5834   sunos4*)
5835     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5836     wlarc=
5837     hardcode_direct=yes
5838     hardcode_shlibpath_var=no
5839     ;;
5840
5841   *)
5842     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5843       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5844       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5845     else
5846       ld_shlibs=no
5847     fi
5848     ;;
5849   esac
5850
5851   if test "$ld_shlibs" = yes; then
5852     runpath_var=LD_RUN_PATH
5853     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5854     export_dynamic_flag_spec='${wl}--export-dynamic'
5855     case $host_os in
5856     cygwin* | mingw* | pw32*)
5857       # dlltool doesn't understand --whole-archive et. al.
5858       whole_archive_flag_spec=
5859       ;;
5860     *)
5861       # ancient GNU ld didn't support --whole-archive et. al.
5862       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5863         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5864       else
5865         whole_archive_flag_spec=
5866       fi
5867       ;;
5868     esac
5869   fi
5870 else
5871   # PORTME fill in a description of your system's linker (not GNU ld)
5872   case $host_os in
5873   aix3*)
5874     allow_undefined_flag=unsupported
5875     always_export_symbols=yes
5876     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'
5877     # Note: this linker hardcodes the directories in LIBPATH if there
5878     # are no directories specified by -L.
5879     hardcode_minus_L=yes
5880     if test "$GCC" = yes && test -z "$link_static_flag"; then
5881       # Neither direct hardcoding nor static linking is supported with a
5882       # broken collect2.
5883       hardcode_direct=unsupported
5884     fi
5885     ;;
5886
5887   aix4* | aix5*)
5888     if test "$host_cpu" = ia64; then
5889       # On IA64, the linker does run time linking by default, so we don't
5890       # have to do anything special.
5891       aix_use_runtimelinking=no
5892       exp_sym_flag='-Bexport'
5893       no_entry_flag=""
5894     else
5895       aix_use_runtimelinking=no
5896
5897       # Test if we are trying to use run time linking or normal
5898       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5899       # need to do runtime linking.
5900       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5901         for ld_flag in $LDFLAGS; do
5902           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5903             aix_use_runtimelinking=yes
5904             break
5905           fi
5906         done
5907       esac
5908
5909       exp_sym_flag='-bexport'
5910       no_entry_flag='-bnoentry'
5911     fi
5912
5913     # When large executables or shared objects are built, AIX ld can
5914     # have problems creating the table of contents.  If linking a library
5915     # or program results in "error TOC overflow" add -mminimal-toc to
5916     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5917     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5918
5919     hardcode_direct=yes
5920     archive_cmds=''
5921     hardcode_libdir_separator=':'
5922     if test "$GCC" = yes; then
5923       case $host_os in aix4.[012]|aix4.[012].*)
5924         collect2name=`${CC} -print-prog-name=collect2`
5925         if test -f "$collect2name" && \
5926           strings "$collect2name" | grep resolve_lib_name >/dev/null
5927         then
5928           # We have reworked collect2
5929           hardcode_direct=yes
5930         else
5931           # We have old collect2
5932           hardcode_direct=unsupported
5933           # It fails to find uninstalled libraries when the uninstalled
5934           # path is not listed in the libpath.  Setting hardcode_minus_L
5935           # to unsupported forces relinking
5936           hardcode_minus_L=yes
5937           hardcode_libdir_flag_spec='-L$libdir'
5938           hardcode_libdir_separator=
5939         fi
5940       esac
5941
5942       shared_flag='-shared'
5943     else
5944       # not using gcc
5945       if test "$host_cpu" = ia64; then
5946         shared_flag='${wl}-G'
5947       else
5948         if test "$aix_use_runtimelinking" = yes; then
5949           shared_flag='${wl}-G'
5950         else
5951           shared_flag='${wl}-bM:SRE'
5952         fi
5953       fi
5954     fi
5955
5956     # It seems that -bexpall can do strange things, so it is better to
5957     # generate a list of symbols to export.
5958     always_export_symbols=yes
5959     if test "$aix_use_runtimelinking" = yes; then
5960       # Warning - without using the other runtime loading flags (-brtl),
5961       # -berok will link without error, but may produce a broken library.
5962       allow_undefined_flag='-berok'
5963       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5964       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"
5965     else
5966       if test "$host_cpu" = ia64; then
5967         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5968         allow_undefined_flag="-z nodefs"
5969         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"
5970       else
5971         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5972         # Warning - without using the other run time loading flags,
5973         # -berok will link without error, but may produce a broken library.
5974         allow_undefined_flag='${wl}-berok'
5975         # This is a bit strange, but is similar to how AIX traditionally builds
5976         # it's shared libraries.
5977         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'
5978       fi
5979     fi
5980     ;;
5981
5982   amigaos*)
5983     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)'
5984     hardcode_libdir_flag_spec='-L$libdir'
5985     hardcode_minus_L=yes
5986     # see comment about different semantics on the GNU ld section
5987     ld_shlibs=no
5988     ;;
5989
5990   cygwin* | mingw* | pw32*)
5991     # When not using gcc, we currently assume that we are using
5992     # Microsoft Visual C++.
5993     # hardcode_libdir_flag_spec is actually meaningless, as there is
5994     # no search path for DLLs.
5995     hardcode_libdir_flag_spec=' '
5996     allow_undefined_flag=unsupported
5997     # Tell ltmain to make .lib files, not .a files.
5998     libext=lib
5999     # FIXME: Setting linknames here is a bad hack.
6000     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6001     # The linker will automatically build a .lib file if we build a DLL.
6002     old_archive_from_new_cmds='true'
6003     # FIXME: Should let the user specify the lib program.
6004     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
6005     fix_srcfile_path='`cygpath -w "$srcfile"`'
6006     ;;
6007
6008   darwin* | rhapsody*)
6009     case "$host_os" in
6010     rhapsody* | darwin1.[012])
6011       allow_undefined_flag='-undefined suppress'
6012       ;;
6013     *) # Darwin 1.3 on
6014       allow_undefined_flag='-flat_namespace -undefined suppress'
6015       ;;
6016     esac
6017     # FIXME: Relying on posixy $() will cause problems for
6018     #        cross-compilation, but unfortunately the echo tests do not
6019     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6020     #        `"' quotes if we put them in here... so don't!
6021     archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
6022     # We need to add '_' to the symbols in $export_symbols first
6023     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6024     hardcode_direct=yes
6025     hardcode_shlibpath_var=no
6026     whole_archive_flag_spec='-all_load $convenience'
6027     ;;
6028
6029   freebsd1*)
6030     ld_shlibs=no
6031     ;;
6032
6033   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6034   # support.  Future versions do this automatically, but an explicit c++rt0.o
6035   # does not break anything, and helps significantly (at the cost of a little
6036   # extra space).
6037   freebsd2.2*)
6038     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6039     hardcode_libdir_flag_spec='-R$libdir'
6040     hardcode_direct=yes
6041     hardcode_shlibpath_var=no
6042     ;;
6043
6044   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6045   freebsd2*)
6046     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6047     hardcode_direct=yes
6048     hardcode_minus_L=yes
6049     hardcode_shlibpath_var=no
6050     ;;
6051
6052   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6053   freebsd*)
6054     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6055     hardcode_libdir_flag_spec='-R$libdir'
6056     hardcode_direct=yes
6057     hardcode_shlibpath_var=no
6058     ;;
6059
6060   hpux9* | hpux10* | hpux11*)
6061     case $host_os in
6062     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' ;;
6063     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6064     esac
6065     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6066     hardcode_libdir_separator=:
6067     hardcode_direct=yes
6068     hardcode_minus_L=yes # Not in the search PATH, but as the default
6069                          # location of the library.
6070     export_dynamic_flag_spec='${wl}-E'
6071     ;;
6072
6073   irix5* | irix6* | nonstopux*)
6074     if test "$GCC" = yes; then
6075       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'
6076     else
6077       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'
6078     fi
6079     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6080     hardcode_libdir_separator=:
6081     link_all_deplibs=yes
6082     ;;
6083
6084   netbsd*)
6085     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6086       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6087     else
6088       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6089     fi
6090     hardcode_libdir_flag_spec='-R$libdir'
6091     hardcode_direct=yes
6092     hardcode_shlibpath_var=no
6093     ;;
6094
6095   newsos6)
6096     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6097     hardcode_direct=yes
6098     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6099     hardcode_libdir_separator=:
6100     hardcode_shlibpath_var=no
6101     ;;
6102
6103   openbsd*)
6104     hardcode_direct=yes
6105     hardcode_shlibpath_var=no
6106     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6107       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6108       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6109       export_dynamic_flag_spec='${wl}-E'
6110     else
6111       case "$host_os" in
6112       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6113         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6114         hardcode_libdir_flag_spec='-R$libdir'
6115         ;;
6116       *)
6117         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6118         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6119         ;;
6120       esac
6121     fi
6122     ;;
6123
6124   os2*)
6125     hardcode_libdir_flag_spec='-L$libdir'
6126     hardcode_minus_L=yes
6127     allow_undefined_flag=unsupported
6128     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'
6129     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6130     ;;
6131
6132   osf3*)
6133     if test "$GCC" = yes; then
6134       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6135       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'
6136     else
6137       allow_undefined_flag=' -expect_unresolved \*'
6138       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'
6139     fi
6140     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6141     hardcode_libdir_separator=:
6142     ;;
6143
6144   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6145     if test "$GCC" = yes; then
6146       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6147       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'
6148       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6149     else
6150       allow_undefined_flag=' -expect_unresolved \*'
6151       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'
6152       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6153       $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'
6154
6155       #Both c and cxx compiler support -rpath directly
6156       hardcode_libdir_flag_spec='-rpath $libdir'
6157     fi
6158     hardcode_libdir_separator=:
6159     ;;
6160
6161   sco3.2v5*)
6162     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6163     hardcode_shlibpath_var=no
6164     runpath_var=LD_RUN_PATH
6165     hardcode_runpath_var=yes
6166     export_dynamic_flag_spec='${wl}-Bexport'
6167     ;;
6168
6169   solaris*)
6170     # gcc --version < 3.0 without binutils cannot create self contained
6171     # shared libraries reliably, requiring libgcc.a to resolve some of
6172     # the object symbols generated in some cases.  Libraries that use
6173     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6174     # a copy of libgcc.a into every shared library to guarantee resolving
6175     # such symbols causes other problems:  According to Tim Van Holder
6176     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6177     # (to the application) exception stack for one thing.
6178     no_undefined_flag=' -z defs'
6179     if test "$GCC" = yes; then
6180       case `$CC --version 2>/dev/null` in
6181       [12].*)
6182         cat <<EOF 1>&2
6183
6184 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6185 *** create self contained shared libraries on Solaris systems, without
6186 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6187 *** -no-undefined support, which will at least allow you to build shared
6188 *** libraries.  However, you may find that when you link such libraries
6189 *** into an application without using GCC, you have to manually add
6190 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6191 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6192 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6193
6194 EOF
6195         no_undefined_flag=
6196         ;;
6197       esac
6198     fi
6199     # $CC -shared without GNU ld will not create a library from C++
6200     # object files and a static libstdc++, better avoid it by now
6201     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6202     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6203                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6204     hardcode_libdir_flag_spec='-R$libdir'
6205     hardcode_shlibpath_var=no
6206     case $host_os in
6207     solaris2.[0-5] | solaris2.[0-5].*) ;;
6208     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6209       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6210     esac
6211     link_all_deplibs=yes
6212     ;;
6213
6214   sunos4*)
6215     if test "x$host_vendor" = xsequent; then
6216       # Use $CC to link under sequent, because it throws in some extra .o
6217       # files that make .init and .fini sections work.
6218       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6219     else
6220       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6221     fi
6222     hardcode_libdir_flag_spec='-L$libdir'
6223     hardcode_direct=yes
6224     hardcode_minus_L=yes
6225     hardcode_shlibpath_var=no
6226     ;;
6227
6228   sysv4)
6229     if test "x$host_vendor" = xsno; then
6230       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6231       hardcode_direct=yes # is this really true???
6232     else
6233       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6234       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6235     fi
6236     runpath_var='LD_RUN_PATH'
6237     hardcode_shlibpath_var=no
6238     ;;
6239
6240   sysv4.3*)
6241     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6242     hardcode_shlibpath_var=no
6243     export_dynamic_flag_spec='-Bexport'
6244     ;;
6245
6246   sysv5*)
6247     no_undefined_flag=' -z text'
6248     # $CC -shared without GNU ld will not create a library from C++
6249     # object files and a static libstdc++, better avoid it by now
6250     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6251     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6252                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6253     hardcode_libdir_flag_spec=
6254     hardcode_shlibpath_var=no
6255     runpath_var='LD_RUN_PATH'
6256     ;;
6257
6258   uts4*)
6259     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6260     hardcode_libdir_flag_spec='-L$libdir'
6261     hardcode_shlibpath_var=no
6262     ;;
6263
6264   dgux*)
6265     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6266     hardcode_libdir_flag_spec='-L$libdir'
6267     hardcode_shlibpath_var=no
6268     ;;
6269
6270   sysv4*MP*)
6271     if test -d /usr/nec; then
6272       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6273       hardcode_shlibpath_var=no
6274       runpath_var=LD_RUN_PATH
6275       hardcode_runpath_var=yes
6276       ld_shlibs=yes
6277     fi
6278     ;;
6279
6280   sysv4.2uw2*)
6281     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6282     hardcode_direct=yes
6283     hardcode_minus_L=no
6284     hardcode_shlibpath_var=no
6285     hardcode_runpath_var=yes
6286     runpath_var=LD_RUN_PATH
6287     ;;
6288
6289   sysv5uw7* | unixware7*)
6290     no_undefined_flag='${wl}-z ${wl}text'
6291     if test "$GCC" = yes; then
6292       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6293     else
6294       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6295     fi
6296     runpath_var='LD_RUN_PATH'
6297     hardcode_shlibpath_var=no
6298     ;;
6299
6300   *)
6301     ld_shlibs=no
6302     ;;
6303   esac
6304 fi
6305 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
6306 echo "${ECHO_T}$ld_shlibs" >&6
6307 test "$ld_shlibs" = no && can_build_shared=no
6308 ##
6309 ## END FIXME
6310
6311 ## FIXME: this should be a separate macro
6312 ##
6313 # Check hardcoding attributes.
6314 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
6315 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
6316 hardcode_action=
6317 if test -n "$hardcode_libdir_flag_spec" || \
6318    test -n "$runpath_var"; then
6319
6320   # We can hardcode non-existant directories.
6321   if test "$hardcode_direct" != no &&
6322      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6323      # have to relink, otherwise we might link with an installed library
6324      # when we should be linking with a yet-to-be-installed one
6325      ## test "$hardcode_shlibpath_var" != no &&
6326      test "$hardcode_minus_L" != no; then
6327     # Linking always hardcodes the temporary library directory.
6328     hardcode_action=relink
6329   else
6330     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6331     hardcode_action=immediate
6332   fi
6333 else
6334   # We cannot hardcode anything, or else we can only hardcode existing
6335   # directories.
6336   hardcode_action=unsupported
6337 fi
6338 echo "$as_me:$LINENO: result: $hardcode_action" >&5
6339 echo "${ECHO_T}$hardcode_action" >&6
6340 ##
6341 ## END FIXME
6342
6343 ## FIXME: this should be a separate macro
6344 ##
6345 striplib=
6346 old_striplib=
6347 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
6348 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
6349 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6350   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6351   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6352   echo "$as_me:$LINENO: result: yes" >&5
6353 echo "${ECHO_T}yes" >&6
6354 else
6355   echo "$as_me:$LINENO: result: no" >&5
6356 echo "${ECHO_T}no" >&6
6357 fi
6358 ##
6359 ## END FIXME
6360
6361 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6362 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6363
6364 ## FIXME: this should be a separate macro
6365 ##
6366 # PORTME Fill in your ld.so characteristics
6367 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
6368 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
6369 library_names_spec=
6370 libname_spec='lib$name'
6371 soname_spec=
6372 postinstall_cmds=
6373 postuninstall_cmds=
6374 finish_cmds=
6375 finish_eval=
6376 shlibpath_var=
6377 shlibpath_overrides_runpath=unknown
6378 version_type=none
6379 dynamic_linker="$host_os ld.so"
6380 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6381 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6382
6383 case $host_os in
6384 aix3*)
6385   version_type=linux
6386   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6387   shlibpath_var=LIBPATH
6388
6389   # AIX has no versioning support, so we append a major version to the name.
6390   soname_spec='${libname}${release}.so$major'
6391   ;;
6392
6393 aix4* | aix5*)
6394   version_type=linux
6395   if test "$host_cpu" = ia64; then
6396     # AIX 5 supports IA64
6397     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6398     shlibpath_var=LD_LIBRARY_PATH
6399   else
6400     # With GCC up to 2.95.x, collect2 would create an import file
6401     # for dependence libraries.  The import file would start with
6402     # the line `#! .'.  This would cause the generated library to
6403     # depend on `.', always an invalid library.  This was fixed in
6404     # development snapshots of GCC prior to 3.0.
6405     case $host_os in
6406       aix4 | aix4.[01] | aix4.[01].*)
6407         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6408              echo ' yes '
6409              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6410           :
6411         else
6412           can_build_shared=no
6413         fi
6414         ;;
6415     esac
6416     # AIX (on Power*) has no versioning support, so currently we can
6417     # not hardcode correct soname into executable. Probably we can
6418     # add versioning support to collect2, so additional links can
6419     # be useful in future.
6420     if test "$aix_use_runtimelinking" = yes; then
6421       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6422       # instead of lib<name>.a to let people know that these are not
6423       # typical AIX shared libraries.
6424       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6425     else
6426       # We preserve .a as extension for shared libraries through AIX4.2
6427       # and later when we are not doing run time linking.
6428       library_names_spec='${libname}${release}.a $libname.a'
6429       soname_spec='${libname}${release}.so$major'
6430     fi
6431     shlibpath_var=LIBPATH
6432   fi
6433   ;;
6434
6435 amigaos*)
6436   library_names_spec='$libname.ixlibrary $libname.a'
6437   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6438   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'
6439   ;;
6440
6441 beos*)
6442   library_names_spec='${libname}.so'
6443   dynamic_linker="$host_os ld.so"
6444   shlibpath_var=LIBRARY_PATH
6445   ;;
6446
6447 bsdi4*)
6448   version_type=linux
6449   need_version=no
6450   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6451   soname_spec='${libname}${release}.so$major'
6452   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6453   shlibpath_var=LD_LIBRARY_PATH
6454   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6455   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6456   export_dynamic_flag_spec=-rdynamic
6457   # the default ld.so.conf also contains /usr/contrib/lib and
6458   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6459   # libtool to hard-code these into programs
6460   ;;
6461
6462 cygwin* | mingw* | pw32*)
6463   version_type=windows
6464   need_version=no
6465   need_lib_prefix=no
6466   case $GCC,$host_os in
6467   yes,cygwin*)
6468     library_names_spec='$libname.dll.a'
6469     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6470     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6471       dldir=$destdir/`dirname \$dlpath`~
6472       test -d \$dldir || mkdir -p \$dldir~
6473       $install_prog .libs/$dlname \$dldir/$dlname'
6474     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6475       dlpath=$dir/\$dldll~
6476        $rm \$dlpath'
6477     ;;
6478   yes,mingw*)
6479     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6480     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6481     ;;
6482   yes,pw32*)
6483     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6484     ;;
6485   *)
6486     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6487     ;;
6488   esac
6489   dynamic_linker='Win32 ld.exe'
6490   # FIXME: first we should search . and the directory the executable is in
6491   shlibpath_var=PATH
6492   ;;
6493
6494 darwin* | rhapsody*)
6495   dynamic_linker="$host_os dyld"
6496   version_type=darwin
6497   need_lib_prefix=no
6498   need_version=no
6499   # FIXME: Relying on posixy $() will cause problems for
6500   #        cross-compilation, but unfortunately the echo tests do not
6501   #        yet detect zsh echo's removal of \ escapes.
6502   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)'
6503   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6504   shlibpath_overrides_runpath=yes
6505   shlibpath_var=DYLD_LIBRARY_PATH
6506   ;;
6507
6508 freebsd1*)
6509   dynamic_linker=no
6510   ;;
6511
6512 freebsd*)
6513   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6514   version_type=freebsd-$objformat
6515   case $version_type in
6516     freebsd-elf*)
6517       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6518       need_version=no
6519       need_lib_prefix=no
6520       ;;
6521     freebsd-*)
6522       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6523       need_version=yes
6524       ;;
6525   esac
6526   shlibpath_var=LD_LIBRARY_PATH
6527   case $host_os in
6528   freebsd2*)
6529     shlibpath_overrides_runpath=yes
6530     ;;
6531   *)
6532     shlibpath_overrides_runpath=no
6533     hardcode_into_libs=yes
6534     ;;
6535   esac
6536   ;;
6537
6538 gnu*)
6539   version_type=linux
6540   need_lib_prefix=no
6541   need_version=no
6542   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6543   soname_spec='${libname}${release}.so$major'
6544   shlibpath_var=LD_LIBRARY_PATH
6545   hardcode_into_libs=yes
6546   ;;
6547
6548 hpux9* | hpux10* | hpux11*)
6549   # Give a soname corresponding to the major version so that dld.sl refuses to
6550   # link against other versions.
6551   dynamic_linker="$host_os dld.sl"
6552   version_type=sunos
6553   need_lib_prefix=no
6554   need_version=no
6555   shlibpath_var=SHLIB_PATH
6556   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6557   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6558   soname_spec='${libname}${release}.sl$major'
6559   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6560   postinstall_cmds='chmod 555 $lib'
6561   ;;
6562
6563 irix5* | irix6* | nonstopux*)
6564   case $host_os in
6565     nonstopux*) version_type=nonstopux ;;
6566     *)          version_type=irix ;;
6567   esac
6568   need_lib_prefix=no
6569   need_version=no
6570   soname_spec='${libname}${release}.so$major'
6571   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6572   case $host_os in
6573   irix5* | nonstopux*)
6574     libsuff= shlibsuff=
6575     ;;
6576   *)
6577     case $LD in # libtool.m4 will add one of these switches to LD
6578     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6579     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6580     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6581     *) libsuff= shlibsuff= libmagic=never-match;;
6582     esac
6583     ;;
6584   esac
6585   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6586   shlibpath_overrides_runpath=no
6587   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6588   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6589   ;;
6590
6591 # No shared lib support for Linux oldld, aout, or coff.
6592 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6593   dynamic_linker=no
6594   ;;
6595
6596 # This must be Linux ELF.
6597 linux-gnu*)
6598   version_type=linux
6599   need_lib_prefix=no
6600   need_version=no
6601   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6602   soname_spec='${libname}${release}.so$major'
6603   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6604   shlibpath_var=LD_LIBRARY_PATH
6605   shlibpath_overrides_runpath=no
6606   # This implies no fast_install, which is unacceptable.
6607   # Some rework will be needed to allow for fast_install
6608   # before this can be enabled.
6609   hardcode_into_libs=yes
6610
6611   # We used to test for /lib/ld.so.1 and disable shared libraries on
6612   # powerpc, because MkLinux only supported shared libraries with the
6613   # GNU dynamic linker.  Since this was broken with cross compilers,
6614   # most powerpc-linux boxes support dynamic linking these days and
6615   # people can always --disable-shared, the test was removed, and we
6616   # assume the GNU/Linux dynamic linker is in use.
6617   dynamic_linker='GNU/Linux ld.so'
6618   ;;
6619
6620 netbsd*)
6621   version_type=sunos
6622   need_lib_prefix=no
6623   need_version=no
6624   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6625     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6626     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6627     dynamic_linker='NetBSD (a.out) ld.so'
6628   else
6629     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6630     soname_spec='${libname}${release}.so$major'
6631     dynamic_linker='NetBSD ld.elf_so'
6632   fi
6633   shlibpath_var=LD_LIBRARY_PATH
6634   shlibpath_overrides_runpath=yes
6635   hardcode_into_libs=yes
6636   ;;
6637
6638 newsos6)
6639   version_type=linux
6640   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6641   shlibpath_var=LD_LIBRARY_PATH
6642   shlibpath_overrides_runpath=yes
6643   ;;
6644
6645 openbsd*)
6646   version_type=sunos
6647   need_lib_prefix=no
6648   need_version=no
6649   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6650     case "$host_os" in
6651     openbsd2.[89] | openbsd2.[89].*)
6652       shlibpath_overrides_runpath=no
6653       ;;
6654     *)
6655       shlibpath_overrides_runpath=yes
6656       ;;
6657     esac
6658   else
6659     shlibpath_overrides_runpath=yes
6660   fi
6661   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6662   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6663   shlibpath_var=LD_LIBRARY_PATH
6664   ;;
6665
6666 os2*)
6667   libname_spec='$name'
6668   need_lib_prefix=no
6669   library_names_spec='$libname.dll $libname.a'
6670   dynamic_linker='OS/2 ld.exe'
6671   shlibpath_var=LIBPATH
6672   ;;
6673
6674 osf3* | osf4* | osf5*)
6675   version_type=osf
6676   need_version=no
6677   soname_spec='${libname}${release}.so'
6678   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6679   shlibpath_var=LD_LIBRARY_PATH
6680   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6681   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6682   ;;
6683
6684 sco3.2v5*)
6685   version_type=osf
6686   soname_spec='${libname}${release}.so$major'
6687   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6688   shlibpath_var=LD_LIBRARY_PATH
6689   ;;
6690
6691 solaris*)
6692   version_type=linux
6693   need_lib_prefix=no
6694   need_version=no
6695   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6696   soname_spec='${libname}${release}.so$major'
6697   shlibpath_var=LD_LIBRARY_PATH
6698   shlibpath_overrides_runpath=yes
6699   hardcode_into_libs=yes
6700   # ldd complains unless libraries are executable
6701   postinstall_cmds='chmod +x $lib'
6702   ;;
6703
6704 sunos4*)
6705   version_type=sunos
6706   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6707   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6708   shlibpath_var=LD_LIBRARY_PATH
6709   shlibpath_overrides_runpath=yes
6710   if test "$with_gnu_ld" = yes; then
6711     need_lib_prefix=no
6712   fi
6713   need_version=yes
6714   ;;
6715
6716 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6717   version_type=linux
6718   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6719   soname_spec='${libname}${release}.so$major'
6720   shlibpath_var=LD_LIBRARY_PATH
6721   case $host_vendor in
6722     sni)
6723       shlibpath_overrides_runpath=no
6724       ;;
6725     motorola)
6726       need_lib_prefix=no
6727       need_version=no
6728       shlibpath_overrides_runpath=no
6729       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6730       ;;
6731   esac
6732   ;;
6733
6734 uts4*)
6735   version_type=linux
6736   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6737   soname_spec='${libname}${release}.so$major'
6738   shlibpath_var=LD_LIBRARY_PATH
6739   ;;
6740
6741 dgux*)
6742   version_type=linux
6743   need_lib_prefix=no
6744   need_version=no
6745   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6746   soname_spec='${libname}${release}.so$major'
6747   shlibpath_var=LD_LIBRARY_PATH
6748   ;;
6749
6750 sysv4*MP*)
6751   if test -d /usr/nec ;then
6752     version_type=linux
6753     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6754     soname_spec='$libname.so.$major'
6755     shlibpath_var=LD_LIBRARY_PATH
6756   fi
6757   ;;
6758
6759 *)
6760   dynamic_linker=no
6761   ;;
6762 esac
6763 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
6764 echo "${ECHO_T}$dynamic_linker" >&6
6765 test "$dynamic_linker" = no && can_build_shared=no
6766 ##
6767 ## END FIXME
6768
6769 ## FIXME: this should be a separate macro
6770 ##
6771 # Report the final consequences.
6772 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
6773 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
6774 echo "$as_me:$LINENO: result: $can_build_shared" >&5
6775 echo "${ECHO_T}$can_build_shared" >&6
6776 ##
6777 ## END FIXME
6778
6779 ## FIXME: this should be a separate macro
6780 ##
6781 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
6782 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
6783 test "$can_build_shared" = "no" && enable_shared=no
6784
6785 # On AIX, shared libraries and static libraries use the same namespace, and
6786 # are all built from PIC.
6787 case "$host_os" in
6788 aix3*)
6789   test "$enable_shared" = yes && enable_static=no
6790   if test -n "$RANLIB"; then
6791     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6792     postinstall_cmds='$RANLIB $lib'
6793   fi
6794   ;;
6795
6796 aix4*)
6797   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6798     test "$enable_shared" = yes && enable_static=no
6799   fi
6800   ;;
6801 esac
6802 echo "$as_me:$LINENO: result: $enable_shared" >&5
6803 echo "${ECHO_T}$enable_shared" >&6
6804 ##
6805 ## END FIXME
6806
6807 ## FIXME: this should be a separate macro
6808 ##
6809 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
6810 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
6811 # Make sure either enable_shared or enable_static is yes.
6812 test "$enable_shared" = yes || enable_static=yes
6813 echo "$as_me:$LINENO: result: $enable_static" >&5
6814 echo "${ECHO_T}$enable_static" >&6
6815 ##
6816 ## END FIXME
6817
6818 if test "$hardcode_action" = relink; then
6819   # Fast installation is not supported
6820   enable_fast_install=no
6821 elif test "$shlibpath_overrides_runpath" = yes ||
6822      test "$enable_shared" = no; then
6823   # Fast installation is not necessary
6824   enable_fast_install=needless
6825 fi
6826
6827 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6828 if test "$GCC" = yes; then
6829   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6830 fi
6831
6832 if test "x$enable_dlopen" != xyes; then
6833   enable_dlopen=unknown
6834   enable_dlopen_self=unknown
6835   enable_dlopen_self_static=unknown
6836 else
6837   lt_cv_dlopen=no
6838   lt_cv_dlopen_libs=
6839
6840   case $host_os in
6841   beos*)
6842     lt_cv_dlopen="load_add_on"
6843     lt_cv_dlopen_libs=
6844     lt_cv_dlopen_self=yes
6845     ;;
6846
6847   cygwin* | mingw* | pw32*)
6848     lt_cv_dlopen="LoadLibrary"
6849     lt_cv_dlopen_libs=
6850    ;;
6851
6852   *)
6853     echo "$as_me:$LINENO: checking for shl_load" >&5
6854 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
6855 if test "${ac_cv_func_shl_load+set}" = set; then
6856   echo $ECHO_N "(cached) $ECHO_C" >&6
6857 else
6858   cat >conftest.$ac_ext <<_ACEOF
6859 #line $LINENO "configure"
6860 /* confdefs.h.  */
6861 _ACEOF
6862 cat confdefs.h >>conftest.$ac_ext
6863 cat >>conftest.$ac_ext <<_ACEOF
6864 /* end confdefs.h.  */
6865 /* System header to define __stub macros and hopefully few prototypes,
6866     which can conflict with char shl_load (); below.
6867     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6868     <limits.h> exists even on freestanding compilers.  */
6869 #ifdef __STDC__
6870 # include <limits.h>
6871 #else
6872 # include <assert.h>
6873 #endif
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 #ifdef __cplusplus
6876 extern "C"
6877 {
6878 #endif
6879 /* We use char because int might match the return type of a gcc2
6880    builtin and then its argument prototype would still apply.  */
6881 char shl_load ();
6882 /* The GNU C library defines this for functions which it implements
6883     to always fail with ENOSYS.  Some functions are actually named
6884     something starting with __ and the normal name is an alias.  */
6885 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6886 choke me
6887 #else
6888 char (*f) () = shl_load;
6889 #endif
6890 #ifdef __cplusplus
6891 }
6892 #endif
6893
6894 int
6895 main ()
6896 {
6897 return f != shl_load;
6898   ;
6899   return 0;
6900 }
6901 _ACEOF
6902 rm -f conftest.$ac_objext conftest$ac_exeext
6903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6904   (eval $ac_link) 2>&5
6905   ac_status=$?
6906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907   (exit $ac_status); } &&
6908          { ac_try='test -s conftest$ac_exeext'
6909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6910   (eval $ac_try) 2>&5
6911   ac_status=$?
6912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913   (exit $ac_status); }; }; then
6914   ac_cv_func_shl_load=yes
6915 else
6916   echo "$as_me: failed program was:" >&5
6917 sed 's/^/| /' conftest.$ac_ext >&5
6918
6919 ac_cv_func_shl_load=no
6920 fi
6921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6922 fi
6923 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
6924 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
6925 if test $ac_cv_func_shl_load = yes; then
6926   lt_cv_dlopen="shl_load"
6927 else
6928   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
6929 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
6930 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
6931   echo $ECHO_N "(cached) $ECHO_C" >&6
6932 else
6933   ac_check_lib_save_LIBS=$LIBS
6934 LIBS="-ldld  $LIBS"
6935 cat >conftest.$ac_ext <<_ACEOF
6936 #line $LINENO "configure"
6937 /* confdefs.h.  */
6938 _ACEOF
6939 cat confdefs.h >>conftest.$ac_ext
6940 cat >>conftest.$ac_ext <<_ACEOF
6941 /* end confdefs.h.  */
6942
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 #ifdef __cplusplus
6945 extern "C"
6946 #endif
6947 /* We use char because int might match the return type of a gcc2
6948    builtin and then its argument prototype would still apply.  */
6949 char shl_load ();
6950 int
6951 main ()
6952 {
6953 shl_load ();
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 rm -f conftest.$ac_objext conftest$ac_exeext
6959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6960   (eval $ac_link) 2>&5
6961   ac_status=$?
6962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963   (exit $ac_status); } &&
6964          { ac_try='test -s conftest$ac_exeext'
6965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6966   (eval $ac_try) 2>&5
6967   ac_status=$?
6968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969   (exit $ac_status); }; }; then
6970   ac_cv_lib_dld_shl_load=yes
6971 else
6972   echo "$as_me: failed program was:" >&5
6973 sed 's/^/| /' conftest.$ac_ext >&5
6974
6975 ac_cv_lib_dld_shl_load=no
6976 fi
6977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6978 LIBS=$ac_check_lib_save_LIBS
6979 fi
6980 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
6981 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
6982 if test $ac_cv_lib_dld_shl_load = yes; then
6983   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6984 else
6985   echo "$as_me:$LINENO: checking for dlopen" >&5
6986 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
6987 if test "${ac_cv_func_dlopen+set}" = set; then
6988   echo $ECHO_N "(cached) $ECHO_C" >&6
6989 else
6990   cat >conftest.$ac_ext <<_ACEOF
6991 #line $LINENO "configure"
6992 /* confdefs.h.  */
6993 _ACEOF
6994 cat confdefs.h >>conftest.$ac_ext
6995 cat >>conftest.$ac_ext <<_ACEOF
6996 /* end confdefs.h.  */
6997 /* System header to define __stub macros and hopefully few prototypes,
6998     which can conflict with char dlopen (); below.
6999     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7000     <limits.h> exists even on freestanding compilers.  */
7001 #ifdef __STDC__
7002 # include <limits.h>
7003 #else
7004 # include <assert.h>
7005 #endif
7006 /* Override any gcc2 internal prototype to avoid an error.  */
7007 #ifdef __cplusplus
7008 extern "C"
7009 {
7010 #endif
7011 /* We use char because int might match the return type of a gcc2
7012    builtin and then its argument prototype would still apply.  */
7013 char dlopen ();
7014 /* The GNU C library defines this for functions which it implements
7015     to always fail with ENOSYS.  Some functions are actually named
7016     something starting with __ and the normal name is an alias.  */
7017 #if defined (__stub_dlopen) || defined (__stub___dlopen)
7018 choke me
7019 #else
7020 char (*f) () = dlopen;
7021 #endif
7022 #ifdef __cplusplus
7023 }
7024 #endif
7025
7026 int
7027 main ()
7028 {
7029 return f != dlopen;
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext conftest$ac_exeext
7035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest$ac_exeext'
7041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   ac_cv_func_dlopen=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 sed 's/^/| /' conftest.$ac_ext >&5
7050
7051 ac_cv_func_dlopen=no
7052 fi
7053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7054 fi
7055 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
7056 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
7057 if test $ac_cv_func_dlopen = yes; then
7058   lt_cv_dlopen="dlopen"
7059 else
7060   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
7061 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
7062 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
7063   echo $ECHO_N "(cached) $ECHO_C" >&6
7064 else
7065   ac_check_lib_save_LIBS=$LIBS
7066 LIBS="-ldl  $LIBS"
7067 cat >conftest.$ac_ext <<_ACEOF
7068 #line $LINENO "configure"
7069 /* confdefs.h.  */
7070 _ACEOF
7071 cat confdefs.h >>conftest.$ac_ext
7072 cat >>conftest.$ac_ext <<_ACEOF
7073 /* end confdefs.h.  */
7074
7075 /* Override any gcc2 internal prototype to avoid an error.  */
7076 #ifdef __cplusplus
7077 extern "C"
7078 #endif
7079 /* We use char because int might match the return type of a gcc2
7080    builtin and then its argument prototype would still apply.  */
7081 char dlopen ();
7082 int
7083 main ()
7084 {
7085 dlopen ();
7086   ;
7087   return 0;
7088 }
7089 _ACEOF
7090 rm -f conftest.$ac_objext conftest$ac_exeext
7091 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7092   (eval $ac_link) 2>&5
7093   ac_status=$?
7094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095   (exit $ac_status); } &&
7096          { ac_try='test -s conftest$ac_exeext'
7097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7098   (eval $ac_try) 2>&5
7099   ac_status=$?
7100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7101   (exit $ac_status); }; }; then
7102   ac_cv_lib_dl_dlopen=yes
7103 else
7104   echo "$as_me: failed program was:" >&5
7105 sed 's/^/| /' conftest.$ac_ext >&5
7106
7107 ac_cv_lib_dl_dlopen=no
7108 fi
7109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7110 LIBS=$ac_check_lib_save_LIBS
7111 fi
7112 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
7113 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
7114 if test $ac_cv_lib_dl_dlopen = yes; then
7115   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7116 else
7117   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
7118 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
7119 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
7120   echo $ECHO_N "(cached) $ECHO_C" >&6
7121 else
7122   ac_check_lib_save_LIBS=$LIBS
7123 LIBS="-lsvld  $LIBS"
7124 cat >conftest.$ac_ext <<_ACEOF
7125 #line $LINENO "configure"
7126 /* confdefs.h.  */
7127 _ACEOF
7128 cat confdefs.h >>conftest.$ac_ext
7129 cat >>conftest.$ac_ext <<_ACEOF
7130 /* end confdefs.h.  */
7131
7132 /* Override any gcc2 internal prototype to avoid an error.  */
7133 #ifdef __cplusplus
7134 extern "C"
7135 #endif
7136 /* We use char because int might match the return type of a gcc2
7137    builtin and then its argument prototype would still apply.  */
7138 char dlopen ();
7139 int
7140 main ()
7141 {
7142 dlopen ();
7143   ;
7144   return 0;
7145 }
7146 _ACEOF
7147 rm -f conftest.$ac_objext conftest$ac_exeext
7148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7149   (eval $ac_link) 2>&5
7150   ac_status=$?
7151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152   (exit $ac_status); } &&
7153          { ac_try='test -s conftest$ac_exeext'
7154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7155   (eval $ac_try) 2>&5
7156   ac_status=$?
7157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158   (exit $ac_status); }; }; then
7159   ac_cv_lib_svld_dlopen=yes
7160 else
7161   echo "$as_me: failed program was:" >&5
7162 sed 's/^/| /' conftest.$ac_ext >&5
7163
7164 ac_cv_lib_svld_dlopen=no
7165 fi
7166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7167 LIBS=$ac_check_lib_save_LIBS
7168 fi
7169 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
7170 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
7171 if test $ac_cv_lib_svld_dlopen = yes; then
7172   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7173 else
7174   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
7175 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
7176 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
7177   echo $ECHO_N "(cached) $ECHO_C" >&6
7178 else
7179   ac_check_lib_save_LIBS=$LIBS
7180 LIBS="-ldld  $LIBS"
7181 cat >conftest.$ac_ext <<_ACEOF
7182 #line $LINENO "configure"
7183 /* confdefs.h.  */
7184 _ACEOF
7185 cat confdefs.h >>conftest.$ac_ext
7186 cat >>conftest.$ac_ext <<_ACEOF
7187 /* end confdefs.h.  */
7188
7189 /* Override any gcc2 internal prototype to avoid an error.  */
7190 #ifdef __cplusplus
7191 extern "C"
7192 #endif
7193 /* We use char because int might match the return type of a gcc2
7194    builtin and then its argument prototype would still apply.  */
7195 char dld_link ();
7196 int
7197 main ()
7198 {
7199 dld_link ();
7200   ;
7201   return 0;
7202 }
7203 _ACEOF
7204 rm -f conftest.$ac_objext conftest$ac_exeext
7205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7206   (eval $ac_link) 2>&5
7207   ac_status=$?
7208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209   (exit $ac_status); } &&
7210          { ac_try='test -s conftest$ac_exeext'
7211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7212   (eval $ac_try) 2>&5
7213   ac_status=$?
7214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215   (exit $ac_status); }; }; then
7216   ac_cv_lib_dld_dld_link=yes
7217 else
7218   echo "$as_me: failed program was:" >&5
7219 sed 's/^/| /' conftest.$ac_ext >&5
7220
7221 ac_cv_lib_dld_dld_link=no
7222 fi
7223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7224 LIBS=$ac_check_lib_save_LIBS
7225 fi
7226 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
7227 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
7228 if test $ac_cv_lib_dld_dld_link = yes; then
7229   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7230 fi
7231
7232
7233 fi
7234
7235
7236 fi
7237
7238
7239 fi
7240
7241
7242 fi
7243
7244
7245 fi
7246
7247     ;;
7248   esac
7249
7250   if test "x$lt_cv_dlopen" != xno; then
7251     enable_dlopen=yes
7252   else
7253     enable_dlopen=no
7254   fi
7255
7256   case $lt_cv_dlopen in
7257   dlopen)
7258     save_CPPFLAGS="$CPPFLAGS"
7259         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7260
7261     save_LDFLAGS="$LDFLAGS"
7262     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7263
7264     save_LIBS="$LIBS"
7265     LIBS="$lt_cv_dlopen_libs $LIBS"
7266
7267     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
7268 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
7269 if test "${lt_cv_dlopen_self+set}" = set; then
7270   echo $ECHO_N "(cached) $ECHO_C" >&6
7271 else
7272           if test "$cross_compiling" = yes; then :
7273   lt_cv_dlopen_self=cross
7274 else
7275     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7276   lt_status=$lt_dlunknown
7277   cat > conftest.$ac_ext <<EOF
7278 #line 7278 "configure"
7279 #include "confdefs.h"
7280
7281 #if HAVE_DLFCN_H
7282 #include <dlfcn.h>
7283 #endif
7284
7285 #include <stdio.h>
7286
7287 #ifdef RTLD_GLOBAL
7288 #  define LT_DLGLOBAL           RTLD_GLOBAL
7289 #else
7290 #  ifdef DL_GLOBAL
7291 #    define LT_DLGLOBAL         DL_GLOBAL
7292 #  else
7293 #    define LT_DLGLOBAL         0
7294 #  endif
7295 #endif
7296
7297 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7298    find out it does not work in some platform. */
7299 #ifndef LT_DLLAZY_OR_NOW
7300 #  ifdef RTLD_LAZY
7301 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7302 #  else
7303 #    ifdef DL_LAZY
7304 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7305 #    else
7306 #      ifdef RTLD_NOW
7307 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7308 #      else
7309 #        ifdef DL_NOW
7310 #          define LT_DLLAZY_OR_NOW      DL_NOW
7311 #        else
7312 #          define LT_DLLAZY_OR_NOW      0
7313 #        endif
7314 #      endif
7315 #    endif
7316 #  endif
7317 #endif
7318
7319 #ifdef __cplusplus
7320 extern "C" void exit (int);
7321 #endif
7322
7323 void fnord() { int i=42;}
7324 int main ()
7325 {
7326   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7327   int status = $lt_dlunknown;
7328
7329   if (self)
7330     {
7331       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7332       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7333       /* dlclose (self); */
7334     }
7335
7336     exit (status);
7337 }
7338 EOF
7339   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7340   (eval $ac_link) 2>&5
7341   ac_status=$?
7342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7344     (./conftest; exit; ) 2>/dev/null
7345     lt_status=$?
7346     case x$lt_status in
7347       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7348       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7349       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7350     esac
7351   else :
7352     # compilation failed
7353     lt_cv_dlopen_self=no
7354   fi
7355 fi
7356 rm -fr conftest*
7357
7358
7359 fi
7360 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
7361 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
7362
7363     if test "x$lt_cv_dlopen_self" = xyes; then
7364       LDFLAGS="$LDFLAGS $link_static_flag"
7365       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
7366 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
7367 if test "${lt_cv_dlopen_self_static+set}" = set; then
7368   echo $ECHO_N "(cached) $ECHO_C" >&6
7369 else
7370           if test "$cross_compiling" = yes; then :
7371   lt_cv_dlopen_self_static=cross
7372 else
7373     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7374   lt_status=$lt_dlunknown
7375   cat > conftest.$ac_ext <<EOF
7376 #line 7376 "configure"
7377 #include "confdefs.h"
7378
7379 #if HAVE_DLFCN_H
7380 #include <dlfcn.h>
7381 #endif
7382
7383 #include <stdio.h>
7384
7385 #ifdef RTLD_GLOBAL
7386 #  define LT_DLGLOBAL           RTLD_GLOBAL
7387 #else
7388 #  ifdef DL_GLOBAL
7389 #    define LT_DLGLOBAL         DL_GLOBAL
7390 #  else
7391 #    define LT_DLGLOBAL         0
7392 #  endif
7393 #endif
7394
7395 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7396    find out it does not work in some platform. */
7397 #ifndef LT_DLLAZY_OR_NOW
7398 #  ifdef RTLD_LAZY
7399 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7400 #  else
7401 #    ifdef DL_LAZY
7402 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7403 #    else
7404 #      ifdef RTLD_NOW
7405 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7406 #      else
7407 #        ifdef DL_NOW
7408 #          define LT_DLLAZY_OR_NOW      DL_NOW
7409 #        else
7410 #          define LT_DLLAZY_OR_NOW      0
7411 #        endif
7412 #      endif
7413 #    endif
7414 #  endif
7415 #endif
7416
7417 #ifdef __cplusplus
7418 extern "C" void exit (int);
7419 #endif
7420
7421 void fnord() { int i=42;}
7422 int main ()
7423 {
7424   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7425   int status = $lt_dlunknown;
7426
7427   if (self)
7428     {
7429       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7430       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7431       /* dlclose (self); */
7432     }
7433
7434     exit (status);
7435 }
7436 EOF
7437   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7438   (eval $ac_link) 2>&5
7439   ac_status=$?
7440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
7442     (./conftest; exit; ) 2>/dev/null
7443     lt_status=$?
7444     case x$lt_status in
7445       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7446       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7447       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7448     esac
7449   else :
7450     # compilation failed
7451     lt_cv_dlopen_self_static=no
7452   fi
7453 fi
7454 rm -fr conftest*
7455
7456
7457 fi
7458 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
7459 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
7460     fi
7461
7462     CPPFLAGS="$save_CPPFLAGS"
7463     LDFLAGS="$save_LDFLAGS"
7464     LIBS="$save_LIBS"
7465     ;;
7466   esac
7467
7468   case $lt_cv_dlopen_self in
7469   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7470   *) enable_dlopen_self=unknown ;;
7471   esac
7472
7473   case $lt_cv_dlopen_self_static in
7474   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7475   *) enable_dlopen_self_static=unknown ;;
7476   esac
7477 fi
7478
7479
7480 ## FIXME: this should be a separate macro
7481 ##
7482 if test "$enable_shared" = yes && test "$GCC" = yes; then
7483   case $archive_cmds in
7484   *'~'*)
7485     # FIXME: we may have to deal with multi-command sequences.
7486     ;;
7487   '$CC '*)
7488     # Test whether the compiler implicitly links with -lc since on some
7489     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7490     # to ld, don't add -lc before -lgcc.
7491     echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
7492 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
7493     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
7494   echo $ECHO_N "(cached) $ECHO_C" >&6
7495 else
7496   $rm conftest*
7497     echo 'static int dummy;' > conftest.$ac_ext
7498
7499     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7500   (eval $ac_compile) 2>&5
7501   ac_status=$?
7502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7503   (exit $ac_status); }; then
7504       soname=conftest
7505       lib=conftest
7506       libobjs=conftest.$ac_objext
7507       deplibs=
7508       wl=$lt_cv_prog_cc_wl
7509       compiler_flags=-v
7510       linker_flags=-v
7511       verstring=
7512       output_objdir=.
7513       libname=conftest
7514       save_allow_undefined_flag=$allow_undefined_flag
7515       allow_undefined_flag=
7516       if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
7517   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
7518   ac_status=$?
7519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520   (exit $ac_status); }
7521       then
7522         lt_cv_archive_cmds_need_lc=no
7523       else
7524         lt_cv_archive_cmds_need_lc=yes
7525       fi
7526       allow_undefined_flag=$save_allow_undefined_flag
7527     else
7528       cat conftest.err 1>&5
7529     fi
7530 fi
7531
7532     echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
7533 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
7534     ;;
7535   esac
7536 fi
7537 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7538 ##
7539 ## END FIXME
7540
7541 ## FIXME: this should be a separate macro
7542 ##
7543 # The second clause should only fire when bootstrapping the
7544 # libtool distribution, otherwise you forgot to ship ltmain.sh
7545 # with your package, and you will get complaints that there are
7546 # no rules to generate ltmain.sh.
7547 if test -f "$ltmain"; then
7548   :
7549 else
7550   # If there is no Makefile yet, we rely on a make rule to execute
7551   # `config.status --recheck' to rerun these tests and create the
7552   # libtool script then.
7553   test -f Makefile && make "$ltmain"
7554 fi
7555
7556 if test -f "$ltmain"; then
7557   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7558   $rm -f "${ofile}T"
7559
7560   echo creating $ofile
7561
7562   # Now quote all the things that may contain metacharacters while being
7563   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7564   # variables and quote the copies for generation of the libtool script.
7565   for var in echo old_CC old_CFLAGS \
7566     AR AR_FLAGS CC LD LN_S NM SHELL \
7567     reload_flag reload_cmds wl \
7568     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7569     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7570     library_names_spec soname_spec \
7571     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7572     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7573     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7574     old_striplib striplib file_magic_cmd export_symbols_cmds \
7575     deplibs_check_method allow_undefined_flag no_undefined_flag \
7576     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7577     global_symbol_to_c_name_address \
7578     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7579     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7580     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7581
7582     case $var in
7583     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7584     old_postinstall_cmds | old_postuninstall_cmds | \
7585     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7586     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7587     postinstall_cmds | postuninstall_cmds | \
7588     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7589       # Double-quote double-evaled strings.
7590       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7591       ;;
7592     *)
7593       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7594       ;;
7595     esac
7596   done
7597
7598   cat <<__EOF__ > "${ofile}T"
7599 #! $SHELL
7600
7601 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7602 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7603 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7604 #
7605 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7606 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7607 #
7608 # This program is free software; you can redistribute it and/or modify
7609 # it under the terms of the GNU General Public License as published by
7610 # the Free Software Foundation; either version 2 of the License, or
7611 # (at your option) any later version.
7612 #
7613 # This program is distributed in the hope that it will be useful, but
7614 # WITHOUT ANY WARRANTY; without even the implied warranty of
7615 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7616 # General Public License for more details.
7617 #
7618 # You should have received a copy of the GNU General Public License
7619 # along with this program; if not, write to the Free Software
7620 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7621 #
7622 # As a special exception to the GNU General Public License, if you
7623 # distribute this file as part of a program that contains a
7624 # configuration script generated by Autoconf, you may include it under
7625 # the same distribution terms that you use for the rest of that program.
7626
7627 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7628 Xsed="sed -e s/^X//"
7629
7630 # The HP-UX ksh and POSIX shell print the target directory to stdout
7631 # if CDPATH is set.
7632 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7633
7634 # ### BEGIN LIBTOOL CONFIG
7635
7636 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7637
7638 # Shell to use when invoking shell scripts.
7639 SHELL=$lt_SHELL
7640
7641 # Whether or not to build shared libraries.
7642 build_libtool_libs=$enable_shared
7643
7644 # Whether or not to build static libraries.
7645 build_old_libs=$enable_static
7646
7647 # Whether or not to add -lc for building shared libraries.
7648 build_libtool_need_lc=$need_lc
7649
7650 # Whether or not to optimize for fast installation.
7651 fast_install=$enable_fast_install
7652
7653 # The host system.
7654 host_alias=$host_alias
7655 host=$host
7656
7657 # An echo program that does not interpret backslashes.
7658 echo=$lt_echo
7659
7660 # The archiver.
7661 AR=$lt_AR
7662 AR_FLAGS=$lt_AR_FLAGS
7663
7664 # The default C compiler.
7665 CC=$lt_CC
7666
7667 # Is the compiler the GNU C compiler?
7668 with_gcc=$GCC
7669
7670 # The linker used to build libraries.
7671 LD=$lt_LD
7672
7673 # Whether we need hard or soft links.
7674 LN_S=$lt_LN_S
7675
7676 # A BSD-compatible nm program.
7677 NM=$lt_NM
7678
7679 # A symbol stripping program
7680 STRIP=$STRIP
7681
7682 # Used to examine libraries when file_magic_cmd begins "file"
7683 MAGIC_CMD=$MAGIC_CMD
7684
7685 # Used on cygwin: DLL creation program.
7686 DLLTOOL="$DLLTOOL"
7687
7688 # Used on cygwin: object dumper.
7689 OBJDUMP="$OBJDUMP"
7690
7691 # Used on cygwin: assembler.
7692 AS="$AS"
7693
7694 # The name of the directory that contains temporary libtool files.
7695 objdir=$objdir
7696
7697 # How to create reloadable object files.
7698 reload_flag=$lt_reload_flag
7699 reload_cmds=$lt_reload_cmds
7700
7701 # How to pass a linker flag through the compiler.
7702 wl=$lt_wl
7703
7704 # Object file suffix (normally "o").
7705 objext="$ac_objext"
7706
7707 # Old archive suffix (normally "a").
7708 libext="$libext"
7709
7710 # Executable file suffix (normally "").
7711 exeext="$exeext"
7712
7713 # Additional compiler flags for building library objects.
7714 pic_flag=$lt_pic_flag
7715 pic_mode=$pic_mode
7716
7717 # Does compiler simultaneously support -c and -o options?
7718 compiler_c_o=$lt_compiler_c_o
7719
7720 # Can we write directly to a .lo ?
7721 compiler_o_lo=$lt_compiler_o_lo
7722
7723 # Must we lock files when doing compilation ?
7724 need_locks=$lt_need_locks
7725
7726 # Do we need the lib prefix for modules?
7727 need_lib_prefix=$need_lib_prefix
7728
7729 # Do we need a version for libraries?
7730 need_version=$need_version
7731
7732 # Whether dlopen is supported.
7733 dlopen_support=$enable_dlopen
7734
7735 # Whether dlopen of programs is supported.
7736 dlopen_self=$enable_dlopen_self
7737
7738 # Whether dlopen of statically linked programs is supported.
7739 dlopen_self_static=$enable_dlopen_self_static
7740
7741 # Compiler flag to prevent dynamic linking.
7742 link_static_flag=$lt_link_static_flag
7743
7744 # Compiler flag to turn off builtin functions.
7745 no_builtin_flag=$lt_no_builtin_flag
7746
7747 # Compiler flag to allow reflexive dlopens.
7748 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7749
7750 # Compiler flag to generate shared objects directly from archives.
7751 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7752
7753 # Compiler flag to generate thread-safe objects.
7754 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7755
7756 # Library versioning type.
7757 version_type=$version_type
7758
7759 # Format of library name prefix.
7760 libname_spec=$lt_libname_spec
7761
7762 # List of archive names.  First name is the real one, the rest are links.
7763 # The last name is the one that the linker finds with -lNAME.
7764 library_names_spec=$lt_library_names_spec
7765
7766 # The coded name of the library, if different from the real name.
7767 soname_spec=$lt_soname_spec
7768
7769 # Commands used to build and install an old-style archive.
7770 RANLIB=$lt_RANLIB
7771 old_archive_cmds=$lt_old_archive_cmds
7772 old_postinstall_cmds=$lt_old_postinstall_cmds
7773 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7774
7775 # Create an old-style archive from a shared archive.
7776 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7777
7778 # Create a temporary old-style archive to link instead of a shared archive.
7779 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7780
7781 # Commands used to build and install a shared archive.
7782 archive_cmds=$lt_archive_cmds
7783 archive_expsym_cmds=$lt_archive_expsym_cmds
7784 postinstall_cmds=$lt_postinstall_cmds
7785 postuninstall_cmds=$lt_postuninstall_cmds
7786
7787 # Commands to strip libraries.
7788 old_striplib=$lt_old_striplib
7789 striplib=$lt_striplib
7790
7791 # Method to check whether dependent libraries are shared objects.
7792 deplibs_check_method=$lt_deplibs_check_method
7793
7794 # Command to use when deplibs_check_method == file_magic.
7795 file_magic_cmd=$lt_file_magic_cmd
7796
7797 # Flag that allows shared libraries with undefined symbols to be built.
7798 allow_undefined_flag=$lt_allow_undefined_flag
7799
7800 # Flag that forces no undefined symbols.
7801 no_undefined_flag=$lt_no_undefined_flag
7802
7803 # Commands used to finish a libtool library installation in a directory.
7804 finish_cmds=$lt_finish_cmds
7805
7806 # Same as above, but a single script fragment to be evaled but not shown.
7807 finish_eval=$lt_finish_eval
7808
7809 # Take the output of nm and produce a listing of raw symbols and C names.
7810 global_symbol_pipe=$lt_global_symbol_pipe
7811
7812 # Transform the output of nm in a proper C declaration
7813 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7814
7815 # Transform the output of nm in a C name address pair
7816 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7817
7818 # This is the shared library runtime path variable.
7819 runpath_var=$runpath_var
7820
7821 # This is the shared library path variable.
7822 shlibpath_var=$shlibpath_var
7823
7824 # Is shlibpath searched before the hard-coded library search path?
7825 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7826
7827 # How to hardcode a shared library path into an executable.
7828 hardcode_action=$hardcode_action
7829
7830 # Whether we should hardcode library paths into libraries.
7831 hardcode_into_libs=$hardcode_into_libs
7832
7833 # Flag to hardcode \$libdir into a binary during linking.
7834 # This must work even if \$libdir does not exist.
7835 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7836
7837 # Whether we need a single -rpath flag with a separated argument.
7838 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7839
7840 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7841 # resulting binary.
7842 hardcode_direct=$hardcode_direct
7843
7844 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7845 # resulting binary.
7846 hardcode_minus_L=$hardcode_minus_L
7847
7848 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7849 # the resulting binary.
7850 hardcode_shlibpath_var=$hardcode_shlibpath_var
7851
7852 # Variables whose values should be saved in libtool wrapper scripts and
7853 # restored at relink time.
7854 variables_saved_for_relink="$variables_saved_for_relink"
7855
7856 # Whether libtool must link a program against all its dependency libraries.
7857 link_all_deplibs=$link_all_deplibs
7858
7859 # Compile-time system search path for libraries
7860 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7861
7862 # Run-time system search path for libraries
7863 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7864
7865 # Fix the shell variable \$srcfile for the compiler.
7866 fix_srcfile_path="$fix_srcfile_path"
7867
7868 # Set to yes if exported symbols are required.
7869 always_export_symbols=$always_export_symbols
7870
7871 # The commands to list exported symbols.
7872 export_symbols_cmds=$lt_export_symbols_cmds
7873
7874 # The commands to extract the exported symbol list from a shared archive.
7875 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7876
7877 # Symbols that should not be listed in the preloaded symbols.
7878 exclude_expsyms=$lt_exclude_expsyms
7879
7880 # Symbols that must always be exported.
7881 include_expsyms=$lt_include_expsyms
7882
7883 # ### END LIBTOOL CONFIG
7884
7885 __EOF__
7886
7887   case $host_os in
7888   aix3*)
7889     cat <<\EOF >> "${ofile}T"
7890
7891 # AIX sometimes has problems with the GCC collect2 program.  For some
7892 # reason, if we set the COLLECT_NAMES environment variable, the problems
7893 # vanish in a puff of smoke.
7894 if test "X${COLLECT_NAMES+set}" != Xset; then
7895   COLLECT_NAMES=
7896   export COLLECT_NAMES
7897 fi
7898 EOF
7899     ;;
7900   esac
7901
7902   case $host_os in
7903   cygwin* | mingw* | pw32* | os2*)
7904     cat <<'EOF' >> "${ofile}T"
7905       # This is a source program that is used to create dlls on Windows
7906       # Don't remove nor modify the starting and closing comments
7907 # /* ltdll.c starts here */
7908 # #define WIN32_LEAN_AND_MEAN
7909 # #include <windows.h>
7910 # #undef WIN32_LEAN_AND_MEAN
7911 # #include <stdio.h>
7912 #
7913 # #ifndef __CYGWIN__
7914 # #  ifdef __CYGWIN32__
7915 # #    define __CYGWIN__ __CYGWIN32__
7916 # #  endif
7917 # #endif
7918 #
7919 # #ifdef __cplusplus
7920 # extern "C" {
7921 # #endif
7922 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7923 # #ifdef __cplusplus
7924 # }
7925 # #endif
7926 #
7927 # #ifdef __CYGWIN__
7928 # #include <cygwin/cygwin_dll.h>
7929 # DECLARE_CYGWIN_DLL( DllMain );
7930 # #endif
7931 # HINSTANCE __hDllInstance_base;
7932 #
7933 # BOOL APIENTRY
7934 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7935 # {
7936 #   __hDllInstance_base = hInst;
7937 #   return TRUE;
7938 # }
7939 # /* ltdll.c ends here */
7940         # This is a source program that is used to create import libraries
7941         # on Windows for dlls which lack them. Don't remove nor modify the
7942         # starting and closing comments
7943 # /* impgen.c starts here */
7944 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7945 #
7946 #  This file is part of GNU libtool.
7947 #
7948 #  This program is free software; you can redistribute it and/or modify
7949 #  it under the terms of the GNU General Public License as published by
7950 #  the Free Software Foundation; either version 2 of the License, or
7951 #  (at your option) any later version.
7952 #
7953 #  This program is distributed in the hope that it will be useful,
7954 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7955 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7956 #  GNU General Public License for more details.
7957 #
7958 #  You should have received a copy of the GNU General Public License
7959 #  along with this program; if not, write to the Free Software
7960 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7961 #  */
7962 #
7963 # #include <stdio.h>            /* for printf() */
7964 # #include <unistd.h>           /* for open(), lseek(), read() */
7965 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7966 # #include <string.h>           /* for strdup() */
7967 #
7968 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7969 # #ifndef O_BINARY
7970 # #define O_BINARY 0
7971 # #endif
7972 #
7973 # static unsigned int
7974 # pe_get16 (fd, offset)
7975 #      int fd;
7976 #      int offset;
7977 # {
7978 #   unsigned char b[2];
7979 #   lseek (fd, offset, SEEK_SET);
7980 #   read (fd, b, 2);
7981 #   return b[0] + (b[1]<<8);
7982 # }
7983 #
7984 # static unsigned int
7985 # pe_get32 (fd, offset)
7986 #     int fd;
7987 #     int offset;
7988 # {
7989 #   unsigned char b[4];
7990 #   lseek (fd, offset, SEEK_SET);
7991 #   read (fd, b, 4);
7992 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7993 # }
7994 #
7995 # static unsigned int
7996 # pe_as32 (ptr)
7997 #      void *ptr;
7998 # {
7999 #   unsigned char *b = ptr;
8000 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
8001 # }
8002 #
8003 # int
8004 # main (argc, argv)
8005 #     int argc;
8006 #     char *argv[];
8007 # {
8008 #     int dll;
8009 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
8010 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
8011 #     unsigned long name_rvas, nexp;
8012 #     unsigned char *expdata, *erva;
8013 #     char *filename, *dll_name;
8014 #
8015 #     filename = argv[1];
8016 #
8017 #     dll = open(filename, O_RDONLY|O_BINARY);
8018 #     if (dll < 1)
8019 #       return 1;
8020 #
8021 #     dll_name = filename;
8022 #
8023 #     for (i=0; filename[i]; i++)
8024 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
8025 #           dll_name = filename + i +1;
8026 #
8027 #     pe_header_offset = pe_get32 (dll, 0x3c);
8028 #     opthdr_ofs = pe_header_offset + 4 + 20;
8029 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
8030 #
8031 #     if (num_entries < 1) /* no exports */
8032 #       return 1;
8033 #
8034 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
8035 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
8036 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
8037 #     secptr = (pe_header_offset + 4 + 20 +
8038 #             pe_get16 (dll, pe_header_offset + 4 + 16));
8039 #
8040 #     expptr = 0;
8041 #     for (i = 0; i < nsections; i++)
8042 #     {
8043 #       char sname[8];
8044 #       unsigned long secptr1 = secptr + 40 * i;
8045 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
8046 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
8047 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
8048 #       lseek(dll, secptr1, SEEK_SET);
8049 #       read(dll, sname, 8);
8050 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
8051 #       {
8052 #           expptr = fptr + (export_rva - vaddr);
8053 #           if (export_rva + export_size > vaddr + vsize)
8054 #               export_size = vsize - (export_rva - vaddr);
8055 #           break;
8056 #       }
8057 #     }
8058 #
8059 #     expdata = (unsigned char*)malloc(export_size);
8060 #     lseek (dll, expptr, SEEK_SET);
8061 #     read (dll, expdata, export_size);
8062 #     erva = expdata - export_rva;
8063 #
8064 #     nexp = pe_as32 (expdata+24);
8065 #     name_rvas = pe_as32 (expdata+32);
8066 #
8067 #     printf ("EXPORTS\n");
8068 #     for (i = 0; i<nexp; i++)
8069 #     {
8070 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
8071 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
8072 #     }
8073 #
8074 #     return 0;
8075 # }
8076 # /* impgen.c ends here */
8077
8078 EOF
8079     ;;
8080   esac
8081
8082   # We use sed instead of cat because bash on DJGPP gets confused if
8083   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
8084   # text mode, it properly converts lines to CR/LF.  This bash problem
8085   # is reportedly fixed, but why not run on old versions too?
8086   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
8087
8088   mv -f "${ofile}T" "$ofile" || \
8089     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
8090   chmod +x "$ofile"
8091 fi
8092 ##
8093 ## END FIXME
8094
8095
8096
8097
8098
8099 # This can be used to rebuild libtool when needed
8100 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8101
8102 # Always use our own libtool.
8103 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8104
8105 # Prevent multiple expansion
8106
8107
8108
8109
8110 ac_ext=cc
8111 ac_cpp='$CXXCPP $CPPFLAGS'
8112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8115
8116
8117 # Checking for header files.
8118 # ===========================================================================
8119
8120 if test -d /stuff/include; then
8121   CPPFLAGS="$CPPFLAGS -I/stuff/include"
8122 fi
8123
8124
8125
8126 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8127 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8128 if test "${ac_cv_header_stdc+set}" = set; then
8129   echo $ECHO_N "(cached) $ECHO_C" >&6
8130 else
8131   cat >conftest.$ac_ext <<_ACEOF
8132 #line $LINENO "configure"
8133 /* confdefs.h.  */
8134 _ACEOF
8135 cat confdefs.h >>conftest.$ac_ext
8136 cat >>conftest.$ac_ext <<_ACEOF
8137 /* end confdefs.h.  */
8138 #include <stdlib.h>
8139 #include <stdarg.h>
8140 #include <string.h>
8141 #include <float.h>
8142
8143 int
8144 main ()
8145 {
8146
8147   ;
8148   return 0;
8149 }
8150 _ACEOF
8151 rm -f conftest.$ac_objext
8152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8153   (eval $ac_compile) 2>&5
8154   ac_status=$?
8155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8156   (exit $ac_status); } &&
8157          { ac_try='test -s conftest.$ac_objext'
8158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8159   (eval $ac_try) 2>&5
8160   ac_status=$?
8161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162   (exit $ac_status); }; }; then
8163   ac_cv_header_stdc=yes
8164 else
8165   echo "$as_me: failed program was:" >&5
8166 sed 's/^/| /' conftest.$ac_ext >&5
8167
8168 ac_cv_header_stdc=no
8169 fi
8170 rm -f conftest.$ac_objext conftest.$ac_ext
8171
8172 if test $ac_cv_header_stdc = yes; then
8173   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8174   cat >conftest.$ac_ext <<_ACEOF
8175 #line $LINENO "configure"
8176 /* confdefs.h.  */
8177 _ACEOF
8178 cat confdefs.h >>conftest.$ac_ext
8179 cat >>conftest.$ac_ext <<_ACEOF
8180 /* end confdefs.h.  */
8181 #include <string.h>
8182
8183 _ACEOF
8184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8185   $EGREP "memchr" >/dev/null 2>&1; then
8186   :
8187 else
8188   ac_cv_header_stdc=no
8189 fi
8190 rm -f conftest*
8191
8192 fi
8193
8194 if test $ac_cv_header_stdc = yes; then
8195   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8196   cat >conftest.$ac_ext <<_ACEOF
8197 #line $LINENO "configure"
8198 /* confdefs.h.  */
8199 _ACEOF
8200 cat confdefs.h >>conftest.$ac_ext
8201 cat >>conftest.$ac_ext <<_ACEOF
8202 /* end confdefs.h.  */
8203 #include <stdlib.h>
8204
8205 _ACEOF
8206 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8207   $EGREP "free" >/dev/null 2>&1; then
8208   :
8209 else
8210   ac_cv_header_stdc=no
8211 fi
8212 rm -f conftest*
8213
8214 fi
8215
8216 if test $ac_cv_header_stdc = yes; then
8217   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8218   if test "$cross_compiling" = yes; then
8219   :
8220 else
8221   cat >conftest.$ac_ext <<_ACEOF
8222 #line $LINENO "configure"
8223 /* confdefs.h.  */
8224 _ACEOF
8225 cat confdefs.h >>conftest.$ac_ext
8226 cat >>conftest.$ac_ext <<_ACEOF
8227 /* end confdefs.h.  */
8228 #include <ctype.h>
8229 #if ((' ' & 0x0FF) == 0x020)
8230 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8231 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8232 #else
8233 # define ISLOWER(c) \
8234                    (('a' <= (c) && (c) <= 'i') \
8235                      || ('j' <= (c) && (c) <= 'r') \
8236                      || ('s' <= (c) && (c) <= 'z'))
8237 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8238 #endif
8239
8240 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8241 int
8242 main ()
8243 {
8244   int i;
8245   for (i = 0; i < 256; i++)
8246     if (XOR (islower (i), ISLOWER (i))
8247         || toupper (i) != TOUPPER (i))
8248       exit(2);
8249   exit (0);
8250 }
8251 _ACEOF
8252 rm -f conftest$ac_exeext
8253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8254   (eval $ac_link) 2>&5
8255   ac_status=$?
8256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259   (eval $ac_try) 2>&5
8260   ac_status=$?
8261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262   (exit $ac_status); }; }; then
8263   :
8264 else
8265   echo "$as_me: program exited with status $ac_status" >&5
8266 echo "$as_me: failed program was:" >&5
8267 sed 's/^/| /' conftest.$ac_ext >&5
8268
8269 ( exit $ac_status )
8270 ac_cv_header_stdc=no
8271 fi
8272 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8273 fi
8274 fi
8275 fi
8276 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8277 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8278 if test $ac_cv_header_stdc = yes; then
8279
8280 cat >>confdefs.h <<\_ACEOF
8281 #define STDC_HEADERS 1
8282 _ACEOF
8283
8284 fi
8285
8286
8287 for ac_header in getopt.h
8288 do
8289 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8290 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8291   echo "$as_me:$LINENO: checking for $ac_header" >&5
8292 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8293 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8294   echo $ECHO_N "(cached) $ECHO_C" >&6
8295 fi
8296 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8297 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8298 else
8299   # Is the header compilable?
8300 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8301 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8302 cat >conftest.$ac_ext <<_ACEOF
8303 #line $LINENO "configure"
8304 /* confdefs.h.  */
8305 _ACEOF
8306 cat confdefs.h >>conftest.$ac_ext
8307 cat >>conftest.$ac_ext <<_ACEOF
8308 /* end confdefs.h.  */
8309 $ac_includes_default
8310 #include <$ac_header>
8311 _ACEOF
8312 rm -f conftest.$ac_objext
8313 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8314   (eval $ac_compile) 2>&5
8315   ac_status=$?
8316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317   (exit $ac_status); } &&
8318          { ac_try='test -s conftest.$ac_objext'
8319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320   (eval $ac_try) 2>&5
8321   ac_status=$?
8322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323   (exit $ac_status); }; }; then
8324   ac_header_compiler=yes
8325 else
8326   echo "$as_me: failed program was:" >&5
8327 sed 's/^/| /' conftest.$ac_ext >&5
8328
8329 ac_header_compiler=no
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8333 echo "${ECHO_T}$ac_header_compiler" >&6
8334
8335 # Is the header present?
8336 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8337 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8338 cat >conftest.$ac_ext <<_ACEOF
8339 #line $LINENO "configure"
8340 /* confdefs.h.  */
8341 _ACEOF
8342 cat confdefs.h >>conftest.$ac_ext
8343 cat >>conftest.$ac_ext <<_ACEOF
8344 /* end confdefs.h.  */
8345 #include <$ac_header>
8346 _ACEOF
8347 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8349   ac_status=$?
8350   grep -v '^ *+' conftest.er1 >conftest.err
8351   rm -f conftest.er1
8352   cat conftest.err >&5
8353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8354   (exit $ac_status); } >/dev/null; then
8355   if test -s conftest.err; then
8356     ac_cpp_err=$ac_cxx_preproc_warn_flag
8357   else
8358     ac_cpp_err=
8359   fi
8360 else
8361   ac_cpp_err=yes
8362 fi
8363 if test -z "$ac_cpp_err"; then
8364   ac_header_preproc=yes
8365 else
8366   echo "$as_me: failed program was:" >&5
8367 sed 's/^/| /' conftest.$ac_ext >&5
8368
8369   ac_header_preproc=no
8370 fi
8371 rm -f conftest.err conftest.$ac_ext
8372 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8373 echo "${ECHO_T}$ac_header_preproc" >&6
8374
8375 # So?  What about this header?
8376 case $ac_header_compiler:$ac_header_preproc in
8377   yes:no )
8378     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8379 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8380     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8381 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8382     (
8383       cat <<\_ASBOX
8384 ## ------------------------------------ ##
8385 ## Report this to bug-autoconf@gnu.org. ##
8386 ## ------------------------------------ ##
8387 _ASBOX
8388     ) |
8389       sed "s/^/$as_me: WARNING:     /" >&2
8390     ;;
8391   no:yes )
8392     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8393 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8394     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8395 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8396     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8397 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8398     (
8399       cat <<\_ASBOX
8400 ## ------------------------------------ ##
8401 ## Report this to bug-autoconf@gnu.org. ##
8402 ## ------------------------------------ ##
8403 _ASBOX
8404     ) |
8405       sed "s/^/$as_me: WARNING:     /" >&2
8406     ;;
8407 esac
8408 echo "$as_me:$LINENO: checking for $ac_header" >&5
8409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8411   echo $ECHO_N "(cached) $ECHO_C" >&6
8412 else
8413   eval "$as_ac_Header=$ac_header_preproc"
8414 fi
8415 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8417
8418 fi
8419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8420   cat >>confdefs.h <<_ACEOF
8421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8422 _ACEOF
8423
8424 fi
8425
8426 done
8427
8428
8429 for ac_header in unistd.h
8430 do
8431 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8433   echo "$as_me:$LINENO: checking for $ac_header" >&5
8434 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8435 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8436   echo $ECHO_N "(cached) $ECHO_C" >&6
8437 fi
8438 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8439 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8440 else
8441   # Is the header compilable?
8442 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8443 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8444 cat >conftest.$ac_ext <<_ACEOF
8445 #line $LINENO "configure"
8446 /* confdefs.h.  */
8447 _ACEOF
8448 cat confdefs.h >>conftest.$ac_ext
8449 cat >>conftest.$ac_ext <<_ACEOF
8450 /* end confdefs.h.  */
8451 $ac_includes_default
8452 #include <$ac_header>
8453 _ACEOF
8454 rm -f conftest.$ac_objext
8455 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8456   (eval $ac_compile) 2>&5
8457   ac_status=$?
8458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8459   (exit $ac_status); } &&
8460          { ac_try='test -s conftest.$ac_objext'
8461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8462   (eval $ac_try) 2>&5
8463   ac_status=$?
8464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465   (exit $ac_status); }; }; then
8466   ac_header_compiler=yes
8467 else
8468   echo "$as_me: failed program was:" >&5
8469 sed 's/^/| /' conftest.$ac_ext >&5
8470
8471 ac_header_compiler=no
8472 fi
8473 rm -f conftest.$ac_objext conftest.$ac_ext
8474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8475 echo "${ECHO_T}$ac_header_compiler" >&6
8476
8477 # Is the header present?
8478 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8479 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8480 cat >conftest.$ac_ext <<_ACEOF
8481 #line $LINENO "configure"
8482 /* confdefs.h.  */
8483 _ACEOF
8484 cat confdefs.h >>conftest.$ac_ext
8485 cat >>conftest.$ac_ext <<_ACEOF
8486 /* end confdefs.h.  */
8487 #include <$ac_header>
8488 _ACEOF
8489 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8490   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -f conftest.er1
8494   cat conftest.err >&5
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } >/dev/null; then
8497   if test -s conftest.err; then
8498     ac_cpp_err=$ac_cxx_preproc_warn_flag
8499   else
8500     ac_cpp_err=
8501   fi
8502 else
8503   ac_cpp_err=yes
8504 fi
8505 if test -z "$ac_cpp_err"; then
8506   ac_header_preproc=yes
8507 else
8508   echo "$as_me: failed program was:" >&5
8509 sed 's/^/| /' conftest.$ac_ext >&5
8510
8511   ac_header_preproc=no
8512 fi
8513 rm -f conftest.err conftest.$ac_ext
8514 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8515 echo "${ECHO_T}$ac_header_preproc" >&6
8516
8517 # So?  What about this header?
8518 case $ac_header_compiler:$ac_header_preproc in
8519   yes:no )
8520     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8521 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8523 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8524     (
8525       cat <<\_ASBOX
8526 ## ------------------------------------ ##
8527 ## Report this to bug-autoconf@gnu.org. ##
8528 ## ------------------------------------ ##
8529 _ASBOX
8530     ) |
8531       sed "s/^/$as_me: WARNING:     /" >&2
8532     ;;
8533   no:yes )
8534     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8535 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8536     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8537 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8538     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8539 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8540     (
8541       cat <<\_ASBOX
8542 ## ------------------------------------ ##
8543 ## Report this to bug-autoconf@gnu.org. ##
8544 ## ------------------------------------ ##
8545 _ASBOX
8546     ) |
8547       sed "s/^/$as_me: WARNING:     /" >&2
8548     ;;
8549 esac
8550 echo "$as_me:$LINENO: checking for $ac_header" >&5
8551 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8552 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8553   echo $ECHO_N "(cached) $ECHO_C" >&6
8554 else
8555   eval "$as_ac_Header=$ac_header_preproc"
8556 fi
8557 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8559
8560 fi
8561 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8562   cat >>confdefs.h <<_ACEOF
8563 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8564 _ACEOF
8565
8566 fi
8567
8568 done
8569
8570 if test "${ac_cv_header_sys_socket_h+set}" = set; then
8571   echo "$as_me:$LINENO: checking for sys/socket.h" >&5
8572 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
8573 if test "${ac_cv_header_sys_socket_h+set}" = set; then
8574   echo $ECHO_N "(cached) $ECHO_C" >&6
8575 fi
8576 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
8577 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
8578 else
8579   # Is the header compilable?
8580 echo "$as_me:$LINENO: checking sys/socket.h usability" >&5
8581 echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6
8582 cat >conftest.$ac_ext <<_ACEOF
8583 #line $LINENO "configure"
8584 /* confdefs.h.  */
8585 _ACEOF
8586 cat confdefs.h >>conftest.$ac_ext
8587 cat >>conftest.$ac_ext <<_ACEOF
8588 /* end confdefs.h.  */
8589 $ac_includes_default
8590 #include <sys/socket.h>
8591 _ACEOF
8592 rm -f conftest.$ac_objext
8593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8594   (eval $ac_compile) 2>&5
8595   ac_status=$?
8596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8597   (exit $ac_status); } &&
8598          { ac_try='test -s conftest.$ac_objext'
8599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8600   (eval $ac_try) 2>&5
8601   ac_status=$?
8602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603   (exit $ac_status); }; }; then
8604   ac_header_compiler=yes
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 sed 's/^/| /' conftest.$ac_ext >&5
8608
8609 ac_header_compiler=no
8610 fi
8611 rm -f conftest.$ac_objext conftest.$ac_ext
8612 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8613 echo "${ECHO_T}$ac_header_compiler" >&6
8614
8615 # Is the header present?
8616 echo "$as_me:$LINENO: checking sys/socket.h presence" >&5
8617 echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6
8618 cat >conftest.$ac_ext <<_ACEOF
8619 #line $LINENO "configure"
8620 /* confdefs.h.  */
8621 _ACEOF
8622 cat confdefs.h >>conftest.$ac_ext
8623 cat >>conftest.$ac_ext <<_ACEOF
8624 /* end confdefs.h.  */
8625 #include <sys/socket.h>
8626 _ACEOF
8627 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8628   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8629   ac_status=$?
8630   grep -v '^ *+' conftest.er1 >conftest.err
8631   rm -f conftest.er1
8632   cat conftest.err >&5
8633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634   (exit $ac_status); } >/dev/null; then
8635   if test -s conftest.err; then
8636     ac_cpp_err=$ac_cxx_preproc_warn_flag
8637   else
8638     ac_cpp_err=
8639   fi
8640 else
8641   ac_cpp_err=yes
8642 fi
8643 if test -z "$ac_cpp_err"; then
8644   ac_header_preproc=yes
8645 else
8646   echo "$as_me: failed program was:" >&5
8647 sed 's/^/| /' conftest.$ac_ext >&5
8648
8649   ac_header_preproc=no
8650 fi
8651 rm -f conftest.err conftest.$ac_ext
8652 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8653 echo "${ECHO_T}$ac_header_preproc" >&6
8654
8655 # So?  What about this header?
8656 case $ac_header_compiler:$ac_header_preproc in
8657   yes:no )
8658     { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
8659 echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8660     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
8661 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
8662     (
8663       cat <<\_ASBOX
8664 ## ------------------------------------ ##
8665 ## Report this to bug-autoconf@gnu.org. ##
8666 ## ------------------------------------ ##
8667 _ASBOX
8668     ) |
8669       sed "s/^/$as_me: WARNING:     /" >&2
8670     ;;
8671   no:yes )
8672     { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5
8673 echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;}
8674     { echo "$as_me:$LINENO: WARNING: sys/socket.h: check for missing prerequisite headers?" >&5
8675 echo "$as_me: WARNING: sys/socket.h: check for missing prerequisite headers?" >&2;}
8676     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
8677 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
8678     (
8679       cat <<\_ASBOX
8680 ## ------------------------------------ ##
8681 ## Report this to bug-autoconf@gnu.org. ##
8682 ## ------------------------------------ ##
8683 _ASBOX
8684     ) |
8685       sed "s/^/$as_me: WARNING:     /" >&2
8686     ;;
8687 esac
8688 echo "$as_me:$LINENO: checking for sys/socket.h" >&5
8689 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
8690 if test "${ac_cv_header_sys_socket_h+set}" = set; then
8691   echo $ECHO_N "(cached) $ECHO_C" >&6
8692 else
8693   ac_cv_header_sys_socket_h=$ac_header_preproc
8694 fi
8695 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
8696 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
8697
8698 fi
8699 if test $ac_cv_header_sys_socket_h = yes; then
8700   cat >>confdefs.h <<\_ACEOF
8701 #define SOCKET_AVAIL 1
8702 _ACEOF
8703
8704     cat >>confdefs.h <<\_ACEOF
8705 #define HAVE_SYS_SOCKET_H 1
8706 _ACEOF
8707
8708     cat >conftest.$ac_ext <<_ACEOF
8709 #line $LINENO "configure"
8710 /* confdefs.h.  */
8711 _ACEOF
8712 cat confdefs.h >>conftest.$ac_ext
8713 cat >>conftest.$ac_ext <<_ACEOF
8714 /* end confdefs.h.  */
8715 #include <sys/socket.h>
8716
8717 _ACEOF
8718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8719   $EGREP "socklen_t" >/dev/null 2>&1; then
8720   cat >>confdefs.h <<_ACEOF
8721 #define SOCKLEN_T socklen_t
8722 _ACEOF
8723
8724 else
8725   cat >>confdefs.h <<_ACEOF
8726 #define SOCKLEN_T uint
8727 _ACEOF
8728
8729 fi
8730 rm -f conftest*
8731
8732
8733 fi
8734
8735
8736 if test "${ac_cv_header_dlfcn_h+set}" = set; then
8737   echo "$as_me:$LINENO: checking for dlfcn.h" >&5
8738 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
8739 if test "${ac_cv_header_dlfcn_h+set}" = set; then
8740   echo $ECHO_N "(cached) $ECHO_C" >&6
8741 fi
8742 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
8743 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
8744 else
8745   # Is the header compilable?
8746 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
8747 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
8748 cat >conftest.$ac_ext <<_ACEOF
8749 #line $LINENO "configure"
8750 /* confdefs.h.  */
8751 _ACEOF
8752 cat confdefs.h >>conftest.$ac_ext
8753 cat >>conftest.$ac_ext <<_ACEOF
8754 /* end confdefs.h.  */
8755 $ac_includes_default
8756 #include <dlfcn.h>
8757 _ACEOF
8758 rm -f conftest.$ac_objext
8759 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8760   (eval $ac_compile) 2>&5
8761   ac_status=$?
8762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763   (exit $ac_status); } &&
8764          { ac_try='test -s conftest.$ac_objext'
8765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8766   (eval $ac_try) 2>&5
8767   ac_status=$?
8768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8769   (exit $ac_status); }; }; then
8770   ac_header_compiler=yes
8771 else
8772   echo "$as_me: failed program was:" >&5
8773 sed 's/^/| /' conftest.$ac_ext >&5
8774
8775 ac_header_compiler=no
8776 fi
8777 rm -f conftest.$ac_objext conftest.$ac_ext
8778 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8779 echo "${ECHO_T}$ac_header_compiler" >&6
8780
8781 # Is the header present?
8782 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
8783 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
8784 cat >conftest.$ac_ext <<_ACEOF
8785 #line $LINENO "configure"
8786 /* confdefs.h.  */
8787 _ACEOF
8788 cat confdefs.h >>conftest.$ac_ext
8789 cat >>conftest.$ac_ext <<_ACEOF
8790 /* end confdefs.h.  */
8791 #include <dlfcn.h>
8792 _ACEOF
8793 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8795   ac_status=$?
8796   grep -v '^ *+' conftest.er1 >conftest.err
8797   rm -f conftest.er1
8798   cat conftest.err >&5
8799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800   (exit $ac_status); } >/dev/null; then
8801   if test -s conftest.err; then
8802     ac_cpp_err=$ac_cxx_preproc_warn_flag
8803   else
8804     ac_cpp_err=
8805   fi
8806 else
8807   ac_cpp_err=yes
8808 fi
8809 if test -z "$ac_cpp_err"; then
8810   ac_header_preproc=yes
8811 else
8812   echo "$as_me: failed program was:" >&5
8813 sed 's/^/| /' conftest.$ac_ext >&5
8814
8815   ac_header_preproc=no
8816 fi
8817 rm -f conftest.err conftest.$ac_ext
8818 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8819 echo "${ECHO_T}$ac_header_preproc" >&6
8820
8821 # So?  What about this header?
8822 case $ac_header_compiler:$ac_header_preproc in
8823   yes:no )
8824     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
8825 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8826     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
8827 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
8828     (
8829       cat <<\_ASBOX
8830 ## ------------------------------------ ##
8831 ## Report this to bug-autoconf@gnu.org. ##
8832 ## ------------------------------------ ##
8833 _ASBOX
8834     ) |
8835       sed "s/^/$as_me: WARNING:     /" >&2
8836     ;;
8837   no:yes )
8838     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
8839 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
8840     { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
8841 echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
8842     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
8843 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
8844     (
8845       cat <<\_ASBOX
8846 ## ------------------------------------ ##
8847 ## Report this to bug-autoconf@gnu.org. ##
8848 ## ------------------------------------ ##
8849 _ASBOX
8850     ) |
8851       sed "s/^/$as_me: WARNING:     /" >&2
8852     ;;
8853 esac
8854 echo "$as_me:$LINENO: checking for dlfcn.h" >&5
8855 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
8856 if test "${ac_cv_header_dlfcn_h+set}" = set; then
8857   echo $ECHO_N "(cached) $ECHO_C" >&6
8858 else
8859   ac_cv_header_dlfcn_h=$ac_header_preproc
8860 fi
8861 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
8862 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
8863
8864 fi
8865
8866
8867
8868
8869
8870
8871
8872 ac_header_dirent=no
8873 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
8874   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8875 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
8876 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
8877 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8878   echo $ECHO_N "(cached) $ECHO_C" >&6
8879 else
8880   cat >conftest.$ac_ext <<_ACEOF
8881 #line $LINENO "configure"
8882 /* confdefs.h.  */
8883 _ACEOF
8884 cat confdefs.h >>conftest.$ac_ext
8885 cat >>conftest.$ac_ext <<_ACEOF
8886 /* end confdefs.h.  */
8887 #include <sys/types.h>
8888 #include <$ac_hdr>
8889
8890 int
8891 main ()
8892 {
8893 if ((DIR *) 0)
8894 return 0;
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 rm -f conftest.$ac_objext
8900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8901   (eval $ac_compile) 2>&5
8902   ac_status=$?
8903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8904   (exit $ac_status); } &&
8905          { ac_try='test -s conftest.$ac_objext'
8906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8907   (eval $ac_try) 2>&5
8908   ac_status=$?
8909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910   (exit $ac_status); }; }; then
8911   eval "$as_ac_Header=yes"
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 sed 's/^/| /' conftest.$ac_ext >&5
8915
8916 eval "$as_ac_Header=no"
8917 fi
8918 rm -f conftest.$ac_objext conftest.$ac_ext
8919 fi
8920 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8921 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8922 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8923   cat >>confdefs.h <<_ACEOF
8924 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
8925 _ACEOF
8926
8927 ac_header_dirent=$ac_hdr; break
8928 fi
8929
8930 done
8931 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8932 if test $ac_header_dirent = dirent.h; then
8933   echo "$as_me:$LINENO: checking for library containing opendir" >&5
8934 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
8935 if test "${ac_cv_search_opendir+set}" = set; then
8936   echo $ECHO_N "(cached) $ECHO_C" >&6
8937 else
8938   ac_func_search_save_LIBS=$LIBS
8939 ac_cv_search_opendir=no
8940 cat >conftest.$ac_ext <<_ACEOF
8941 #line $LINENO "configure"
8942 /* confdefs.h.  */
8943 _ACEOF
8944 cat confdefs.h >>conftest.$ac_ext
8945 cat >>conftest.$ac_ext <<_ACEOF
8946 /* end confdefs.h.  */
8947
8948 /* Override any gcc2 internal prototype to avoid an error.  */
8949 #ifdef __cplusplus
8950 extern "C"
8951 #endif
8952 /* We use char because int might match the return type of a gcc2
8953    builtin and then its argument prototype would still apply.  */
8954 char opendir ();
8955 int
8956 main ()
8957 {
8958 opendir ();
8959   ;
8960   return 0;
8961 }
8962 _ACEOF
8963 rm -f conftest.$ac_objext conftest$ac_exeext
8964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8965   (eval $ac_link) 2>&5
8966   ac_status=$?
8967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968   (exit $ac_status); } &&
8969          { ac_try='test -s conftest$ac_exeext'
8970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8971   (eval $ac_try) 2>&5
8972   ac_status=$?
8973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974   (exit $ac_status); }; }; then
8975   ac_cv_search_opendir="none required"
8976 else
8977   echo "$as_me: failed program was:" >&5
8978 sed 's/^/| /' conftest.$ac_ext >&5
8979
8980 fi
8981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8982 if test "$ac_cv_search_opendir" = no; then
8983   for ac_lib in dir; do
8984     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8985     cat >conftest.$ac_ext <<_ACEOF
8986 #line $LINENO "configure"
8987 /* confdefs.h.  */
8988 _ACEOF
8989 cat confdefs.h >>conftest.$ac_ext
8990 cat >>conftest.$ac_ext <<_ACEOF
8991 /* end confdefs.h.  */
8992
8993 /* Override any gcc2 internal prototype to avoid an error.  */
8994 #ifdef __cplusplus
8995 extern "C"
8996 #endif
8997 /* We use char because int might match the return type of a gcc2
8998    builtin and then its argument prototype would still apply.  */
8999 char opendir ();
9000 int
9001 main ()
9002 {
9003 opendir ();
9004   ;
9005   return 0;
9006 }
9007 _ACEOF
9008 rm -f conftest.$ac_objext conftest$ac_exeext
9009 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010   (eval $ac_link) 2>&5
9011   ac_status=$?
9012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013   (exit $ac_status); } &&
9014          { ac_try='test -s conftest$ac_exeext'
9015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016   (eval $ac_try) 2>&5
9017   ac_status=$?
9018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019   (exit $ac_status); }; }; then
9020   ac_cv_search_opendir="-l$ac_lib"
9021 break
9022 else
9023   echo "$as_me: failed program was:" >&5
9024 sed 's/^/| /' conftest.$ac_ext >&5
9025
9026 fi
9027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9028   done
9029 fi
9030 LIBS=$ac_func_search_save_LIBS
9031 fi
9032 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
9033 echo "${ECHO_T}$ac_cv_search_opendir" >&6
9034 if test "$ac_cv_search_opendir" != no; then
9035   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
9036
9037 fi
9038
9039 else
9040   echo "$as_me:$LINENO: checking for library containing opendir" >&5
9041 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
9042 if test "${ac_cv_search_opendir+set}" = set; then
9043   echo $ECHO_N "(cached) $ECHO_C" >&6
9044 else
9045   ac_func_search_save_LIBS=$LIBS
9046 ac_cv_search_opendir=no
9047 cat >conftest.$ac_ext <<_ACEOF
9048 #line $LINENO "configure"
9049 /* confdefs.h.  */
9050 _ACEOF
9051 cat confdefs.h >>conftest.$ac_ext
9052 cat >>conftest.$ac_ext <<_ACEOF
9053 /* end confdefs.h.  */
9054
9055 /* Override any gcc2 internal prototype to avoid an error.  */
9056 #ifdef __cplusplus
9057 extern "C"
9058 #endif
9059 /* We use char because int might match the return type of a gcc2
9060    builtin and then its argument prototype would still apply.  */
9061 char opendir ();
9062 int
9063 main ()
9064 {
9065 opendir ();
9066   ;
9067   return 0;
9068 }
9069 _ACEOF
9070 rm -f conftest.$ac_objext conftest$ac_exeext
9071 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9072   (eval $ac_link) 2>&5
9073   ac_status=$?
9074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9075   (exit $ac_status); } &&
9076          { ac_try='test -s conftest$ac_exeext'
9077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9078   (eval $ac_try) 2>&5
9079   ac_status=$?
9080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081   (exit $ac_status); }; }; then
9082   ac_cv_search_opendir="none required"
9083 else
9084   echo "$as_me: failed program was:" >&5
9085 sed 's/^/| /' conftest.$ac_ext >&5
9086
9087 fi
9088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9089 if test "$ac_cv_search_opendir" = no; then
9090   for ac_lib in x; do
9091     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9092     cat >conftest.$ac_ext <<_ACEOF
9093 #line $LINENO "configure"
9094 /* confdefs.h.  */
9095 _ACEOF
9096 cat confdefs.h >>conftest.$ac_ext
9097 cat >>conftest.$ac_ext <<_ACEOF
9098 /* end confdefs.h.  */
9099
9100 /* Override any gcc2 internal prototype to avoid an error.  */
9101 #ifdef __cplusplus
9102 extern "C"
9103 #endif
9104 /* We use char because int might match the return type of a gcc2
9105    builtin and then its argument prototype would still apply.  */
9106 char opendir ();
9107 int
9108 main ()
9109 {
9110 opendir ();
9111   ;
9112   return 0;
9113 }
9114 _ACEOF
9115 rm -f conftest.$ac_objext conftest$ac_exeext
9116 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9117   (eval $ac_link) 2>&5
9118   ac_status=$?
9119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120   (exit $ac_status); } &&
9121          { ac_try='test -s conftest$ac_exeext'
9122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123   (eval $ac_try) 2>&5
9124   ac_status=$?
9125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126   (exit $ac_status); }; }; then
9127   ac_cv_search_opendir="-l$ac_lib"
9128 break
9129 else
9130   echo "$as_me: failed program was:" >&5
9131 sed 's/^/| /' conftest.$ac_ext >&5
9132
9133 fi
9134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9135   done
9136 fi
9137 LIBS=$ac_func_search_save_LIBS
9138 fi
9139 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
9140 echo "${ECHO_T}$ac_cv_search_opendir" >&6
9141 if test "$ac_cv_search_opendir" != no; then
9142   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
9143
9144 fi
9145
9146 fi
9147
9148
9149 # This must be after CXXCPP
9150
9151 echo "$as_me:$LINENO: checking which header file defines FD_ macros" >&5
9152 echo $ECHO_N "checking which header file defines FD_ macros... $ECHO_C" >&6
9153 if test "${ucsim_cv_fd+set}" = set; then
9154   echo $ECHO_N "(cached) $ECHO_C" >&6
9155 else
9156   ucsim_cv_fd="unknown"
9157 cat >conftest.$ac_ext <<_ACEOF
9158 #line $LINENO "configure"
9159 /* confdefs.h.  */
9160 _ACEOF
9161 cat confdefs.h >>conftest.$ac_ext
9162 cat >>conftest.$ac_ext <<_ACEOF
9163 /* end confdefs.h.  */
9164
9165 #include <sys/time.h>
9166 #ifdef FD_ZERO
9167 yes
9168 #endif
9169 _ACEOF
9170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9171   $EGREP "yes" >/dev/null 2>&1; then
9172   ucsim_cv_fd="<sys/time.h>"
9173 fi
9174 rm -f conftest*
9175
9176 cat >conftest.$ac_ext <<_ACEOF
9177 #line $LINENO "configure"
9178 /* confdefs.h.  */
9179 _ACEOF
9180 cat confdefs.h >>conftest.$ac_ext
9181 cat >>conftest.$ac_ext <<_ACEOF
9182 /* end confdefs.h.  */
9183
9184 #include <sys/types.h>
9185 #ifdef FD_ZERO
9186 yes
9187 #endif
9188 _ACEOF
9189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9190   $EGREP "yes" >/dev/null 2>&1; then
9191   ucsim_cv_fd="<sys/types.h>"
9192 fi
9193 rm -f conftest*
9194
9195 cat >conftest.$ac_ext <<_ACEOF
9196 #line $LINENO "configure"
9197 /* confdefs.h.  */
9198 _ACEOF
9199 cat confdefs.h >>conftest.$ac_ext
9200 cat >>conftest.$ac_ext <<_ACEOF
9201 /* end confdefs.h.  */
9202
9203 #include <sys/select.h>
9204 #ifdef FD_ZERO
9205 yes
9206 #endif
9207 _ACEOF
9208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9209   $EGREP "yes" >/dev/null 2>&1; then
9210   ucsim_cv_fd="<sys/types.h>"
9211 fi
9212 rm -f conftest*
9213
9214 fi
9215 echo "$as_me:$LINENO: result: $ucsim_cv_fd" >&5
9216 echo "${ECHO_T}$ucsim_cv_fd" >&6
9217
9218 cat >>confdefs.h <<\_ACEOF
9219 #define FD_HEADER_OK 0
9220 _ACEOF
9221
9222 if echo $ucsim_cv_fd|grep time >/dev/null 2>&1; then
9223 cat >>confdefs.h <<\_ACEOF
9224 #define FD_NEED_TIME_H 1
9225 _ACEOF
9226
9227 cat >>confdefs.h <<\_ACEOF
9228 #define FD_HEADER_OK 1
9229 _ACEOF
9230
9231 else
9232 cat >>confdefs.h <<\_ACEOF
9233 #define FD_NEED_TIME_H 0
9234 _ACEOF
9235
9236 fi
9237 if echo $ucsim_cv_fd|grep types >/dev/null 2>&1; then
9238 cat >>confdefs.h <<\_ACEOF
9239 #define FD_NEED_TYPES_H 1
9240 _ACEOF
9241
9242 cat >>confdefs.h <<\_ACEOF
9243 #define FD_HEADER_OK 1
9244 _ACEOF
9245
9246 else
9247 cat >>confdefs.h <<\_ACEOF
9248 #define FD_NEED_TYPES_H 0
9249 _ACEOF
9250
9251 fi
9252 if echo $ucsim_cv_fd|grep select >/dev/null 2>&1; then
9253 cat >>confdefs.h <<\_ACEOF
9254 #define FD_NEED_SELECT_H 1
9255 _ACEOF
9256
9257 cat >>confdefs.h <<\_ACEOF
9258 #define FD_HEADER_OK 1
9259 _ACEOF
9260
9261 else
9262 cat >>confdefs.h <<\_ACEOF
9263 #define FD_NEED_SELECT_H 0
9264 _ACEOF
9265
9266 fi
9267
9268 cat >>confdefs.h <<_ACEOF
9269 #define HEADER_FD ${ucsim_cv_fd}
9270 _ACEOF
9271
9272
9273
9274 # Checking for functions/libs
9275 # ===========================================================================
9276
9277 echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9278 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9279 if test "${ac_cv_lib_socket_socket+set}" = set; then
9280   echo $ECHO_N "(cached) $ECHO_C" >&6
9281 else
9282   ac_check_lib_save_LIBS=$LIBS
9283 LIBS="-lsocket  $LIBS"
9284 cat >conftest.$ac_ext <<_ACEOF
9285 #line $LINENO "configure"
9286 /* confdefs.h.  */
9287 _ACEOF
9288 cat confdefs.h >>conftest.$ac_ext
9289 cat >>conftest.$ac_ext <<_ACEOF
9290 /* end confdefs.h.  */
9291
9292 /* Override any gcc2 internal prototype to avoid an error.  */
9293 #ifdef __cplusplus
9294 extern "C"
9295 #endif
9296 /* We use char because int might match the return type of a gcc2
9297    builtin and then its argument prototype would still apply.  */
9298 char socket ();
9299 int
9300 main ()
9301 {
9302 socket ();
9303   ;
9304   return 0;
9305 }
9306 _ACEOF
9307 rm -f conftest.$ac_objext conftest$ac_exeext
9308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9309   (eval $ac_link) 2>&5
9310   ac_status=$?
9311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312   (exit $ac_status); } &&
9313          { ac_try='test -s conftest$ac_exeext'
9314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9315   (eval $ac_try) 2>&5
9316   ac_status=$?
9317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9318   (exit $ac_status); }; }; then
9319   ac_cv_lib_socket_socket=yes
9320 else
9321   echo "$as_me: failed program was:" >&5
9322 sed 's/^/| /' conftest.$ac_ext >&5
9323
9324 ac_cv_lib_socket_socket=no
9325 fi
9326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9327 LIBS=$ac_check_lib_save_LIBS
9328 fi
9329 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9330 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9331 if test $ac_cv_lib_socket_socket = yes; then
9332   cat >>confdefs.h <<_ACEOF
9333 #define HAVE_LIBSOCKET 1
9334 _ACEOF
9335
9336   LIBS="-lsocket $LIBS"
9337
9338 fi
9339
9340
9341 echo "$as_me:$LINENO: checking for xdr_short in -lnsl" >&5
9342 echo $ECHO_N "checking for xdr_short in -lnsl... $ECHO_C" >&6
9343 if test "${ac_cv_lib_nsl_xdr_short+set}" = set; then
9344   echo $ECHO_N "(cached) $ECHO_C" >&6
9345 else
9346   ac_check_lib_save_LIBS=$LIBS
9347 LIBS="-lnsl  $LIBS"
9348 cat >conftest.$ac_ext <<_ACEOF
9349 #line $LINENO "configure"
9350 /* confdefs.h.  */
9351 _ACEOF
9352 cat confdefs.h >>conftest.$ac_ext
9353 cat >>conftest.$ac_ext <<_ACEOF
9354 /* end confdefs.h.  */
9355
9356 /* Override any gcc2 internal prototype to avoid an error.  */
9357 #ifdef __cplusplus
9358 extern "C"
9359 #endif
9360 /* We use char because int might match the return type of a gcc2
9361    builtin and then its argument prototype would still apply.  */
9362 char xdr_short ();
9363 int
9364 main ()
9365 {
9366 xdr_short ();
9367   ;
9368   return 0;
9369 }
9370 _ACEOF
9371 rm -f conftest.$ac_objext conftest$ac_exeext
9372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9373   (eval $ac_link) 2>&5
9374   ac_status=$?
9375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -s conftest$ac_exeext'
9378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9379   (eval $ac_try) 2>&5
9380   ac_status=$?
9381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382   (exit $ac_status); }; }; then
9383   ac_cv_lib_nsl_xdr_short=yes
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 sed 's/^/| /' conftest.$ac_ext >&5
9387
9388 ac_cv_lib_nsl_xdr_short=no
9389 fi
9390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9391 LIBS=$ac_check_lib_save_LIBS
9392 fi
9393 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_xdr_short" >&5
9394 echo "${ECHO_T}$ac_cv_lib_nsl_xdr_short" >&6
9395 if test $ac_cv_lib_nsl_xdr_short = yes; then
9396   cat >>confdefs.h <<_ACEOF
9397 #define HAVE_LIBNSL 1
9398 _ACEOF
9399
9400   LIBS="-lnsl $LIBS"
9401
9402 fi
9403
9404 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9405 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9406 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9407   echo $ECHO_N "(cached) $ECHO_C" >&6
9408 else
9409   ac_check_lib_save_LIBS=$LIBS
9410 LIBS="-ldl  $LIBS"
9411 cat >conftest.$ac_ext <<_ACEOF
9412 #line $LINENO "configure"
9413 /* confdefs.h.  */
9414 _ACEOF
9415 cat confdefs.h >>conftest.$ac_ext
9416 cat >>conftest.$ac_ext <<_ACEOF
9417 /* end confdefs.h.  */
9418
9419 /* Override any gcc2 internal prototype to avoid an error.  */
9420 #ifdef __cplusplus
9421 extern "C"
9422 #endif
9423 /* We use char because int might match the return type of a gcc2
9424    builtin and then its argument prototype would still apply.  */
9425 char dlopen ();
9426 int
9427 main ()
9428 {
9429 dlopen ();
9430   ;
9431   return 0;
9432 }
9433 _ACEOF
9434 rm -f conftest.$ac_objext conftest$ac_exeext
9435 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9436   (eval $ac_link) 2>&5
9437   ac_status=$?
9438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9439   (exit $ac_status); } &&
9440          { ac_try='test -s conftest$ac_exeext'
9441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9442   (eval $ac_try) 2>&5
9443   ac_status=$?
9444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9445   (exit $ac_status); }; }; then
9446   ac_cv_lib_dl_dlopen=yes
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 sed 's/^/| /' conftest.$ac_ext >&5
9450
9451 ac_cv_lib_dl_dlopen=no
9452 fi
9453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9454 LIBS=$ac_check_lib_save_LIBS
9455 fi
9456 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9457 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9458 if test $ac_cv_lib_dl_dlopen = yes; then
9459   dl_ok="yes"
9460 DL="-ldl"
9461 else
9462   dl_ok="no"
9463 DL=""
9464 fi
9465
9466
9467
9468 echo "$as_me:$LINENO: checking for panel_above in -lpanel" >&5
9469 echo $ECHO_N "checking for panel_above in -lpanel... $ECHO_C" >&6
9470 if test "${ac_cv_lib_panel_panel_above+set}" = set; then
9471   echo $ECHO_N "(cached) $ECHO_C" >&6
9472 else
9473   ac_check_lib_save_LIBS=$LIBS
9474 LIBS="-lpanel -lcurses $LIBS"
9475 cat >conftest.$ac_ext <<_ACEOF
9476 #line $LINENO "configure"
9477 /* confdefs.h.  */
9478 _ACEOF
9479 cat confdefs.h >>conftest.$ac_ext
9480 cat >>conftest.$ac_ext <<_ACEOF
9481 /* end confdefs.h.  */
9482
9483 /* Override any gcc2 internal prototype to avoid an error.  */
9484 #ifdef __cplusplus
9485 extern "C"
9486 #endif
9487 /* We use char because int might match the return type of a gcc2
9488    builtin and then its argument prototype would still apply.  */
9489 char panel_above ();
9490 int
9491 main ()
9492 {
9493 panel_above ();
9494   ;
9495   return 0;
9496 }
9497 _ACEOF
9498 rm -f conftest.$ac_objext conftest$ac_exeext
9499 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9500   (eval $ac_link) 2>&5
9501   ac_status=$?
9502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9503   (exit $ac_status); } &&
9504          { ac_try='test -s conftest$ac_exeext'
9505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9506   (eval $ac_try) 2>&5
9507   ac_status=$?
9508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9509   (exit $ac_status); }; }; then
9510   ac_cv_lib_panel_panel_above=yes
9511 else
9512   echo "$as_me: failed program was:" >&5
9513 sed 's/^/| /' conftest.$ac_ext >&5
9514
9515 ac_cv_lib_panel_panel_above=no
9516 fi
9517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9518 LIBS=$ac_check_lib_save_LIBS
9519 fi
9520 echo "$as_me:$LINENO: result: $ac_cv_lib_panel_panel_above" >&5
9521 echo "${ECHO_T}$ac_cv_lib_panel_panel_above" >&6
9522 if test $ac_cv_lib_panel_panel_above = yes; then
9523   panel_ok="yes"
9524 curses_ok="yes"
9525 CURSES_LIBS="-lpanel -lcurses"
9526
9527 else
9528   panel_ok="no"
9529 echo "$as_me:$LINENO: checking for nl in -lcurses" >&5
9530 echo $ECHO_N "checking for nl in -lcurses... $ECHO_C" >&6
9531 if test "${ac_cv_lib_curses_nl+set}" = set; then
9532   echo $ECHO_N "(cached) $ECHO_C" >&6
9533 else
9534   ac_check_lib_save_LIBS=$LIBS
9535 LIBS="-lcurses  $LIBS"
9536 cat >conftest.$ac_ext <<_ACEOF
9537 #line $LINENO "configure"
9538 /* confdefs.h.  */
9539 _ACEOF
9540 cat confdefs.h >>conftest.$ac_ext
9541 cat >>conftest.$ac_ext <<_ACEOF
9542 /* end confdefs.h.  */
9543
9544 /* Override any gcc2 internal prototype to avoid an error.  */
9545 #ifdef __cplusplus
9546 extern "C"
9547 #endif
9548 /* We use char because int might match the return type of a gcc2
9549    builtin and then its argument prototype would still apply.  */
9550 char nl ();
9551 int
9552 main ()
9553 {
9554 nl ();
9555   ;
9556   return 0;
9557 }
9558 _ACEOF
9559 rm -f conftest.$ac_objext conftest$ac_exeext
9560 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9561   (eval $ac_link) 2>&5
9562   ac_status=$?
9563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9564   (exit $ac_status); } &&
9565          { ac_try='test -s conftest$ac_exeext'
9566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9567   (eval $ac_try) 2>&5
9568   ac_status=$?
9569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9570   (exit $ac_status); }; }; then
9571   ac_cv_lib_curses_nl=yes
9572 else
9573   echo "$as_me: failed program was:" >&5
9574 sed 's/^/| /' conftest.$ac_ext >&5
9575
9576 ac_cv_lib_curses_nl=no
9577 fi
9578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9579 LIBS=$ac_check_lib_save_LIBS
9580 fi
9581 echo "$as_me:$LINENO: result: $ac_cv_lib_curses_nl" >&5
9582 echo "${ECHO_T}$ac_cv_lib_curses_nl" >&6
9583 if test $ac_cv_lib_curses_nl = yes; then
9584   curses_ok="yes"
9585 CURSES_LIBS="-lcurses"
9586
9587 else
9588   ncurses_ok="no"
9589 fi
9590
9591
9592 fi
9593
9594
9595
9596
9597
9598
9599 for ac_func in vprintf
9600 do
9601 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9602 echo "$as_me:$LINENO: checking for $ac_func" >&5
9603 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9604 if eval "test \"\${$as_ac_var+set}\" = set"; then
9605   echo $ECHO_N "(cached) $ECHO_C" >&6
9606 else
9607   cat >conftest.$ac_ext <<_ACEOF
9608 #line $LINENO "configure"
9609 /* confdefs.h.  */
9610 _ACEOF
9611 cat confdefs.h >>conftest.$ac_ext
9612 cat >>conftest.$ac_ext <<_ACEOF
9613 /* end confdefs.h.  */
9614 /* System header to define __stub macros and hopefully few prototypes,
9615     which can conflict with char $ac_func (); below.
9616     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9617     <limits.h> exists even on freestanding compilers.  */
9618 #ifdef __STDC__
9619 # include <limits.h>
9620 #else
9621 # include <assert.h>
9622 #endif
9623 /* Override any gcc2 internal prototype to avoid an error.  */
9624 #ifdef __cplusplus
9625 extern "C"
9626 {
9627 #endif
9628 /* We use char because int might match the return type of a gcc2
9629    builtin and then its argument prototype would still apply.  */
9630 char $ac_func ();
9631 /* The GNU C library defines this for functions which it implements
9632     to always fail with ENOSYS.  Some functions are actually named
9633     something starting with __ and the normal name is an alias.  */
9634 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9635 choke me
9636 #else
9637 char (*f) () = $ac_func;
9638 #endif
9639 #ifdef __cplusplus
9640 }
9641 #endif
9642
9643 int
9644 main ()
9645 {
9646 return f != $ac_func;
9647   ;
9648   return 0;
9649 }
9650 _ACEOF
9651 rm -f conftest.$ac_objext conftest$ac_exeext
9652 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9653   (eval $ac_link) 2>&5
9654   ac_status=$?
9655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9656   (exit $ac_status); } &&
9657          { ac_try='test -s conftest$ac_exeext'
9658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659   (eval $ac_try) 2>&5
9660   ac_status=$?
9661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662   (exit $ac_status); }; }; then
9663   eval "$as_ac_var=yes"
9664 else
9665   echo "$as_me: failed program was:" >&5
9666 sed 's/^/| /' conftest.$ac_ext >&5
9667
9668 eval "$as_ac_var=no"
9669 fi
9670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9671 fi
9672 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9673 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9674 if test `eval echo '${'$as_ac_var'}'` = yes; then
9675   cat >>confdefs.h <<_ACEOF
9676 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9677 _ACEOF
9678
9679 echo "$as_me:$LINENO: checking for _doprnt" >&5
9680 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
9681 if test "${ac_cv_func__doprnt+set}" = set; then
9682   echo $ECHO_N "(cached) $ECHO_C" >&6
9683 else
9684   cat >conftest.$ac_ext <<_ACEOF
9685 #line $LINENO "configure"
9686 /* confdefs.h.  */
9687 _ACEOF
9688 cat confdefs.h >>conftest.$ac_ext
9689 cat >>conftest.$ac_ext <<_ACEOF
9690 /* end confdefs.h.  */
9691 /* System header to define __stub macros and hopefully few prototypes,
9692     which can conflict with char _doprnt (); below.
9693     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9694     <limits.h> exists even on freestanding compilers.  */
9695 #ifdef __STDC__
9696 # include <limits.h>
9697 #else
9698 # include <assert.h>
9699 #endif
9700 /* Override any gcc2 internal prototype to avoid an error.  */
9701 #ifdef __cplusplus
9702 extern "C"
9703 {
9704 #endif
9705 /* We use char because int might match the return type of a gcc2
9706    builtin and then its argument prototype would still apply.  */
9707 char _doprnt ();
9708 /* The GNU C library defines this for functions which it implements
9709     to always fail with ENOSYS.  Some functions are actually named
9710     something starting with __ and the normal name is an alias.  */
9711 #if defined (__stub__doprnt) || defined (__stub____doprnt)
9712 choke me
9713 #else
9714 char (*f) () = _doprnt;
9715 #endif
9716 #ifdef __cplusplus
9717 }
9718 #endif
9719
9720 int
9721 main ()
9722 {
9723 return f != _doprnt;
9724   ;
9725   return 0;
9726 }
9727 _ACEOF
9728 rm -f conftest.$ac_objext conftest$ac_exeext
9729 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9730   (eval $ac_link) 2>&5
9731   ac_status=$?
9732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733   (exit $ac_status); } &&
9734          { ac_try='test -s conftest$ac_exeext'
9735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736   (eval $ac_try) 2>&5
9737   ac_status=$?
9738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739   (exit $ac_status); }; }; then
9740   ac_cv_func__doprnt=yes
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 sed 's/^/| /' conftest.$ac_ext >&5
9744
9745 ac_cv_func__doprnt=no
9746 fi
9747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9748 fi
9749 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
9750 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
9751 if test $ac_cv_func__doprnt = yes; then
9752
9753 cat >>confdefs.h <<\_ACEOF
9754 #define HAVE_DOPRNT 1
9755 _ACEOF
9756
9757 fi
9758
9759 fi
9760 done
9761
9762
9763
9764
9765 for ac_func in vsnprintf vasprintf
9766 do
9767 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9768 echo "$as_me:$LINENO: checking for $ac_func" >&5
9769 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9770 if eval "test \"\${$as_ac_var+set}\" = set"; then
9771   echo $ECHO_N "(cached) $ECHO_C" >&6
9772 else
9773   cat >conftest.$ac_ext <<_ACEOF
9774 #line $LINENO "configure"
9775 /* confdefs.h.  */
9776 _ACEOF
9777 cat confdefs.h >>conftest.$ac_ext
9778 cat >>conftest.$ac_ext <<_ACEOF
9779 /* end confdefs.h.  */
9780 /* System header to define __stub macros and hopefully few prototypes,
9781     which can conflict with char $ac_func (); below.
9782     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9783     <limits.h> exists even on freestanding compilers.  */
9784 #ifdef __STDC__
9785 # include <limits.h>
9786 #else
9787 # include <assert.h>
9788 #endif
9789 /* Override any gcc2 internal prototype to avoid an error.  */
9790 #ifdef __cplusplus
9791 extern "C"
9792 {
9793 #endif
9794 /* We use char because int might match the return type of a gcc2
9795    builtin and then its argument prototype would still apply.  */
9796 char $ac_func ();
9797 /* The GNU C library defines this for functions which it implements
9798     to always fail with ENOSYS.  Some functions are actually named
9799     something starting with __ and the normal name is an alias.  */
9800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9801 choke me
9802 #else
9803 char (*f) () = $ac_func;
9804 #endif
9805 #ifdef __cplusplus
9806 }
9807 #endif
9808
9809 int
9810 main ()
9811 {
9812 return f != $ac_func;
9813   ;
9814   return 0;
9815 }
9816 _ACEOF
9817 rm -f conftest.$ac_objext conftest$ac_exeext
9818 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9819   (eval $ac_link) 2>&5
9820   ac_status=$?
9821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822   (exit $ac_status); } &&
9823          { ac_try='test -s conftest$ac_exeext'
9824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9825   (eval $ac_try) 2>&5
9826   ac_status=$?
9827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828   (exit $ac_status); }; }; then
9829   eval "$as_ac_var=yes"
9830 else
9831   echo "$as_me: failed program was:" >&5
9832 sed 's/^/| /' conftest.$ac_ext >&5
9833
9834 eval "$as_ac_var=no"
9835 fi
9836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9837 fi
9838 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9839 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9840 if test `eval echo '${'$as_ac_var'}'` = yes; then
9841   cat >>confdefs.h <<_ACEOF
9842 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9843 _ACEOF
9844
9845 fi
9846 done
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856 for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup
9857 do
9858 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9859 echo "$as_me:$LINENO: checking for $ac_func" >&5
9860 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9861 if eval "test \"\${$as_ac_var+set}\" = set"; then
9862   echo $ECHO_N "(cached) $ECHO_C" >&6
9863 else
9864   cat >conftest.$ac_ext <<_ACEOF
9865 #line $LINENO "configure"
9866 /* confdefs.h.  */
9867 _ACEOF
9868 cat confdefs.h >>conftest.$ac_ext
9869 cat >>conftest.$ac_ext <<_ACEOF
9870 /* end confdefs.h.  */
9871 /* System header to define __stub macros and hopefully few prototypes,
9872     which can conflict with char $ac_func (); below.
9873     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9874     <limits.h> exists even on freestanding compilers.  */
9875 #ifdef __STDC__
9876 # include <limits.h>
9877 #else
9878 # include <assert.h>
9879 #endif
9880 /* Override any gcc2 internal prototype to avoid an error.  */
9881 #ifdef __cplusplus
9882 extern "C"
9883 {
9884 #endif
9885 /* We use char because int might match the return type of a gcc2
9886    builtin and then its argument prototype would still apply.  */
9887 char $ac_func ();
9888 /* The GNU C library defines this for functions which it implements
9889     to always fail with ENOSYS.  Some functions are actually named
9890     something starting with __ and the normal name is an alias.  */
9891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9892 choke me
9893 #else
9894 char (*f) () = $ac_func;
9895 #endif
9896 #ifdef __cplusplus
9897 }
9898 #endif
9899
9900 int
9901 main ()
9902 {
9903 return f != $ac_func;
9904   ;
9905   return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext conftest$ac_exeext
9909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9910   (eval $ac_link) 2>&5
9911   ac_status=$?
9912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest$ac_exeext'
9915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   eval "$as_ac_var=yes"
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 sed 's/^/| /' conftest.$ac_ext >&5
9924
9925 eval "$as_ac_var=no"
9926 fi
9927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9928 fi
9929 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9930 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9931 if test `eval echo '${'$as_ac_var'}'` = yes; then
9932   cat >>confdefs.h <<_ACEOF
9933 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9934 _ACEOF
9935
9936 fi
9937 done
9938
9939
9940
9941 for ac_func in strchr memcpy
9942 do
9943 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9944 echo "$as_me:$LINENO: checking for $ac_func" >&5
9945 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9946 if eval "test \"\${$as_ac_var+set}\" = set"; then
9947   echo $ECHO_N "(cached) $ECHO_C" >&6
9948 else
9949   cat >conftest.$ac_ext <<_ACEOF
9950 #line $LINENO "configure"
9951 /* confdefs.h.  */
9952 _ACEOF
9953 cat confdefs.h >>conftest.$ac_ext
9954 cat >>conftest.$ac_ext <<_ACEOF
9955 /* end confdefs.h.  */
9956 /* System header to define __stub macros and hopefully few prototypes,
9957     which can conflict with char $ac_func (); below.
9958     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9959     <limits.h> exists even on freestanding compilers.  */
9960 #ifdef __STDC__
9961 # include <limits.h>
9962 #else
9963 # include <assert.h>
9964 #endif
9965 /* Override any gcc2 internal prototype to avoid an error.  */
9966 #ifdef __cplusplus
9967 extern "C"
9968 {
9969 #endif
9970 /* We use char because int might match the return type of a gcc2
9971    builtin and then its argument prototype would still apply.  */
9972 char $ac_func ();
9973 /* The GNU C library defines this for functions which it implements
9974     to always fail with ENOSYS.  Some functions are actually named
9975     something starting with __ and the normal name is an alias.  */
9976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9977 choke me
9978 #else
9979 char (*f) () = $ac_func;
9980 #endif
9981 #ifdef __cplusplus
9982 }
9983 #endif
9984
9985 int
9986 main ()
9987 {
9988 return f != $ac_func;
9989   ;
9990   return 0;
9991 }
9992 _ACEOF
9993 rm -f conftest.$ac_objext conftest$ac_exeext
9994 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9995   (eval $ac_link) 2>&5
9996   ac_status=$?
9997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9998   (exit $ac_status); } &&
9999          { ac_try='test -s conftest$ac_exeext'
10000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10001   (eval $ac_try) 2>&5
10002   ac_status=$?
10003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004   (exit $ac_status); }; }; then
10005   eval "$as_ac_var=yes"
10006 else
10007   echo "$as_me: failed program was:" >&5
10008 sed 's/^/| /' conftest.$ac_ext >&5
10009
10010 eval "$as_ac_var=no"
10011 fi
10012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10013 fi
10014 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10015 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10016 if test `eval echo '${'$as_ac_var'}'` = yes; then
10017   cat >>confdefs.h <<_ACEOF
10018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10019 _ACEOF
10020
10021 fi
10022 done
10023
10024
10025 for ac_func in fgets
10026 do
10027 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10028 echo "$as_me:$LINENO: checking for $ac_func" >&5
10029 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10030 if eval "test \"\${$as_ac_var+set}\" = set"; then
10031   echo $ECHO_N "(cached) $ECHO_C" >&6
10032 else
10033   cat >conftest.$ac_ext <<_ACEOF
10034 #line $LINENO "configure"
10035 /* confdefs.h.  */
10036 _ACEOF
10037 cat confdefs.h >>conftest.$ac_ext
10038 cat >>conftest.$ac_ext <<_ACEOF
10039 /* end confdefs.h.  */
10040 /* System header to define __stub macros and hopefully few prototypes,
10041     which can conflict with char $ac_func (); below.
10042     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10043     <limits.h> exists even on freestanding compilers.  */
10044 #ifdef __STDC__
10045 # include <limits.h>
10046 #else
10047 # include <assert.h>
10048 #endif
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 #ifdef __cplusplus
10051 extern "C"
10052 {
10053 #endif
10054 /* We use char because int might match the return type of a gcc2
10055    builtin and then its argument prototype would still apply.  */
10056 char $ac_func ();
10057 /* The GNU C library defines this for functions which it implements
10058     to always fail with ENOSYS.  Some functions are actually named
10059     something starting with __ and the normal name is an alias.  */
10060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10061 choke me
10062 #else
10063 char (*f) () = $ac_func;
10064 #endif
10065 #ifdef __cplusplus
10066 }
10067 #endif
10068
10069 int
10070 main ()
10071 {
10072 return f != $ac_func;
10073   ;
10074   return 0;
10075 }
10076 _ACEOF
10077 rm -f conftest.$ac_objext conftest$ac_exeext
10078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079   (eval $ac_link) 2>&5
10080   ac_status=$?
10081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082   (exit $ac_status); } &&
10083          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
10089   eval "$as_ac_var=yes"
10090 else
10091   echo "$as_me: failed program was:" >&5
10092 sed 's/^/| /' conftest.$ac_ext >&5
10093
10094 eval "$as_ac_var=no"
10095 fi
10096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10097 fi
10098 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10099 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10100 if test `eval echo '${'$as_ac_var'}'` = yes; then
10101   cat >>confdefs.h <<_ACEOF
10102 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10103 _ACEOF
10104
10105 fi
10106 done
10107
10108
10109 for ac_func in yylex
10110 do
10111 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10112 echo "$as_me:$LINENO: checking for $ac_func" >&5
10113 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10114 if eval "test \"\${$as_ac_var+set}\" = set"; then
10115   echo $ECHO_N "(cached) $ECHO_C" >&6
10116 else
10117   cat >conftest.$ac_ext <<_ACEOF
10118 #line $LINENO "configure"
10119 /* confdefs.h.  */
10120 _ACEOF
10121 cat confdefs.h >>conftest.$ac_ext
10122 cat >>conftest.$ac_ext <<_ACEOF
10123 /* end confdefs.h.  */
10124 /* System header to define __stub macros and hopefully few prototypes,
10125     which can conflict with char $ac_func (); below.
10126     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10127     <limits.h> exists even on freestanding compilers.  */
10128 #ifdef __STDC__
10129 # include <limits.h>
10130 #else
10131 # include <assert.h>
10132 #endif
10133 /* Override any gcc2 internal prototype to avoid an error.  */
10134 #ifdef __cplusplus
10135 extern "C"
10136 {
10137 #endif
10138 /* We use char because int might match the return type of a gcc2
10139    builtin and then its argument prototype would still apply.  */
10140 char $ac_func ();
10141 /* The GNU C library defines this for functions which it implements
10142     to always fail with ENOSYS.  Some functions are actually named
10143     something starting with __ and the normal name is an alias.  */
10144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10145 choke me
10146 #else
10147 char (*f) () = $ac_func;
10148 #endif
10149 #ifdef __cplusplus
10150 }
10151 #endif
10152
10153 int
10154 main ()
10155 {
10156 return f != $ac_func;
10157   ;
10158   return 0;
10159 }
10160 _ACEOF
10161 rm -f conftest.$ac_objext conftest$ac_exeext
10162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10163   (eval $ac_link) 2>&5
10164   ac_status=$?
10165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10166   (exit $ac_status); } &&
10167          { ac_try='test -s conftest$ac_exeext'
10168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10169   (eval $ac_try) 2>&5
10170   ac_status=$?
10171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10172   (exit $ac_status); }; }; then
10173   eval "$as_ac_var=yes"
10174 else
10175   echo "$as_me: failed program was:" >&5
10176 sed 's/^/| /' conftest.$ac_ext >&5
10177
10178 eval "$as_ac_var=no"
10179 fi
10180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10181 fi
10182 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10183 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10184 if test `eval echo '${'$as_ac_var'}'` = yes; then
10185   cat >>confdefs.h <<_ACEOF
10186 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10187 _ACEOF
10188
10189 fi
10190 done
10191
10192
10193 echo "$as_me:$LINENO: checking whether scanf knows %a" >&5
10194 echo $ECHO_N "checking whether scanf knows %a... $ECHO_C" >&6
10195 if test "${ucsim_cv_scanf_a+set}" = set; then
10196   echo $ECHO_N "(cached) $ECHO_C" >&6
10197 else
10198   echo "a b" >conftest.data
10199 if test "$cross_compiling" = yes; then
10200   ucsim_cv_scanf_a="unknown"
10201 else
10202   cat >conftest.$ac_ext <<_ACEOF
10203 #line $LINENO "configure"
10204 /* confdefs.h.  */
10205 _ACEOF
10206 cat confdefs.h >>conftest.$ac_ext
10207 cat >>conftest.$ac_ext <<_ACEOF
10208 /* end confdefs.h.  */
10209
10210 #include <stdio.h>
10211 void main(void)
10212 {
10213   FILE *f;
10214   char *a;
10215   int  i;
10216   if ((f= fopen("conftest.data", "r")) == NULL)
10217     exit(1);
10218   i= fscanf(f, " %a[a-z] ", &a);
10219   fclose(f);
10220   if (i == 0)
10221     exit(2);
10222   if (i == 1)
10223     exit(0);
10224   exit(3);
10225 }
10226 _ACEOF
10227 rm -f conftest$ac_exeext
10228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10229   (eval $ac_link) 2>&5
10230   ac_status=$?
10231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10234   (eval $ac_try) 2>&5
10235   ac_status=$?
10236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237   (exit $ac_status); }; }; then
10238   ucsim_cv_scanf_a="yes"
10239 else
10240   echo "$as_me: program exited with status $ac_status" >&5
10241 echo "$as_me: failed program was:" >&5
10242 sed 's/^/| /' conftest.$ac_ext >&5
10243
10244 ( exit $ac_status )
10245 ucsim_cv_scanf_a="no"
10246 fi
10247 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10248 fi
10249
10250 fi
10251 echo "$as_me:$LINENO: result: $ucsim_cv_scanf_a" >&5
10252 echo "${ECHO_T}$ucsim_cv_scanf_a" >&6
10253 if test "$ucsim_cv_scanf_a" = "yes"; then
10254   cat >>confdefs.h <<\_ACEOF
10255 #define SCANF_A 1
10256 _ACEOF
10257
10258 fi
10259
10260 echo "$as_me:$LINENO: checking whether getcwd is GNUish" >&5
10261 echo $ECHO_N "checking whether getcwd is GNUish... $ECHO_C" >&6
10262 if test "${ucsim_cv_getcwd+set}" = set; then
10263   echo $ECHO_N "(cached) $ECHO_C" >&6
10264 else
10265   if test "$cross_compiling" = yes; then
10266   ucsim_cv_getcwd="unknown"
10267 else
10268   cat >conftest.$ac_ext <<_ACEOF
10269 #line $LINENO "configure"
10270 /* confdefs.h.  */
10271 _ACEOF
10272 cat confdefs.h >>conftest.$ac_ext
10273 cat >>conftest.$ac_ext <<_ACEOF
10274 /* end confdefs.h.  */
10275
10276 #include <unistd.h>
10277 void main(void)
10278 {
10279   if ((getcwd(NULL, 0)) == NULL)
10280     exit(1);
10281   exit(0);
10282 }
10283 _ACEOF
10284 rm -f conftest$ac_exeext
10285 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10286   (eval $ac_link) 2>&5
10287   ac_status=$?
10288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294   (exit $ac_status); }; }; then
10295   ucsim_cv_getcwd="yes"
10296 else
10297   echo "$as_me: program exited with status $ac_status" >&5
10298 echo "$as_me: failed program was:" >&5
10299 sed 's/^/| /' conftest.$ac_ext >&5
10300
10301 ( exit $ac_status )
10302 ucsim_cv_getcwd="no"
10303 fi
10304 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10305 fi
10306
10307 fi
10308 echo "$as_me:$LINENO: result: $ucsim_cv_getcwd" >&5
10309 echo "${ECHO_T}$ucsim_cv_getcwd" >&6
10310 if test "$ucsim_cv_getcwd" = "yes"; then
10311   cat >>confdefs.h <<\_ACEOF
10312 #define GNU_GETCWD 1
10313 _ACEOF
10314
10315 fi
10316
10317
10318 #'
10319
10320 echo "$as_me:$LINENO: checking for type of length pointer parameter of accept" >&5
10321 echo $ECHO_N "checking for type of length pointer parameter of accept... $ECHO_C" >&6
10322 if test "${ucsim_cv_accept_length_type+set}" = set; then
10323   echo $ECHO_N "(cached) $ECHO_C" >&6
10324 else
10325   ac_save_CPPFLAGS="$CPPFLAGS"
10326     ucsim_cv_accept_length_type=no
10327     for ac_val in int size_t socklen_t; do
10328       CPPFLAGS="$ac_save_CPPFLAGS -DACCEPT_SOCKLEN_T=$ac_val"
10329       cat >conftest.$ac_ext <<_ACEOF
10330 #line $LINENO "configure"
10331 /* confdefs.h.  */
10332 _ACEOF
10333 cat confdefs.h >>conftest.$ac_ext
10334 cat >>conftest.$ac_ext <<_ACEOF
10335 /* end confdefs.h.  */
10336 #include <sys/types.h>
10337 #include <sys/socket.h>
10338 int
10339 main ()
10340 {
10341 struct sockaddr a; $ac_val len; accept (0, &a, &len);
10342   ;
10343   return 0;
10344 }
10345 _ACEOF
10346 rm -f conftest.$ac_objext
10347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10348   (eval $ac_compile) 2>&5
10349   ac_status=$?
10350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351   (exit $ac_status); } &&
10352          { ac_try='test -s conftest.$ac_objext'
10353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10354   (eval $ac_try) 2>&5
10355   ac_status=$?
10356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357   (exit $ac_status); }; }; then
10358   ucsim_cv_accept_length_type=$ac_val; break
10359 else
10360   echo "$as_me: failed program was:" >&5
10361 sed 's/^/| /' conftest.$ac_ext >&5
10362
10363 fi
10364 rm -f conftest.$ac_objext conftest.$ac_ext
10365     done
10366     CPPFLAGS="$ac_save_CPPFLAGS"
10367 fi
10368 echo "$as_me:$LINENO: result: $ucsim_cv_accept_length_type" >&5
10369 echo "${ECHO_T}$ucsim_cv_accept_length_type" >&6
10370   if test "$ucsim_cv_accept_length_type" != no; then
10371
10372 cat >>confdefs.h <<_ACEOF
10373 #define ACCEPT_SOCKLEN_T $ucsim_cv_accept_length_type
10374 _ACEOF
10375
10376   fi
10377
10378
10379
10380 # Macro definitions
10381 ###################
10382
10383 # DD_COPT macro checks if the compiler specified as the 1st parameter
10384 # supports option specified as the 2nd parameter
10385 # For example: DD_COPT(CXX, fPIC)
10386
10387
10388
10389
10390 # Checking characteristics of compilers and other programs
10391 # --------------------------------------------------------
10392
10393 # Cross compiling overrides
10394 # FIXME
10395 if test "$CC" = "i586-mingw32msvc-gcc"; then
10396   ac_cv_c_bigendian=no
10397   ac_cv_sizeof_char=1
10398   ac_cv_sizeof_short=2
10399   ac_cv_sizeof_int=4
10400   ac_cv_sizeof_long=4
10401   ac_cv_sizeof_long_long=4
10402 fi
10403
10404 if test "$cross_compiling" = "no"
10405 then
10406     echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
10407 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
10408 if test "${ac_cv_c_bigendian+set}" = set; then
10409   echo $ECHO_N "(cached) $ECHO_C" >&6
10410 else
10411   # See if sys/param.h defines the BYTE_ORDER macro.
10412 cat >conftest.$ac_ext <<_ACEOF
10413 #line $LINENO "configure"
10414 /* confdefs.h.  */
10415 _ACEOF
10416 cat confdefs.h >>conftest.$ac_ext
10417 cat >>conftest.$ac_ext <<_ACEOF
10418 /* end confdefs.h.  */
10419 #include <sys/types.h>
10420 #include <sys/param.h>
10421
10422 int
10423 main ()
10424 {
10425 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
10426  bogus endian macros
10427 #endif
10428
10429   ;
10430   return 0;
10431 }
10432 _ACEOF
10433 rm -f conftest.$ac_objext
10434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10435   (eval $ac_compile) 2>&5
10436   ac_status=$?
10437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438   (exit $ac_status); } &&
10439          { ac_try='test -s conftest.$ac_objext'
10440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10441   (eval $ac_try) 2>&5
10442   ac_status=$?
10443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10444   (exit $ac_status); }; }; then
10445   # It does; now see whether it defined to BIG_ENDIAN or not.
10446 cat >conftest.$ac_ext <<_ACEOF
10447 #line $LINENO "configure"
10448 /* confdefs.h.  */
10449 _ACEOF
10450 cat confdefs.h >>conftest.$ac_ext
10451 cat >>conftest.$ac_ext <<_ACEOF
10452 /* end confdefs.h.  */
10453 #include <sys/types.h>
10454 #include <sys/param.h>
10455
10456 int
10457 main ()
10458 {
10459 #if BYTE_ORDER != BIG_ENDIAN
10460  not big endian
10461 #endif
10462
10463   ;
10464   return 0;
10465 }
10466 _ACEOF
10467 rm -f conftest.$ac_objext
10468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10469   (eval $ac_compile) 2>&5
10470   ac_status=$?
10471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472   (exit $ac_status); } &&
10473          { ac_try='test -s conftest.$ac_objext'
10474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10475   (eval $ac_try) 2>&5
10476   ac_status=$?
10477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478   (exit $ac_status); }; }; then
10479   ac_cv_c_bigendian=yes
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 sed 's/^/| /' conftest.$ac_ext >&5
10483
10484 ac_cv_c_bigendian=no
10485 fi
10486 rm -f conftest.$ac_objext conftest.$ac_ext
10487 else
10488   echo "$as_me: failed program was:" >&5
10489 sed 's/^/| /' conftest.$ac_ext >&5
10490
10491 # It does not; compile a test program.
10492 if test "$cross_compiling" = yes; then
10493   # try to guess the endianness by grepping values into an object file
10494   ac_cv_c_bigendian=unknown
10495   cat >conftest.$ac_ext <<_ACEOF
10496 #line $LINENO "configure"
10497 /* confdefs.h.  */
10498 _ACEOF
10499 cat confdefs.h >>conftest.$ac_ext
10500 cat >>conftest.$ac_ext <<_ACEOF
10501 /* end confdefs.h.  */
10502 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10503 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10504 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
10505 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10506 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10507 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
10508 int
10509 main ()
10510 {
10511  _ascii (); _ebcdic ();
10512   ;
10513   return 0;
10514 }
10515 _ACEOF
10516 rm -f conftest.$ac_objext
10517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10518   (eval $ac_compile) 2>&5
10519   ac_status=$?
10520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10521   (exit $ac_status); } &&
10522          { ac_try='test -s conftest.$ac_objext'
10523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10524   (eval $ac_try) 2>&5
10525   ac_status=$?
10526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527   (exit $ac_status); }; }; then
10528   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
10529   ac_cv_c_bigendian=yes
10530 fi
10531 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
10532   if test "$ac_cv_c_bigendian" = unknown; then
10533     ac_cv_c_bigendian=no
10534   else
10535     # finding both strings is unlikely to happen, but who knows?
10536     ac_cv_c_bigendian=unknown
10537   fi
10538 fi
10539 else
10540   echo "$as_me: failed program was:" >&5
10541 sed 's/^/| /' conftest.$ac_ext >&5
10542
10543 fi
10544 rm -f conftest.$ac_objext conftest.$ac_ext
10545 else
10546   cat >conftest.$ac_ext <<_ACEOF
10547 #line $LINENO "configure"
10548 /* confdefs.h.  */
10549 _ACEOF
10550 cat confdefs.h >>conftest.$ac_ext
10551 cat >>conftest.$ac_ext <<_ACEOF
10552 /* end confdefs.h.  */
10553 int
10554 main ()
10555 {
10556   /* Are we little or big endian?  From Harbison&Steele.  */
10557   union
10558   {
10559     long l;
10560     char c[sizeof (long)];
10561   } u;
10562   u.l = 1;
10563   exit (u.c[sizeof (long) - 1] == 1);
10564 }
10565 _ACEOF
10566 rm -f conftest$ac_exeext
10567 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10568   (eval $ac_link) 2>&5
10569   ac_status=$?
10570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10571   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10573   (eval $ac_try) 2>&5
10574   ac_status=$?
10575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10576   (exit $ac_status); }; }; then
10577   ac_cv_c_bigendian=no
10578 else
10579   echo "$as_me: program exited with status $ac_status" >&5
10580 echo "$as_me: failed program was:" >&5
10581 sed 's/^/| /' conftest.$ac_ext >&5
10582
10583 ( exit $ac_status )
10584 ac_cv_c_bigendian=yes
10585 fi
10586 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10587 fi
10588 fi
10589 rm -f conftest.$ac_objext conftest.$ac_ext
10590 fi
10591 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
10592 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
10593 case $ac_cv_c_bigendian in
10594   yes)
10595
10596 cat >>confdefs.h <<\_ACEOF
10597 #define WORDS_BIGENDIAN 1
10598 _ACEOF
10599  ;;
10600   no)
10601      ;;
10602   *)
10603     { { echo "$as_me:$LINENO: error: unknown endianness
10604 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
10605 echo "$as_me: error: unknown endianness
10606 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
10607    { (exit 1); exit 1; }; } ;;
10608 esac
10609
10610 else
10611 #echo "CROSS ENDIAN"
10612     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
10613         ac_cv_c_bigendian=no
10614     else
10615         : # FIXME
10616     fi
10617 #echo "CROSS ENDIAN DONE"
10618 fi
10619
10620 echo "$as_me:$LINENO: checking whether preprocessor accepts -MM or -M" >&5
10621 echo $ECHO_N "checking whether preprocessor accepts -MM or -M... $ECHO_C" >&6
10622 if test "${ucsim_cv_MM+set}" = set; then
10623   echo $ECHO_N "(cached) $ECHO_C" >&6
10624 else
10625   echo "#include <stdio.h>" >_test_.c
10626 echo "" >>_test_.c
10627 $CXXCPP -v -MM _test_.c 1>&5 2>&5
10628 if test "$?" = "0"; then
10629   ucsim_cv_MM="-MM"
10630 else
10631   ucsim_cv_MM="-M"
10632 fi
10633 rm -f _test_.*
10634 fi
10635 echo "$as_me:$LINENO: result: $ucsim_cv_MM" >&5
10636 echo "${ECHO_T}$ucsim_cv_MM" >&6
10637 M_OR_MM=$ucsim_cv_MM
10638
10639
10640 # This is the first time when CFLAGS are set/modified!!
10641
10642
10643 echo "$as_me:$LINENO: checking whether $CXX accepts -ggdb" >&5
10644 echo $ECHO_N "checking whether $CXX accepts -ggdb... $ECHO_C" >&6
10645 if test "${ucsim_cv_CXXggdb+set}" = set; then
10646   echo $ECHO_N "(cached) $ECHO_C" >&6
10647 else
10648   cat >_test_.c <<EOF
10649 #include <stdio.h>
10650 void main(void) {}
10651 EOF
10652 $CXX -v -ggdb -c _test_.c 1>&5 2>&5
10653 if test "$?" = "0"; then
10654   ucsim_cv_CXXggdb="yes"
10655 else
10656   ucsim_cv_CXXggdb="no"
10657 fi
10658 rm -f _test_.* a.out
10659 fi
10660 echo "$as_me:$LINENO: result: $ucsim_cv_CXXggdb" >&5
10661 echo "${ECHO_T}$ucsim_cv_CXXggdb" >&6
10662
10663 if test "$ucsim_cv_CXXggdb" = "yes"; then
10664     if test "$CXXFLAGS"x = x ;then
10665         CXXFLAGS="-ggdb"
10666     else
10667         CXXFLAGS="$CXXFLAGS -ggdb"
10668     fi
10669 fi
10670
10671
10672 echo "$as_me:$LINENO: checking whether $CXX accepts -pipe" >&5
10673 echo $ECHO_N "checking whether $CXX accepts -pipe... $ECHO_C" >&6
10674 if test "${ucsim_cv_CXXpipe+set}" = set; then
10675   echo $ECHO_N "(cached) $ECHO_C" >&6
10676 else
10677   cat >_test_.c <<EOF
10678 #include <stdio.h>
10679 void main(void) {}
10680 EOF
10681 $CXX -v -pipe -c _test_.c 1>&5 2>&5
10682 if test "$?" = "0"; then
10683   ucsim_cv_CXXpipe="yes"
10684 else
10685   ucsim_cv_CXXpipe="no"
10686 fi
10687 rm -f _test_.* a.out
10688 fi
10689 echo "$as_me:$LINENO: result: $ucsim_cv_CXXpipe" >&5
10690 echo "${ECHO_T}$ucsim_cv_CXXpipe" >&6
10691
10692 if test "$ucsim_cv_CXXpipe" = "yes"; then
10693   CXXFLAGS="$CXXFLAGS -pipe"
10694 fi
10695
10696 PICOPT=""
10697 SHAREDLIB="no"
10698
10699 echo "$as_me:$LINENO: checking whether $CXX accepts -fPIC" >&5
10700 echo $ECHO_N "checking whether $CXX accepts -fPIC... $ECHO_C" >&6
10701 if test "${ucsim_cv_CXXfPIC+set}" = set; then
10702   echo $ECHO_N "(cached) $ECHO_C" >&6
10703 else
10704   cat >_test_.c <<EOF
10705 #include <stdio.h>
10706 void main(void) {}
10707 EOF
10708 $CXX -v -fPIC -c _test_.c 1>&5 2>&5
10709 if test "$?" = "0"; then
10710   ucsim_cv_CXXfPIC="yes"
10711 else
10712   ucsim_cv_CXXfPIC="no"
10713 fi
10714 rm -f _test_.* a.out
10715 fi
10716 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfPIC" >&5
10717 echo "${ECHO_T}$ucsim_cv_CXXfPIC" >&6
10718
10719 if test "$ucsim_cv_CXXfPIC" = "yes"; then
10720     PICOPT="-fPIC"
10721 else
10722
10723 echo "$as_me:$LINENO: checking whether $CXX accepts -fpic" >&5
10724 echo $ECHO_N "checking whether $CXX accepts -fpic... $ECHO_C" >&6
10725 if test "${ucsim_cv_CXXfpic+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728   cat >_test_.c <<EOF
10729 #include <stdio.h>
10730 void main(void) {}
10731 EOF
10732 $CXX -v -fpic -c _test_.c 1>&5 2>&5
10733 if test "$?" = "0"; then
10734   ucsim_cv_CXXfpic="yes"
10735 else
10736   ucsim_cv_CXXfpic="no"
10737 fi
10738 rm -f _test_.* a.out
10739 fi
10740 echo "$as_me:$LINENO: result: $ucsim_cv_CXXfpic" >&5
10741 echo "${ECHO_T}$ucsim_cv_CXXfpic" >&6
10742
10743     if test "$ucsim_cv_CXXfpic" = "yes"; then
10744         PICOPT="-fpic"
10745     fi
10746 fi
10747 if test "$PICOPT"x != "x"; then
10748     SHAREDLIB="yes"
10749 fi
10750 # If this is Cygwin neither use Position Independant Code
10751 # nor build .so
10752 # Quick + dirty by Bernhard
10753 # FIXME
10754 if $CXX -v 2>&1 | grep -i cygwin 1>&5 2>&5; then
10755     PICOPT=""
10756     SHAREDLIB="no"
10757 fi
10758
10759
10760
10761 dlso_ok="no"
10762 if test $SHAREDLIB = "yes" -a $dl_ok = "yes" -a $enable_dlso = "yes"; then
10763     dlso_ok="yes"
10764 fi
10765
10766
10767 # Checks for typedefs, structures, and compiler characteristics.
10768 # ===========================================================================
10769
10770 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
10771 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10772 if test "${ac_cv_type_signal+set}" = set; then
10773   echo $ECHO_N "(cached) $ECHO_C" >&6
10774 else
10775   cat >conftest.$ac_ext <<_ACEOF
10776 #line $LINENO "configure"
10777 /* confdefs.h.  */
10778 _ACEOF
10779 cat confdefs.h >>conftest.$ac_ext
10780 cat >>conftest.$ac_ext <<_ACEOF
10781 /* end confdefs.h.  */
10782 #include <sys/types.h>
10783 #include <signal.h>
10784 #ifdef signal
10785 # undef signal
10786 #endif
10787 #ifdef __cplusplus
10788 extern "C" void (*signal (int, void (*)(int)))(int);
10789 #else
10790 void (*signal ()) ();
10791 #endif
10792
10793 int
10794 main ()
10795 {
10796 int i;
10797   ;
10798   return 0;
10799 }
10800 _ACEOF
10801 rm -f conftest.$ac_objext
10802 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10803   (eval $ac_compile) 2>&5
10804   ac_status=$?
10805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10806   (exit $ac_status); } &&
10807          { ac_try='test -s conftest.$ac_objext'
10808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10809   (eval $ac_try) 2>&5
10810   ac_status=$?
10811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812   (exit $ac_status); }; }; then
10813   ac_cv_type_signal=void
10814 else
10815   echo "$as_me: failed program was:" >&5
10816 sed 's/^/| /' conftest.$ac_ext >&5
10817
10818 ac_cv_type_signal=int
10819 fi
10820 rm -f conftest.$ac_objext conftest.$ac_ext
10821 fi
10822 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
10823 echo "${ECHO_T}$ac_cv_type_signal" >&6
10824
10825 cat >>confdefs.h <<_ACEOF
10826 #define RETSIGTYPE $ac_cv_type_signal
10827 _ACEOF
10828
10829
10830 if test "$cross_compiling" = "no"; then
10831 echo "$as_me:$LINENO: checking for char" >&5
10832 echo $ECHO_N "checking for char... $ECHO_C" >&6
10833 if test "${ac_cv_type_char+set}" = set; then
10834   echo $ECHO_N "(cached) $ECHO_C" >&6
10835 else
10836   cat >conftest.$ac_ext <<_ACEOF
10837 #line $LINENO "configure"
10838 /* confdefs.h.  */
10839 _ACEOF
10840 cat confdefs.h >>conftest.$ac_ext
10841 cat >>conftest.$ac_ext <<_ACEOF
10842 /* end confdefs.h.  */
10843 $ac_includes_default
10844 int
10845 main ()
10846 {
10847 if ((char *) 0)
10848   return 0;
10849 if (sizeof (char))
10850   return 0;
10851   ;
10852   return 0;
10853 }
10854 _ACEOF
10855 rm -f conftest.$ac_objext
10856 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10857   (eval $ac_compile) 2>&5
10858   ac_status=$?
10859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10860   (exit $ac_status); } &&
10861          { ac_try='test -s conftest.$ac_objext'
10862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10863   (eval $ac_try) 2>&5
10864   ac_status=$?
10865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10866   (exit $ac_status); }; }; then
10867   ac_cv_type_char=yes
10868 else
10869   echo "$as_me: failed program was:" >&5
10870 sed 's/^/| /' conftest.$ac_ext >&5
10871
10872 ac_cv_type_char=no
10873 fi
10874 rm -f conftest.$ac_objext conftest.$ac_ext
10875 fi
10876 echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
10877 echo "${ECHO_T}$ac_cv_type_char" >&6
10878
10879 echo "$as_me:$LINENO: checking size of char" >&5
10880 echo $ECHO_N "checking size of char... $ECHO_C" >&6
10881 if test "${ac_cv_sizeof_char+set}" = set; then
10882   echo $ECHO_N "(cached) $ECHO_C" >&6
10883 else
10884   if test "$ac_cv_type_char" = yes; then
10885   # The cast to unsigned long works around a bug in the HP C Compiler
10886   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10887   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10888   # This bug is HP SR number 8606223364.
10889   if test "$cross_compiling" = yes; then
10890   # Depending upon the size, compute the lo and hi bounds.
10891 cat >conftest.$ac_ext <<_ACEOF
10892 #line $LINENO "configure"
10893 /* confdefs.h.  */
10894 _ACEOF
10895 cat confdefs.h >>conftest.$ac_ext
10896 cat >>conftest.$ac_ext <<_ACEOF
10897 /* end confdefs.h.  */
10898 $ac_includes_default
10899 int
10900 main ()
10901 {
10902 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
10903 test_array [0] = 0
10904
10905   ;
10906   return 0;
10907 }
10908 _ACEOF
10909 rm -f conftest.$ac_objext
10910 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10911   (eval $ac_compile) 2>&5
10912   ac_status=$?
10913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10914   (exit $ac_status); } &&
10915          { ac_try='test -s conftest.$ac_objext'
10916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10917   (eval $ac_try) 2>&5
10918   ac_status=$?
10919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10920   (exit $ac_status); }; }; then
10921   ac_lo=0 ac_mid=0
10922   while :; do
10923     cat >conftest.$ac_ext <<_ACEOF
10924 #line $LINENO "configure"
10925 /* confdefs.h.  */
10926 _ACEOF
10927 cat confdefs.h >>conftest.$ac_ext
10928 cat >>conftest.$ac_ext <<_ACEOF
10929 /* end confdefs.h.  */
10930 $ac_includes_default
10931 int
10932 main ()
10933 {
10934 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
10935 test_array [0] = 0
10936
10937   ;
10938   return 0;
10939 }
10940 _ACEOF
10941 rm -f conftest.$ac_objext
10942 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10943   (eval $ac_compile) 2>&5
10944   ac_status=$?
10945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10946   (exit $ac_status); } &&
10947          { ac_try='test -s conftest.$ac_objext'
10948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10949   (eval $ac_try) 2>&5
10950   ac_status=$?
10951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10952   (exit $ac_status); }; }; then
10953   ac_hi=$ac_mid; break
10954 else
10955   echo "$as_me: failed program was:" >&5
10956 sed 's/^/| /' conftest.$ac_ext >&5
10957
10958 ac_lo=`expr $ac_mid + 1`
10959                     if test $ac_lo -le $ac_mid; then
10960                       ac_lo= ac_hi=
10961                       break
10962                     fi
10963                     ac_mid=`expr 2 '*' $ac_mid + 1`
10964 fi
10965 rm -f conftest.$ac_objext conftest.$ac_ext
10966   done
10967 else
10968   echo "$as_me: failed program was:" >&5
10969 sed 's/^/| /' conftest.$ac_ext >&5
10970
10971 cat >conftest.$ac_ext <<_ACEOF
10972 #line $LINENO "configure"
10973 /* confdefs.h.  */
10974 _ACEOF
10975 cat confdefs.h >>conftest.$ac_ext
10976 cat >>conftest.$ac_ext <<_ACEOF
10977 /* end confdefs.h.  */
10978 $ac_includes_default
10979 int
10980 main ()
10981 {
10982 static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
10983 test_array [0] = 0
10984
10985   ;
10986   return 0;
10987 }
10988 _ACEOF
10989 rm -f conftest.$ac_objext
10990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10991   (eval $ac_compile) 2>&5
10992   ac_status=$?
10993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994   (exit $ac_status); } &&
10995          { ac_try='test -s conftest.$ac_objext'
10996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10997   (eval $ac_try) 2>&5
10998   ac_status=$?
10999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000   (exit $ac_status); }; }; then
11001   ac_hi=-1 ac_mid=-1
11002   while :; do
11003     cat >conftest.$ac_ext <<_ACEOF
11004 #line $LINENO "configure"
11005 /* confdefs.h.  */
11006 _ACEOF
11007 cat confdefs.h >>conftest.$ac_ext
11008 cat >>conftest.$ac_ext <<_ACEOF
11009 /* end confdefs.h.  */
11010 $ac_includes_default
11011 int
11012 main ()
11013 {
11014 static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
11015 test_array [0] = 0
11016
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f conftest.$ac_objext
11022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026   (exit $ac_status); } &&
11027          { ac_try='test -s conftest.$ac_objext'
11028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11032   (exit $ac_status); }; }; then
11033   ac_lo=$ac_mid; break
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 sed 's/^/| /' conftest.$ac_ext >&5
11037
11038 ac_hi=`expr '(' $ac_mid ')' - 1`
11039                        if test $ac_mid -le $ac_hi; then
11040                          ac_lo= ac_hi=
11041                          break
11042                        fi
11043                        ac_mid=`expr 2 '*' $ac_mid`
11044 fi
11045 rm -f conftest.$ac_objext conftest.$ac_ext
11046   done
11047 else
11048   echo "$as_me: failed program was:" >&5
11049 sed 's/^/| /' conftest.$ac_ext >&5
11050
11051 ac_lo= ac_hi=
11052 fi
11053 rm -f conftest.$ac_objext conftest.$ac_ext
11054 fi
11055 rm -f conftest.$ac_objext conftest.$ac_ext
11056 # Binary search between lo and hi bounds.
11057 while test "x$ac_lo" != "x$ac_hi"; do
11058   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11059   cat >conftest.$ac_ext <<_ACEOF
11060 #line $LINENO "configure"
11061 /* confdefs.h.  */
11062 _ACEOF
11063 cat confdefs.h >>conftest.$ac_ext
11064 cat >>conftest.$ac_ext <<_ACEOF
11065 /* end confdefs.h.  */
11066 $ac_includes_default
11067 int
11068 main ()
11069 {
11070 static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
11071 test_array [0] = 0
11072
11073   ;
11074   return 0;
11075 }
11076 _ACEOF
11077 rm -f conftest.$ac_objext
11078 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11079   (eval $ac_compile) 2>&5
11080   ac_status=$?
11081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082   (exit $ac_status); } &&
11083          { ac_try='test -s conftest.$ac_objext'
11084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11085   (eval $ac_try) 2>&5
11086   ac_status=$?
11087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088   (exit $ac_status); }; }; then
11089   ac_hi=$ac_mid
11090 else
11091   echo "$as_me: failed program was:" >&5
11092 sed 's/^/| /' conftest.$ac_ext >&5
11093
11094 ac_lo=`expr '(' $ac_mid ')' + 1`
11095 fi
11096 rm -f conftest.$ac_objext conftest.$ac_ext
11097 done
11098 case $ac_lo in
11099 ?*) ac_cv_sizeof_char=$ac_lo;;
11100 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11101 See \`config.log' for more details." >&5
11102 echo "$as_me: error: cannot compute sizeof (char), 77
11103 See \`config.log' for more details." >&2;}
11104    { (exit 1); exit 1; }; } ;;
11105 esac
11106 else
11107   if test "$cross_compiling" = yes; then
11108   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11109 See \`config.log' for more details." >&5
11110 echo "$as_me: error: cannot run test program while cross compiling
11111 See \`config.log' for more details." >&2;}
11112    { (exit 1); exit 1; }; }
11113 else
11114   cat >conftest.$ac_ext <<_ACEOF
11115 #line $LINENO "configure"
11116 /* confdefs.h.  */
11117 _ACEOF
11118 cat confdefs.h >>conftest.$ac_ext
11119 cat >>conftest.$ac_ext <<_ACEOF
11120 /* end confdefs.h.  */
11121 $ac_includes_default
11122 long longval () { return (long) (sizeof (char)); }
11123 unsigned long ulongval () { return (long) (sizeof (char)); }
11124 #include <stdio.h>
11125 #include <stdlib.h>
11126 int
11127 main ()
11128 {
11129
11130   FILE *f = fopen ("conftest.val", "w");
11131   if (! f)
11132     exit (1);
11133   if (((long) (sizeof (char))) < 0)
11134     {
11135       long i = longval ();
11136       if (i != ((long) (sizeof (char))))
11137         exit (1);
11138       fprintf (f, "%ld\n", i);
11139     }
11140   else
11141     {
11142       unsigned long i = ulongval ();
11143       if (i != ((long) (sizeof (char))))
11144         exit (1);
11145       fprintf (f, "%lu\n", i);
11146     }
11147   exit (ferror (f) || fclose (f) != 0);
11148
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest$ac_exeext
11154 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11155   (eval $ac_link) 2>&5
11156   ac_status=$?
11157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11158   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11160   (eval $ac_try) 2>&5
11161   ac_status=$?
11162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11163   (exit $ac_status); }; }; then
11164   ac_cv_sizeof_char=`cat conftest.val`
11165 else
11166   echo "$as_me: program exited with status $ac_status" >&5
11167 echo "$as_me: failed program was:" >&5
11168 sed 's/^/| /' conftest.$ac_ext >&5
11169
11170 ( exit $ac_status )
11171 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11172 See \`config.log' for more details." >&5
11173 echo "$as_me: error: cannot compute sizeof (char), 77
11174 See \`config.log' for more details." >&2;}
11175    { (exit 1); exit 1; }; }
11176 fi
11177 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11178 fi
11179 fi
11180 rm -f conftest.val
11181 else
11182   ac_cv_sizeof_char=0
11183 fi
11184 fi
11185 echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
11186 echo "${ECHO_T}$ac_cv_sizeof_char" >&6
11187 cat >>confdefs.h <<_ACEOF
11188 #define SIZEOF_CHAR $ac_cv_sizeof_char
11189 _ACEOF
11190
11191
11192 echo "$as_me:$LINENO: checking for short" >&5
11193 echo $ECHO_N "checking for short... $ECHO_C" >&6
11194 if test "${ac_cv_type_short+set}" = set; then
11195   echo $ECHO_N "(cached) $ECHO_C" >&6
11196 else
11197   cat >conftest.$ac_ext <<_ACEOF
11198 #line $LINENO "configure"
11199 /* confdefs.h.  */
11200 _ACEOF
11201 cat confdefs.h >>conftest.$ac_ext
11202 cat >>conftest.$ac_ext <<_ACEOF
11203 /* end confdefs.h.  */
11204 $ac_includes_default
11205 int
11206 main ()
11207 {
11208 if ((short *) 0)
11209   return 0;
11210 if (sizeof (short))
11211   return 0;
11212   ;
11213   return 0;
11214 }
11215 _ACEOF
11216 rm -f conftest.$ac_objext
11217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11218   (eval $ac_compile) 2>&5
11219   ac_status=$?
11220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221   (exit $ac_status); } &&
11222          { ac_try='test -s conftest.$ac_objext'
11223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11224   (eval $ac_try) 2>&5
11225   ac_status=$?
11226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227   (exit $ac_status); }; }; then
11228   ac_cv_type_short=yes
11229 else
11230   echo "$as_me: failed program was:" >&5
11231 sed 's/^/| /' conftest.$ac_ext >&5
11232
11233 ac_cv_type_short=no
11234 fi
11235 rm -f conftest.$ac_objext conftest.$ac_ext
11236 fi
11237 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
11238 echo "${ECHO_T}$ac_cv_type_short" >&6
11239
11240 echo "$as_me:$LINENO: checking size of short" >&5
11241 echo $ECHO_N "checking size of short... $ECHO_C" >&6
11242 if test "${ac_cv_sizeof_short+set}" = set; then
11243   echo $ECHO_N "(cached) $ECHO_C" >&6
11244 else
11245   if test "$ac_cv_type_short" = yes; then
11246   # The cast to unsigned long works around a bug in the HP C Compiler
11247   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11248   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11249   # This bug is HP SR number 8606223364.
11250   if test "$cross_compiling" = yes; then
11251   # Depending upon the size, compute the lo and hi bounds.
11252 cat >conftest.$ac_ext <<_ACEOF
11253 #line $LINENO "configure"
11254 /* confdefs.h.  */
11255 _ACEOF
11256 cat confdefs.h >>conftest.$ac_ext
11257 cat >>conftest.$ac_ext <<_ACEOF
11258 /* end confdefs.h.  */
11259 $ac_includes_default
11260 int
11261 main ()
11262 {
11263 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
11264 test_array [0] = 0
11265
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 rm -f conftest.$ac_objext
11271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11272   (eval $ac_compile) 2>&5
11273   ac_status=$?
11274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275   (exit $ac_status); } &&
11276          { ac_try='test -s conftest.$ac_objext'
11277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278   (eval $ac_try) 2>&5
11279   ac_status=$?
11280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281   (exit $ac_status); }; }; then
11282   ac_lo=0 ac_mid=0
11283   while :; do
11284     cat >conftest.$ac_ext <<_ACEOF
11285 #line $LINENO "configure"
11286 /* confdefs.h.  */
11287 _ACEOF
11288 cat confdefs.h >>conftest.$ac_ext
11289 cat >>conftest.$ac_ext <<_ACEOF
11290 /* end confdefs.h.  */
11291 $ac_includes_default
11292 int
11293 main ()
11294 {
11295 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
11296 test_array [0] = 0
11297
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>&5
11305   ac_status=$?
11306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11307   (exit $ac_status); } &&
11308          { ac_try='test -s conftest.$ac_objext'
11309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11313   (exit $ac_status); }; }; then
11314   ac_hi=$ac_mid; break
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 sed 's/^/| /' conftest.$ac_ext >&5
11318
11319 ac_lo=`expr $ac_mid + 1`
11320                     if test $ac_lo -le $ac_mid; then
11321                       ac_lo= ac_hi=
11322                       break
11323                     fi
11324                     ac_mid=`expr 2 '*' $ac_mid + 1`
11325 fi
11326 rm -f conftest.$ac_objext conftest.$ac_ext
11327   done
11328 else
11329   echo "$as_me: failed program was:" >&5
11330 sed 's/^/| /' conftest.$ac_ext >&5
11331
11332 cat >conftest.$ac_ext <<_ACEOF
11333 #line $LINENO "configure"
11334 /* confdefs.h.  */
11335 _ACEOF
11336 cat confdefs.h >>conftest.$ac_ext
11337 cat >>conftest.$ac_ext <<_ACEOF
11338 /* end confdefs.h.  */
11339 $ac_includes_default
11340 int
11341 main ()
11342 {
11343 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
11344 test_array [0] = 0
11345
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 rm -f conftest.$ac_objext
11351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11352   (eval $ac_compile) 2>&5
11353   ac_status=$?
11354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355   (exit $ac_status); } &&
11356          { ac_try='test -s conftest.$ac_objext'
11357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11358   (eval $ac_try) 2>&5
11359   ac_status=$?
11360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361   (exit $ac_status); }; }; then
11362   ac_hi=-1 ac_mid=-1
11363   while :; do
11364     cat >conftest.$ac_ext <<_ACEOF
11365 #line $LINENO "configure"
11366 /* confdefs.h.  */
11367 _ACEOF
11368 cat confdefs.h >>conftest.$ac_ext
11369 cat >>conftest.$ac_ext <<_ACEOF
11370 /* end confdefs.h.  */
11371 $ac_includes_default
11372 int
11373 main ()
11374 {
11375 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
11376 test_array [0] = 0
11377
11378   ;
11379   return 0;
11380 }
11381 _ACEOF
11382 rm -f conftest.$ac_objext
11383 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11384   (eval $ac_compile) 2>&5
11385   ac_status=$?
11386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387   (exit $ac_status); } &&
11388          { ac_try='test -s conftest.$ac_objext'
11389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11390   (eval $ac_try) 2>&5
11391   ac_status=$?
11392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11393   (exit $ac_status); }; }; then
11394   ac_lo=$ac_mid; break
11395 else
11396   echo "$as_me: failed program was:" >&5
11397 sed 's/^/| /' conftest.$ac_ext >&5
11398
11399 ac_hi=`expr '(' $ac_mid ')' - 1`
11400                        if test $ac_mid -le $ac_hi; then
11401                          ac_lo= ac_hi=
11402                          break
11403                        fi
11404                        ac_mid=`expr 2 '*' $ac_mid`
11405 fi
11406 rm -f conftest.$ac_objext conftest.$ac_ext
11407   done
11408 else
11409   echo "$as_me: failed program was:" >&5
11410 sed 's/^/| /' conftest.$ac_ext >&5
11411
11412 ac_lo= ac_hi=
11413 fi
11414 rm -f conftest.$ac_objext conftest.$ac_ext
11415 fi
11416 rm -f conftest.$ac_objext conftest.$ac_ext
11417 # Binary search between lo and hi bounds.
11418 while test "x$ac_lo" != "x$ac_hi"; do
11419   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11420   cat >conftest.$ac_ext <<_ACEOF
11421 #line $LINENO "configure"
11422 /* confdefs.h.  */
11423 _ACEOF
11424 cat confdefs.h >>conftest.$ac_ext
11425 cat >>conftest.$ac_ext <<_ACEOF
11426 /* end confdefs.h.  */
11427 $ac_includes_default
11428 int
11429 main ()
11430 {
11431 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
11432 test_array [0] = 0
11433
11434   ;
11435   return 0;
11436 }
11437 _ACEOF
11438 rm -f conftest.$ac_objext
11439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11440   (eval $ac_compile) 2>&5
11441   ac_status=$?
11442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443   (exit $ac_status); } &&
11444          { ac_try='test -s conftest.$ac_objext'
11445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11446   (eval $ac_try) 2>&5
11447   ac_status=$?
11448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11449   (exit $ac_status); }; }; then
11450   ac_hi=$ac_mid
11451 else
11452   echo "$as_me: failed program was:" >&5
11453 sed 's/^/| /' conftest.$ac_ext >&5
11454
11455 ac_lo=`expr '(' $ac_mid ')' + 1`
11456 fi
11457 rm -f conftest.$ac_objext conftest.$ac_ext
11458 done
11459 case $ac_lo in
11460 ?*) ac_cv_sizeof_short=$ac_lo;;
11461 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
11462 See \`config.log' for more details." >&5
11463 echo "$as_me: error: cannot compute sizeof (short), 77
11464 See \`config.log' for more details." >&2;}
11465    { (exit 1); exit 1; }; } ;;
11466 esac
11467 else
11468   if test "$cross_compiling" = yes; then
11469   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11470 See \`config.log' for more details." >&5
11471 echo "$as_me: error: cannot run test program while cross compiling
11472 See \`config.log' for more details." >&2;}
11473    { (exit 1); exit 1; }; }
11474 else
11475   cat >conftest.$ac_ext <<_ACEOF
11476 #line $LINENO "configure"
11477 /* confdefs.h.  */
11478 _ACEOF
11479 cat confdefs.h >>conftest.$ac_ext
11480 cat >>conftest.$ac_ext <<_ACEOF
11481 /* end confdefs.h.  */
11482 $ac_includes_default
11483 long longval () { return (long) (sizeof (short)); }
11484 unsigned long ulongval () { return (long) (sizeof (short)); }
11485 #include <stdio.h>
11486 #include <stdlib.h>
11487 int
11488 main ()
11489 {
11490
11491   FILE *f = fopen ("conftest.val", "w");
11492   if (! f)
11493     exit (1);
11494   if (((long) (sizeof (short))) < 0)
11495     {
11496       long i = longval ();
11497       if (i != ((long) (sizeof (short))))
11498         exit (1);
11499       fprintf (f, "%ld\n", i);
11500     }
11501   else
11502     {
11503       unsigned long i = ulongval ();
11504       if (i != ((long) (sizeof (short))))
11505         exit (1);
11506       fprintf (f, "%lu\n", i);
11507     }
11508   exit (ferror (f) || fclose (f) != 0);
11509
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f conftest$ac_exeext
11515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11516   (eval $ac_link) 2>&5
11517   ac_status=$?
11518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11519   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11521   (eval $ac_try) 2>&5
11522   ac_status=$?
11523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524   (exit $ac_status); }; }; then
11525   ac_cv_sizeof_short=`cat conftest.val`
11526 else
11527   echo "$as_me: program exited with status $ac_status" >&5
11528 echo "$as_me: failed program was:" >&5
11529 sed 's/^/| /' conftest.$ac_ext >&5
11530
11531 ( exit $ac_status )
11532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
11533 See \`config.log' for more details." >&5
11534 echo "$as_me: error: cannot compute sizeof (short), 77
11535 See \`config.log' for more details." >&2;}
11536    { (exit 1); exit 1; }; }
11537 fi
11538 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11539 fi
11540 fi
11541 rm -f conftest.val
11542 else
11543   ac_cv_sizeof_short=0
11544 fi
11545 fi
11546 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
11547 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
11548 cat >>confdefs.h <<_ACEOF
11549 #define SIZEOF_SHORT $ac_cv_sizeof_short
11550 _ACEOF
11551
11552
11553 echo "$as_me:$LINENO: checking for int" >&5
11554 echo $ECHO_N "checking for int... $ECHO_C" >&6
11555 if test "${ac_cv_type_int+set}" = set; then
11556   echo $ECHO_N "(cached) $ECHO_C" >&6
11557 else
11558   cat >conftest.$ac_ext <<_ACEOF
11559 #line $LINENO "configure"
11560 /* confdefs.h.  */
11561 _ACEOF
11562 cat confdefs.h >>conftest.$ac_ext
11563 cat >>conftest.$ac_ext <<_ACEOF
11564 /* end confdefs.h.  */
11565 $ac_includes_default
11566 int
11567 main ()
11568 {
11569 if ((int *) 0)
11570   return 0;
11571 if (sizeof (int))
11572   return 0;
11573   ;
11574   return 0;
11575 }
11576 _ACEOF
11577 rm -f conftest.$ac_objext
11578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11579   (eval $ac_compile) 2>&5
11580   ac_status=$?
11581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582   (exit $ac_status); } &&
11583          { ac_try='test -s conftest.$ac_objext'
11584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11585   (eval $ac_try) 2>&5
11586   ac_status=$?
11587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588   (exit $ac_status); }; }; then
11589   ac_cv_type_int=yes
11590 else
11591   echo "$as_me: failed program was:" >&5
11592 sed 's/^/| /' conftest.$ac_ext >&5
11593
11594 ac_cv_type_int=no
11595 fi
11596 rm -f conftest.$ac_objext conftest.$ac_ext
11597 fi
11598 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
11599 echo "${ECHO_T}$ac_cv_type_int" >&6
11600
11601 echo "$as_me:$LINENO: checking size of int" >&5
11602 echo $ECHO_N "checking size of int... $ECHO_C" >&6
11603 if test "${ac_cv_sizeof_int+set}" = set; then
11604   echo $ECHO_N "(cached) $ECHO_C" >&6
11605 else
11606   if test "$ac_cv_type_int" = yes; then
11607   # The cast to unsigned long works around a bug in the HP C Compiler
11608   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11609   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11610   # This bug is HP SR number 8606223364.
11611   if test "$cross_compiling" = yes; then
11612   # Depending upon the size, compute the lo and hi bounds.
11613 cat >conftest.$ac_ext <<_ACEOF
11614 #line $LINENO "configure"
11615 /* confdefs.h.  */
11616 _ACEOF
11617 cat confdefs.h >>conftest.$ac_ext
11618 cat >>conftest.$ac_ext <<_ACEOF
11619 /* end confdefs.h.  */
11620 $ac_includes_default
11621 int
11622 main ()
11623 {
11624 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
11625 test_array [0] = 0
11626
11627   ;
11628   return 0;
11629 }
11630 _ACEOF
11631 rm -f conftest.$ac_objext
11632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11633   (eval $ac_compile) 2>&5
11634   ac_status=$?
11635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11636   (exit $ac_status); } &&
11637          { ac_try='test -s conftest.$ac_objext'
11638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11639   (eval $ac_try) 2>&5
11640   ac_status=$?
11641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11642   (exit $ac_status); }; }; then
11643   ac_lo=0 ac_mid=0
11644   while :; do
11645     cat >conftest.$ac_ext <<_ACEOF
11646 #line $LINENO "configure"
11647 /* confdefs.h.  */
11648 _ACEOF
11649 cat confdefs.h >>conftest.$ac_ext
11650 cat >>conftest.$ac_ext <<_ACEOF
11651 /* end confdefs.h.  */
11652 $ac_includes_default
11653 int
11654 main ()
11655 {
11656 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
11657 test_array [0] = 0
11658
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext
11664 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11665   (eval $ac_compile) 2>&5
11666   ac_status=$?
11667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668   (exit $ac_status); } &&
11669          { ac_try='test -s conftest.$ac_objext'
11670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11671   (eval $ac_try) 2>&5
11672   ac_status=$?
11673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11674   (exit $ac_status); }; }; then
11675   ac_hi=$ac_mid; break
11676 else
11677   echo "$as_me: failed program was:" >&5
11678 sed 's/^/| /' conftest.$ac_ext >&5
11679
11680 ac_lo=`expr $ac_mid + 1`
11681                     if test $ac_lo -le $ac_mid; then
11682                       ac_lo= ac_hi=
11683                       break
11684                     fi
11685                     ac_mid=`expr 2 '*' $ac_mid + 1`
11686 fi
11687 rm -f conftest.$ac_objext conftest.$ac_ext
11688   done
11689 else
11690   echo "$as_me: failed program was:" >&5
11691 sed 's/^/| /' conftest.$ac_ext >&5
11692
11693 cat >conftest.$ac_ext <<_ACEOF
11694 #line $LINENO "configure"
11695 /* confdefs.h.  */
11696 _ACEOF
11697 cat confdefs.h >>conftest.$ac_ext
11698 cat >>conftest.$ac_ext <<_ACEOF
11699 /* end confdefs.h.  */
11700 $ac_includes_default
11701 int
11702 main ()
11703 {
11704 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
11705 test_array [0] = 0
11706
11707   ;
11708   return 0;
11709 }
11710 _ACEOF
11711 rm -f conftest.$ac_objext
11712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11713   (eval $ac_compile) 2>&5
11714   ac_status=$?
11715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716   (exit $ac_status); } &&
11717          { ac_try='test -s conftest.$ac_objext'
11718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11719   (eval $ac_try) 2>&5
11720   ac_status=$?
11721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722   (exit $ac_status); }; }; then
11723   ac_hi=-1 ac_mid=-1
11724   while :; do
11725     cat >conftest.$ac_ext <<_ACEOF
11726 #line $LINENO "configure"
11727 /* confdefs.h.  */
11728 _ACEOF
11729 cat confdefs.h >>conftest.$ac_ext
11730 cat >>conftest.$ac_ext <<_ACEOF
11731 /* end confdefs.h.  */
11732 $ac_includes_default
11733 int
11734 main ()
11735 {
11736 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
11737 test_array [0] = 0
11738
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext
11744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11745   (eval $ac_compile) 2>&5
11746   ac_status=$?
11747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -s conftest.$ac_objext'
11750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   ac_lo=$ac_mid; break
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 sed 's/^/| /' conftest.$ac_ext >&5
11759
11760 ac_hi=`expr '(' $ac_mid ')' - 1`
11761                        if test $ac_mid -le $ac_hi; then
11762                          ac_lo= ac_hi=
11763                          break
11764                        fi
11765                        ac_mid=`expr 2 '*' $ac_mid`
11766 fi
11767 rm -f conftest.$ac_objext conftest.$ac_ext
11768   done
11769 else
11770   echo "$as_me: failed program was:" >&5
11771 sed 's/^/| /' conftest.$ac_ext >&5
11772
11773 ac_lo= ac_hi=
11774 fi
11775 rm -f conftest.$ac_objext conftest.$ac_ext
11776 fi
11777 rm -f conftest.$ac_objext conftest.$ac_ext
11778 # Binary search between lo and hi bounds.
11779 while test "x$ac_lo" != "x$ac_hi"; do
11780   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11781   cat >conftest.$ac_ext <<_ACEOF
11782 #line $LINENO "configure"
11783 /* confdefs.h.  */
11784 _ACEOF
11785 cat confdefs.h >>conftest.$ac_ext
11786 cat >>conftest.$ac_ext <<_ACEOF
11787 /* end confdefs.h.  */
11788 $ac_includes_default
11789 int
11790 main ()
11791 {
11792 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
11793 test_array [0] = 0
11794
11795   ;
11796   return 0;
11797 }
11798 _ACEOF
11799 rm -f conftest.$ac_objext
11800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11801   (eval $ac_compile) 2>&5
11802   ac_status=$?
11803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804   (exit $ac_status); } &&
11805          { ac_try='test -s conftest.$ac_objext'
11806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11807   (eval $ac_try) 2>&5
11808   ac_status=$?
11809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810   (exit $ac_status); }; }; then
11811   ac_hi=$ac_mid
11812 else
11813   echo "$as_me: failed program was:" >&5
11814 sed 's/^/| /' conftest.$ac_ext >&5
11815
11816 ac_lo=`expr '(' $ac_mid ')' + 1`
11817 fi
11818 rm -f conftest.$ac_objext conftest.$ac_ext
11819 done
11820 case $ac_lo in
11821 ?*) ac_cv_sizeof_int=$ac_lo;;
11822 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11823 See \`config.log' for more details." >&5
11824 echo "$as_me: error: cannot compute sizeof (int), 77
11825 See \`config.log' for more details." >&2;}
11826    { (exit 1); exit 1; }; } ;;
11827 esac
11828 else
11829   if test "$cross_compiling" = yes; then
11830   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11831 See \`config.log' for more details." >&5
11832 echo "$as_me: error: cannot run test program while cross compiling
11833 See \`config.log' for more details." >&2;}
11834    { (exit 1); exit 1; }; }
11835 else
11836   cat >conftest.$ac_ext <<_ACEOF
11837 #line $LINENO "configure"
11838 /* confdefs.h.  */
11839 _ACEOF
11840 cat confdefs.h >>conftest.$ac_ext
11841 cat >>conftest.$ac_ext <<_ACEOF
11842 /* end confdefs.h.  */
11843 $ac_includes_default
11844 long longval () { return (long) (sizeof (int)); }
11845 unsigned long ulongval () { return (long) (sizeof (int)); }
11846 #include <stdio.h>
11847 #include <stdlib.h>
11848 int
11849 main ()
11850 {
11851
11852   FILE *f = fopen ("conftest.val", "w");
11853   if (! f)
11854     exit (1);
11855   if (((long) (sizeof (int))) < 0)
11856     {
11857       long i = longval ();
11858       if (i != ((long) (sizeof (int))))
11859         exit (1);
11860       fprintf (f, "%ld\n", i);
11861     }
11862   else
11863     {
11864       unsigned long i = ulongval ();
11865       if (i != ((long) (sizeof (int))))
11866         exit (1);
11867       fprintf (f, "%lu\n", i);
11868     }
11869   exit (ferror (f) || fclose (f) != 0);
11870
11871   ;
11872   return 0;
11873 }
11874 _ACEOF
11875 rm -f conftest$ac_exeext
11876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11877   (eval $ac_link) 2>&5
11878   ac_status=$?
11879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_sizeof_int=`cat conftest.val`
11887 else
11888   echo "$as_me: program exited with status $ac_status" >&5
11889 echo "$as_me: failed program was:" >&5
11890 sed 's/^/| /' conftest.$ac_ext >&5
11891
11892 ( exit $ac_status )
11893 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11894 See \`config.log' for more details." >&5
11895 echo "$as_me: error: cannot compute sizeof (int), 77
11896 See \`config.log' for more details." >&2;}
11897    { (exit 1); exit 1; }; }
11898 fi
11899 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11900 fi
11901 fi
11902 rm -f conftest.val
11903 else
11904   ac_cv_sizeof_int=0
11905 fi
11906 fi
11907 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
11908 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
11909 cat >>confdefs.h <<_ACEOF
11910 #define SIZEOF_INT $ac_cv_sizeof_int
11911 _ACEOF
11912
11913
11914 echo "$as_me:$LINENO: checking for long" >&5
11915 echo $ECHO_N "checking for long... $ECHO_C" >&6
11916 if test "${ac_cv_type_long+set}" = set; then
11917   echo $ECHO_N "(cached) $ECHO_C" >&6
11918 else
11919   cat >conftest.$ac_ext <<_ACEOF
11920 #line $LINENO "configure"
11921 /* confdefs.h.  */
11922 _ACEOF
11923 cat confdefs.h >>conftest.$ac_ext
11924 cat >>conftest.$ac_ext <<_ACEOF
11925 /* end confdefs.h.  */
11926 $ac_includes_default
11927 int
11928 main ()
11929 {
11930 if ((long *) 0)
11931   return 0;
11932 if (sizeof (long))
11933   return 0;
11934   ;
11935   return 0;
11936 }
11937 _ACEOF
11938 rm -f conftest.$ac_objext
11939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11940   (eval $ac_compile) 2>&5
11941   ac_status=$?
11942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11943   (exit $ac_status); } &&
11944          { ac_try='test -s conftest.$ac_objext'
11945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11946   (eval $ac_try) 2>&5
11947   ac_status=$?
11948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11949   (exit $ac_status); }; }; then
11950   ac_cv_type_long=yes
11951 else
11952   echo "$as_me: failed program was:" >&5
11953 sed 's/^/| /' conftest.$ac_ext >&5
11954
11955 ac_cv_type_long=no
11956 fi
11957 rm -f conftest.$ac_objext conftest.$ac_ext
11958 fi
11959 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
11960 echo "${ECHO_T}$ac_cv_type_long" >&6
11961
11962 echo "$as_me:$LINENO: checking size of long" >&5
11963 echo $ECHO_N "checking size of long... $ECHO_C" >&6
11964 if test "${ac_cv_sizeof_long+set}" = set; then
11965   echo $ECHO_N "(cached) $ECHO_C" >&6
11966 else
11967   if test "$ac_cv_type_long" = yes; then
11968   # The cast to unsigned long works around a bug in the HP C Compiler
11969   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11970   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11971   # This bug is HP SR number 8606223364.
11972   if test "$cross_compiling" = yes; then
11973   # Depending upon the size, compute the lo and hi bounds.
11974 cat >conftest.$ac_ext <<_ACEOF
11975 #line $LINENO "configure"
11976 /* confdefs.h.  */
11977 _ACEOF
11978 cat confdefs.h >>conftest.$ac_ext
11979 cat >>conftest.$ac_ext <<_ACEOF
11980 /* end confdefs.h.  */
11981 $ac_includes_default
11982 int
11983 main ()
11984 {
11985 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
11986 test_array [0] = 0
11987
11988   ;
11989   return 0;
11990 }
11991 _ACEOF
11992 rm -f conftest.$ac_objext
11993 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11994   (eval $ac_compile) 2>&5
11995   ac_status=$?
11996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11997   (exit $ac_status); } &&
11998          { ac_try='test -s conftest.$ac_objext'
11999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12000   (eval $ac_try) 2>&5
12001   ac_status=$?
12002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003   (exit $ac_status); }; }; then
12004   ac_lo=0 ac_mid=0
12005   while :; do
12006     cat >conftest.$ac_ext <<_ACEOF
12007 #line $LINENO "configure"
12008 /* confdefs.h.  */
12009 _ACEOF
12010 cat confdefs.h >>conftest.$ac_ext
12011 cat >>conftest.$ac_ext <<_ACEOF
12012 /* end confdefs.h.  */
12013 $ac_includes_default
12014 int
12015 main ()
12016 {
12017 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
12018 test_array [0] = 0
12019
12020   ;
12021   return 0;
12022 }
12023 _ACEOF
12024 rm -f conftest.$ac_objext
12025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12026   (eval $ac_compile) 2>&5
12027   ac_status=$?
12028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029   (exit $ac_status); } &&
12030          { ac_try='test -s conftest.$ac_objext'
12031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12032   (eval $ac_try) 2>&5
12033   ac_status=$?
12034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12035   (exit $ac_status); }; }; then
12036   ac_hi=$ac_mid; break
12037 else
12038   echo "$as_me: failed program was:" >&5
12039 sed 's/^/| /' conftest.$ac_ext >&5
12040
12041 ac_lo=`expr $ac_mid + 1`
12042                     if test $ac_lo -le $ac_mid; then
12043                       ac_lo= ac_hi=
12044                       break
12045                     fi
12046                     ac_mid=`expr 2 '*' $ac_mid + 1`
12047 fi
12048 rm -f conftest.$ac_objext conftest.$ac_ext
12049   done
12050 else
12051   echo "$as_me: failed program was:" >&5
12052 sed 's/^/| /' conftest.$ac_ext >&5
12053
12054 cat >conftest.$ac_ext <<_ACEOF
12055 #line $LINENO "configure"
12056 /* confdefs.h.  */
12057 _ACEOF
12058 cat confdefs.h >>conftest.$ac_ext
12059 cat >>conftest.$ac_ext <<_ACEOF
12060 /* end confdefs.h.  */
12061 $ac_includes_default
12062 int
12063 main ()
12064 {
12065 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
12066 test_array [0] = 0
12067
12068   ;
12069   return 0;
12070 }
12071 _ACEOF
12072 rm -f conftest.$ac_objext
12073 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12074   (eval $ac_compile) 2>&5
12075   ac_status=$?
12076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12077   (exit $ac_status); } &&
12078          { ac_try='test -s conftest.$ac_objext'
12079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12080   (eval $ac_try) 2>&5
12081   ac_status=$?
12082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083   (exit $ac_status); }; }; then
12084   ac_hi=-1 ac_mid=-1
12085   while :; do
12086     cat >conftest.$ac_ext <<_ACEOF
12087 #line $LINENO "configure"
12088 /* confdefs.h.  */
12089 _ACEOF
12090 cat confdefs.h >>conftest.$ac_ext
12091 cat >>conftest.$ac_ext <<_ACEOF
12092 /* end confdefs.h.  */
12093 $ac_includes_default
12094 int
12095 main ()
12096 {
12097 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
12098 test_array [0] = 0
12099
12100   ;
12101   return 0;
12102 }
12103 _ACEOF
12104 rm -f conftest.$ac_objext
12105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12106   (eval $ac_compile) 2>&5
12107   ac_status=$?
12108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109   (exit $ac_status); } &&
12110          { ac_try='test -s conftest.$ac_objext'
12111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112   (eval $ac_try) 2>&5
12113   ac_status=$?
12114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115   (exit $ac_status); }; }; then
12116   ac_lo=$ac_mid; break
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 ac_hi=`expr '(' $ac_mid ')' - 1`
12122                        if test $ac_mid -le $ac_hi; then
12123                          ac_lo= ac_hi=
12124                          break
12125                        fi
12126                        ac_mid=`expr 2 '*' $ac_mid`
12127 fi
12128 rm -f conftest.$ac_objext conftest.$ac_ext
12129   done
12130 else
12131   echo "$as_me: failed program was:" >&5
12132 sed 's/^/| /' conftest.$ac_ext >&5
12133
12134 ac_lo= ac_hi=
12135 fi
12136 rm -f conftest.$ac_objext conftest.$ac_ext
12137 fi
12138 rm -f conftest.$ac_objext conftest.$ac_ext
12139 # Binary search between lo and hi bounds.
12140 while test "x$ac_lo" != "x$ac_hi"; do
12141   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12142   cat >conftest.$ac_ext <<_ACEOF
12143 #line $LINENO "configure"
12144 /* confdefs.h.  */
12145 _ACEOF
12146 cat confdefs.h >>conftest.$ac_ext
12147 cat >>conftest.$ac_ext <<_ACEOF
12148 /* end confdefs.h.  */
12149 $ac_includes_default
12150 int
12151 main ()
12152 {
12153 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
12154 test_array [0] = 0
12155
12156   ;
12157   return 0;
12158 }
12159 _ACEOF
12160 rm -f conftest.$ac_objext
12161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12162   (eval $ac_compile) 2>&5
12163   ac_status=$?
12164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12165   (exit $ac_status); } &&
12166          { ac_try='test -s conftest.$ac_objext'
12167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12168   (eval $ac_try) 2>&5
12169   ac_status=$?
12170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12171   (exit $ac_status); }; }; then
12172   ac_hi=$ac_mid
12173 else
12174   echo "$as_me: failed program was:" >&5
12175 sed 's/^/| /' conftest.$ac_ext >&5
12176
12177 ac_lo=`expr '(' $ac_mid ')' + 1`
12178 fi
12179 rm -f conftest.$ac_objext conftest.$ac_ext
12180 done
12181 case $ac_lo in
12182 ?*) ac_cv_sizeof_long=$ac_lo;;
12183 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
12184 See \`config.log' for more details." >&5
12185 echo "$as_me: error: cannot compute sizeof (long), 77
12186 See \`config.log' for more details." >&2;}
12187    { (exit 1); exit 1; }; } ;;
12188 esac
12189 else
12190   if test "$cross_compiling" = yes; then
12191   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12192 See \`config.log' for more details." >&5
12193 echo "$as_me: error: cannot run test program while cross compiling
12194 See \`config.log' for more details." >&2;}
12195    { (exit 1); exit 1; }; }
12196 else
12197   cat >conftest.$ac_ext <<_ACEOF
12198 #line $LINENO "configure"
12199 /* confdefs.h.  */
12200 _ACEOF
12201 cat confdefs.h >>conftest.$ac_ext
12202 cat >>conftest.$ac_ext <<_ACEOF
12203 /* end confdefs.h.  */
12204 $ac_includes_default
12205 long longval () { return (long) (sizeof (long)); }
12206 unsigned long ulongval () { return (long) (sizeof (long)); }
12207 #include <stdio.h>
12208 #include <stdlib.h>
12209 int
12210 main ()
12211 {
12212
12213   FILE *f = fopen ("conftest.val", "w");
12214   if (! f)
12215     exit (1);
12216   if (((long) (sizeof (long))) < 0)
12217     {
12218       long i = longval ();
12219       if (i != ((long) (sizeof (long))))
12220         exit (1);
12221       fprintf (f, "%ld\n", i);
12222     }
12223   else
12224     {
12225       unsigned long i = ulongval ();
12226       if (i != ((long) (sizeof (long))))
12227         exit (1);
12228       fprintf (f, "%lu\n", i);
12229     }
12230   exit (ferror (f) || fclose (f) != 0);
12231
12232   ;
12233   return 0;
12234 }
12235 _ACEOF
12236 rm -f conftest$ac_exeext
12237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12238   (eval $ac_link) 2>&5
12239   ac_status=$?
12240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246   (exit $ac_status); }; }; then
12247   ac_cv_sizeof_long=`cat conftest.val`
12248 else
12249   echo "$as_me: program exited with status $ac_status" >&5
12250 echo "$as_me: failed program was:" >&5
12251 sed 's/^/| /' conftest.$ac_ext >&5
12252
12253 ( exit $ac_status )
12254 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
12255 See \`config.log' for more details." >&5
12256 echo "$as_me: error: cannot compute sizeof (long), 77
12257 See \`config.log' for more details." >&2;}
12258    { (exit 1); exit 1; }; }
12259 fi
12260 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12261 fi
12262 fi
12263 rm -f conftest.val
12264 else
12265   ac_cv_sizeof_long=0
12266 fi
12267 fi
12268 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
12269 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
12270 cat >>confdefs.h <<_ACEOF
12271 #define SIZEOF_LONG $ac_cv_sizeof_long
12272 _ACEOF
12273
12274
12275 echo "$as_me:$LINENO: checking for long long" >&5
12276 echo $ECHO_N "checking for long long... $ECHO_C" >&6
12277 if test "${ac_cv_type_long_long+set}" = set; then
12278   echo $ECHO_N "(cached) $ECHO_C" >&6
12279 else
12280   cat >conftest.$ac_ext <<_ACEOF
12281 #line $LINENO "configure"
12282 /* confdefs.h.  */
12283 _ACEOF
12284 cat confdefs.h >>conftest.$ac_ext
12285 cat >>conftest.$ac_ext <<_ACEOF
12286 /* end confdefs.h.  */
12287 $ac_includes_default
12288 int
12289 main ()
12290 {
12291 if ((long long *) 0)
12292   return 0;
12293 if (sizeof (long long))
12294   return 0;
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 rm -f conftest.$ac_objext
12300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12301   (eval $ac_compile) 2>&5
12302   ac_status=$?
12303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304   (exit $ac_status); } &&
12305          { ac_try='test -s conftest.$ac_objext'
12306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12307   (eval $ac_try) 2>&5
12308   ac_status=$?
12309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310   (exit $ac_status); }; }; then
12311   ac_cv_type_long_long=yes
12312 else
12313   echo "$as_me: failed program was:" >&5
12314 sed 's/^/| /' conftest.$ac_ext >&5
12315
12316 ac_cv_type_long_long=no
12317 fi
12318 rm -f conftest.$ac_objext conftest.$ac_ext
12319 fi
12320 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
12321 echo "${ECHO_T}$ac_cv_type_long_long" >&6
12322
12323 echo "$as_me:$LINENO: checking size of long long" >&5
12324 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
12325 if test "${ac_cv_sizeof_long_long+set}" = set; then
12326   echo $ECHO_N "(cached) $ECHO_C" >&6
12327 else
12328   if test "$ac_cv_type_long_long" = yes; then
12329   # The cast to unsigned long works around a bug in the HP C Compiler
12330   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12331   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12332   # This bug is HP SR number 8606223364.
12333   if test "$cross_compiling" = yes; then
12334   # Depending upon the size, compute the lo and hi bounds.
12335 cat >conftest.$ac_ext <<_ACEOF
12336 #line $LINENO "configure"
12337 /* confdefs.h.  */
12338 _ACEOF
12339 cat confdefs.h >>conftest.$ac_ext
12340 cat >>conftest.$ac_ext <<_ACEOF
12341 /* end confdefs.h.  */
12342 $ac_includes_default
12343 int
12344 main ()
12345 {
12346 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
12347 test_array [0] = 0
12348
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext
12354 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12355   (eval $ac_compile) 2>&5
12356   ac_status=$?
12357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -s conftest.$ac_objext'
12360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12361   (eval $ac_try) 2>&5
12362   ac_status=$?
12363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12364   (exit $ac_status); }; }; then
12365   ac_lo=0 ac_mid=0
12366   while :; do
12367     cat >conftest.$ac_ext <<_ACEOF
12368 #line $LINENO "configure"
12369 /* confdefs.h.  */
12370 _ACEOF
12371 cat confdefs.h >>conftest.$ac_ext
12372 cat >>conftest.$ac_ext <<_ACEOF
12373 /* end confdefs.h.  */
12374 $ac_includes_default
12375 int
12376 main ()
12377 {
12378 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
12379 test_array [0] = 0
12380
12381   ;
12382   return 0;
12383 }
12384 _ACEOF
12385 rm -f conftest.$ac_objext
12386 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12387   (eval $ac_compile) 2>&5
12388   ac_status=$?
12389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12390   (exit $ac_status); } &&
12391          { ac_try='test -s conftest.$ac_objext'
12392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12393   (eval $ac_try) 2>&5
12394   ac_status=$?
12395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12396   (exit $ac_status); }; }; then
12397   ac_hi=$ac_mid; break
12398 else
12399   echo "$as_me: failed program was:" >&5
12400 sed 's/^/| /' conftest.$ac_ext >&5
12401
12402 ac_lo=`expr $ac_mid + 1`
12403                     if test $ac_lo -le $ac_mid; then
12404                       ac_lo= ac_hi=
12405                       break
12406                     fi
12407                     ac_mid=`expr 2 '*' $ac_mid + 1`
12408 fi
12409 rm -f conftest.$ac_objext conftest.$ac_ext
12410   done
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 sed 's/^/| /' conftest.$ac_ext >&5
12414
12415 cat >conftest.$ac_ext <<_ACEOF
12416 #line $LINENO "configure"
12417 /* confdefs.h.  */
12418 _ACEOF
12419 cat confdefs.h >>conftest.$ac_ext
12420 cat >>conftest.$ac_ext <<_ACEOF
12421 /* end confdefs.h.  */
12422 $ac_includes_default
12423 int
12424 main ()
12425 {
12426 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
12427 test_array [0] = 0
12428
12429   ;
12430   return 0;
12431 }
12432 _ACEOF
12433 rm -f conftest.$ac_objext
12434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12435   (eval $ac_compile) 2>&5
12436   ac_status=$?
12437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438   (exit $ac_status); } &&
12439          { ac_try='test -s conftest.$ac_objext'
12440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12441   (eval $ac_try) 2>&5
12442   ac_status=$?
12443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444   (exit $ac_status); }; }; then
12445   ac_hi=-1 ac_mid=-1
12446   while :; do
12447     cat >conftest.$ac_ext <<_ACEOF
12448 #line $LINENO "configure"
12449 /* confdefs.h.  */
12450 _ACEOF
12451 cat confdefs.h >>conftest.$ac_ext
12452 cat >>conftest.$ac_ext <<_ACEOF
12453 /* end confdefs.h.  */
12454 $ac_includes_default
12455 int
12456 main ()
12457 {
12458 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
12459 test_array [0] = 0
12460
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -f conftest.$ac_objext
12466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12467   (eval $ac_compile) 2>&5
12468   ac_status=$?
12469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470   (exit $ac_status); } &&
12471          { ac_try='test -s conftest.$ac_objext'
12472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476   (exit $ac_status); }; }; then
12477   ac_lo=$ac_mid; break
12478 else
12479   echo "$as_me: failed program was:" >&5
12480 sed 's/^/| /' conftest.$ac_ext >&5
12481
12482 ac_hi=`expr '(' $ac_mid ')' - 1`
12483                        if test $ac_mid -le $ac_hi; then
12484                          ac_lo= ac_hi=
12485                          break
12486                        fi
12487                        ac_mid=`expr 2 '*' $ac_mid`
12488 fi
12489 rm -f conftest.$ac_objext conftest.$ac_ext
12490   done
12491 else
12492   echo "$as_me: failed program was:" >&5
12493 sed 's/^/| /' conftest.$ac_ext >&5
12494
12495 ac_lo= ac_hi=
12496 fi
12497 rm -f conftest.$ac_objext conftest.$ac_ext
12498 fi
12499 rm -f conftest.$ac_objext conftest.$ac_ext
12500 # Binary search between lo and hi bounds.
12501 while test "x$ac_lo" != "x$ac_hi"; do
12502   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12503   cat >conftest.$ac_ext <<_ACEOF
12504 #line $LINENO "configure"
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 (long long))) <= $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>&5
12524   ac_status=$?
12525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526   (exit $ac_status); } &&
12527          { ac_try='test -s conftest.$ac_objext'
12528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12529   (eval $ac_try) 2>&5
12530   ac_status=$?
12531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12532   (exit $ac_status); }; }; then
12533   ac_hi=$ac_mid
12534 else
12535   echo "$as_me: failed program was:" >&5
12536 sed 's/^/| /' conftest.$ac_ext >&5
12537
12538 ac_lo=`expr '(' $ac_mid ')' + 1`
12539 fi
12540 rm -f conftest.$ac_objext conftest.$ac_ext
12541 done
12542 case $ac_lo in
12543 ?*) ac_cv_sizeof_long_long=$ac_lo;;
12544 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
12545 See \`config.log' for more details." >&5
12546 echo "$as_me: error: cannot compute sizeof (long long), 77
12547 See \`config.log' for more details." >&2;}
12548    { (exit 1); exit 1; }; } ;;
12549 esac
12550 else
12551   if test "$cross_compiling" = yes; then
12552   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12553 See \`config.log' for more details." >&5
12554 echo "$as_me: error: cannot run test program while cross compiling
12555 See \`config.log' for more details." >&2;}
12556    { (exit 1); exit 1; }; }
12557 else
12558   cat >conftest.$ac_ext <<_ACEOF
12559 #line $LINENO "configure"
12560 /* confdefs.h.  */
12561 _ACEOF
12562 cat confdefs.h >>conftest.$ac_ext
12563 cat >>conftest.$ac_ext <<_ACEOF
12564 /* end confdefs.h.  */
12565 $ac_includes_default
12566 long longval () { return (long) (sizeof (long long)); }
12567 unsigned long ulongval () { return (long) (sizeof (long long)); }
12568 #include <stdio.h>
12569 #include <stdlib.h>
12570 int
12571 main ()
12572 {
12573
12574   FILE *f = fopen ("conftest.val", "w");
12575   if (! f)
12576     exit (1);
12577   if (((long) (sizeof (long long))) < 0)
12578     {
12579       long i = longval ();
12580       if (i != ((long) (sizeof (long long))))
12581         exit (1);
12582       fprintf (f, "%ld\n", i);
12583     }
12584   else
12585     {
12586       unsigned long i = ulongval ();
12587       if (i != ((long) (sizeof (long long))))
12588         exit (1);
12589       fprintf (f, "%lu\n", i);
12590     }
12591   exit (ferror (f) || fclose (f) != 0);
12592
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f conftest$ac_exeext
12598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12599   (eval $ac_link) 2>&5
12600   ac_status=$?
12601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12602   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12604   (eval $ac_try) 2>&5
12605   ac_status=$?
12606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12607   (exit $ac_status); }; }; then
12608   ac_cv_sizeof_long_long=`cat conftest.val`
12609 else
12610   echo "$as_me: program exited with status $ac_status" >&5
12611 echo "$as_me: failed program was:" >&5
12612 sed 's/^/| /' conftest.$ac_ext >&5
12613
12614 ( exit $ac_status )
12615 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
12616 See \`config.log' for more details." >&5
12617 echo "$as_me: error: cannot compute sizeof (long long), 77
12618 See \`config.log' for more details." >&2;}
12619    { (exit 1); exit 1; }; }
12620 fi
12621 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12622 fi
12623 fi
12624 rm -f conftest.val
12625 else
12626   ac_cv_sizeof_long_long=0
12627 fi
12628 fi
12629 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
12630 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
12631 cat >>confdefs.h <<_ACEOF
12632 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12633 _ACEOF
12634
12635
12636 else
12637     if $CXX -v 2>&1|grep "mingw" >/dev/null 2>&1; then
12638         ac_cv_sizeof_char=1
12639         ac_cv_sizeof_short=2
12640         ac_cv_sizeof_int=4
12641         ac_cv_sizeof_long=4
12642         ac_cv_sizeof_long_long=4
12643     else
12644         : # FIXME
12645     fi
12646 #echo
12647 fi
12648
12649 type_name()
12650 {
12651     if expr "$ac_cv_sizeof_char" '>=' "$1" >/dev/null; then
12652         echo "char"
12653         exit
12654     fi
12655     if expr "$ac_cv_sizeof_short" '>=' "$1" >/dev/null; then
12656         echo "short"
12657         exit
12658     fi
12659     if expr "$ac_cv_sizeof_int" '>=' "$1" >/dev/null; then
12660         echo "int"
12661         exit
12662     fi
12663     if expr "$ac_cv_sizeof_long" '>=' "$1" >/dev/null; then
12664         echo "long"
12665         exit
12666     fi
12667     if expr "$ac_cv_sizeof_long_long" '>=' "$1" >/dev/null; then
12668         echo "long long"
12669         exit
12670     fi
12671     echo "long long"
12672 }
12673
12674 echo "$as_me:$LINENO: checking type name for byte" >&5
12675 echo $ECHO_N "checking type name for byte... $ECHO_C" >&6
12676 TYPE_BYTE=`type_name 1`
12677 echo "$as_me:$LINENO: result: $TYPE_BYTE" >&5
12678 echo "${ECHO_T}$TYPE_BYTE" >&6
12679 echo "$as_me:$LINENO: checking type name for word" >&5
12680 echo $ECHO_N "checking type name for word... $ECHO_C" >&6
12681 TYPE_WORD=`type_name 2`
12682 echo "$as_me:$LINENO: result: $TYPE_WORD" >&5
12683 echo "${ECHO_T}$TYPE_WORD" >&6
12684 echo "$as_me:$LINENO: checking type name for dword" >&5
12685 echo $ECHO_N "checking type name for dword... $ECHO_C" >&6
12686 TYPE_DWORD=`type_name 4`
12687 echo "$as_me:$LINENO: result: $TYPE_DWORD" >&5
12688 echo "${ECHO_T}$TYPE_DWORD" >&6
12689 cat >>confdefs.h <<_ACEOF
12690 #define TYPE_BYTE $TYPE_BYTE
12691 _ACEOF
12692
12693 cat >>confdefs.h <<_ACEOF
12694 #define TYPE_WORD $TYPE_WORD
12695 _ACEOF
12696
12697 cat >>confdefs.h <<_ACEOF
12698 #define TYPE_DWORD $TYPE_DWORD
12699 _ACEOF
12700
12701
12702 if echo $TYPE_DWORD|grep short >/dev/null; then
12703     A="h"
12704 elif echo $TYPE_DWORD|grep long >/dev/null; then
12705     A="l"
12706 else
12707     A=""
12708 fi
12709
12710 if echo $TYPE_WORD|grep short >/dev/null; then M="h"
12711 elif echo $TYPE_WORD|grep long >/dev/null; then M="l"
12712 else M=""
12713 fi
12714
12715 cat >>confdefs.h <<_ACEOF
12716 #define _A_ "${A}"
12717 _ACEOF
12718
12719 cat >>confdefs.h <<_ACEOF
12720 #define _M_ "${M}"
12721 _ACEOF
12722
12723
12724
12725 # Generating output files
12726 # ===========================================================================
12727
12728                                                                                                                         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"
12729 cat >confcache <<\_ACEOF
12730 # This file is a shell script that caches the results of configure
12731 # tests run on this system so they can be shared between configure
12732 # scripts and configure runs, see configure's option --config-cache.
12733 # It is not useful on other systems.  If it contains results you don't
12734 # want to keep, you may remove or edit it.
12735 #
12736 # config.status only pays attention to the cache file if you give it
12737 # the --recheck option to rerun configure.
12738 #
12739 # `ac_cv_env_foo' variables (set or unset) will be overridden when
12740 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12741 # following values.
12742
12743 _ACEOF
12744
12745 # The following way of writing the cache mishandles newlines in values,
12746 # but we know of no workaround that is simple, portable, and efficient.
12747 # So, don't put newlines in cache variables' values.
12748 # Ultrix sh set writes to stderr and can't be redirected directly,
12749 # and sets the high bit in the cache file unless we assign to the vars.
12750 {
12751   (set) 2>&1 |
12752     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12753     *ac_space=\ *)
12754       # `set' does not quote correctly, so add quotes (double-quote
12755       # substitution turns \\\\ into \\, and sed turns \\ into \).
12756       sed -n \
12757         "s/'/'\\\\''/g;
12758           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12759       ;;
12760     *)
12761       # `set' quotes correctly as required by POSIX, so do not add quotes.
12762       sed -n \
12763         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12764       ;;
12765     esac;
12766 } |
12767   sed '
12768      t clear
12769      : clear
12770      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12771      t end
12772      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12773      : end' >>confcache
12774 if diff $cache_file confcache >/dev/null 2>&1; then :; else
12775   if test -w $cache_file; then
12776     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12777     cat confcache >$cache_file
12778   else
12779     echo "not updating unwritable cache $cache_file"
12780   fi
12781 fi
12782 rm -f confcache
12783
12784 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12785 # Let make expand exec_prefix.
12786 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12787
12788 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12789 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12790 # trailing colons and then remove the whole line if VPATH becomes empty
12791 # (actually we leave an empty line to preserve line numbers).
12792 if test "x$srcdir" = x.; then
12793   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12794 s/:*\$(srcdir):*/:/;
12795 s/:*\${srcdir}:*/:/;
12796 s/:*@srcdir@:*/:/;
12797 s/^\([^=]*=[    ]*\):*/\1/;
12798 s/:*$//;
12799 s/^[^=]*=[      ]*$//;
12800 }'
12801 fi
12802
12803 DEFS=-DHAVE_CONFIG_H
12804
12805 ac_libobjs=
12806 ac_ltlibobjs=
12807 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12808   # 1. Remove the extension, and $U if already installed.
12809   ac_i=`echo "$ac_i" |
12810          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
12811   # 2. Add them.
12812   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
12813   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
12814 done
12815 LIBOBJS=$ac_libobjs
12816
12817 LTLIBOBJS=$ac_ltlibobjs
12818
12819
12820
12821 : ${CONFIG_STATUS=./config.status}
12822 ac_clean_files_save=$ac_clean_files
12823 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12824 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
12825 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12826 cat >$CONFIG_STATUS <<_ACEOF
12827 #! $SHELL
12828 # Generated by $as_me.
12829 # Run this file to recreate the current configuration.
12830 # Compiler output produced by configure, useful for debugging
12831 # configure, is in config.log if it exists.
12832
12833 debug=false
12834 ac_cs_recheck=false
12835 ac_cs_silent=false
12836 SHELL=\${CONFIG_SHELL-$SHELL}
12837 _ACEOF
12838
12839 cat >>$CONFIG_STATUS <<\_ACEOF
12840 ## --------------------- ##
12841 ## M4sh Initialization.  ##
12842 ## --------------------- ##
12843
12844 # Be Bourne compatible
12845 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12846   emulate sh
12847   NULLCMD=:
12848   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
12849   # is contrary to our usage.  Disable this feature.
12850   alias -g '${1+"$@"}'='"$@"'
12851 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12852   set -o posix
12853 fi
12854
12855 # Support unset when possible.
12856 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12857   as_unset=unset
12858 else
12859   as_unset=false
12860 fi
12861
12862
12863 # Work around bugs in pre-3.0 UWIN ksh.
12864 $as_unset ENV MAIL MAILPATH
12865 PS1='$ '
12866 PS2='> '
12867 PS4='+ '
12868
12869 # NLS nuisances.
12870 for as_var in \
12871   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
12872   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
12873   LC_TELEPHONE LC_TIME
12874 do
12875   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
12876     eval $as_var=C; export $as_var
12877   else
12878     $as_unset $as_var
12879   fi
12880 done
12881
12882 # Required to use basename.
12883 if expr a : '\(a\)' >/dev/null 2>&1; then
12884   as_expr=expr
12885 else
12886   as_expr=false
12887 fi
12888
12889 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
12890   as_basename=basename
12891 else
12892   as_basename=false
12893 fi
12894
12895
12896 # Name of the executable.
12897 as_me=`$as_basename "$0" ||
12898 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12899          X"$0" : 'X\(//\)$' \| \
12900          X"$0" : 'X\(/\)$' \| \
12901          .     : '\(.\)' 2>/dev/null ||
12902 echo X/"$0" |
12903     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
12904           /^X\/\(\/\/\)$/{ s//\1/; q; }
12905           /^X\/\(\/\).*/{ s//\1/; q; }
12906           s/.*/./; q'`
12907
12908
12909 # PATH needs CR, and LINENO needs CR and PATH.
12910 # Avoid depending upon Character Ranges.
12911 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12912 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12913 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12914 as_cr_digits='0123456789'
12915 as_cr_alnum=$as_cr_Letters$as_cr_digits
12916
12917 # The user is always right.
12918 if test "${PATH_SEPARATOR+set}" != set; then
12919   echo "#! /bin/sh" >conf$$.sh
12920   echo  "exit 0"   >>conf$$.sh
12921   chmod +x conf$$.sh
12922   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
12923     PATH_SEPARATOR=';'
12924   else
12925     PATH_SEPARATOR=:
12926   fi
12927   rm -f conf$$.sh
12928 fi
12929
12930
12931   as_lineno_1=$LINENO
12932   as_lineno_2=$LINENO
12933   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12934   test "x$as_lineno_1" != "x$as_lineno_2" &&
12935   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
12936   # Find who we are.  Look in the path if we contain no path at all
12937   # relative or not.
12938   case $0 in
12939     *[\\/]* ) as_myself=$0 ;;
12940     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12941 for as_dir in $PATH
12942 do
12943   IFS=$as_save_IFS
12944   test -z "$as_dir" && as_dir=.
12945   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12946 done
12947
12948        ;;
12949   esac
12950   # We did not find ourselves, most probably we were run as `sh COMMAND'
12951   # in which case we are not to be found in the path.
12952   if test "x$as_myself" = x; then
12953     as_myself=$0
12954   fi
12955   if test ! -f "$as_myself"; then
12956     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
12957 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
12958    { (exit 1); exit 1; }; }
12959   fi
12960   case $CONFIG_SHELL in
12961   '')
12962     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12963 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
12964 do
12965   IFS=$as_save_IFS
12966   test -z "$as_dir" && as_dir=.
12967   for as_base in sh bash ksh sh5; do
12968          case $as_dir in
12969          /*)
12970            if ("$as_dir/$as_base" -c '
12971   as_lineno_1=$LINENO
12972   as_lineno_2=$LINENO
12973   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
12974   test "x$as_lineno_1" != "x$as_lineno_2" &&
12975   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
12976              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
12977              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
12978              CONFIG_SHELL=$as_dir/$as_base
12979              export CONFIG_SHELL
12980              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
12981            fi;;
12982          esac
12983        done
12984 done
12985 ;;
12986   esac
12987
12988   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
12989   # uniformly replaced by the line number.  The first 'sed' inserts a
12990   # line-number line before each line; the second 'sed' does the real
12991   # work.  The second script uses 'N' to pair each line-number line
12992   # with the numbered line, and appends trailing '-' during
12993   # substitution so that $LINENO is not a special case at line end.
12994   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
12995   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
12996   sed '=' <$as_myself |
12997     sed '
12998       N
12999       s,$,-,
13000       : loop
13001       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
13002       t loop
13003       s,-$,,
13004       s,^['$as_cr_digits']*\n,,
13005     ' >$as_me.lineno &&
13006   chmod +x $as_me.lineno ||
13007     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
13008 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
13009    { (exit 1); exit 1; }; }
13010
13011   # Don't try to exec as it changes $[0], causing all sort of problems
13012   # (the dirname of $[0] is not the place where we might find the
13013   # original and so on.  Autoconf is especially sensible to this).
13014   . ./$as_me.lineno
13015   # Exit status is that of the last command.
13016   exit
13017 }
13018
13019
13020 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
13021   *c*,-n*) ECHO_N= ECHO_C='
13022 ' ECHO_T='      ' ;;
13023   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
13024   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
13025 esac
13026
13027 if expr a : '\(a\)' >/dev/null 2>&1; then
13028   as_expr=expr
13029 else
13030   as_expr=false
13031 fi
13032
13033 rm -f conf$$ conf$$.exe conf$$.file
13034 echo >conf$$.file
13035 if ln -s conf$$.file conf$$ 2>/dev/null; then
13036   # We could just check for DJGPP; but this test a) works b) is more generic
13037   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
13038   if test -f conf$$.exe; then
13039     # Don't use ln at all; we don't have any links
13040     as_ln_s='cp -p'
13041   else
13042     as_ln_s='ln -s'
13043   fi
13044 elif ln conf$$.file conf$$ 2>/dev/null; then
13045   as_ln_s=ln
13046 else
13047   as_ln_s='cp -p'
13048 fi
13049 rm -f conf$$ conf$$.exe conf$$.file
13050
13051 if mkdir -p . 2>/dev/null; then
13052   as_mkdir_p=:
13053 else
13054   as_mkdir_p=false
13055 fi
13056
13057 as_executable_p="test -f"
13058
13059 # Sed expression to map a string onto a valid CPP name.
13060 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
13061
13062 # Sed expression to map a string onto a valid variable name.
13063 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
13064
13065
13066 # IFS
13067 # We need space, tab and new line, in precisely that order.
13068 as_nl='
13069 '
13070 IFS="   $as_nl"
13071
13072 # CDPATH.
13073 $as_unset CDPATH
13074
13075 exec 6>&1
13076
13077 # Open the log real soon, to keep \$[0] and so on meaningful, and to
13078 # report actual input values of CONFIG_FILES etc. instead of their
13079 # values after options handling.  Logging --version etc. is OK.
13080 exec 5>>config.log
13081 {
13082   echo
13083   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13084 ## Running $as_me. ##
13085 _ASBOX
13086 } >&5
13087 cat >&5 <<_CSEOF
13088
13089 This file was extended by $as_me, which was
13090 generated by GNU Autoconf 2.57.  Invocation command line was
13091
13092   CONFIG_FILES    = $CONFIG_FILES
13093   CONFIG_HEADERS  = $CONFIG_HEADERS
13094   CONFIG_LINKS    = $CONFIG_LINKS
13095   CONFIG_COMMANDS = $CONFIG_COMMANDS
13096   $ $0 $@
13097
13098 _CSEOF
13099 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
13100 echo >&5
13101 _ACEOF
13102
13103 # Files that config.status was made for.
13104 if test -n "$ac_config_files"; then
13105   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
13106 fi
13107
13108 if test -n "$ac_config_headers"; then
13109   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
13110 fi
13111
13112 if test -n "$ac_config_links"; then
13113   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
13114 fi
13115
13116 if test -n "$ac_config_commands"; then
13117   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
13118 fi
13119
13120 cat >>$CONFIG_STATUS <<\_ACEOF
13121
13122 ac_cs_usage="\
13123 \`$as_me' instantiates files from templates according to the
13124 current configuration.
13125
13126 Usage: $0 [OPTIONS] [FILE]...
13127
13128   -h, --help       print this help, then exit
13129   -V, --version    print version number, then exit
13130   -q, --quiet      do not print progress messages
13131   -d, --debug      don't remove temporary files
13132       --recheck    update $as_me by reconfiguring in the same conditions
13133   --file=FILE[:TEMPLATE]
13134                    instantiate the configuration file FILE
13135   --header=FILE[:TEMPLATE]
13136                    instantiate the configuration header FILE
13137
13138 Configuration files:
13139 $config_files
13140
13141 Configuration headers:
13142 $config_headers
13143
13144 Report bugs to <bug-autoconf@gnu.org>."
13145 _ACEOF
13146
13147 cat >>$CONFIG_STATUS <<_ACEOF
13148 ac_cs_version="\\
13149 config.status
13150 configured by $0, generated by GNU Autoconf 2.57,
13151   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
13152
13153 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
13154 Free Software Foundation, Inc.
13155 This config.status script is free software; the Free Software Foundation
13156 gives unlimited permission to copy, distribute and modify it."
13157 srcdir=$srcdir
13158 INSTALL="$INSTALL"
13159 _ACEOF
13160
13161 cat >>$CONFIG_STATUS <<\_ACEOF
13162 # If no file are specified by the user, then we need to provide default
13163 # value.  By we need to know if files were specified by the user.
13164 ac_need_defaults=:
13165 while test $# != 0
13166 do
13167   case $1 in
13168   --*=*)
13169     ac_option=`expr "x$1" : 'x\([^=]*\)='`
13170     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
13171     ac_shift=:
13172     ;;
13173   -*)
13174     ac_option=$1
13175     ac_optarg=$2
13176     ac_shift=shift
13177     ;;
13178   *) # This is not an option, so the user has probably given explicit
13179      # arguments.
13180      ac_option=$1
13181      ac_need_defaults=false;;
13182   esac
13183
13184   case $ac_option in
13185   # Handling of the options.
13186 _ACEOF
13187 cat >>$CONFIG_STATUS <<\_ACEOF
13188   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13189     ac_cs_recheck=: ;;
13190   --version | --vers* | -V )
13191     echo "$ac_cs_version"; exit 0 ;;
13192   --he | --h)
13193     # Conflict between --help and --header
13194     { { echo "$as_me:$LINENO: error: ambiguous option: $1
13195 Try \`$0 --help' for more information." >&5
13196 echo "$as_me: error: ambiguous option: $1
13197 Try \`$0 --help' for more information." >&2;}
13198    { (exit 1); exit 1; }; };;
13199   --help | --hel | -h )
13200     echo "$ac_cs_usage"; exit 0 ;;
13201   --debug | --d* | -d )
13202     debug=: ;;
13203   --file | --fil | --fi | --f )
13204     $ac_shift
13205     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
13206     ac_need_defaults=false;;
13207   --header | --heade | --head | --hea )
13208     $ac_shift
13209     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
13210     ac_need_defaults=false;;
13211   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13212   | -silent | --silent | --silen | --sile | --sil | --si | --s)
13213     ac_cs_silent=: ;;
13214
13215   # This is an error.
13216   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
13217 Try \`$0 --help' for more information." >&5
13218 echo "$as_me: error: unrecognized option: $1
13219 Try \`$0 --help' for more information." >&2;}
13220    { (exit 1); exit 1; }; } ;;
13221
13222   *) ac_config_targets="$ac_config_targets $1" ;;
13223
13224   esac
13225   shift
13226 done
13227
13228 ac_configure_extra_args=
13229
13230 if $ac_cs_silent; then
13231   exec 6>/dev/null
13232   ac_configure_extra_args="$ac_configure_extra_args --silent"
13233 fi
13234
13235 _ACEOF
13236 cat >>$CONFIG_STATUS <<_ACEOF
13237 if \$ac_cs_recheck; then
13238   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
13239   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13240 fi
13241
13242 _ACEOF
13243
13244
13245
13246
13247
13248 cat >>$CONFIG_STATUS <<\_ACEOF
13249 for ac_config_target in $ac_config_targets
13250 do
13251   case "$ac_config_target" in
13252   # Handling of arguments.
13253   "main.mk" ) CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
13254   "packages.mk" ) CONFIG_FILES="$CONFIG_FILES packages.mk:packages_in.mk" ;;
13255   "sim.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES sim.src/Makefile" ;;
13256   "cmd.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES cmd.src/Makefile" ;;
13257   "s51.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES s51.src/Makefile" ;;
13258   "avr.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES avr.src/Makefile" ;;
13259   "z80.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES z80.src/Makefile" ;;
13260   "hc08.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hc08.src/Makefile" ;;
13261   "xa.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES xa.src/Makefile" ;;
13262   "gui.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/Makefile" ;;
13263   "gui.src/serio.src/Makefile" ) CONFIG_FILES="$CONFIG_FILES gui.src/serio.src/Makefile" ;;
13264   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
13265   "ddconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ddconfig.h:ddconfig_in.h" ;;
13266   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
13267 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
13268    { (exit 1); exit 1; }; };;
13269   esac
13270 done
13271
13272 # If the user did not use the arguments to specify the items to instantiate,
13273 # then the envvar interface is used.  Set only those that are not.
13274 # We use the long form for the default assignment because of an extremely
13275 # bizarre bug on SunOS 4.1.3.
13276 if $ac_need_defaults; then
13277   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13278   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
13279 fi
13280
13281 # Have a temporary directory for convenience.  Make it in the build tree
13282 # simply because there is no reason to put it here, and in addition,
13283 # creating and moving files from /tmp can sometimes cause problems.
13284 # Create a temporary directory, and hook for its removal unless debugging.
13285 $debug ||
13286 {
13287   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
13288   trap '{ (exit 1); exit 1; }' 1 2 13 15
13289 }
13290
13291 # Create a (secure) tmp directory for tmp files.
13292
13293 {
13294   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
13295   test -n "$tmp" && test -d "$tmp"
13296 }  ||
13297 {
13298   tmp=./confstat$$-$RANDOM
13299   (umask 077 && mkdir $tmp)
13300 } ||
13301 {
13302    echo "$me: cannot create a temporary directory in ." >&2
13303    { (exit 1); exit 1; }
13304 }
13305
13306 _ACEOF
13307
13308 cat >>$CONFIG_STATUS <<_ACEOF
13309
13310 #
13311 # CONFIG_FILES section.
13312 #
13313
13314 # No need to generate the scripts if there are no CONFIG_FILES.
13315 # This happens for instance when ./config.status config.h
13316 if test -n "\$CONFIG_FILES"; then
13317   # Protect against being on the right side of a sed subst in config.status.
13318   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
13319    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
13320 s,@SHELL@,$SHELL,;t t
13321 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
13322 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
13323 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
13324 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
13325 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
13326 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
13327 s,@exec_prefix@,$exec_prefix,;t t
13328 s,@prefix@,$prefix,;t t
13329 s,@program_transform_name@,$program_transform_name,;t t
13330 s,@bindir@,$bindir,;t t
13331 s,@sbindir@,$sbindir,;t t
13332 s,@libexecdir@,$libexecdir,;t t
13333 s,@datadir@,$datadir,;t t
13334 s,@sysconfdir@,$sysconfdir,;t t
13335 s,@sharedstatedir@,$sharedstatedir,;t t
13336 s,@localstatedir@,$localstatedir,;t t
13337 s,@libdir@,$libdir,;t t
13338 s,@includedir@,$includedir,;t t
13339 s,@oldincludedir@,$oldincludedir,;t t
13340 s,@infodir@,$infodir,;t t
13341 s,@mandir@,$mandir,;t t
13342 s,@build_alias@,$build_alias,;t t
13343 s,@host_alias@,$host_alias,;t t
13344 s,@target_alias@,$target_alias,;t t
13345 s,@DEFS@,$DEFS,;t t
13346 s,@ECHO_C@,$ECHO_C,;t t
13347 s,@ECHO_N@,$ECHO_N,;t t
13348 s,@ECHO_T@,$ECHO_T,;t t
13349 s,@LIBS@,$LIBS,;t t
13350 s,@AWK@,$AWK,;t t
13351 s,@VERSION@,$VERSION,;t t
13352 s,@VERSIONHI@,$VERSIONHI,;t t
13353 s,@VERSIONLO@,$VERSIONLO,;t t
13354 s,@VERSIONP@,$VERSIONP,;t t
13355 s,@enable_ucsim@,$enable_ucsim,;t t
13356 s,@enable_dlso@,$enable_dlso,;t t
13357 s,@enable_51@,$enable_51,;t t
13358 s,@enable_avr@,$enable_avr,;t t
13359 s,@enable_z80@,$enable_z80,;t t
13360 s,@enable_hc08@,$enable_hc08,;t t
13361 s,@enable_xa@,$enable_xa,;t t
13362 s,@enable_serio@,$enable_serio,;t t
13363 s,@CXX@,$CXX,;t t
13364 s,@CXXFLAGS@,$CXXFLAGS,;t t
13365 s,@LDFLAGS@,$LDFLAGS,;t t
13366 s,@CPPFLAGS@,$CPPFLAGS,;t t
13367 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
13368 s,@EXEEXT@,$EXEEXT,;t t
13369 s,@OBJEXT@,$OBJEXT,;t t
13370 s,@CXXCPP@,$CXXCPP,;t t
13371 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
13372 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
13373 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
13374 s,@RANLIB@,$RANLIB,;t t
13375 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
13376 s,@STRIP@,$STRIP,;t t
13377 s,@build@,$build,;t t
13378 s,@build_cpu@,$build_cpu,;t t
13379 s,@build_vendor@,$build_vendor,;t t
13380 s,@build_os@,$build_os,;t t
13381 s,@host@,$host,;t t
13382 s,@host_cpu@,$host_cpu,;t t
13383 s,@host_vendor@,$host_vendor,;t t
13384 s,@host_os@,$host_os,;t t
13385 s,@CC@,$CC,;t t
13386 s,@CFLAGS@,$CFLAGS,;t t
13387 s,@ac_ct_CC@,$ac_ct_CC,;t t
13388 s,@LN_S@,$LN_S,;t t
13389 s,@ECHO@,$ECHO,;t t
13390 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
13391 s,@CPP@,$CPP,;t t
13392 s,@EGREP@,$EGREP,;t t
13393 s,@LIBTOOL@,$LIBTOOL,;t t
13394 s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t
13395 s,@dl_ok@,$dl_ok,;t t
13396 s,@DL@,$DL,;t t
13397 s,@panel_ok@,$panel_ok,;t t
13398 s,@curses_ok@,$curses_ok,;t t
13399 s,@CURSES_LIBS@,$CURSES_LIBS,;t t
13400 s,@M_OR_MM@,$M_OR_MM,;t t
13401 s,@SHAREDLIB@,$SHAREDLIB,;t t
13402 s,@PICOPT@,$PICOPT,;t t
13403 s,@dlso_ok@,$dlso_ok,;t t
13404 s,@LIBOBJS@,$LIBOBJS,;t t
13405 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
13406 CEOF
13407
13408 _ACEOF
13409
13410   cat >>$CONFIG_STATUS <<\_ACEOF
13411   # Split the substitutions into bite-sized pieces for seds with
13412   # small command number limits, like on Digital OSF/1 and HP-UX.
13413   ac_max_sed_lines=48
13414   ac_sed_frag=1 # Number of current file.
13415   ac_beg=1 # First line for current file.
13416   ac_end=$ac_max_sed_lines # Line after last line for current file.
13417   ac_more_lines=:
13418   ac_sed_cmds=
13419   while $ac_more_lines; do
13420     if test $ac_beg -gt 1; then
13421       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13422     else
13423       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
13424     fi
13425     if test ! -s $tmp/subs.frag; then
13426       ac_more_lines=false
13427     else
13428       # The purpose of the label and of the branching condition is to
13429       # speed up the sed processing (if there are no `@' at all, there
13430       # is no need to browse any of the substitutions).
13431       # These are the two extra sed commands mentioned above.
13432       (echo ':t
13433   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
13434       if test -z "$ac_sed_cmds"; then
13435         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
13436       else
13437         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
13438       fi
13439       ac_sed_frag=`expr $ac_sed_frag + 1`
13440       ac_beg=$ac_end
13441       ac_end=`expr $ac_end + $ac_max_sed_lines`
13442     fi
13443   done
13444   if test -z "$ac_sed_cmds"; then
13445     ac_sed_cmds=cat
13446   fi
13447 fi # test -n "$CONFIG_FILES"
13448
13449 _ACEOF
13450 cat >>$CONFIG_STATUS <<\_ACEOF
13451 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
13452   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13453   case $ac_file in
13454   - | *:- | *:-:* ) # input from stdin
13455         cat >$tmp/stdin
13456         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13457         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13458   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13459         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13460   * )   ac_file_in=$ac_file.in ;;
13461   esac
13462
13463   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
13464   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13465 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13466          X"$ac_file" : 'X\(//\)[^/]' \| \
13467          X"$ac_file" : 'X\(//\)$' \| \
13468          X"$ac_file" : 'X\(/\)' \| \
13469          .     : '\(.\)' 2>/dev/null ||
13470 echo X"$ac_file" |
13471     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13472           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13473           /^X\(\/\/\)$/{ s//\1/; q; }
13474           /^X\(\/\).*/{ s//\1/; q; }
13475           s/.*/./; q'`
13476   { if $as_mkdir_p; then
13477     mkdir -p "$ac_dir"
13478   else
13479     as_dir="$ac_dir"
13480     as_dirs=
13481     while test ! -d "$as_dir"; do
13482       as_dirs="$as_dir $as_dirs"
13483       as_dir=`(dirname "$as_dir") 2>/dev/null ||
13484 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13485          X"$as_dir" : 'X\(//\)[^/]' \| \
13486          X"$as_dir" : 'X\(//\)$' \| \
13487          X"$as_dir" : 'X\(/\)' \| \
13488          .     : '\(.\)' 2>/dev/null ||
13489 echo X"$as_dir" |
13490     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13491           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13492           /^X\(\/\/\)$/{ s//\1/; q; }
13493           /^X\(\/\).*/{ s//\1/; q; }
13494           s/.*/./; q'`
13495     done
13496     test ! -n "$as_dirs" || mkdir $as_dirs
13497   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13498 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13499    { (exit 1); exit 1; }; }; }
13500
13501   ac_builddir=.
13502
13503 if test "$ac_dir" != .; then
13504   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13505   # A "../" for each directory in $ac_dir_suffix.
13506   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
13507 else
13508   ac_dir_suffix= ac_top_builddir=
13509 fi
13510
13511 case $srcdir in
13512   .)  # No --srcdir option.  We are building in place.
13513     ac_srcdir=.
13514     if test -z "$ac_top_builddir"; then
13515        ac_top_srcdir=.
13516     else
13517        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
13518     fi ;;
13519   [\\/]* | ?:[\\/]* )  # Absolute path.
13520     ac_srcdir=$srcdir$ac_dir_suffix;
13521     ac_top_srcdir=$srcdir ;;
13522   *) # Relative path.
13523     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
13524     ac_top_srcdir=$ac_top_builddir$srcdir ;;
13525 esac
13526 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
13527 # absolute.
13528 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
13529 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
13530 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
13531 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
13532
13533
13534   case $INSTALL in
13535   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13536   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
13537   esac
13538
13539   if test x"$ac_file" != x-; then
13540     { echo "$as_me:$LINENO: creating $ac_file" >&5
13541 echo "$as_me: creating $ac_file" >&6;}
13542     rm -f "$ac_file"
13543   fi
13544   # Let's still pretend it is `configure' which instantiates (i.e., don't
13545   # use $as_me), people would be surprised to read:
13546   #    /* config.h.  Generated by config.status.  */
13547   if test x"$ac_file" = x-; then
13548     configure_input=
13549   else
13550     configure_input="$ac_file.  "
13551   fi
13552   configure_input=$configure_input"Generated from `echo $ac_file_in |
13553                                      sed 's,.*/,,'` by configure."
13554
13555   # First look for the input files in the build tree, otherwise in the
13556   # src tree.
13557   ac_file_inputs=`IFS=:
13558     for f in $ac_file_in; do
13559       case $f in
13560       -) echo $tmp/stdin ;;
13561       [\\/$]*)
13562          # Absolute (can't be DOS-style, as IFS=:)
13563          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13564 echo "$as_me: error: cannot find input file: $f" >&2;}
13565    { (exit 1); exit 1; }; }
13566          echo $f;;
13567       *) # Relative
13568          if test -f "$f"; then
13569            # Build tree
13570            echo $f
13571          elif test -f "$srcdir/$f"; then
13572            # Source tree
13573            echo $srcdir/$f
13574          else
13575            # /dev/null tree
13576            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13577 echo "$as_me: error: cannot find input file: $f" >&2;}
13578    { (exit 1); exit 1; }; }
13579          fi;;
13580       esac
13581     done` || { (exit 1); exit 1; }
13582 _ACEOF
13583 cat >>$CONFIG_STATUS <<_ACEOF
13584   sed "$ac_vpsub
13585 $extrasub
13586 _ACEOF
13587 cat >>$CONFIG_STATUS <<\_ACEOF
13588 :t
13589 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13590 s,@configure_input@,$configure_input,;t t
13591 s,@srcdir@,$ac_srcdir,;t t
13592 s,@abs_srcdir@,$ac_abs_srcdir,;t t
13593 s,@top_srcdir@,$ac_top_srcdir,;t t
13594 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
13595 s,@builddir@,$ac_builddir,;t t
13596 s,@abs_builddir@,$ac_abs_builddir,;t t
13597 s,@top_builddir@,$ac_top_builddir,;t t
13598 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
13599 s,@INSTALL@,$ac_INSTALL,;t t
13600 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13601   rm -f $tmp/stdin
13602   if test x"$ac_file" != x-; then
13603     mv $tmp/out $ac_file
13604   else
13605     cat $tmp/out
13606     rm -f $tmp/out
13607   fi
13608
13609 done
13610 _ACEOF
13611 cat >>$CONFIG_STATUS <<\_ACEOF
13612
13613 #
13614 # CONFIG_HEADER section.
13615 #
13616
13617 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13618 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13619 #
13620 # ac_d sets the value in "#define NAME VALUE" lines.
13621 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13622 ac_dB='[        ].*$,\1#\2'
13623 ac_dC=' '
13624 ac_dD=',;t'
13625 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13626 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13627 ac_uB='$,\1#\2define\3'
13628 ac_uC=' '
13629 ac_uD=',;t'
13630
13631 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13632   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13633   case $ac_file in
13634   - | *:- | *:-:* ) # input from stdin
13635         cat >$tmp/stdin
13636         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13637         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13638   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13639         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13640   * )   ac_file_in=$ac_file.in ;;
13641   esac
13642
13643   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
13644 echo "$as_me: creating $ac_file" >&6;}
13645
13646   # First look for the input files in the build tree, otherwise in the
13647   # src tree.
13648   ac_file_inputs=`IFS=:
13649     for f in $ac_file_in; do
13650       case $f in
13651       -) echo $tmp/stdin ;;
13652       [\\/$]*)
13653          # Absolute (can't be DOS-style, as IFS=:)
13654          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13655 echo "$as_me: error: cannot find input file: $f" >&2;}
13656    { (exit 1); exit 1; }; }
13657          echo $f;;
13658       *) # Relative
13659          if test -f "$f"; then
13660            # Build tree
13661            echo $f
13662          elif test -f "$srcdir/$f"; then
13663            # Source tree
13664            echo $srcdir/$f
13665          else
13666            # /dev/null tree
13667            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
13668 echo "$as_me: error: cannot find input file: $f" >&2;}
13669    { (exit 1); exit 1; }; }
13670          fi;;
13671       esac
13672     done` || { (exit 1); exit 1; }
13673   # Remove the trailing spaces.
13674   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13675
13676 _ACEOF
13677
13678 # Transform confdefs.h into two sed scripts, `conftest.defines' and
13679 # `conftest.undefs', that substitutes the proper values into
13680 # config.h.in to produce config.h.  The first handles `#define'
13681 # templates, and the second `#undef' templates.
13682 # And first: Protect against being on the right side of a sed subst in
13683 # config.status.  Protect against being in an unquoted here document
13684 # in config.status.
13685 rm -f conftest.defines conftest.undefs
13686 # Using a here document instead of a string reduces the quoting nightmare.
13687 # Putting comments in sed scripts is not portable.
13688 #
13689 # `end' is used to avoid that the second main sed command (meant for
13690 # 0-ary CPP macros) applies to n-ary macro definitions.
13691 # See the Autoconf documentation for `clear'.
13692 cat >confdef2sed.sed <<\_ACEOF
13693 s/[\\&,]/\\&/g
13694 s,[\\$`],\\&,g
13695 t clear
13696 : clear
13697 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
13698 t end
13699 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
13700 : end
13701 _ACEOF
13702 # If some macros were called several times there might be several times
13703 # the same #defines, which is useless.  Nevertheless, we may not want to
13704 # sort them, since we want the *last* AC-DEFINE to be honored.
13705 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13706 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13707 rm -f confdef2sed.sed
13708
13709 # This sed command replaces #undef with comments.  This is necessary, for
13710 # example, in the case of _POSIX_SOURCE, which is predefined and required
13711 # on some systems where configure will not decide to define it.
13712 cat >>conftest.undefs <<\_ACEOF
13713 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
13714 _ACEOF
13715
13716 # Break up conftest.defines because some shells have a limit on the size
13717 # of here documents, and old seds have small limits too (100 cmds).
13718 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
13719 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
13720 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13721 echo '  :' >>$CONFIG_STATUS
13722 rm -f conftest.tail
13723 while grep . conftest.defines >/dev/null
13724 do
13725   # Write a limited-size here document to $tmp/defines.sed.
13726   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13727   # Speed up: don't consider the non `#define' lines.
13728   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
13729   # Work around the forget-to-reset-the-flag bug.
13730   echo 't clr' >>$CONFIG_STATUS
13731   echo ': clr' >>$CONFIG_STATUS
13732   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13733   echo 'CEOF
13734   sed -f $tmp/defines.sed $tmp/in >$tmp/out
13735   rm -f $tmp/in
13736   mv $tmp/out $tmp/in
13737 ' >>$CONFIG_STATUS
13738   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13739   rm -f conftest.defines
13740   mv conftest.tail conftest.defines
13741 done
13742 rm -f conftest.defines
13743 echo '  fi # grep' >>$CONFIG_STATUS
13744 echo >>$CONFIG_STATUS
13745
13746 # Break up conftest.undefs because some shells have a limit on the size
13747 # of here documents, and old seds have small limits too (100 cmds).
13748 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
13749 rm -f conftest.tail
13750 while grep . conftest.undefs >/dev/null
13751 do
13752   # Write a limited-size here document to $tmp/undefs.sed.
13753   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13754   # Speed up: don't consider the non `#undef'
13755   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
13756   # Work around the forget-to-reset-the-flag bug.
13757   echo 't clr' >>$CONFIG_STATUS
13758   echo ': clr' >>$CONFIG_STATUS
13759   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
13760   echo 'CEOF
13761   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13762   rm -f $tmp/in
13763   mv $tmp/out $tmp/in
13764 ' >>$CONFIG_STATUS
13765   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13766   rm -f conftest.undefs
13767   mv conftest.tail conftest.undefs
13768 done
13769 rm -f conftest.undefs
13770
13771 cat >>$CONFIG_STATUS <<\_ACEOF
13772   # Let's still pretend it is `configure' which instantiates (i.e., don't
13773   # use $as_me), people would be surprised to read:
13774   #    /* config.h.  Generated by config.status.  */
13775   if test x"$ac_file" = x-; then
13776     echo "/* Generated by configure.  */" >$tmp/config.h
13777   else
13778     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
13779   fi
13780   cat $tmp/in >>$tmp/config.h
13781   rm -f $tmp/in
13782   if test x"$ac_file" != x-; then
13783     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
13784       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
13785 echo "$as_me: $ac_file is unchanged" >&6;}
13786     else
13787       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
13788 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13789          X"$ac_file" : 'X\(//\)[^/]' \| \
13790          X"$ac_file" : 'X\(//\)$' \| \
13791          X"$ac_file" : 'X\(/\)' \| \
13792          .     : '\(.\)' 2>/dev/null ||
13793 echo X"$ac_file" |
13794     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13795           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13796           /^X\(\/\/\)$/{ s//\1/; q; }
13797           /^X\(\/\).*/{ s//\1/; q; }
13798           s/.*/./; q'`
13799       { if $as_mkdir_p; then
13800     mkdir -p "$ac_dir"
13801   else
13802     as_dir="$ac_dir"
13803     as_dirs=
13804     while test ! -d "$as_dir"; do
13805       as_dirs="$as_dir $as_dirs"
13806       as_dir=`(dirname "$as_dir") 2>/dev/null ||
13807 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13808          X"$as_dir" : 'X\(//\)[^/]' \| \
13809          X"$as_dir" : 'X\(//\)$' \| \
13810          X"$as_dir" : 'X\(/\)' \| \
13811          .     : '\(.\)' 2>/dev/null ||
13812 echo X"$as_dir" |
13813     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13814           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13815           /^X\(\/\/\)$/{ s//\1/; q; }
13816           /^X\(\/\).*/{ s//\1/; q; }
13817           s/.*/./; q'`
13818     done
13819     test ! -n "$as_dirs" || mkdir $as_dirs
13820   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
13821 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
13822    { (exit 1); exit 1; }; }; }
13823
13824       rm -f $ac_file
13825       mv $tmp/config.h $ac_file
13826     fi
13827   else
13828     cat $tmp/config.h
13829     rm -f $tmp/config.h
13830   fi
13831 done
13832 _ACEOF
13833
13834 cat >>$CONFIG_STATUS <<\_ACEOF
13835
13836 { (exit 0); exit 0; }
13837 _ACEOF
13838 chmod +x $CONFIG_STATUS
13839 ac_clean_files=$ac_clean_files_save
13840
13841
13842 # configure is writing to config.log, and then calls config.status.
13843 # config.status does its own redirection, appending to config.log.
13844 # Unfortunately, on DOS this fails, as config.log is still kept open
13845 # by configure, so config.status won't be able to write to it; its
13846 # output is simply discarded.  So we exec the FD to /dev/null,
13847 # effectively closing config.log, so it can be properly (re)opened and
13848 # appended to by config.status.  When coming back to configure, we
13849 # need to make the FD available again.
13850 if test "$no_create" != yes; then
13851   ac_cs_success=:
13852   ac_config_status_args=
13853   test "$silent" = yes &&
13854     ac_config_status_args="$ac_config_status_args --quiet"
13855   exec 5>/dev/null
13856   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13857   exec 5>>config.log
13858   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13859   # would make configure fail if this is the last instruction.
13860   $ac_cs_success || { (exit 1); exit 1; }
13861 fi
13862
13863
13864 #gui.src/portmon.src/Makefile
13865
13866
13867 # End of configure/configure.in